@upbond/sdk
    Preparing search index...

    Interface UpbondWalletConfig

    The wallet leg of UpbondConfig. Omit it to take the preset's default wiring. Two shapes share this type: mode: 'embedded' (default) delegates to a wallet-origin widget and needs only walletOrigin (docs/25-widget.md, docs/24-sdk-design.md D12/D18); mode: 'redirect' runs the MPC ceremony on the RP page and needs the Web3Auth fields (all supplied by the environment preset). Setting environment supplies UPBOND infra defaults for either mode. In either mode the auth leg is the RP's own OIDC redirect (login(), docs/24 D20).

    interface UpbondWalletConfig {
        environment?: UpbondEnvironment;
        mode?: "redirect" | "embedded";
        network?: "sapphire_mainnet" | "sapphire_devnet";
        promptPasscode?: (purpose: "enroll" | "unlock") => Promise<string>;
        recovery?: Partial<UpbondWalletRecoveryConfig> | null;
        rpId?: string;
        sealerPolicy?: SealerPolicy;
        verifier?: string;
        walletConnectProjectId?: string;
        walletOrigin?: string;
        web3authClientId?: string;
    }
    Index
    environment?: UpbondEnvironment

    Wallet-leg environment override. Defaults to the top-level UpbondConfig.environment (itself defaulting to 'production'); set it only to point the wallet leg at a different deployment than the issuer. Explicit fields below override the preset field-by-field.

    mode?: "redirect" | "embedded"

    'embedded' (default, docs/24 D18/D20): the wallet lives in a wallet-origin iframe/popup and the RP talks EIP-1193 (docs/25-widget.md) — keys, passkeys, ceremonies and recovery traffic never leave the wallet origin; only walletOrigin applies. The RP authenticates under its own client with login() first; connect() then consumes that issuer session as silent SSO. 'redirect': the RP page itself runs the MPC ceremony via the wallet-core layer (connectWallet() / setupWallet() / signMessage() …) — for the wallet's own origin and internal demos; every RP origin then needs Web3Auth / recovery-service registration. When mode is omitted but any local-MPC field below (web3authClientId/network/verifier/rpId/ recovery/promptPasscode/sealerPolicy) is set, the config is treated as 'redirect' (pre-D18 configs keep working unchanged).

    network?: "sapphire_mainnet" | "sapphire_devnet"

    Required unless environment supplies it (redirect mode).

    promptPasscode?: (purpose: "enroll" | "unlock") => Promise<string>

    Passcode UI callback for the second sealer (docs/23, redirect mode): asks the user to choose ('enroll', via addPasscodeSealer) or enter ('unlock') their passcode. The value is used for one on-device key derivation and never sent anywhere. Wallet creation is passkey-only and never consults this callback — environments without WebAuthn PRF fail creation with passkey_unsupported (guide the user to an external browser). Omit if the app offers no passcode UI.

    recovery?: Partial<UpbondWalletRecoveryConfig> | null

    Recovery-service wiring (WO 2026/003995, redirect mode). Omit to inherit the preset's wiring (or none without a preset); pass null to disable recovery even when the preset provides it. An explicit object merges over the preset field-by-field — e.g. recovery: { promptOtp } just adds the OTP UI on top of the preset URLs.

    rpId?: string

    WebAuthn RP ID for the passkey factor; defaults to the page's domain.

    sealerPolicy?: SealerPolicy

    Sealer policy (docs/23, redirect mode). Governs the post-hoc passcode sealer only — wallet creation is always passkey-only. Default 'passkey-or-passcode' allows addPasscodeSealer on an unlocked wallet; 'passkey-strict' disables passcode sealers entirely.

    verifier?: string

    Custom verifier trusting the issuer JWKS (verifierId = OIDC sub). Required unless environment supplies it (redirect mode).

    walletConnectProjectId?: string

    Reown Cloud (WalletConnect) project id used by connectExternal({ connector: 'walletconnect' }) (issue #302). Applies in both wallet modes and never participates in the redirect-mode inference below. Omit if the app never offers WalletConnect.

    walletOrigin?: string

    Origin serving the widget (embedded mode). Required unless environment supplies it.

    web3authClientId?: string

    Web3Auth dashboard project ID (redirect mode). Defaults to UPBOND's project via environment; set it only to run against your own Web3Auth project. Required when no environment is set.