pchains-tx-parser
v1.1.0
Published
A transactions parser for PChains.
Downloads
7
Maintainers
Readme
Concept
PChains is a side-chains Proof-of-Concept for Burstcoin network. It's purpose is to show the power of the Burst messaging system and how it can be used to signal immutable data with structured data... This module is a simple NodeJS parser for PChains transactions.
NPM install
npm install pchains-tx-parser
Usage
Require
const parser = require('pchains-tx-parser').getInfo;
Normal Transactions
parser('TEST@tx@01030000002d81a7a233c4d70501070000001027000000000000011000000000000000000000000105000000f779587bc54dc43901140000001027000000000000');
Returns
{ ticker: 'TEST', type: 'tx', amount: 0, data:{ sender: '421020816233693485', receiver: '4162537466170472951', amount: 10000, fee: 0, merge: 10000 } }
Genesis Transactions
parser('TEST@genesis@500000');
Returns
{ ticker: 'TEST', type: 'genesis', amount: '500000' }
Tests
Run:
npm test
Coverage
Run:
npm run cover
Dependencies
- [x] hex2dec