dpos-offline
Version:
Offline Signing Transactions for DPOS Blockchains
36 lines (35 loc) • 1.52 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_v1_1 = require("./base_v1");
var RiseSecondSignV1TxCodec = /** @class */ (function (_super) {
__extends(RiseSecondSignV1TxCodec, _super);
function RiseSecondSignV1TxCodec() {
return _super.call(this, 1, 'second-signature') || this;
}
RiseSecondSignV1TxCodec.prototype.calcFees = function (tx) {
return 500000000;
};
RiseSecondSignV1TxCodec.prototype.transform = function (from) {
var s = _super.prototype.transform.call(this, from);
s.asset = { signature: { publicKey: from.publicKey.toString('hex') } };
return s;
};
RiseSecondSignV1TxCodec.prototype.assetBytes = function (tx) {
return Buffer.from(tx.asset.signature.publicKey, 'hex');
};
return RiseSecondSignV1TxCodec;
}(base_v1_1.BaseRiseV1Codec));
exports.RiseSecondSignV1TxCodec = RiseSecondSignV1TxCodec;