Skip to content

convertCoinTypeToChain

Converts a coinType into a viem Chain object. The conversion follows ENSIP-11.

Note

For mainnet, the conversion expects coinType == 60. This comes from ENSIP-9.

Usage

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

// mainnet
const result = convertCoinTypeToChain(60);

Returns

Chain

A viem Chain object that the coinType represents

Parameters

coinType: number

The coinType to convert to a Chain object