API Kit Reference
constructor

constructor

Returns an instance of the API Kit.

Usage


_10
import SafeApiKit from '@safe-global/api-kit'
_10
_10
const chainId = 1n
_10
_10
const txServiceUrl = 'https://...'
_10
_10
const 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.


_10
const apiKit = new SafeApiKit({
_10
chainId: 1n
_10
})

txServiceUrl (Optional)

  • Type: string

A custom Safe Transaction Service URL that is not supported by default.


_10
const apiKit = new SafeApiKit({
_10
chainId: 1n,
_10
txServiceUrl: 'https://...'
_10
})

Was this page helpful?