@swapkit/core 1.0.0-rc.3 → 1.0.0-rc.6
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.d.ts +4 -2
- package/dist/index.es.js +237 -228
- package/package.json +13 -13
- package/src/client/explorerUrls.ts +2 -0
- package/src/client/index.ts +2 -2
- package/src/client/types.ts +2 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "swapkit-oss-team",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/types": "1.0.0-rc.
|
|
5
|
-
"@swapkit/helpers": "1.0.0-rc.
|
|
4
|
+
"@swapkit/types": "1.0.0-rc.1",
|
|
5
|
+
"@swapkit/helpers": "1.0.0-rc.2"
|
|
6
6
|
},
|
|
7
7
|
"description": "SwapKit Lib core",
|
|
8
8
|
"devDependencies": {
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
"vite-plugin-wasm": "3.2.2",
|
|
14
14
|
"vitest": "0.34.4",
|
|
15
15
|
"@internal/config": "0.0.0-internal.0",
|
|
16
|
-
"@swapkit/api": "1.0.0-rc.
|
|
17
|
-
"@swapkit/tokens": "1.0.0-rc.
|
|
18
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.
|
|
19
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.
|
|
20
|
-
"@swapkit/toolbox-utxo": "1.0.0-rc.
|
|
16
|
+
"@swapkit/api": "1.0.0-rc.1",
|
|
17
|
+
"@swapkit/tokens": "1.0.0-rc.1",
|
|
18
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.4",
|
|
19
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.3",
|
|
20
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.3"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@swapkit/api": "1.0.0-rc.
|
|
24
|
-
"@swapkit/tokens": "1.0.0-rc.
|
|
25
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.
|
|
26
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.
|
|
27
|
-
"@swapkit/toolbox-utxo": "1.0.0-rc.
|
|
23
|
+
"@swapkit/api": "1.0.0-rc.1",
|
|
24
|
+
"@swapkit/tokens": "1.0.0-rc.1",
|
|
25
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.4",
|
|
26
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.3",
|
|
27
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.3"
|
|
28
28
|
},
|
|
29
29
|
"eslintConfig": {
|
|
30
30
|
"extends": "../../../internal/eslint-config"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"repository": "https://github.com/thorswap/SwapKit.git",
|
|
53
53
|
"type": "module",
|
|
54
54
|
"types": "./dist/index.d.ts",
|
|
55
|
-
"version": "1.0.0-rc.
|
|
55
|
+
"version": "1.0.0-rc.6",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "NODE_OPTIONS=--max_old_space_size=16384 vite build",
|
|
58
58
|
"clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
|
|
@@ -8,6 +8,7 @@ export const getExplorerTxUrl = ({ chain, txHash }: { txHash: string; chain: Cha
|
|
|
8
8
|
case Chain.Bitcoin:
|
|
9
9
|
case Chain.BitcoinCash:
|
|
10
10
|
case Chain.Maya:
|
|
11
|
+
case Chain.Kujira:
|
|
11
12
|
case Chain.THORChain:
|
|
12
13
|
return `${baseUrl}/tx/${txHash}`;
|
|
13
14
|
|
|
@@ -46,6 +47,7 @@ export const getExplorerAddressUrl = ({ chain, address }: { address: string; cha
|
|
|
46
47
|
case Chain.Maya:
|
|
47
48
|
case Chain.Optimism:
|
|
48
49
|
case Chain.Polygon:
|
|
50
|
+
case Chain.Kujira:
|
|
49
51
|
case Chain.THORChain:
|
|
50
52
|
return `${baseUrl}/address/${address}`;
|
|
51
53
|
|
package/src/client/index.ts
CHANGED
|
@@ -393,7 +393,7 @@ export class SwapKitCore<T = ''> {
|
|
|
393
393
|
assetValue: AssetValue;
|
|
394
394
|
percent: number;
|
|
395
395
|
from: 'sym' | 'rune' | 'asset';
|
|
396
|
-
to: 'sym' | 'rune';
|
|
396
|
+
to: 'sym' | 'rune' | 'asset';
|
|
397
397
|
}) => {
|
|
398
398
|
const targetAsset =
|
|
399
399
|
to === 'rune'
|
|
@@ -576,7 +576,7 @@ export class SwapKitCore<T = ''> {
|
|
|
576
576
|
connectTrezor = async (_chains: Chain, _derivationPath: number[]): Promise<void> => {
|
|
577
577
|
throw new SwapKitError('core_wallet_trezor_not_installed');
|
|
578
578
|
};
|
|
579
|
-
connectKeplr = async (): Promise<void> => {
|
|
579
|
+
connectKeplr = async (_chain: Chain): Promise<void> => {
|
|
580
580
|
throw new SwapKitError('core_wallet_keplr_not_installed');
|
|
581
581
|
};
|
|
582
582
|
connectOkx = async (_chains: Chain[]): Promise<void> => {
|
package/src/client/types.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
BinanceToolbox,
|
|
5
5
|
DepositParam,
|
|
6
6
|
GaiaToolbox,
|
|
7
|
+
KujiraToolbox,
|
|
7
8
|
ThorchainToolboxType,
|
|
8
9
|
} from '@swapkit/toolbox-cosmos';
|
|
9
10
|
import type {
|
|
@@ -86,6 +87,7 @@ export type WalletMethods = {
|
|
|
86
87
|
[Chain.Cosmos]: CosmosBasedWallet<typeof GaiaToolbox> | null;
|
|
87
88
|
[Chain.Dogecoin]: UTXOWallet<typeof DOGEToolbox> | null;
|
|
88
89
|
[Chain.Ethereum]: EVMWallet<typeof ETHToolbox> | null;
|
|
90
|
+
[Chain.Kujira]: CosmosBasedWallet<typeof KujiraToolbox> | null;
|
|
89
91
|
[Chain.Litecoin]: UTXOWallet<typeof LTCToolbox> | null;
|
|
90
92
|
[Chain.Maya]: ThorchainWallet | null;
|
|
91
93
|
[Chain.Optimism]: EVMWallet<typeof OPToolbox> | null;
|