Contract 96c3b90dc2c8a9addb183eaf49c6c8e2d5e4be89458c6814b44c3f6181d879e9

← Back to Index 📥 Download WASM

Meta

rssdkver 23.2.1#ab415a33cc1f6bdce20ac4a12f0ddbe41a648949
rsver 1.91.1

Instances

  • CAGGBVYAXUETNLVLNEBLOD7GBM2IHOOQTQXOVWSZFJDKXFHQSPCXVK6J
  • CAIFKK2AKTEOBJIOPGERXK53D6AUZYJGRMLREOBXR556LPU5J7ZLBMT4
  • CAWUAEHEBGAMW6KM52Q4G6Z54GLU7PRL5ZGJAPPOQRKNVMRK4ONCSL4J
  • CAX6ND2PQPXO3X7XQ7IVBBKUMW4BH5J2Z6PMFUOLPQMAHFD7CEHHDU6L
  • CBPWSOJQKPNCYNL2H5XQL5JT5FO6355CC622QGOJJSBO5MXMRA5M3HFF
  • CCGZ5FI6JD3XQ3GF74WKWDTEKGY54O7HJAKZUHT4ZVTMQMWD5DEFAXRH
  • CCOHAMTRUGLTEIWKGLOEHZWYAKD726BPIWEP2CHB5O4VGQEQDIXC7DBS
  • CCPUIEXIR2CVCJGV5OIFZOE7HNUK4ZDJ7JQSNNNNXPFCEKCNV2QNNT6K
  • CD5FQWJOLQ6GIOBYS2OFBD7I4HM7WU54ZNHDG55BRC5FIRUBHNXFCMML
  • CD6IE4KRTQHEIZNNRXZXUGB247N5RMYVZL2FLRZVGJUE7VXVVPWEEOHZ
  • CD7QF663AJ32K2GKM4QQBRO7ZOHTFEUEIZOQWOGH3SZCOBFTTQWYQATX
  • CDQAN5S4YRIM2GW5SUDJH6HMJSQR56A7KA2YJ4B6XKAGZTEEGUMDI6UI
  • CDW2ORZ6JQJMCUUIUAYJPKTEWSCYXZCSVKYUB4N2ON5FTUMKTXGI7HHW

Interface

Read current nonce (monotonic).

fn get_nonce(env: soroban_sdk::Env) -> u64

Read the stored passkey pubkey (for debugging/verification).

fn get_passkey(env: soroban_sdk::Env) -> soroban_sdk::BytesN<65>

Constructor: Automatically called during deployment Initializes the contract with the passkey secp256r1 public key (65-byte uncompressed) and the USDC token contract address.

fn __constructor(
    env: soroban_sdk::Env,
    passkey_pubkey: soroban_sdk::BytesN<65>,
    usdc_token: soroban_sdk::Address,
)

Transfer USDC from this contract to a recipient address. Only the registered passkey can authorize.

auth_data and client_data_json come from the WebAuthn assertion. The signature is over SHA256(auth_data || SHA256(client_data_json)). The challenge inside client_data_json must equal SHA256("transfer_usdc" | amount | nonce).

fn transfer_usdc(
    env: soroban_sdk::Env,
    recipient: soroban_sdk::Address,
    amount: i128,
    signature: soroban_sdk::BytesN<64>,
    auth_data: soroban_sdk::Bytes,
    client_data_json: soroban_sdk::Bytes,
)

Read the stored USDC token contract address.

fn get_usdc_token(env: soroban_sdk::Env) -> soroban_sdk::Address

Imports

WebAssembly Text (WAT) ▶