Skip to main content

Interface: BrowserSDKConfig

Defined in: types.ts:19

Configuration options for BrowserSDK.

All properties are optional — sensible defaults connect to the KEA Wallet and Thru Alphanet.

Example

const sdk = new BrowserSDK({
rpcUrl: 'https://grpc-web.alphanet.thruput.org',
});

Properties

PropertyTypeDefault valueDescriptionDefined in
addressTypes?"thru"[]['thru']Which blockchain address types to enable.types.ts:34
autoConnect?booleanfalseAttempt to silently restore the previous wallet session on BrowserSDK.initialize. When enabled, the SDK checks a localStorage hint and queries the wallet iframe for an existing session. If valid, the SDK transitions to connected state without showing the wallet modal. Remarks - The localStorage hint stores only 'connected' / 'disconnected' — never addresses, keys, or tokens. - The wallet iframe is the sole authority for session validity. - After an explicit BrowserSDK.disconnect, auto-connect is suppressed until the next manual BrowserSDK.connect. - Fails silently if the session is expired, storage is blocked (Safari ITP / Brave Shields), or the iframe is unreachable.types.ts:73
iframeUrl?string'https://keawallet.com/embedded'URL of the wallet's /embedded page that hosts the iframe. Remarks Override this for local development or self-hosted wallet deployments.types.ts:27
rpcUrl?stringundefinedgRPC-web endpoint for direct blockchain RPC queries (balance lookups, transaction submission, block queries). Remarks This URL is passed to createThruClient(). If omitted, the ThruClient uses its built-in default endpoint. See BrowserSDK.getThru — returns the configured ThruClient instance Example // Alphanet { rpcUrl: 'https://grpc-web.alphanet.thruput.org' }types.ts:52