Immediately pauses the wallet.
Any authorized guardian may trigger a pause to protect the account.
fn pause(
env: soroban_sdk::Env,
guardian: soroban_sdk::Address,
) -> Result<(), WalletError>
Removes the paused state after wallet authentication and guardian approval.
fn unpause(env: soroban_sdk::Env) -> Result<(), WalletError>
fn upgrade(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)
Returns whether the wallet is currently paused.
fn is_paused(env: soroban_sdk::Env) -> bool
Returns the currently registered passkey.
fn get_passkey(env: soroban_sdk::Env) -> Option>
fn get_session(
env: soroban_sdk::Env,
policy_id: soroban_sdk::BytesN<32>,
) -> Option
Soroban authentication entrypoint.
Every contract invocation requiring wallet authorization passes through this method. It validates the execution context and verifies the passkey signature over the transaction payload.
fn __check_auth(
env: soroban_sdk::Env,
signature_payload: soroban_sdk::BytesN<32>,
signature: WalletAuth,
auth_contexts: soroban_sdk::Vec,
) -> Result<(), WalletError>
Adds a new guardian to the wallet.
fn add_guardian(
env: soroban_sdk::Env,
guardian: soroban_sdk::Address,
) -> Result<(), WalletError>
Initializes a newly deployed wallet.
Verifies the initial passkey and guardian configuration, aggregates the guardian BLS keys, and stores the wallet state.
fn __constructor(
env: soroban_sdk::Env,
challenge: soroban_sdk::BytesN<32>,
passkey: soroban_sdk::BytesN<65>,
passkey_sig: PasskeySignature,
rpid_hash: soroban_sdk::BytesN<32>,
bls_keys_pop: soroban_sdk::Vec,
guardians: soroban_sdk::Vec,
) -> Result<(), WalletError>
fn create_session(
env: soroban_sdk::Env,
input: SessionPolicyInput,
delegate_pop: soroban_sdk::BytesN<64>,
) -> Result, WalletError>
fn revoke_session(
env: soroban_sdk::Env,
policy_id: soroban_sdk::BytesN<32>,
) -> Result<(), WalletError>
Rotates the wallet's passkey.
Requires normal wallet authentication and proof of possession for the new passkey before replacing the stored credential.
fn rotate_passkey(
env: soroban_sdk::Env,
new_passkey: soroban_sdk::BytesN<65>,
new_passkey_pop_sig: PasskeySignature,
) -> Result<(), WalletError>
Guardian approval to resume wallet activity.
fn approve_unpause(
env: soroban_sdk::Env,
guardian: soroban_sdk::Address,
) -> Result<(), WalletError>
Recovers the wallet using the stored aggregate BLS recovery key.
Off chain verification of account ownership A new passkey is installed only after:
fn recover_account(
env: soroban_sdk::Env,
new_passkey: soroban_sdk::BytesN<65>,
new_passkey_pop_sig: PasskeySignature,
agg_bls_sig: soroban_sdk::BytesN<192>,
) -> Result<(), WalletError>
fn revoke_all_sessions(env: soroban_sdk::Env) -> Result
Completes a previously scheduled guardian removal.
fn finalize_guardian_removal(
env: soroban_sdk::Env,
guardian: soroban_sdk::Address,
) -> Result<(), WalletError>
Removal is delayed to provide a safety window.
fn schedule_guardian_removal(
env: soroban_sdk::Env,
guardian: soroban_sdk::Address,
) -> Result<(), WalletError>