Contract bc4b9c8f705d2c478a93e5019910a3a14f1a6ded8cf8aced89f2b1d0fe3cf4bd

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdk_spec_shaking 2
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.94.0

Instances

  • CD6NSMQCHXI2C5GDGMV6BHH6NVCMNCO73UHIRFQLAT7N6TFLRJTF3TU3

Interface

Verify a WebAuthn signature against a message and public key.

Arguments

  • signature_payload - The message hash that was signed
  • key_data - Bytes containing:
  • 65-byte secp256r1 public key (uncompressed format)
  • Variable length credential ID (used on the client side)
  • sig_data - XDR-encoded WebAuthnSigData structure containing:
  • Authenticator data
  • Client data JSON
  • Signature components

Returns

  • true if the signature is valid
  • false otherwise
fn verify(
    env: soroban_sdk::Env,
    signature_payload: soroban_sdk::Bytes,
    key_data: soroban_sdk::Bytes,
    sig_data: soroban_sdk::Bytes,
) -> bool

Returns the canonical byte representation of a WebAuthn public key.

The canonical identity is the 65-byte uncompressed secp256r1 public key, stripping the variable-length credential ID suffix which is not part of the cryptographic identity.

Arguments

  • key_data - Bytes containing the 65-byte public key followed by an optional credential ID.
fn canonicalize_key(
    env: soroban_sdk::Env,
    key_data: soroban_sdk::Bytes,
) -> soroban_sdk::Bytes

Canonicalizes a batch of WebAuthn keys.

Arguments

  • keys_data - A vector with bytes containing the 65-byte public key followed by an optional credential ID.
fn batch_canonicalize_key(
    env: soroban_sdk::Env,
    keys_data: soroban_sdk::Vec,
) -> soroban_sdk::Vec

Imports

WebAssembly Text (WAT) ▶