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