@xswap-link/sdk 0.0.3 → 0.0.4
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.mjs +2 -2
- package/index.ts +1 -1
- package/package.json +2 -2
- package/src/services/api.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetRoutePayload, ApiOverrides, Route, Ecosystem, Chain, Token } from '@xswap-link/
|
|
2
|
-
export * from '@xswap-link/
|
|
1
|
+
import { GetRoutePayload, ApiOverrides, Route, Ecosystem, Chain, Token } from '@xswap-link/common';
|
|
2
|
+
export * from '@xswap-link/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Get swap route based on provided criteria.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GetRoutePayload, ApiOverrides, Route, Ecosystem, Chain, Token } from '@xswap-link/
|
|
2
|
-
export * from '@xswap-link/
|
|
1
|
+
import { GetRoutePayload, ApiOverrides, Route, Ecosystem, Chain, Token } from '@xswap-link/common';
|
|
2
|
+
export * from '@xswap-link/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Get swap route based on provided criteria.
|
package/dist/index.js
CHANGED
|
@@ -27,12 +27,12 @@ __export(xswap_sdk_exports, {
|
|
|
27
27
|
getTokens: () => getTokens
|
|
28
28
|
});
|
|
29
29
|
module.exports = __toCommonJS(xswap_sdk_exports);
|
|
30
|
-
__reExport(xswap_sdk_exports, require("@xswap-link/
|
|
30
|
+
__reExport(xswap_sdk_exports, require("@xswap-link/common"), module.exports);
|
|
31
31
|
|
|
32
32
|
// src/services/api.ts
|
|
33
|
-
var
|
|
33
|
+
var import_common = require("@xswap-link/common");
|
|
34
34
|
async function _sendRequest(urlPath, options, overrides) {
|
|
35
|
-
const apiUrl = overrides?.apiUrl ||
|
|
35
|
+
const apiUrl = overrides?.apiUrl || import_common.DEFAULT_API_URL;
|
|
36
36
|
const response = await fetch(`${apiUrl}${urlPath}`, {
|
|
37
37
|
...options,
|
|
38
38
|
headers: {
|
|
@@ -93,5 +93,5 @@ async function getTokens(chainId, address, ecosystem, overrides) {
|
|
|
93
93
|
getChains,
|
|
94
94
|
getRoute,
|
|
95
95
|
getTokens,
|
|
96
|
-
...require("@xswap-link/
|
|
96
|
+
...require("@xswap-link/common")
|
|
97
97
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// index.ts
|
|
2
|
-
export * from "@xswap-link/
|
|
2
|
+
export * from "@xswap-link/common";
|
|
3
3
|
|
|
4
4
|
// src/services/api.ts
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_API_URL
|
|
7
|
-
} from "@xswap-link/
|
|
7
|
+
} from "@xswap-link/common";
|
|
8
8
|
async function _sendRequest(urlPath, options, overrides) {
|
|
9
9
|
const apiUrl = overrides?.apiUrl || DEFAULT_API_URL;
|
|
10
10
|
const response = await fetch(`${apiUrl}${urlPath}`, {
|
package/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "@xswap-link/
|
|
1
|
+
export * from "@xswap-link/common";
|
|
2
2
|
export * from "./src/services";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xswap-link/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "JavaScript SDK for XSwap platform",
|
|
5
5
|
"homepage": "https://github.com/xswap-link/xswap-sdk",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "jest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@xswap-link/
|
|
28
|
+
"@xswap-link/common": "^0.0.6",
|
|
29
29
|
"ethers": "^5.7.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|