Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var bsv = require('bsv');
var $ = bsv.util.preconditions;
var Buffer = require('buffer').Buffer;
var reverse = require('buffer-reverse');
var BufferReader = bsv.encoding.BufferReader;
var BufferWriter = bsv.encoding.BufferWriter;
var _ = bsv.deps._;
/**
* A constructor for inventory related Bitcoin messages such as
* "getdata", "inv" and "notfound".
* @param {Object} obj
* @param {Number} obj.type - Inventory.TYPE
* @param {Buffer} obj.hash - The hash for the inventory
* @constructor
*/
function Inventory(obj) {
this.type = obj.type;