Skip to content
Alchemy Logo

convertCoinTypeToChain | @aa-sdk/core

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

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

ParameterTypeDescription

coinType

number

The numerical identifier for the coin type

Chain

The corresponding blockchain chain

If the coin type does not map to a supported chain

Was this page helpful?