@swapkit/sdk 2.2.22 → 3.0.0-beta.0
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.cjs +3 -0
- package/dist/index.cjs.map +10 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +6 -12
- package/src/index.ts +14 -21
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:e,getOwnPropertyNames:l,getOwnPropertyDescriptor:h}=Object,f=Object.prototype.hasOwnProperty,a=(r,o,p)=>{for(let t of l(o))if(!f.call(r,t)&&t!=="default")e(r,t,{get:()=>o[t],enumerable:!0});if(p){for(let t of l(o))if(!f.call(p,t)&&t!=="default")e(p,t,{get:()=>o[t],enumerable:!0});return p}};var u=new WeakMap,S=(r)=>{var o=u.get(r),p;if(o)return o;if(o=e({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function")l(r).map((t)=>!f.call(o,t)&&e(o,t,{get:()=>r[t],enumerable:!(p=h(r,t))||p.enumerable}));return u.set(r,o),o};var k=(r,o)=>{for(var p in o)e(r,p,{get:o[p],enumerable:!0,configurable:!0,set:(t)=>o[p]=()=>t})};var i={};k(i,{tokenLists:()=>n.tokenLists,getTokenIcon:()=>n.getTokenIcon,defaultPlugins:()=>K,createSwapKit:()=>y,SwapKitApi:()=>d.SwapKitApi});module.exports=S(i);var s=require("@swapkit/core"),g=require("@swapkit/plugins/chainflip"),P=require("@swapkit/plugins/evm"),c=require("@swapkit/plugins/kado"),w=require("@swapkit/plugins/radix"),m=require("@swapkit/plugins/thorchain"),x=require("@swapkit/wallets");a(i,require("@swapkit/core"),module.exports);var n=require("@swapkit/helpers/tokens"),d=require("@swapkit/helpers/api"),K={...g.ChainflipPlugin,...P.EVMPlugin,...c.KadoPlugin,...m.MayachainPlugin,...m.ThorchainPlugin,...w.RadixPlugin};function y(r){return s.SwapKit({...r,wallets:x.wallets,plugins:K})}
|
|
2
|
+
|
|
3
|
+
//# debugId=3411033D63BD596264756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { SwapKit } from \"@swapkit/core\";\nimport { ChainflipPlugin } from \"@swapkit/plugins/chainflip\";\nimport { EVMPlugin } from \"@swapkit/plugins/evm\";\nimport { KadoPlugin } from \"@swapkit/plugins/kado\";\nimport { RadixPlugin } from \"@swapkit/plugins/radix\";\nimport { MayachainPlugin, ThorchainPlugin } from \"@swapkit/plugins/thorchain\";\nimport { wallets as defaultWallets } from \"@swapkit/wallets\";\n\nexport * from \"@swapkit/core\";\nexport { getTokenIcon, tokenLists } from \"@swapkit/helpers/tokens\";\n\nexport const defaultPlugins = {\n ...ChainflipPlugin,\n ...EVMPlugin,\n ...KadoPlugin,\n ...MayachainPlugin,\n ...ThorchainPlugin,\n ...RadixPlugin,\n};\n\nexport function createSwapKit(config: Parameters<typeof SwapKit>[0]) {\n return SwapKit({\n ...config,\n wallets: defaultWallets,\n plugins: defaultPlugins,\n });\n}\n\nexport { SwapKitApi } from \"@swapkit/helpers/api\";\n"
|
|
6
|
+
],
|
|
7
|
+
"mappings": "qzBAAwB,IAAxB,2BACA,wCACA,kCACA,mCACA,oCACA,wCACA,8BAEA,6CACyC,IAAzC,qCAmBA,kCAjBa,EAAiB,IACzB,qBACA,eACA,gBACA,qBACA,qBACA,aACL,EAEO,SAAS,CAAa,CAAC,EAAuC,CACnE,OAAO,UAAQ,IACV,EACH,QAAS,UACT,QAAS,CACX,CAAC",
|
|
8
|
+
"debugId": "3411033D63BD596264756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{SwapKit as
|
|
1
|
+
import{SwapKit as t}from"@swapkit/core";import{ChainflipPlugin as r}from"@swapkit/plugins/chainflip";import{EVMPlugin as i}from"@swapkit/plugins/evm";import{KadoPlugin as a}from"@swapkit/plugins/kado";import{RadixPlugin as p}from"@swapkit/plugins/radix";import{MayachainPlugin as e,ThorchainPlugin as m}from"@swapkit/plugins/thorchain";import{wallets as n}from"@swapkit/wallets";export*from"@swapkit/core";import{getTokenIcon as S,tokenLists as k}from"@swapkit/helpers/tokens";import{SwapKitApi as M}from"@swapkit/helpers/api";var l={...r,...i,...a,...e,...m,...p};function x(o){return t({...o,wallets:n,plugins:l})}export{k as tokenLists,S as getTokenIcon,l as defaultPlugins,x as createSwapKit,M as SwapKitApi};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=78E0A471C2B5363664756E2164756E21
|
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 {
|
|
5
|
+
"import { SwapKit } from \"@swapkit/core\";\nimport { ChainflipPlugin } from \"@swapkit/plugins/chainflip\";\nimport { EVMPlugin } from \"@swapkit/plugins/evm\";\nimport { KadoPlugin } from \"@swapkit/plugins/kado\";\nimport { RadixPlugin } from \"@swapkit/plugins/radix\";\nimport { MayachainPlugin, ThorchainPlugin } from \"@swapkit/plugins/thorchain\";\nimport { wallets as defaultWallets } from \"@swapkit/wallets\";\n\nexport * from \"@swapkit/core\";\nexport { getTokenIcon, tokenLists } from \"@swapkit/helpers/tokens\";\n\nexport const defaultPlugins = {\n ...ChainflipPlugin,\n ...EVMPlugin,\n ...KadoPlugin,\n ...MayachainPlugin,\n ...ThorchainPlugin,\n ...RadixPlugin,\n};\n\nexport function createSwapKit(config: Parameters<typeof SwapKit>[0]) {\n return SwapKit({\n ...config,\n wallets: defaultWallets,\n plugins: defaultPlugins,\n });\n}\n\nexport { SwapKitApi } from \"@swapkit/helpers/api\";\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "AAAA,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "AAAA,kBAAS,sBACT,0BAAS,mCACT,oBAAS,6BACT,qBAAS,8BACT,sBAAS,+BACT,0BAAS,qBAAiB,mCAC1B,kBAAS,yBAET,2BACA,uBAAS,gBAAc,gCAmBvB,qBAAS,6BAjBF,IAAM,EAAiB,IACzB,KACA,KACA,KACA,KACA,KACA,CACL,EAEO,SAAS,CAAa,CAAC,EAAuC,CACnE,OAAO,EAAQ,IACV,EACH,QAAS,EACT,QAAS,CACX,CAAC",
|
|
8
|
+
"debugId": "78E0A471C2B5363664756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-oss",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/
|
|
5
|
-
"@swapkit/
|
|
6
|
-
"@swapkit/
|
|
7
|
-
"@swapkit/plugin-evm": "1.3.22",
|
|
8
|
-
"@swapkit/plugin-kado": "0.2.14",
|
|
9
|
-
"@swapkit/plugin-radix": "1.3.16",
|
|
10
|
-
"@swapkit/plugin-thorchain": "2.3.12",
|
|
11
|
-
"@swapkit/tokens": "2.3.0",
|
|
12
|
-
"@swapkit/wallets": "2.0.25"
|
|
4
|
+
"@swapkit/core": "4.0.0-beta.0",
|
|
5
|
+
"@swapkit/plugins": "1.0.0-beta.0",
|
|
6
|
+
"@swapkit/wallets": "3.0.0-beta.0"
|
|
13
7
|
},
|
|
14
8
|
"description": "SwapKit - SDK",
|
|
15
9
|
"files": [
|
|
@@ -27,10 +21,10 @@
|
|
|
27
21
|
"scripts": {
|
|
28
22
|
"build": "bun run ./build.ts",
|
|
29
23
|
"clean": "rm -rf dist node_modules *.tsbuildinfo",
|
|
30
|
-
"lint": "biome check --
|
|
24
|
+
"lint": "biome check --write ./src",
|
|
31
25
|
"type-check": "tsc --noEmit"
|
|
32
26
|
},
|
|
33
27
|
"type": "module",
|
|
34
28
|
"types": "./src/index.ts",
|
|
35
|
-
"version": "
|
|
36
|
-
}
|
|
29
|
+
"version": "3.0.0-beta.0"
|
|
30
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChainflipPlugin } from "@swapkit/
|
|
3
|
-
import { EVMPlugin } from "@swapkit/
|
|
4
|
-
import { KadoPlugin } from "@swapkit/
|
|
5
|
-
import { RadixPlugin } from "@swapkit/
|
|
6
|
-
import { MayachainPlugin, ThorchainPlugin } from "@swapkit/
|
|
1
|
+
import { SwapKit } from "@swapkit/core";
|
|
2
|
+
import { ChainflipPlugin } from "@swapkit/plugins/chainflip";
|
|
3
|
+
import { EVMPlugin } from "@swapkit/plugins/evm";
|
|
4
|
+
import { KadoPlugin } from "@swapkit/plugins/kado";
|
|
5
|
+
import { RadixPlugin } from "@swapkit/plugins/radix";
|
|
6
|
+
import { MayachainPlugin, ThorchainPlugin } from "@swapkit/plugins/thorchain";
|
|
7
7
|
import { wallets as defaultWallets } from "@swapkit/wallets";
|
|
8
8
|
|
|
9
9
|
export * from "@swapkit/core";
|
|
10
|
-
export { getTokenIcon, tokenLists } from "@swapkit/tokens";
|
|
10
|
+
export { getTokenIcon, tokenLists } from "@swapkit/helpers/tokens";
|
|
11
11
|
|
|
12
12
|
export const defaultPlugins = {
|
|
13
13
|
...ChainflipPlugin,
|
|
@@ -18,19 +18,12 @@ export const defaultPlugins = {
|
|
|
18
18
|
...RadixPlugin,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
wallets,
|
|
27
|
-
...extendParams
|
|
28
|
-
}: SwapKitParams<P, W> = {}) => {
|
|
29
|
-
return SwapKit<P, W>({
|
|
30
|
-
...extendParams,
|
|
31
|
-
wallets: (wallets || defaultWallets) as W,
|
|
32
|
-
plugins: (plugins || defaultPlugins) as P,
|
|
21
|
+
export function createSwapKit(config: Parameters<typeof SwapKit>[0]) {
|
|
22
|
+
return SwapKit({
|
|
23
|
+
...config,
|
|
24
|
+
wallets: defaultWallets,
|
|
25
|
+
plugins: defaultPlugins,
|
|
33
26
|
});
|
|
34
|
-
}
|
|
27
|
+
}
|
|
35
28
|
|
|
36
|
-
export { SwapKitApi } from "@swapkit/api";
|
|
29
|
+
export { SwapKitApi } from "@swapkit/helpers/api";
|