ReadonlystateThe current client state (auth + wallet status, claims, address, phase). Always up to date.
Add a passcode sealer to this device's factor vault (docs/23): the same
wallet afterwards unlocks via passkey OR passcode. Requires an unlocked
wallet (wallet_locked otherwise); the core re-gates with a fresh user
verification and collects the passcode via wallet.promptPasscode.
Refused with passcode_not_allowed under a 'passkey-strict' policy.
Hide the wallet overlay.
Connect the embedded wallet. Requires a signed-in session — call
login() first (D20 A-3): the RP authenticates under its own client and
the wallet-origin popup only consumes that issuer session as silent SSO
(+ passkey onboarding on first use); throws not_signed_in otherwise,
before opening anything. MUST be called synchronously from a user
gesture (it opens the popup). Returns the connected accounts.
Connect an external wallet: an EIP-6963 injected wallet (MetaMask by
default) or WalletConnect v2. Returns a self-contained session exposing
the wallet's own EIP-1193 provider — the UPBOND auth session and
embedded/redirect wallet are unaffected. The WalletConnect connector
needs wallet.walletConnectProjectId and lazy-loads its relay stack
(plus QR modal) on first use.
Layer 1 wallet session; also resolves needs-setup vs needs-recovery for new devices.
The OAuth access token for the issuer's userinfo/management APIs, or null when unavailable.
EIP-1193 provider over the widget (ethers/viem plug in directly). Mounts the widget on first call.
The raw id_token for downstream verification, or null when there is no valid session.
Recovery status (enrollment + masked OTP contact). Layer 1 — works right after connectWallet, no unlock.
The wallet's Sui-on-secp256k1 account (docs/00-BUILD-SPEC.md §3, issue
#205 Option C) — same MPC key as the EVM address, Sui address derivation.
Served from state.suiAccount when the session already captured it (zero
prompts); otherwise establishes the Layer 2 ceremony, which for a locked
wallet means one biometric — call from a user gesture. Throws
wallet_not_set_up for a brand-new wallet.
The signed-in user's id_token claims, or null when signed out or the token has expired.
Call once on page load: consumes the redirect callback (and cleans the URL) or restores a persisted session.
The EIP-6963-announced injected wallets currently available in this browser (for install badges / wallet pickers). Announced means installed and responding. Works in every mode; never prompts the user.
List the account's registered key factors (Layer 2 required — the listing runs behind a biometric).
Persists PKCE state, then navigates to the issuer. Optional hints (connection, loginHint) skip the issuer's provider chooser. Does not resolve into app code.
Optionalhints: AuthorizationHintsOne user click → sign-in AND wallet connect (docs/24 1.0.0). Opens a
popup synchronously, runs the OIDC login under the RP's own client inside
it (the registered redirectUri page loads there briefly — its init()
relays the callback automatically), exchanges the code on THIS page, then
the SAME popup continues into the wallet leg. Resolves with the connected
accounts. Already signed in? Behaves exactly like connect.
MUST be called synchronously from a user gesture. Concurrent calls (and
concurrent connect()) share one flow.
Error contract: unsupported_browser (in-app browser — guide the user to
an external browser), popup_blocked (fall back to login()),
popup_closed (the user cancelled), the auth-leg codes
(authorization_error, state_mismatch, ...) if the login fails, and
connect()'s codes for the wallet leg. If the login succeeded but the
wallet leg failed, the session REMAINS signed in — retry with
connect().
Requires the RP pages (this one and the callback) to not sever
window.opener (Cross-Origin-Opener-Policy: same-origin breaks the
relay — use same-origin-allow-popups or none).
Optionalhints: AuthorizationHintsWallet session first (embedded mode: the widget's wallet-origin session too, via wallet_disconnect), then RP-initiated issuer logout redirect. Clears storage; keeps the device factor (B1).
Optionaloptions: { postLogoutRedirectUri?: string }Open the wallet overlay on a view (RP-initiated, e.g. a "wallet" button).
Optionalview: WalletViewNew-device recovery: synced-passkey restore first, recoverian ceremony fallback.
Remove a stale device factor by its public key (Layer 2 required). Recovery factors and this device's own factor are refused (factor_not_deletable).
Remove the passcode sealer (never the last sealer). Same unlocked-wallet contract as addPasscodeSealer.
Rotate the recovery factor (Layer 2 required).
First-time onboarding — the first unlock creates the wallet.
EIP-191 personal message signature. Same ceremony semantics as signTransaction.
Signs with the session ceremony; every signature re-gates with a fresh biometric. Call from a user gesture.
Observe state changes; returns an unsubscribe function.
Establishes the session's Layer 2 ceremony (device factor + passkey biometric) and returns the wallet address. Call from a user gesture. One ceremony per session (A2): signatures reuse it, each behind a fresh biometric; logout disposes it.
Re-register the recovery contact from the current session's claims
(recovery change → Layer 2). Requires an unlocked wallet (wallet_locked
otherwise); rebinding an already-bound contact runs an OTP ceremony
against the OLD contact via wallet.recovery.promptOtp.
Optionalopts: { channel?: "email" | "sms" }
The browser client returned by createUpbond — the entire supported
@upbond/sdkruntime surface. It combines the OIDC auth leg (login, session, claims) with the wallet leg (connect, unlock, sign, recovery) in either redirect or embedded mode. Read UpbondClient.state synchronously or observe it via UpbondClient.subscribe.