Skip to content

Instantly share code, notes, and snippets.

@melvincarvalho
Created April 20, 2014 23:12
Show Gist options
  • Save melvincarvalho/11127689 to your computer and use it in GitHub Desktop.
Save melvincarvalho/11127689 to your computer and use it in GitHub Desktop.
Parsing Hex with bitcore
var bitcore = require('bitcore');
require('buffertools').extend();
var Block = bitcore.Block;
var BinaryParser = bitcore.BinaryParser;
var b = new Block();
var buf = new Buffer(block);
buf = buf.fromHex();
var p = new BinaryParser(buf);
b.parse(p);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment