@cobo/crypto-address
v0.2.0
Published
> A pubkey to generate all cryptocurrency addresses in Cobo Wallet !
Downloads
13
Readme
Crypto Address
A pubkey to generate all cryptocurrency addresses in Cobo Wallet !
Usage
yarn add @cobo/crypto-address
import { pubKeyToAddress } from '@cobo/crypto-address';
const address = pubKeyToAddress(pubKey, 'bitcoin')
const address = pubKeyToAddress(pubKey, 'bitcoin', 'P2PKH', false) // use uncompressed public key
const address = pubKeyToAddress(pubKey, 'ethereum')
const address = pubKeyToAddress(pubKey, 'eos')
const address = pubKeyToAddress(pubKey, 'ripple')
const address = pubKeyToAddress(pubKey, 'tron')
defaulty we use compressed publickey and will convert to it if not, but you can set not to do it by passing the false params
see test for detail
All Supported Coins
See test/test.js