@velora-dex/sdk 9.3.0 → 9.3.2-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/helpers/fetchers/axios.d.ts.map +1 -1
- package/dist/helpers/fetchers/fetch.d.ts +3 -1
- package/dist/helpers/fetchers/fetch.d.ts.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/methods/delta/getBridgeInfo.d.ts +1 -0
- package/dist/methods/delta/getBridgeInfo.d.ts.map +1 -1
- package/dist/methods/delta/getDeltaPrice.d.ts +3 -7
- package/dist/methods/delta/getDeltaPrice.d.ts.map +1 -1
- package/dist/methods/delta/helpers/types.d.ts +3 -0
- package/dist/methods/delta/helpers/types.d.ts.map +1 -1
- package/dist/methods/quote/getQuote.d.ts +4 -0
- package/dist/methods/quote/getQuote.d.ts.map +1 -1
- package/dist/methods/swap/swapTx.d.ts +3 -3
- package/dist/sdk/simple.d.ts.map +1 -1
- package/dist/sdk.cjs.development.js +12 -11
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +12 -11
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/helpers/fetchers/axios.ts +2 -1
- package/src/helpers/fetchers/fetch.ts +11 -2
- package/src/index.ts +4 -0
- package/src/methods/delta/getBridgeInfo.ts +1 -0
- package/src/methods/delta/getDeltaPrice.ts +8 -6
- package/src/methods/delta/helpers/types.ts +3 -0
- package/src/methods/quote/getQuote.ts +4 -0
- package/src/methods/swap/adapters.ts +2 -2
- package/src/methods/swap/rates.ts +5 -5
- package/src/methods/swap/spender.ts +2 -2
- package/src/methods/swap/swapTx.ts +4 -4
- package/src/sdk/simple.ts +2 -1
- package/src/types.ts +4 -1
package/dist/sdk.esm.js
CHANGED
|
@@ -506,7 +506,7 @@ var constructGetSpender = function constructGetSpender(_ref) {
|
|
|
506
506
|
chainId = _ref.chainId,
|
|
507
507
|
fetcher = _ref.fetcher;
|
|
508
508
|
var search = constructSearchString({
|
|
509
|
-
|
|
509
|
+
chainId: chainId,
|
|
510
510
|
version: version
|
|
511
511
|
});
|
|
512
512
|
var fetchURL = apiURL + "/adapters/contracts" + search;
|
|
@@ -880,7 +880,7 @@ var constructGetAdapters = function constructGetAdapters(_ref) {
|
|
|
880
880
|
case 0:
|
|
881
881
|
// always pass explicit type to make sure UrlSearchParams are correct
|
|
882
882
|
query = constructSearchString({
|
|
883
|
-
|
|
883
|
+
chainId: chainId,
|
|
884
884
|
version: version
|
|
885
885
|
});
|
|
886
886
|
fetchURL = apiURL + "/adapters/list" + query;
|
|
@@ -964,7 +964,7 @@ var constructGetRate = function constructGetRate(_ref) {
|
|
|
964
964
|
search = constructSearchString(_extends({
|
|
965
965
|
srcToken: srcToken,
|
|
966
966
|
destToken: destToken,
|
|
967
|
-
|
|
967
|
+
chainId: chainId,
|
|
968
968
|
version: version
|
|
969
969
|
}, parsedOptions));
|
|
970
970
|
fetchURL = pricesUrl + "/" + search;
|
|
@@ -1005,7 +1005,7 @@ var constructGetRate = function constructGetRate(_ref) {
|
|
|
1005
1005
|
search = constructSearchString(_extends({
|
|
1006
1006
|
route: _route,
|
|
1007
1007
|
// route can be used in place of srcToken+destToken
|
|
1008
|
-
|
|
1008
|
+
chainId: chainId,
|
|
1009
1009
|
version: version
|
|
1010
1010
|
}, parsedOptions));
|
|
1011
1011
|
fetchURL = pricesUrl + "/" + search;
|
|
@@ -1057,7 +1057,7 @@ var constructSwapTx = function constructSwapTx(_ref) {
|
|
|
1057
1057
|
srcToken: srcToken,
|
|
1058
1058
|
destToken: destToken,
|
|
1059
1059
|
route: _route,
|
|
1060
|
-
|
|
1060
|
+
chainId: chainId,
|
|
1061
1061
|
version: version
|
|
1062
1062
|
}, parsedOptions));
|
|
1063
1063
|
fetchURL = pricesUrl + "/" + search;
|
|
@@ -2805,9 +2805,9 @@ var constructFetcher$2 = function constructFetcher(axios, extra) {
|
|
|
2805
2805
|
case 0:
|
|
2806
2806
|
_context.prev = 0;
|
|
2807
2807
|
requestParams = params.requestParams, rest = _objectWithoutPropertiesLoose(params, _excluded$4); // adding apiKey to headers if it's provided
|
|
2808
|
-
headers = extra != null && extra.apiKey ? _extends({
|
|
2808
|
+
headers = extra != null && extra.apiKey ? _extends({}, extra.headers, {
|
|
2809
2809
|
'X-API-KEY': extra.apiKey
|
|
2810
|
-
}, rest.headers, requestParams == null ? void 0 : requestParams.headers) : _extends({}, rest.headers, requestParams == null ? void 0 : requestParams.headers);
|
|
2810
|
+
}, rest.headers, requestParams == null ? void 0 : requestParams.headers) : _extends({}, extra == null ? void 0 : extra.headers, rest.headers, requestParams == null ? void 0 : requestParams.headers);
|
|
2811
2811
|
allParams = _extends({}, rest, requestParams, {
|
|
2812
2812
|
headers: headers
|
|
2813
2813
|
});
|
|
@@ -2855,13 +2855,14 @@ var constructFetcher$1 = function constructFetcher(fetch, extra) {
|
|
|
2855
2855
|
apiHeaders = extra != null && extra.apiKey ? {
|
|
2856
2856
|
'X-API-KEY': extra.apiKey
|
|
2857
2857
|
} : undefined; // all headers combined
|
|
2858
|
-
headers = POSTheaders || apiHeaders || params.headers || requestParams != null && requestParams.headers ? _extends({}, apiHeaders, POSTheaders, params.headers, requestParams == null ? void 0 : requestParams.headers) : undefined;
|
|
2858
|
+
headers = POSTheaders || apiHeaders || params.headers || requestParams != null && requestParams.headers || extra != null && extra.headers ? _extends({}, extra == null ? void 0 : extra.headers, apiHeaders, POSTheaders, params.headers, requestParams == null ? void 0 : requestParams.headers) : undefined;
|
|
2859
2859
|
_context.next = 8;
|
|
2860
2860
|
return fetch(url, _extends({
|
|
2861
2861
|
method: method,
|
|
2862
2862
|
body: body
|
|
2863
2863
|
}, requestParams, {
|
|
2864
|
-
headers: headers
|
|
2864
|
+
headers: headers,
|
|
2865
|
+
keepalive: extra == null ? void 0 : extra.keepalive
|
|
2865
2866
|
}));
|
|
2866
2867
|
case 8:
|
|
2867
2868
|
response = _context.sent;
|
|
@@ -4922,9 +4923,9 @@ var constructFetcher = function constructFetcher(options) {
|
|
|
4922
4923
|
return function (params) {
|
|
4923
4924
|
var _params$requestParams;
|
|
4924
4925
|
// adding apiKey to headers if it's provided
|
|
4925
|
-
var headers = options != null && options.apiKey ? _extends({
|
|
4926
|
+
var headers = options != null && options.apiKey ? _extends({}, options.headers, {
|
|
4926
4927
|
'X-API-KEY': options.apiKey
|
|
4927
|
-
}, params.headers, (_params$requestParams = params.requestParams) == null ? void 0 : _params$requestParams.headers) : params.headers;
|
|
4928
|
+
}, params.headers, (_params$requestParams = params.requestParams) == null ? void 0 : _params$requestParams.headers) : _extends({}, options.headers, params.headers);
|
|
4928
4929
|
return options.fetcher(_extends({}, params, {
|
|
4929
4930
|
headers: headers
|
|
4930
4931
|
}));
|