@velora-dex/sdk 9.3.0-dev.0 → 9.3.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.esm.js CHANGED
@@ -4280,34 +4280,71 @@ var constructGetBridgeInfo = function constructGetBridgeInfo(_ref) {
4280
4280
  var _ref$apiURL = _ref.apiURL,
4281
4281
  apiURL = _ref$apiURL === void 0 ? API_URL : _ref$apiURL,
4282
4282
  fetcher = _ref.fetcher;
4283
- var bridgeInfoUrl = apiURL + "/delta/prices/bridge-info";
4283
+ var deltaBridgeUrl = apiURL + "/delta/prices";
4284
4284
  var getBridgeInfo = /*#__PURE__*/function () {
4285
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(requestParams) {
4286
- var data;
4285
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, requestParams) {
4286
+ var _params, allowBridgeAndSwap, bridges, bridgesString, search, fetchURL, data;
4287
4287
  return _regeneratorRuntime().wrap(function _callee$(_context) {
4288
4288
  while (1) switch (_context.prev = _context.next) {
4289
4289
  case 0:
4290
- _context.next = 2;
4290
+ if (params === void 0) {
4291
+ params = {};
4292
+ }
4293
+ _params = params, allowBridgeAndSwap = _params.allowBridgeAndSwap, bridges = _params.bridges;
4294
+ bridgesString = bridges ? bridges.join(',') : undefined;
4295
+ search = constructSearchString({
4296
+ allowBridgeAndSwap: !!allowBridgeAndSwap,
4297
+ bridges: bridgesString
4298
+ });
4299
+ fetchURL = deltaBridgeUrl + "/bridge-info" + search;
4300
+ _context.next = 7;
4291
4301
  return fetcher({
4292
- url: bridgeInfoUrl,
4302
+ url: fetchURL,
4293
4303
  method: 'GET',
4294
4304
  requestParams: requestParams
4295
4305
  });
4296
- case 2:
4306
+ case 7:
4297
4307
  data = _context.sent;
4298
4308
  return _context.abrupt("return", data.supportedTokens);
4299
- case 4:
4309
+ case 9:
4300
4310
  case "end":
4301
4311
  return _context.stop();
4302
4312
  }
4303
4313
  }, _callee);
4304
4314
  }));
4305
- return function getBridgeInfo(_x) {
4315
+ return function getBridgeInfo(_x, _x2) {
4306
4316
  return _ref2.apply(this, arguments);
4307
4317
  };
4308
4318
  }();
4319
+ var getBridgeProtocols = /*#__PURE__*/function () {
4320
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(requestParams) {
4321
+ var fetchURL, data;
4322
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4323
+ while (1) switch (_context2.prev = _context2.next) {
4324
+ case 0:
4325
+ fetchURL = deltaBridgeUrl + "/bridge-protocols";
4326
+ _context2.next = 3;
4327
+ return fetcher({
4328
+ url: fetchURL,
4329
+ method: 'GET',
4330
+ requestParams: requestParams
4331
+ });
4332
+ case 3:
4333
+ data = _context2.sent;
4334
+ return _context2.abrupt("return", data.bridgeProtocols);
4335
+ case 5:
4336
+ case "end":
4337
+ return _context2.stop();
4338
+ }
4339
+ }, _callee2);
4340
+ }));
4341
+ return function getBridgeProtocols(_x3) {
4342
+ return _ref3.apply(this, arguments);
4343
+ };
4344
+ }();
4309
4345
  return {
4310
- getBridgeInfo: getBridgeInfo
4346
+ getBridgeInfo: getBridgeInfo,
4347
+ getBridgeProtocols: getBridgeProtocols
4311
4348
  };
4312
4349
  };
4313
4350