Installation
Install the Relay SDK and its peer dependency viemEnvironment 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: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.