UNPKG

@reservoir0x/relay-sdk

Version:

Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.

21 lines 813 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSolverCapacity = void 0; const axios_js_1 = require("../utils/axios.js"); const client_js_1 = require("../client.js"); const viem_1 = require("viem"); async function getSolverCapacity(data, axiosInstance = axios_js_1.axios) { const client = (0, client_js_1.getClient)(); if (!client) { throw new Error('Client not initialized'); } data.user = data.user || viem_1.zeroAddress; data.currency = data.currency; const response = await axiosInstance.get(`${client.baseApiUrl}/config/v2`, { params: data }); if (response.data) { return response.data; } throw 'No solver capacity data'; } exports.getSolverCapacity = getSolverCapacity; //# sourceMappingURL=getSolverCapacity.js.map