Initialize the contract with the passkey secp256r1 public key (65-byte uncompressed).
fn init(env: soroban_sdk::Env, passkey_pubkey: soroban_sdk::BytesN<65>)
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>
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,
)