Skip to content
Alchemy Logo

convertChainIdToCoinType | @aa-sdk/core

function convertChainIdToCoinType(chainId): number;

Defined in: aa-sdk/core/src/ens/utils.ts:22

Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains.

import { convertChainIdToCoinType } from "@aa-sdk/core";
import { sepolia } from "viem/chains";
 
const coinType = convertChainIdToCoinType(sepolia.id);

ParameterTypeDescription

chainId

number

the blockchain chain ID that you want to convert to a coin type

number

the corresponding coin type for the given chain ID

Was this page helpful?