airgap-coin-lib
Version:
The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.
16 lines • 745 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var SCALEDecoder_1 = require("../scale/SCALEDecoder");
var SubstrateValidatorPrefs = /** @class */ (function () {
function SubstrateValidatorPrefs(commission) {
this.commission = commission;
}
SubstrateValidatorPrefs.decode = function (network, runtimeVersion, raw) {
var decoder = new SCALEDecoder_1.SCALEDecoder(network, raw);
var commission = decoder.decodeNextCompactInt(); // Perbill (parts per billion)
return new SubstrateValidatorPrefs(commission.decoded);
};
return SubstrateValidatorPrefs;
}());
exports.SubstrateValidatorPrefs = SubstrateValidatorPrefs;
//# sourceMappingURL=SubstrateValidatorPrefs.js.map