airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
21 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var SCALEDecoder_1 = require("../scale/SCALEDecoder");
var SCALEAccountId_1 = require("../scale/type/SCALEAccountId");
var SubstrateNominations = /** @class */ (function () {
function SubstrateNominations(targets, submittedIn, suppressed) {
this.targets = targets;
this.submittedIn = submittedIn;
this.suppressed = suppressed;
}
SubstrateNominations.decode = function (network, runtimeVersion, raw) {
var decoder = new SCALEDecoder_1.SCALEDecoder(network, raw);
var targets = decoder.decodeNextArray(SCALEAccountId_1.SCALEAccountId.decode);
var submittedIn = decoder.decodeNextInt(32);
var suppressed = decoder.decodeNextBoolean();
return new SubstrateNominations(targets.decoded, submittedIn.decoded, suppressed.decoded);
};
return SubstrateNominations;
}());
exports.SubstrateNominations = SubstrateNominations;
//# sourceMappingURL=SubstrateNominations.js.map