@m2-labs/token-amount
v1.0.1
Published
A safe and easy way to deal with amounts of Solana Tokens
Downloads
21
Readme
Token Amount
A safe and easy way to deal with amounts of Solana Tokens.
Installation
npm i @m2-labs/token-amount
Usage
import { TokenAmount } from '@m2-labs/token-amount';
const oneDollar = new TokenAmount(1, 'USDC');
const anotherDollar = TokenAmount.fromSubunits(1000000, 'USDC')
const twoDollars = oneDollar.plus(anotherDollar)
Brought to you by M2 Labs
This project is maintained and funded by M2 Labs, a Web3 product development studio.