@jadepool/lib-cosmos

0.4.0 • Public • Published

Cosmos NodeJS lib

How to use

  const libcosmos = require('@jadepool/lib-cosmos')
  // genAddress
  const addr = libcosmos.genAddressByPubKey(pubKey)
  // getUnsignedTx
  const txString = `${addr}=1stake;${addr}=2stake`
  const unsignedTx = libcosmos.composeUnsignedTx(addr, txString, 'test-chain', 0, 1, 100000, '0.0001stake', 1.0, '')
  // getRawTx
  const sig = 'signiture'
  const pubKey = 'publickKey'
  const isReturnJson = true
  const rawtx = libcosmos.buildRawTx(addr, txString, 'test-chain', 0, 1, 100000, '0.0001stake', 1.0, '', sig, pubKey, isReturnJson)

Readme

Keywords

Package Sidebar

Install

npm i @jadepool/lib-cosmos

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

81.9 MB

Total Files

12

Last publish

Collaborators

  • btspoony
  • kristieguo
  • cisaman
  • woyoutlz