convertChainIdToCoinType

1function 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.

Example

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

Parameters

ParameterTypeDescription

chainId

number

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

Returns

number

the corresponding coin type for the given chain ID