UNPKG

airgap-coin-lib

Version:

The airgap-coin-lib is a protocol agnostic library to prepare, sign and broadcast cryptocurrency transactions.

30 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var CosmosCoin_1 = require("./CosmosCoin"); var CosmosFee = /** @class */ (function () { function CosmosFee(amount, gas) { this.amount = amount; this.gas = gas; } CosmosFee.prototype.toJSON = function () { return { amount: this.amount.map(function (value) { return value.toJSON(); }), gas: this.gas }; }; CosmosFee.fromJSON = function (json) { return new CosmosFee(json.amount.map(function (value) { return CosmosCoin_1.CosmosCoin.fromJSON(value); }), json.gas); }; CosmosFee.prototype.toRPCBody = function () { return { amount: this.amount.map(function (value) { return value.toRPCBody(); }), gas: this.gas }; }; CosmosFee.fromRPCBody = function (json) { return new CosmosFee(json.amount.map(function (value) { return CosmosCoin_1.CosmosCoin.fromRPCBody(value); }), json.gas); }; return CosmosFee; }()); exports.CosmosFee = CosmosFee; //# sourceMappingURL=CosmosFee.js.map