0.0.1 • Published 2 years ago

@hashprotocol/cryptoassets v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Cryptoassets js

Crypto assets data and utilities through a standard interface

Installation

npm install @hashprotocol/cryptoassets --save

Usage

> const { assets, chains, currencyToUnit } = require('@hash/cryptoassets')
> assets.BTC.code
BTC
> assets.ETH.decimals
18
> currencyToUnit(assets.BTC, 1)
100000000
> chains.ethereum.safeConfirmations
3
> chains[assets.btc.chain].fees.unit
sat/b
> chains[assets.eth.chain].isValidAddress('0x5A0b54D5dc17e0AadC383d2db43B0a0D3E029c4c)
true

License

MIT