Skip to main content

Installation

Install the Relay SDK and its peer dependency viem

Environment Requirements:

node 18+ typescript ^5.0.4 (if using typescript)

Configuration

To configure the SDK we first need to create a global instance of it:
You can replace the baseApiUrl with TESTNET_RELAY_API when testing with testnets. In the example above we also pass in an array of RelayChains converted from a viem chain, the sdk exports a function (convertViemChainToRelayChain) to easily do this. Learn more about the createClient options.