UNPKG

dpos-offline

Version:

Offline Signing Transactions for DPOS Blockchains

36 lines (35 loc) 1.5 kB
"use strict"; 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 LiskRegDelegateTxCodec = /** @class */ (function (_super) { __extends(LiskRegDelegateTxCodec, _super); function LiskRegDelegateTxCodec() { return _super.call(this, 2, 'register-delegate') || this; } LiskRegDelegateTxCodec.prototype.calcFees = function (tx) { return 2500000000; }; LiskRegDelegateTxCodec.prototype.transform = function (from) { var s = _super.prototype.transform.call(this, from); s.asset = { delegate: { username: from.identifier } }; return s; }; LiskRegDelegateTxCodec.prototype.assetBytes = function (tx) { return Buffer.from(tx.asset.delegate.username, 'utf8'); }; return LiskRegDelegateTxCodec; }(base_lisk_1.BaseLiskCodec)); exports.LiskRegDelegateTxCodec = LiskRegDelegateTxCodec;