Overview
The/chain-utils subpath export contains utilities for dynamically configuring chains in your application. These functions were moved to a separate entry point to enable better tree-shaking and reduce the default SDK bundle size.
Installation
The chain utilities are included in the main SDK package. Simply import from the/chain-utils subpath:
Functions
configureViemChain
Configures a single viem chain for use with the Relay SDK.
Returns: A configured Relay chain object ready to use with the SDK.
configureDynamicChains
Fetches supported chains from the Relay API and configures them dynamically in the SDK. This is useful for applications that want to support all available chains without hardcoding them.Promise<RelayChain[]> - An array of Relay chain objects, each containing a viemChain property for use with wagmi/viem.