Upgrade the factory Wasm itself.
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>
fn get_user(
env: soroban_sdk::Env,
wallet: soroban_sdk::Address,
) -> Option
Register a user and deploy their wallet. Operator or admin.
user_id should be a stable off-chain id (e.g. hash of phone E.164).
Returns the wallet contract address (unique deposit address).
fn register(
env: soroban_sdk::Env,
user_id: soroban_sdk::Bytes,
) -> Result
fn get_admin(env: soroban_sdk::Env) -> Result
fn is_wallet(env: soroban_sdk::Env, wallet: soroban_sdk::Address) -> bool
fn set_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), FactoryError>
fn get_wallet(
env: soroban_sdk::Env,
user_id: soroban_sdk::Bytes,
) -> Option
One-time setup. naira_vault may equal admin as a placeholder until configured.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
operator: soroban_sdk::Address,
withdrawal_authority: soroban_sdk::Address,
naira_vault: soroban_sdk::Address,
daily_cap: i128,
) -> Result<(), FactoryError>
fn get_operator(env: soroban_sdk::Env) -> Result
fn set_operator(
env: soroban_sdk::Env,
new_operator: soroban_sdk::Address,
) -> Result<(), FactoryError>
fn get_daily_cap(env: soroban_sdk::Env) -> i128
fn set_daily_cap(env: soroban_sdk::Env, daily_cap: i128) -> Result<(), FactoryError>
Deterministic wallet address for a user_id (before or after deploy).
fn predict_wallet(
env: soroban_sdk::Env,
user_id: soroban_sdk::Bytes,
) -> soroban_sdk::Address
Upgrade an already-deployed user wallet to a new Wasm hash.
fn upgrade_wallet(
env: soroban_sdk::Env,
wallet: soroban_sdk::Address,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>
fn get_naira_vault(env: soroban_sdk::Env) -> Result
fn get_wallet_wasm(env: soroban_sdk::Env) -> Option>
fn set_naira_vault(
env: soroban_sdk::Env,
vault: soroban_sdk::Address,
) -> Result<(), FactoryError>
Set / rotate the Wasm hash used for new wallet deploys. Admin only. Upload Wasm on-chain first, then pass its hash here.
fn set_wallet_wasm(
env: soroban_sdk::Env,
wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>
Link a Stellar owner key on a wallet ( Freighter ). Operator.
fn link_wallet_owner(
env: soroban_sdk::Env,
wallet: soroban_sdk::Address,
owner: soroban_sdk::Address,
) -> Result<(), FactoryError>
Push a new operator onto an existing wallet.
fn push_wallet_operator(
env: soroban_sdk::Env,
wallet: soroban_sdk::Address,
operator: soroban_sdk::Address,
) -> Result<(), FactoryError>
Push Naira vault config onto an existing wallet.
fn push_wallet_naira_vault(
env: soroban_sdk::Env,
wallet: soroban_sdk::Address,
vault: soroban_sdk::Address,
) -> Result<(), FactoryError>
fn set_withdrawal_authority(
env: soroban_sdk::Env,
authority: soroban_sdk::Address,
) -> Result<(), FactoryError>