Direct API for interacting with global wallets without SDK dependencies
@dynamic-labs/global-wallet-client/features
entry point. Here’s a simple example to get started:
@dynamic-labs/global-wallet-client
package to re-export all native APIs through the features
entry point. Benefits include:
connect
client
: GlobalWalletClient – The global wallet client instancePromise<Array<BaseWallet>>
– List of connected wallet objectsdisconnect
client
: GlobalWalletClient – The global wallet client instancegetEthereumWallets
client
: GlobalWalletClient – The global wallet client instanceArray<BaseWallet>
– Array of Ethereum walletsgetSolanaWallets
client
: GlobalWalletClient – The global wallet client instanceArray<BaseWallet>
– Array of Solana walletsgetSupportedEthereumNetworks
client
: GlobalWalletClient – The global wallet client instanceArray<{ chainId: number; rpcUrl?: string }>
– Supported networksgetWalletNetwork
wallet
: BaseWallet – The wallet to checknumber | string | null
– Network ID or namecreateKernelClient
wallet
: BaseWallet – The smart wallet to create the kernel account client forchainId?
: number – The chain ID to use for the kernel account clientbundlerProvider?
: ZerodevBundlerProvider – The bundler provider to use for the kernel account clientbundlerRpc?
: string – The bundler RPC URL to use for the kernel account clientpaymasterRpc?
: string – The paymaster RPC URL to use for the kernel account clientpaymaster?
: PaymasterType (‘SPONSOR’ | ‘NONE’) – The paymaster to use for the kernel account clientKernelAccountClient<Transport, ViemChain, SmartAccount, Client, RpcSchema>
– The kernel account clientgetEoaWalletForSmartWallet
smartWallet
: BaseWallet – The smart wallet to get the EOA forBaseWallet
– The EOA walletisEthereumWallet
wallet
: BaseWallet – The wallet to checkboolean
– true if Ethereum-basedisSolanaWallet
wallet
: BaseWallet – The wallet to checkboolean
– true if Solana-basedonEvent
client
: GlobalWalletClient – The global wallet client instanceeventName
: keyof ClientEventEmitterEvents – Event namecallback
: Function – Event handlerVoidFunction
– Unsubscribe functionsignMessage
wallet
: BaseWallet – The wallet to usemessage
: string – Message to signPromise<{ signature: string; signedMessage: string }>
– Signature detailsswitchNetwork
wallet
: BaseWallet – The wallet to switchnetworkId
: number – Target network ID