sensible-sdk
Version:
Sensible-SDK
19 lines (18 loc) • 539 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Prevouts = void 0;
const TokenUtil = require("./tokenUtil");
class Prevouts {
constructor() {
this._buf = Buffer.alloc(0);
}
addVout(txId, outputIndex) {
const txidBuf = TokenUtil.getTxIdBuf(txId);
const indexBuf = TokenUtil.getUInt32Buf(outputIndex);
this._buf = Buffer.concat([this._buf, txidBuf, indexBuf]);
}
toHex() {
return this._buf.toString("hex");
}
}
exports.Prevouts = Prevouts;
;