grs-minimal

Parse raw groestlcoin block and transaction buffers with minimal overhead
Note
You must use node.js v12+
Install
npm i grs-minimal
Documentation
Basic use
const { Block, Transaction, Header } = require('grs-minimal')
const block = Block.fromBuffer(yourBlockBuffer)
block.getHash()
block.getTransactions()
block.getHeight()
await block.getTransactionsAsync(({ header, txs, finished }), => {
for (const {index, tx, offset, size} of txs) {
console.log(`tx ${tx.getTxid()}`)
}
})
const header = Header.fromBuffer(yourHeaderBuffer)
header.getHash()
const transaction = Transaction.fromBuffer(yourTransactionBuffer)
transaction.getTxid()
transaction.getCoinbaseHeight()
Tests
npm run test