convertCoinTypeToChainId

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

1import { convertCoinTypeToChainId } from "@aa-sdk/core";

Usage

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

coinType

number the coin type to be converted to a chain ID

Returns

number the corresponding chain ID