@jadepool/lib-cosmos
v0.4.0
Published
Corelib for cosmos
Downloads
9
Readme
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)