@0xsplits/splits-sdk
Version:
SDK for the 0xSplits protocol
84 lines • 4.17 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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SplitsClient = void 0;
var constants_1 = require("../constants");
var base_1 = require("./base");
var data_1 = require("./data");
var liquidSplit_1 = require("./liquidSplit");
var mixin_1 = require("./mixin");
var oracle_1 = require("./oracle");
var passThroughWallet_1 = require("./passThroughWallet");
var splitV1_1 = require("./splitV1");
var splitV2_1 = require("./splitV2");
var swapper_1 = require("./swapper");
var templates_1 = require("./templates");
var vesting_1 = require("./vesting");
var warehouse_1 = require("./warehouse");
var waterfall_1 = require("./waterfall");
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
var SplitsClient = /** @class */ (function (_super) {
__extends(SplitsClient, _super);
function SplitsClient(clientArgs) {
var _this = _super.call(this, __assign({ transactionType: constants_1.TransactionType.Transaction, supportedChainIds: constants_1.ALL_CHAIN_IDS }, clientArgs)) || this;
_this.waterfall = new waterfall_1.WaterfallClient(clientArgs);
_this.liquidSplits = new liquidSplit_1.LiquidSplitClient(clientArgs);
_this.vesting = new vesting_1.VestingClient(clientArgs);
_this.templates = new templates_1.TemplatesClient(clientArgs);
_this.oracle = new oracle_1.OracleClient(clientArgs);
_this.swapper = new swapper_1.SwapperClient(clientArgs);
_this.passThroughWallet = new passThroughWallet_1.PassThroughWalletClient(clientArgs);
_this.splitV1 = new splitV1_1.SplitV1Client(clientArgs);
_this.splitV2 = new splitV2_1.SplitV2Client(clientArgs);
_this.warehouse = new warehouse_1.WarehouseClient(clientArgs);
if (clientArgs.apiConfig) {
_this.dataClient = new data_1.DataClient({
publicClient: clientArgs.publicClient,
publicClients: clientArgs.publicClients,
ensPublicClient: clientArgs.ensPublicClient,
includeEnsNames: clientArgs.includeEnsNames,
apiConfig: clientArgs.apiConfig,
});
}
_this.estimateGas = new SplitsClientGasEstimates(clientArgs);
return _this;
}
return SplitsClient;
}(base_1.BaseTransactions));
exports.SplitsClient = SplitsClient;
(0, mixin_1.applyMixins)(SplitsClient, [base_1.BaseClientMixin]);
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
var SplitsClientGasEstimates = /** @class */ (function (_super) {
__extends(SplitsClientGasEstimates, _super);
function SplitsClientGasEstimates(clientArgs) {
return _super.call(this, __assign({ transactionType: constants_1.TransactionType.GasEstimate, supportedChainIds: constants_1.ALL_CHAIN_IDS }, clientArgs)) || this;
}
return SplitsClientGasEstimates;
}(base_1.BaseTransactions));
(0, mixin_1.applyMixins)(SplitsClientGasEstimates, [base_1.BaseGasEstimatesMixin]);
//# sourceMappingURL=index.js.map