@crypto-utils/bigint
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@crypto-utils/bigint

A super lightweight library to handle bigints in web3 applications.

Installation

npm install @crypto-utils/bigint

Usage

import { BigNumber } from '@crypto-utils/bigint'

const bn = new BigNumber(1234567891011123456789n, 18)

Multiplication

const result = bn.mul(2n)

Division

const result = bn.div(123456789n)

Get the value

const value = bn.value

Get the decimals

const decimals = bn.decimals

toNumber

const number = bn.toNumber()
// 123456789.1011123456789

Readme

Keywords

Package Sidebar

Install

npm i @crypto-utils/bigint

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

4.49 kB

Total Files

5

Last publish

Collaborators

  • durhailay