navio-blsct
Version:
TypeScript bindings for the `libblsct` library used by the [Navio](https://nav.io/) blockchain to construct confidential transactions based on the BLS12-381 curve.
24 lines (23 loc) • 653 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CTxOuts = void 0;
const blsct_1 = require("./blsct");
const ctxOut_1 = require("./ctxOut");
class CTxOuts {
obj;
constructor(obj) {
this.obj = obj;
}
at = (i) => {
const size = this.size();
if (i < 0 || i >= size) {
throw new RangeError(`Index ${i} is out of bounds. the size is ${size}`);
}
const obj = (0, blsct_1.getCTxOutAt)(this.obj, i);
return new ctxOut_1.CTxOut(obj);
};
size = () => {
return (0, blsct_1.getCTxOutsSize)(this.obj);
};
}
exports.CTxOuts = CTxOuts;