UNPKG

airgap-coin-lib

Version:

The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

19 lines 893 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var SCALEDecoder_1 = require("../scale/SCALEDecoder"); var SCALEInt_1 = require("../scale/type/SCALEInt"); var SubstrateActiveEraInfo = /** @class */ (function () { function SubstrateActiveEraInfo(index, start) { this.index = index; this.start = start; } SubstrateActiveEraInfo.decode = function (network, runtimeVersion, raw) { var decoder = new SCALEDecoder_1.SCALEDecoder(network, raw); var index = decoder.decodeNextInt(32); var start = decoder.decodeNextOptional(function (_, hex) { return SCALEInt_1.SCALEInt.decode(hex, 64); }); return new SubstrateActiveEraInfo(index.decoded, start.decoded); }; return SubstrateActiveEraInfo; }()); exports.SubstrateActiveEraInfo = SubstrateActiveEraInfo; //# sourceMappingURL=SubstrateActiveEraInfo.js.map