Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt

Use this file to discover all available pages before exploring further.

Fetching Enabled Networks

React Native provides access to enabled networks through the dynamic client. Networks are read from the Dashboard at runtime.
React Native
import { dynamicClient } from '<path to client file>'

// Enabled networks are read from the Dashboard at runtime
const evmNetworks = dynamicClient.networks.evm
const solanaNetworks = dynamicClient.networks.solana

// Example: names for display
const evmNames = evmNetworks.map((n) => n.name)
const solanaNames = solanaNetworks.map((n) => n.name)

Network Switching

import { useReactiveClient } from "@dynamic-labs/react-hooks";
import { dynamicClient } from "<path to client file>";

const client = useReactiveClient(dynamicClient);

await client.wallets.switchNetwork({
    wallet: client.wallets.primary,
    chainId: 8453,
});