Contract 98e405f8991eac0a7330514053028a4f6b310a55e4996874282bfec7422f1c0d

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.6#60926a20d1f9f0a669d5fe551636f42a1302f0c0
rsver 1.97.1

Instances

  • CCCNRWMICVEMMUSBI7DL3IKB566QEOOQOLVDOAM5SLFDZ2KGUSRR3JVF

Interface

Deploy a new webauthn-account for public_key (65-byte SEC-1), salted deterministically by sha256(credential_id ‖ public_key), emit (deployed, credential_id, public_key) -> address for the indexer, and return the new smart-account C-address.

The event carries public_key as a topic so a resolver can bind a (credential_id, public_key) pair to its address. deploy is permissionless (gasless/relayer deploys), and credential_id alone is not exclusive: anyone may deploy a DIFFERENT account for the same credential id with their own key (it lands at a different salted address by the F1 binding). A consumer resolving a credential to an account MUST therefore verify the user's key is enrolled (via is_signer, or by re-deriving the address with deriveAccountAddress(credential_id, public_key)) and never blindly trust the first deployed event for a credential id.

fn deploy(
    env: soroban_sdk::Env,
    public_key: soroban_sdk::BytesN<65>,
    credential_id: soroban_sdk::Bytes,
) -> soroban_sdk::Address

The account wasm hash this factory deploys (for verification / indexing).

fn account_wasm(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>

Store the webauthn-account wasm hash this factory deploys instances of.

fn __constructor(env: soroban_sdk::Env, account_wasm_hash: soroban_sdk::BytesN<32>)

Imports

WebAssembly Text (WAT) ▶