@swapkit/core 1.0.0-rc.91 → 1.0.0-rc.93
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 +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +246 -227
- package/dist/index.es.js.map +1 -1
- package/package.json +13 -11
- package/src/client/types.ts +6 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-oss-team",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/helpers": "1.0.0-rc.
|
|
5
|
-
"@swapkit/types": "1.0.0-rc.
|
|
4
|
+
"@swapkit/helpers": "1.0.0-rc.68",
|
|
5
|
+
"@swapkit/types": "1.0.0-rc.36"
|
|
6
6
|
},
|
|
7
7
|
"description": "SwapKit Lib core",
|
|
8
8
|
"devDependencies": {
|
|
@@ -10,16 +10,18 @@
|
|
|
10
10
|
"vite": "5.0.12",
|
|
11
11
|
"vitest": "1.2.1",
|
|
12
12
|
"@internal/config": "0.0.2-rc.0",
|
|
13
|
-
"@swapkit/tokens": "1.0.0-rc.
|
|
14
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.
|
|
15
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.
|
|
16
|
-
"@swapkit/toolbox-
|
|
13
|
+
"@swapkit/tokens": "1.0.0-rc.34",
|
|
14
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.76",
|
|
15
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.74",
|
|
16
|
+
"@swapkit/toolbox-substrate": "1.0.0-rc.2",
|
|
17
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.73"
|
|
17
18
|
},
|
|
18
19
|
"peerDependencies": {
|
|
19
|
-
"@swapkit/tokens": "1.0.0-rc.
|
|
20
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.
|
|
21
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.
|
|
22
|
-
"@swapkit/toolbox-
|
|
20
|
+
"@swapkit/tokens": "1.0.0-rc.34",
|
|
21
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.76",
|
|
22
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.74",
|
|
23
|
+
"@swapkit/toolbox-substrate": "1.0.0-rc.2",
|
|
24
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.73"
|
|
23
25
|
},
|
|
24
26
|
"eslintConfig": {
|
|
25
27
|
"extends": "../../../internal/eslint-config"
|
|
@@ -47,7 +49,7 @@
|
|
|
47
49
|
},
|
|
48
50
|
"type": "module",
|
|
49
51
|
"types": "./dist/index.d.ts",
|
|
50
|
-
"version": "1.0.0-rc.
|
|
52
|
+
"version": "1.0.0-rc.93",
|
|
51
53
|
"scripts": {
|
|
52
54
|
"build": "NODE_OPTIONS=--max_old_space_size=16384 vite build",
|
|
53
55
|
"clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
|
package/src/client/types.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
MATICToolbox,
|
|
15
15
|
OPToolbox,
|
|
16
16
|
} from '@swapkit/toolbox-evm';
|
|
17
|
+
import type { ChainflipToolbox, PolkadotToolbox } from '@swapkit/toolbox-substrate';
|
|
17
18
|
import type { BCHToolbox, BTCToolbox, DOGEToolbox, LTCToolbox } from '@swapkit/toolbox-utxo';
|
|
18
19
|
import type { Chain, FeeOption, WalletOption } from '@swapkit/types';
|
|
19
20
|
|
|
@@ -62,6 +63,9 @@ export type CosmosBasedWallet<T extends typeof BinanceToolbox | typeof GaiaToolb
|
|
|
62
63
|
transfer: (params: CoreTxParams) => Promise<string>;
|
|
63
64
|
};
|
|
64
65
|
|
|
66
|
+
export type SubstrateBasedWallet<T extends typeof PolkadotToolbox | typeof ChainflipToolbox> =
|
|
67
|
+
Awaited<ReturnType<T>>;
|
|
68
|
+
|
|
65
69
|
export type EVMWallet<
|
|
66
70
|
T extends typeof AVAXToolbox | typeof BSCToolbox | typeof ETHToolbox | typeof OPToolbox,
|
|
67
71
|
> = BaseWalletMethods &
|
|
@@ -87,6 +91,8 @@ export type WalletMethods = {
|
|
|
87
91
|
[Chain.Dogecoin]: UTXOWallet<typeof DOGEToolbox> | null;
|
|
88
92
|
[Chain.Ethereum]: EVMWallet<typeof ETHToolbox> | null;
|
|
89
93
|
[Chain.Kujira]: CosmosBasedWallet<typeof KujiraToolbox> | null;
|
|
94
|
+
[Chain.Polkadot]: SubstrateBasedWallet<typeof PolkadotToolbox> | null;
|
|
95
|
+
[Chain.Chainflip]: SubstrateBasedWallet<typeof ChainflipToolbox> | null;
|
|
90
96
|
[Chain.Litecoin]: UTXOWallet<typeof LTCToolbox> | null;
|
|
91
97
|
[Chain.Maya]: ThorchainWallet | null;
|
|
92
98
|
[Chain.Optimism]: EVMWallet<typeof OPToolbox> | null;
|