Skip to content

convertChainIdToCoinType

Converts an ethereum chain ID to an ENS coin type as per ENSIP-11 and assumes this is how mappings are stored for non mainnet chains.

Note

For mainnet, this method will return 60 as the coin type. This comes from ensip-9.

Usage

ts
import { convertChainIdToCoinType } from "@alchemy/aa-core";

const result = convertChainIdToCoinType(1);
// 60

Returns

number

The converted coin type

Parameters

chainId: number

The chain ID to convert