dpos-offline
Version:
Offline Signing Transactions for DPOS Blockchains
36 lines (35 loc) • 1.51 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var base_lisk_1 = require("./base_lisk");
var LiskSecondSignTxCodec = /** @class */ (function (_super) {
__extends(LiskSecondSignTxCodec, _super);
function LiskSecondSignTxCodec() {
return _super.call(this, 1, 'second-signature') || this;
}
LiskSecondSignTxCodec.prototype.calcFees = function (tx) {
return 500000000;
};
LiskSecondSignTxCodec.prototype.transform = function (from) {
var s = _super.prototype.transform.call(this, from);
s.asset = { signature: { publicKey: from.publicKey.toString('hex') } };
return s;
};
LiskSecondSignTxCodec.prototype.assetBytes = function (tx) {
return Buffer.from(tx.asset.signature.publicKey, 'hex');
};
return LiskSecondSignTxCodec;
}(base_lisk_1.BaseLiskCodec));
exports.LiskSecondSignTxCodec = LiskSecondSignTxCodec;