MultipleChain Docs V0.4
  • OVERVIEW
    • 👋Welcome
    • 😇Doc Logic
  • STRUCTURE
    • 🪙Assets
      • Common
      • Coin
      • NFT
      • Token
      • Contract
    • 📝Models
      • Common
      • Transaction
      • CoinTransaction
      • NftTransaction
      • TokenTransaction
      • ContractTransaction
    • 📬Services
      • Provider
      • TransactionSigner
      • TransactionListener
    • 💻Browser
  • NETWORKS
    • 🔗Etherem (EVM)
    • 🔗Solana
    • 🔗Bitcoin
    • 🔗Tron
  • LANGUAGES
    • 💻JavaScript (TS)
      • Node
      • Browser
    • 💻PHP
Powered by GitBook
On this page
  • What is it?
  • Methods
  1. STRUCTURE
  2. Assets

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()

PreviousCommonNextNFT

Last updated 10 months ago

🪙