zumokit
Version:
ZumoKit is a Wallet as a Service SDK
27 lines (26 loc) • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Quote = void 0;
var decimal_js_1 = require("decimal.js");
/**
* Zumo exchange rate quote used in making exchanges.
*/
var Quote = /** @class */ (function () {
/** @internal */
function Quote(json) {
this.json = json;
this.id = json.id;
this.ttl = json.ttl;
this.createdAt = Math.round(new Date(json.createdAt).getTime() / 1000);
this.expiresAt = Math.round(new Date(json.expiresAt).getTime() / 1000);
this.debitCurrency = json.debitCurrency;
this.creditCurrency = json.creditCurrency;
this.price = new decimal_js_1.Decimal(json.price);
this.feeRate = new decimal_js_1.Decimal(json.feeRate);
this.debitAmount = new decimal_js_1.Decimal(json.debitAmount);
this.feeAmount = new decimal_js_1.Decimal(json.feeAmount);
this.creditAmount = new decimal_js_1.Decimal(json.creditAmount);
}
return Quote;
}());
exports.Quote = Quote;