Skip to main content

Installation

Import

Transmissions Client Context

The hooks packages provides a React.Context that can be used to access the transmissions client in a react component tree. The context provider should wrap your component tree beneath your wallet providers. Below is an example using the NextJS app router, rainbowkit, and coinbase smart wallet. The context provider pairs very nicely with wagmi hooks.

Usage

Returns

TranmissionsClient

Parameters

chainId

  • type: 8453 | 84532
The chain id of the target chain

publicClient (optional)

  • type: PublicClient<Transport, Chain>
The public client to use for public data requests. Some methods require a public client to be provided.

walletClient (optional)

  • type: WalletClient<Transport, Chain, Account>
The wallet client to use for modifying blockchain state. Most uplink methods require a wallet client to be provided.

paymasterConfig (optional)

  • type: PaymasterConfig
The paymaster configuration object for the wallet client. This object contains the paymaster url for a paymaster proxy. The default value is undefined. See the paymasters section of the coinbase smart wallet docs.