import type { ClientConfig } from '@bounded-sh/core'; /** * The outcome of preparing the mobile wallet. * - `registered`: it is in the registry and usable. * - `not-applicable`: this environment has no mobile wallet to offer (an * ordinary desktop browser, React Native). Nothing is wrong, nothing pending. * - `failed`: it SHOULD have been available and was not. A caller must not * present it, and may retry. */ export type MobileWalletStatus = 'registered' | 'not-applicable' | 'failed'; /** * The app's own configuration is wrong (a network we cannot map, a cluster that * contradicts it, a page already registered for another chain). Distinct from an * availability failure because it degrades differently: a wallet that simply is * not there leaves the lane working for every other wallet, while this is a * developer bug that must stay loud instead of quietly removing the lane. */ export declare class WalletConfigError extends Error { constructor(message: string); } /** * Whether a discovered wallet is the Solana Mobile one this module registered. * * Callers need it because that wallet is the only one that LEAVES THE PAGE to * sign - it needs a fresh user gesture per operation (see * InjectedWalletConfig.confirmWalletAction). False before registration, for * every injected wallet, and for a lookalike another SDK registered. */ export declare function isSolanaMobileWallet(wallet: object | null | undefined): boolean; /** * Whether a registered wallet reaches its signer through the Mobile Wallet * Adapter transport - ours OR a lookalike another SDK registered. Used to decide * whether the registry already covers the IN-PAGE wallets, which is a question * about transport, not ownership. */ export declare function looksLikeSolanaMobileWallet(name: string): boolean; /** * Whether reaching this wallet LEAVES THE PAGE, which is what makes a fresh * user gesture necessary. True for the local (on-device) transport, which * dispatches an Android intent per operation. NOT true for the remote QR * transport: it keeps its websocket session and drives an in-page modal, so an * extra "one more tap" screen there would be friction for nothing. */ export declare function solanaMobileWalletLeavesPage(name: string): boolean; /** * Register Solana Mobile's MWA wallet with the Wallet Standard registry so * wallet discovery surfaces it. Idempotent - the first wallet-lane activation * (init with a wallet authMethod, loginWithWallet, or the login widget) wins * for the page's lifetime. * * Rejects on a contradictory/unsupported config, and on a later activation that * needs a DIFFERENT chain than the one already registered: the MWA * authorization is cluster-scoped and `registerMwa` hands back no unregister * handle, so the wallet in the registry cannot be moved. Failing loudly beats * leaving a wallet that authorizes on one cluster and is asked to sign on * another - and the app's own fix (reload before switching networks) is one the * error can state. A registration or environment failure resolves after * warning: it degrades to "MWA not listed" rather than breaking the injected * wallets sharing the lane. */ export declare function ensureSolanaMobileWalletRegistered(config: Partial, network: string | null): Promise;