Skip to content
Alchemy Logo

convertCoinTypeToChainId | @aa-sdk/core

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

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

ParameterTypeDescription

coinType

number

the coin type to be converted to a chain ID

number

the corresponding chain ID

Was this page helpful?