convertCoinTypeToChainId

1function convertCoinTypeToChainId(coinType): number;

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

Converts a coin type to a chain ID based on predefined mappings. This function follows ENSIP-9 for coin type 60 and ENSIP-11 for other coin types.

Example

1import {
2 convertChainIdToCoinType,
3 convertCoinTypeToChainId,
4} from "@aa-sdk/core";
5import { sepolia } from "viem/chains";
6
7const coinType = convertChainIdToCoinType(sepolia.id);
8const chainId = convertCoinTypeToChainId(coinType);

Parameters

ParameterTypeDescription

coinType

number

the coin type to be converted to a chain ID

Returns

number

the corresponding chain ID