dpos-offline
Version:
Offline Signing Transactions for DPOS Blockchains
40 lines (39 loc) • 1.53 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 RiseSendV1TxCodec = /** @class */ (function (_super) {
__extends(RiseSendV1TxCodec, _super);
function RiseSendV1TxCodec() {
return _super.call(this, 0, 'send') || this;
}
RiseSendV1TxCodec.prototype.calcFees = function (tx) {
return 10000000;
};
RiseSendV1TxCodec.prototype.transform = function (from) {
var s = _super.prototype.transform.call(this, from);
s.amount = from.amount;
s.recipientId = from.recipient;
if (from.memo) {
throw new Error('Rise V1 send transaction does not support memo field');
}
return s;
};
RiseSendV1TxCodec.prototype.assetBytes = function (tx) {
return Buffer.alloc(0);
};
return RiseSendV1TxCodec;
}(base_v1_1.BaseRiseV1Codec));
exports.RiseSendV1TxCodec = RiseSendV1TxCodec;