@swapkit/sdk 2.1.8 → 2.2.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/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +2 -2
- package/src/index.ts +9 -6
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{SwapKit as
|
|
1
|
+
import{SwapKit as i}from"@swapkit/core";import{ChainflipPlugin as p}from"@swapkit/plugin-chainflip";import{EVMPlugin as l}from"@swapkit/plugin-evm";import{KadoPlugin as o}from"@swapkit/plugin-kado";import{RadixPlugin as r}from"@swapkit/plugin-radix";import{MayachainPlugin as s,ThorchainPlugin as m}from"@swapkit/plugin-thorchain";import{wallets as n}from"@swapkit/wallets";export*from"@swapkit/core";export*from"@swapkit/tokens";import{SwapKitApi as h}from"@swapkit/api";var f={...p,...l,...o,...s,...m,...r},w=({plugins:t,wallets:e,...a}={})=>{return i({...a,wallets:e||n,plugins:t||f})};export{f as defaultPlugins,w as createSwapKit,h as SwapKitApi};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=0DE46DE090BC7AC864756E2164756E21
|
package/dist/index.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import { SwapKit, type SwapKitParams } from \"@swapkit/core\";\nimport { ChainflipPlugin } from \"@swapkit/plugin-chainflip\";\nimport { EVMPlugin } from \"@swapkit/plugin-evm\";\nimport { KadoPlugin } from \"@swapkit/plugin-kado\";\nimport { RadixPlugin } from \"@swapkit/plugin-radix\";\nimport { MayachainPlugin, ThorchainPlugin } from \"@swapkit/plugin-thorchain\";\nimport { wallets as defaultWallets } from \"@swapkit/wallets\";\n\nexport * from \"@swapkit/core\";\nexport * from \"@swapkit/tokens\";\n\
|
|
5
|
+
"import { type PluginsType, SwapKit, type SwapKitParams, type WalletsType } from \"@swapkit/core\";\nimport { ChainflipPlugin } from \"@swapkit/plugin-chainflip\";\nimport { EVMPlugin } from \"@swapkit/plugin-evm\";\nimport { KadoPlugin } from \"@swapkit/plugin-kado\";\nimport { RadixPlugin } from \"@swapkit/plugin-radix\";\nimport { MayachainPlugin, ThorchainPlugin } from \"@swapkit/plugin-thorchain\";\nimport { wallets as defaultWallets } from \"@swapkit/wallets\";\n\nexport * from \"@swapkit/core\";\nexport * from \"@swapkit/tokens\";\n\nexport const defaultPlugins = {\n ...ChainflipPlugin,\n ...EVMPlugin,\n ...KadoPlugin,\n ...MayachainPlugin,\n ...ThorchainPlugin,\n ...RadixPlugin,\n};\n\nexport const createSwapKit = <\n P extends PluginsType = typeof defaultPlugins,\n W extends WalletsType = typeof defaultWallets,\n>({\n plugins,\n wallets,\n ...extendParams\n}: SwapKitParams<P, W> = {}) => {\n return SwapKit<P, W>({\n ...extendParams,\n wallets: (wallets || defaultWallets) as W,\n plugins: (plugins || defaultPlugins) as P,\n });\n};\n\nexport { SwapKitApi } from \"@swapkit/api\";\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "AAAA,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "AAAA,kBAA2B,sBAC3B,0BAAS,kCACT,oBAAS,4BACT,qBAAS,6BACT,sBAAS,8BACT,0BAAS,qBAAiB,kCAC1B,kBAAS,yBAET,2BACA,6BA0BA,qBAAS,qBAxBF,IAAM,EAAiB,IACzB,KACA,KACA,KACA,KACA,KACA,CACL,EAEa,EAAgB,EAI3B,UACA,aACG,GACoB,CAAC,IAAM,CAC9B,OAAO,EAAc,IAChB,EACH,QAAU,GAAW,EACrB,QAAU,GAAW,CACvB,CAAC",
|
|
8
|
+
"debugId": "0DE46DE090BC7AC864756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"author": "swapkit-oss",
|
|
3
3
|
"dependencies": {
|
|
4
4
|
"@swapkit/api": "2.1.0",
|
|
5
|
-
"@swapkit/core": "3.2.
|
|
5
|
+
"@swapkit/core": "3.2.4",
|
|
6
6
|
"@swapkit/plugin-chainflip": "1.5.0",
|
|
7
7
|
"@swapkit/plugin-evm": "1.3.8",
|
|
8
8
|
"@swapkit/plugin-kado": "0.2.2",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
},
|
|
33
33
|
"type": "module",
|
|
34
34
|
"types": "./src/index.ts",
|
|
35
|
-
"version": "2.1
|
|
35
|
+
"version": "2.2.1"
|
|
36
36
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SwapKit, type SwapKitParams } from "@swapkit/core";
|
|
1
|
+
import { type PluginsType, SwapKit, type SwapKitParams, type WalletsType } from "@swapkit/core";
|
|
2
2
|
import { ChainflipPlugin } from "@swapkit/plugin-chainflip";
|
|
3
3
|
import { EVMPlugin } from "@swapkit/plugin-evm";
|
|
4
4
|
import { KadoPlugin } from "@swapkit/plugin-kado";
|
|
@@ -9,7 +9,7 @@ import { wallets as defaultWallets } from "@swapkit/wallets";
|
|
|
9
9
|
export * from "@swapkit/core";
|
|
10
10
|
export * from "@swapkit/tokens";
|
|
11
11
|
|
|
12
|
-
const defaultPlugins = {
|
|
12
|
+
export const defaultPlugins = {
|
|
13
13
|
...ChainflipPlugin,
|
|
14
14
|
...EVMPlugin,
|
|
15
15
|
...KadoPlugin,
|
|
@@ -18,15 +18,18 @@ const defaultPlugins = {
|
|
|
18
18
|
...RadixPlugin,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export const createSwapKit = <
|
|
21
|
+
export const createSwapKit = <
|
|
22
|
+
P extends PluginsType = typeof defaultPlugins,
|
|
23
|
+
W extends WalletsType = typeof defaultWallets,
|
|
24
|
+
>({
|
|
22
25
|
plugins,
|
|
23
26
|
wallets,
|
|
24
27
|
...extendParams
|
|
25
28
|
}: SwapKitParams<P, W> = {}) => {
|
|
26
|
-
return SwapKit({
|
|
29
|
+
return SwapKit<P, W>({
|
|
27
30
|
...extendParams,
|
|
28
|
-
wallets: wallets || defaultWallets,
|
|
29
|
-
plugins: plugins || defaultPlugins,
|
|
31
|
+
wallets: (wallets || defaultWallets) as W,
|
|
32
|
+
plugins: (plugins || defaultPlugins) as P,
|
|
30
33
|
});
|
|
31
34
|
};
|
|
32
35
|
|