Abstract encoding for Bitcoin related objects
var codec = require('bitcoin-consensus-encoding')
console.log(codec.varInt.encode(1e8), codec.varInt.encode.bytes)
console.log(codec.string.encode("Hello world"), codec.string.encode.bytes)
console.log(codec.boolean.encode(true), codec.boolean.encode.bytes)
npm install bitcoin-consensus-encoding