Skip to content

configureRelayChains

A utility function to manually configure the Relay Protocol client with a set of chains. This is only needed in advanced scenarios where you want to override the default dynamic chain configuration.

Import

tsx
import { configureRelayChains } from "@use-glyph/sdk-react";

Usage

tsx
import { configureRelayChains } from "@use-glyph/sdk-react";
import type { RelayChain } from "@relayprotocol/relay-sdk";

const myChains: RelayChain[] = [
	// ... your RelayChain definitions
];

configureRelayChains(myChains);

Signature

typescript
function configureRelayChains(chains: RelayChain[]): void;

Parameters

ParameterTypeDescription
chainsRelayChain[]Array of Relay Protocol chain objects to configure.

Notes

  • In most cases you do not need to call this function. The useGlyphConfigureDynamicChains hook (used internally by GlyphPrivyProvider and GlyphWalletProvider) configures the Relay client automatically from the Glyph API response.
  • Use this only if you need to set up the Relay client before the hook has resolved, or if you are managing chain configuration entirely on your own.