@nexex/api
Version:
support trade on nexex network
33 lines • 1.24 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 ethers_1 = require("ethers");
var parseEther = ethers_1.utils.parseEther;
var FeeRate = /** @class */ (function (_super) {
__extends(FeeRate, _super);
function FeeRate(value) {
return _super.call(this, value) || this;
}
FeeRate.from = function (feeRate) {
var parsed = parseEther(feeRate);
if (parsed.gt(parseEther('1'))) {
throw new Error('not a valid fee rate');
}
return parsed;
};
return FeeRate;
}(ethers_1.utils.BigNumber));
exports.FeeRate = FeeRate;
//# sourceMappingURL=FeeRate.js.map