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

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,72 @@ 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, allowBridgeAndSwapString, 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
+ allowBridgeAndSwapString = allowBridgeAndSwap ? 'true' : 'false';
4295
+ bridgesString = bridges ? bridges.join(',') : undefined;
4296
+ search = constructSearchString({
4297
+ allowBridgeAndSwap: allowBridgeAndSwapString,
4298
+ bridges: bridgesString
4299
+ });
4300
+ fetchURL = deltaBridgeUrl + "/bridge-info" + search;
4301
+ _context.next = 8;
4291
4302
  return fetcher({
4292
- url: bridgeInfoUrl,
4303
+ url: fetchURL,
4293
4304
  method: 'GET',
4294
4305
  requestParams: requestParams
4295
4306
  });
4296
- case 2:
4307
+ case 8:
4297
4308
  data = _context.sent;
4298
4309
  return _context.abrupt("return", data.supportedTokens);
4299
- case 4:
4310
+ case 10:
4300
4311
  case "end":
4301
4312
  return _context.stop();
4302
4313
  }
4303
4314
  }, _callee);
4304
4315
  }));
4305
- return function getBridgeInfo(_x) {
4316
+ return function getBridgeInfo(_x, _x2) {
4306
4317
  return _ref2.apply(this, arguments);
4307
4318
  };
4308
4319
  }();
4320
+ var getBridgeProtocols = /*#__PURE__*/function () {
4321
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(requestParams) {
4322
+ var fetchURL, data;
4323
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
4324
+ while (1) switch (_context2.prev = _context2.next) {
4325
+ case 0:
4326
+ fetchURL = deltaBridgeUrl + "/bridge-protocols";
4327
+ _context2.next = 3;
4328
+ return fetcher({
4329
+ url: fetchURL,
4330
+ method: 'GET',
4331
+ requestParams: requestParams
4332
+ });
4333
+ case 3:
4334
+ data = _context2.sent;
4335
+ return _context2.abrupt("return", data.bridgeProtocols);
4336
+ case 5:
4337
+ case "end":
4338
+ return _context2.stop();
4339
+ }
4340
+ }, _callee2);
4341
+ }));
4342
+ return function getBridgeProtocols(_x3) {
4343
+ return _ref3.apply(this, arguments);
4344
+ };
4345
+ }();
4309
4346
  return {
4310
- getBridgeInfo: getBridgeInfo
4347
+ getBridgeInfo: getBridgeInfo,
4348
+ getBridgeProtocols: getBridgeProtocols
4311
4349
  };
4312
4350
  };
4313
4351