Skip to content

convertCoinTypeToChain

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

Import

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

Usage

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

Parameters

coinType

number The numerical identifier for the coin type

Returns

Chain The corresponding blockchain chain