Skip to main content

Connection

connect

Sets the wallet provider. Must be called once before using any wallet-dependent functions.

connect(
provider: any,
): Promise<void>

Parameters

  • provider: any — An EIP-1193 wallet provider (e.g. from MetaMask, Coinbase Wallet, WalletConnect, Privy, etc.).

Returns

  • Promise<void>

disconnect

Disconnects from all agents and clears the set provider. After calling this, you must call connect() again before using wallet-dependent functions.

disconnect(): Promise<void>

Returns

  • Promise<void>

isConnected

Checks whether the SDK currently has a set provider (i.e. connect() was called and disconnect() has not been called since).

isConnected(): boolean

Returns

  • booleantrue if connected, false otherwise.