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.

25 lines (24 loc) 736 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubAddrId = void 0; const blsct_1 = require("./blsct"); const managedObj_1 = require("./managedObj"); class SubAddrId extends managedObj_1.ManagedObj { constructor(obj) { super(obj); } static generate(account, address) { const obj = (0, blsct_1.genSubAddrId)(account, address); return new SubAddrId(obj); } value() { return (0, blsct_1.castToSubAddrId)(this.obj); } serialize() { return (0, blsct_1.serializeSubAddrId)(this.value()); } static deserialize(hex) { return SubAddrId._deserialize(hex, blsct_1.deserializeSubAddrId); } } exports.SubAddrId = SubAddrId;