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
import { convertCoinTypeToChainId } from "@aa-sdk/core";
Usage
import {
convertChainIdToCoinType,
convertCoinTypeToChainId,
} from "@aa-sdk/core";
import { sepolia } from "viem/chains";
const coinType = convertChainIdToCoinType(sepolia.id);
const chainId = convertCoinTypeToChainId(coinType);
Parameters
coinType
number
the coin type to be converted to a chain ID
Returns
number
the corresponding chain ID