@swapkit/sdk 4.6.6 → 4.6.8

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/package.json CHANGED
@@ -2,14 +2,14 @@
2
2
  "author": "swapkit-dev",
3
3
  "dependencies": {
4
4
  "@stricahq/typhonjs": "~3.0.1",
5
- "@swapkit/core": "^4.4.13",
5
+ "@swapkit/core": "^4.4.18",
6
6
  "@swapkit/helpers": "^4.13.0",
7
7
  "@swapkit/plugins": "^4.6.26",
8
8
  "@swapkit/server": "^4.2.37",
9
- "@swapkit/toolboxes": "^4.15.0",
9
+ "@swapkit/toolboxes": "^4.15.5",
10
10
  "@swapkit/wallet-core": "^4.2.0",
11
11
  "@swapkit/wallet-keystore": "^4.3.19",
12
- "@swapkit/wallets": "4.8.0",
12
+ "@swapkit/wallets": "4.8.2",
13
13
  "cosmjs-types": "0.10.1"
14
14
  },
15
15
  "description": "SwapKit - SDK",
@@ -45,7 +45,7 @@
45
45
  "types": "./dist/types/wallets.d.ts"
46
46
  }
47
47
  },
48
- "files": ["dist/"],
48
+ "files": ["dist/", "src/"],
49
49
  "homepage": "https://github.com/swapkit/wallets",
50
50
  "license": "SEE LICENSE IN LICENSE",
51
51
  "name": "@swapkit/sdk",
@@ -59,5 +59,5 @@
59
59
  "type-check:go": "tsgo"
60
60
  },
61
61
  "type": "module",
62
- "version": "4.6.6"
62
+ "version": "4.6.8"
63
63
  }
package/src/core.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@swapkit/core";
package/src/index.ts ADDED
@@ -0,0 +1,143 @@
1
+ import { type SKConfigState, SwapKit } from "@swapkit/core";
2
+ import type { createPlugin } from "@swapkit/plugins";
3
+ import { ChainflipPlugin } from "@swapkit/plugins/chainflip";
4
+ import { EVMPlugin } from "@swapkit/plugins/evm";
5
+ import { GardenPlugin } from "@swapkit/plugins/garden";
6
+ import { HarborPlugin } from "@swapkit/plugins/harbor";
7
+ import { NearPlugin } from "@swapkit/plugins/near";
8
+ import { RadixPlugin } from "@swapkit/plugins/radix";
9
+ import { SolanaPlugin } from "@swapkit/plugins/solana";
10
+ import { SwapKitPlugin } from "@swapkit/plugins/swapkit";
11
+ import { MayachainPlugin, ThorchainPlugin } from "@swapkit/plugins/thorchain";
12
+ import type { createWallet } from "@swapkit/wallets";
13
+
14
+ import { bitgetWallet } from "@swapkit/wallets/bitget";
15
+ import { coinbaseWallet } from "@swapkit/wallets/coinbase";
16
+ import { ctrlWallet } from "@swapkit/wallets/ctrl";
17
+ import { evmWallet } from "@swapkit/wallets/evm-extensions";
18
+ import { keepkeyWallet } from "@swapkit/wallets/keepkey";
19
+ import { keepkeyBexWallet } from "@swapkit/wallets/keepkey-bex";
20
+ import { keplrWallet } from "@swapkit/wallets/keplr";
21
+ import { keystoreWallet } from "@swapkit/wallets/keystore";
22
+ import { ledgerWallet } from "@swapkit/wallets/ledger";
23
+ import { walletSelectorWallet } from "@swapkit/wallets/near-wallet-selector";
24
+ import { okxWallet } from "@swapkit/wallets/okx";
25
+ import { onekeyWallet } from "@swapkit/wallets/onekey";
26
+ import { passkeysWallet } from "@swapkit/wallets/passkeys";
27
+ import { phantomWallet } from "@swapkit/wallets/phantom";
28
+ import { radixWallet } from "@swapkit/wallets/radix";
29
+ import { talismanWallet } from "@swapkit/wallets/talisman";
30
+ import { trezorWallet } from "@swapkit/wallets/trezor";
31
+ import { tronlinkWallet } from "@swapkit/wallets/tronlink";
32
+ import { walletconnectWallet } from "@swapkit/wallets/walletconnect";
33
+ import { xamanWallet } from "@swapkit/wallets/xaman";
34
+
35
+ export * from "@swapkit/core";
36
+ export * from "@swapkit/helpers";
37
+ export * from "@swapkit/helpers/api";
38
+ export * from "@swapkit/plugins";
39
+ export * from "@swapkit/plugins/chainflip";
40
+ export * from "@swapkit/plugins/evm";
41
+ export * from "@swapkit/plugins/harbor";
42
+ export * from "@swapkit/plugins/near";
43
+ export * from "@swapkit/plugins/radix";
44
+ export * from "@swapkit/plugins/solana";
45
+ export * from "@swapkit/plugins/swapkit";
46
+ export * from "@swapkit/plugins/thorchain";
47
+ export type { HDWalletAccountParams } from "@swapkit/toolboxes";
48
+ export * from "@swapkit/toolboxes";
49
+ export * from "@swapkit/toolboxes/cosmos";
50
+ export * from "@swapkit/toolboxes/evm";
51
+ export * from "@swapkit/toolboxes/radix";
52
+ export * from "@swapkit/toolboxes/solana";
53
+ export * from "@swapkit/toolboxes/utxo";
54
+ export * from "@swapkit/wallets";
55
+
56
+ const exodusWallet = { ...passkeysWallet, connectExodusWallet: passkeysWallet.connectPasskeys };
57
+
58
+ export {
59
+ bitgetWallet,
60
+ coinbaseWallet,
61
+ ctrlWallet,
62
+ evmWallet,
63
+ exodusWallet,
64
+ keepkeyBexWallet,
65
+ keepkeyWallet,
66
+ keplrWallet,
67
+ keystoreWallet,
68
+ ledgerWallet,
69
+ okxWallet,
70
+ onekeyWallet,
71
+ passkeysWallet,
72
+ phantomWallet,
73
+ radixWallet,
74
+ talismanWallet,
75
+ trezorWallet,
76
+ tronlinkWallet,
77
+ walletconnectWallet,
78
+ walletSelectorWallet,
79
+ xamanWallet,
80
+ };
81
+
82
+ export const defaultPlugins = {
83
+ ...ChainflipPlugin,
84
+ ...EVMPlugin,
85
+ ...MayachainPlugin,
86
+ ...ThorchainPlugin,
87
+ ...RadixPlugin,
88
+ ...SolanaPlugin,
89
+ ...NearPlugin,
90
+ ...GardenPlugin,
91
+ ...SwapKitPlugin,
92
+ ...HarborPlugin,
93
+ };
94
+
95
+ export const defaultWallets = {
96
+ ...bitgetWallet,
97
+ ...coinbaseWallet,
98
+ ...ctrlWallet,
99
+ ...evmWallet,
100
+ ...exodusWallet,
101
+ ...keepkeyBexWallet,
102
+ ...keepkeyWallet,
103
+ ...keplrWallet,
104
+ ...keystoreWallet,
105
+ ...ledgerWallet,
106
+ ...okxWallet,
107
+ ...onekeyWallet,
108
+ ...phantomWallet,
109
+ ...passkeysWallet,
110
+ ...radixWallet,
111
+ ...talismanWallet,
112
+ ...trezorWallet,
113
+ ...tronlinkWallet,
114
+ ...walletSelectorWallet,
115
+ ...walletconnectWallet,
116
+ ...xamanWallet,
117
+ } as ReturnType<typeof createWallet>;
118
+
119
+ export type SwapKitClient<
120
+ Plugins extends ReturnType<typeof createPlugin>,
121
+ Wallets extends ReturnType<typeof createWallet>,
122
+ > = ReturnType<typeof SwapKit<typeof defaultPlugins & Plugins, typeof defaultWallets & Wallets>>;
123
+
124
+ export function createSwapKit<
125
+ Plugins extends ReturnType<typeof createPlugin>,
126
+ Wallets extends ReturnType<typeof createWallet>,
127
+ >({
128
+ config,
129
+ plugins,
130
+ wallets,
131
+ }: {
132
+ config?: SKConfigState;
133
+ plugins?: Plugins;
134
+ wallets?: Wallets;
135
+ } = {}): SwapKitClient<Plugins, Wallets> {
136
+ const mergedPlugins = { ...defaultPlugins, ...plugins };
137
+ const mergedWallets = { ...defaultWallets, ...wallets };
138
+
139
+ return SwapKit({ config: config, plugins: mergedPlugins, wallets: mergedWallets }) as unknown as SwapKitClient<
140
+ Plugins,
141
+ Wallets
142
+ >;
143
+ }
package/src/plugins.ts ADDED
@@ -0,0 +1,9 @@
1
+ export * from "@swapkit/plugins";
2
+ export * from "@swapkit/plugins/chainflip";
3
+ export * from "@swapkit/plugins/evm";
4
+ export * from "@swapkit/plugins/harbor";
5
+ export * from "@swapkit/plugins/near";
6
+ export * from "@swapkit/plugins/radix";
7
+ export * from "@swapkit/plugins/solana";
8
+ export * from "@swapkit/plugins/swapkit";
9
+ export * from "@swapkit/plugins/thorchain";
package/src/server.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "@swapkit/server";
package/src/wallets.ts ADDED
@@ -0,0 +1,21 @@
1
+ export * from "@swapkit/wallets";
2
+ export * from "@swapkit/wallets/bitget";
3
+ export * from "@swapkit/wallets/coinbase";
4
+ export * from "@swapkit/wallets/cosmostation";
5
+ export * from "@swapkit/wallets/ctrl";
6
+ export * from "@swapkit/wallets/evm-extensions";
7
+ export * from "@swapkit/wallets/keepkey";
8
+ export * from "@swapkit/wallets/keepkey-bex";
9
+ export * from "@swapkit/wallets/keplr";
10
+ export * from "@swapkit/wallets/keystore";
11
+ export * from "@swapkit/wallets/ledger";
12
+ export * from "@swapkit/wallets/near-wallet-selector";
13
+ export * from "@swapkit/wallets/okx";
14
+ export * from "@swapkit/wallets/onekey";
15
+ export * from "@swapkit/wallets/phantom";
16
+ export * from "@swapkit/wallets/radix";
17
+ export * from "@swapkit/wallets/talisman";
18
+ export * from "@swapkit/wallets/trezor";
19
+ export * from "@swapkit/wallets/tronlink";
20
+ export * from "@swapkit/wallets/walletconnect";
21
+ export * from "@swapkit/wallets/xaman";