convertCoinTypeToChain

1function convertCoinTypeToChain(coinType): Chain;

Defined in: aa-sdk/core/src/ens/utils.ts:73

Converts a coin type to its corresponding blockchain chain based on a predefined mapping.

Example

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

Parameters

ParameterTypeDescription

coinType

number

The numerical identifier for the coin type

Returns

Chain

The corresponding blockchain chain

Throws

If the coin type does not map to a supported chain