Coin

What is it?

Coin stands for "native currency", which has been present in every blockchain network since Bitcoin. So, for example, you need to use this class for BTC transactions on the Bitcoin network and ETH transactions on the Ethereum network.

Methods

import { assets } from '@multiplechain/evm-chains'

const coin = new assets.Coin()

const name = coin.getName()
const symbol = coin.getSymbol()
const decimals = coin.getDecimals()

const balance = await coin.getBalance('0x')

const transfer = await coin.transfer('0x', '0x', 1)

const txId = await (await transfer.sign('0x')).send()

Last updated