constructor
Returns an instance of the API Kit.
Usage
_10import SafeApiKit from '@safe-global/api-kit'_10_10const chainId = 1n_10_10const txServiceUrl = 'https://...'_10_10const apiKit = new SafeApiKit({_10 chainId,_10 txServiceUrl // Optional_10})
Returns
SafeApiKit
A new instance of the API Kit.
Parameters
chainId
- Type:
bigint
The chain ID.
_10const apiKit = new SafeApiKit({_10 chainId: 1n_10})
txServiceUrl
(Optional)
- Type:
string
A custom Safe Transaction Service URL that is not supported by default.
_10const apiKit = new SafeApiKit({_10 chainId: 1n,_10 txServiceUrl: 'https://...'_10})