UNPKG

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) 643 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CTxIns = void 0; const blsct_1 = require("./blsct"); const ctxIn_1 = require("./ctxIn"); class CTxIns { 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.getCTxInAt)(this.obj, i); return new ctxIn_1.CTxIn(obj); }; size = () => { return (0, blsct_1.getCTxInsSize)(this.obj); }; } exports.CTxIns = CTxIns;