Quick Start
Get up and running with the tx-kit SDK
Features
- esm or commonjs
- first class support for coinbase smart wallet and paymasters
- ens name resolution
- small bundle size and minimal dependencies
- gas estimation and calldata generation for every transaction
Installation
Import
The SDK is built for both esm and commonjs environments
Transmissions Client
The SDK provides a client that can be used to interact with the transmissions protocol. The client is initialized with a configuration object and provides 2 sub-clients for uplink and downlink interactions. The uplink client is used to write data to the protocol, while the downlink client is used to read data from the protocol subgraph.
Usage
Returns
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.
apiConfig (optional)
- type:
ApiConfig
The api configuration object for the downlink client. This object contains the server url for the subgraph. The default value is the base mainnet subgraph url.
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.