Contract constructor. Runs atomically as part of the deploy transaction,
so the admin is fixed the instant the factory exists — it cannot be
front-run. Only this admin may later call init.
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
One-time initialization. Stores the wallet Wasm hash.
Gated on the admin set at construction. Without this, init was
unauthenticated and — because the mainnet runbook deploys and initializes
in two separate transactions — anyone monitoring mainnet could win the
race, install their own wasm hash, and have every wallet subsequently
deployed through the factory run attacker-controlled code.
fn init(
env: soroban_sdk::Env,
wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), FactoryError>
Deploy a new invisible_wallet for the given P-256 public key. Returns the Address of the newly deployed wallet.
fn deploy(
env: soroban_sdk::Env,
public_key: soroban_sdk::BytesN<65>,
rp_id: soroban_sdk::Bytes,
origin: soroban_sdk::Bytes,
) -> Result