convertChainIdToCoinType

Converts a given chain ID to a coin type, following specific standards for mainnet and non-mainnet chains.

Import

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

Usage

1import { convertChainIdToCoinType } from "@aa-sdk/core";
2import { sepolia } from "viem/chains";
3
4const coinType = convertChainIdToCoinType(sepolia.id);

Parameters

chainId

number the blockchain chain ID that you want to convert to a coin type

Returns

number the corresponding coin type for the given chain ID