Contract e63a030d0f1a1481e36059a4837c433083b33e704c1f9625b7314795b6d72b76

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdk_spec_shaking 2
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.91.1

Instances

  • CB7HENHJ7NF34I5FFXQK7D5I3WWQRGB5O5XO77D3NXMT7LM7LOKRQ5YR

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) ▶