@m2-labs/token-amount
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

M2 Labs

This project is maintained and funded by M2 Labs, a Web3 product development studio.

Readme

Keywords

none

Package Sidebar

Install

npm i @m2-labs/token-amount

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

14.7 kB

Total Files

12

Last publish

Collaborators

  • venables