@swapkit/wallets 4.0.0-beta.53 → 4.0.0-beta.55
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/{chunk-e674mh4n.js → chunk-mcrgqfr9.js} +3 -3
- package/dist/{chunk-e674mh4n.js.map → chunk-mcrgqfr9.js.map} +1 -1
- package/dist/{chunk-mvbb9fwb.js → chunk-sbf0f2p4.js} +2 -2
- package/dist/{chunk-p2ca0j1v.js → chunk-yqaz2d25.js} +3 -3
- package/dist/{chunk-p2ca0j1v.js.map → chunk-yqaz2d25.js.map} +1 -1
- package/dist/src/bitget/index.cjs +2 -2
- package/dist/src/bitget/index.cjs.map +3 -3
- package/dist/src/bitget/index.js +2 -2
- package/dist/src/bitget/index.js.map +3 -3
- package/dist/src/coinbase/index.cjs +2 -2
- package/dist/src/coinbase/index.cjs.map +3 -3
- package/dist/src/coinbase/index.js +2 -2
- package/dist/src/coinbase/index.js.map +3 -3
- package/dist/src/cosmostation/index.cjs +2 -2
- package/dist/src/cosmostation/index.cjs.map +3 -3
- package/dist/src/cosmostation/index.js +2 -2
- package/dist/src/cosmostation/index.js.map +3 -3
- package/dist/src/ctrl/index.cjs +2 -2
- package/dist/src/ctrl/index.cjs.map +3 -3
- package/dist/src/ctrl/index.js +2 -2
- package/dist/src/ctrl/index.js.map +3 -3
- package/dist/src/evm-extensions/index.cjs +2 -2
- package/dist/src/evm-extensions/index.cjs.map +3 -3
- package/dist/src/evm-extensions/index.js +2 -2
- package/dist/src/evm-extensions/index.js.map +3 -3
- package/dist/src/exodus/index.cjs +2 -2
- package/dist/src/exodus/index.cjs.map +3 -3
- package/dist/src/exodus/index.js +2 -2
- package/dist/src/exodus/index.js.map +3 -3
- package/dist/src/index.cjs +2 -2
- package/dist/src/index.cjs.map +5 -3
- package/dist/src/index.js +2 -2
- package/dist/src/index.js.map +5 -3
- package/dist/src/keepkey-bex/index.cjs +2 -2
- package/dist/src/keepkey-bex/index.cjs.map +3 -3
- package/dist/src/keepkey-bex/index.js +2 -2
- package/dist/src/keepkey-bex/index.js.map +3 -3
- package/dist/src/keepkey.cjs +4 -0
- package/dist/src/keepkey.cjs.map +10 -0
- package/dist/src/keepkey.js +4 -0
- package/dist/src/keepkey.js.map +10 -0
- package/dist/src/keplr/index.cjs +2 -2
- package/dist/src/keplr/index.cjs.map +3 -3
- package/dist/src/keplr/index.js +2 -2
- package/dist/src/keplr/index.js.map +3 -3
- package/dist/src/keystore.cjs +4 -0
- package/dist/src/keystore.cjs.map +10 -0
- package/dist/src/keystore.js +4 -0
- package/dist/src/keystore.js.map +10 -0
- package/dist/src/ledger.cjs +4 -0
- package/dist/src/ledger.cjs.map +10 -0
- package/dist/src/ledger.js +4 -0
- package/dist/src/ledger.js.map +10 -0
- package/dist/src/okx/index.cjs +2 -2
- package/dist/src/okx/index.cjs.map +4 -4
- package/dist/src/okx/index.js +2 -2
- package/dist/src/okx/index.js.map +4 -4
- package/dist/src/onekey/index.cjs +2 -2
- package/dist/src/onekey/index.cjs.map +3 -3
- package/dist/src/onekey/index.js +2 -2
- package/dist/src/onekey/index.js.map +3 -3
- package/dist/src/phantom/index.cjs +2 -2
- package/dist/src/phantom/index.cjs.map +3 -3
- package/dist/src/phantom/index.js +2 -2
- package/dist/src/phantom/index.js.map +3 -3
- package/dist/src/polkadotjs/index.cjs +2 -2
- package/dist/src/polkadotjs/index.cjs.map +3 -3
- package/dist/src/polkadotjs/index.js +2 -2
- package/dist/src/polkadotjs/index.js.map +3 -3
- package/dist/src/radix/index.cjs +2 -2
- package/dist/src/radix/index.cjs.map +3 -3
- package/dist/src/radix/index.js +2 -2
- package/dist/src/radix/index.js.map +3 -3
- package/dist/src/talisman/index.cjs +2 -2
- package/dist/src/talisman/index.cjs.map +3 -3
- package/dist/src/talisman/index.js +2 -2
- package/dist/src/talisman/index.js.map +3 -3
- package/dist/src/trezor.cjs +4 -0
- package/dist/src/trezor.cjs.map +10 -0
- package/dist/src/trezor.js +4 -0
- package/dist/src/trezor.js.map +10 -0
- package/dist/src/vultisig/index.cjs +2 -2
- package/dist/src/vultisig/index.cjs.map +3 -3
- package/dist/src/vultisig/index.js +2 -2
- package/dist/src/vultisig/index.js.map +3 -3
- package/dist/src/walletconnect/index.cjs +2 -2
- package/dist/src/walletconnect/index.cjs.map +3 -3
- package/dist/src/walletconnect/index.js +2 -2
- package/dist/src/walletconnect/index.js.map +3 -3
- package/dist/src/xaman/index.cjs +2 -2
- package/dist/src/xaman/index.cjs.map +5 -5
- package/dist/src/xaman/index.js +2 -2
- package/dist/src/xaman/index.js.map +5 -5
- package/dist/types/bitget/helpers.d.ts +330 -0
- package/dist/types/bitget/helpers.d.ts.map +1 -0
- package/dist/types/bitget/index.d.ts +11 -0
- package/dist/types/bitget/index.d.ts.map +1 -0
- package/dist/types/coinbase/index.d.ts +11 -0
- package/dist/types/coinbase/index.d.ts.map +1 -0
- package/dist/types/coinbase/signer.d.ts +91 -0
- package/dist/types/coinbase/signer.d.ts.map +1 -0
- package/dist/types/cosmostation/index.d.ts +21 -0
- package/dist/types/cosmostation/index.d.ts.map +1 -0
- package/dist/types/ctrl/index.d.ts +11 -0
- package/dist/types/ctrl/index.d.ts.map +1 -0
- package/dist/types/ctrl/walletHelpers.d.ts +24 -0
- package/dist/types/ctrl/walletHelpers.d.ts.map +1 -0
- package/dist/types/evm-extensions/index.d.ts +101 -0
- package/dist/types/evm-extensions/index.d.ts.map +1 -0
- package/{src/evm-extensions/types.ts → dist/types/evm-extensions/types.d.ts} +11 -13
- package/dist/types/evm-extensions/types.d.ts.map +1 -0
- package/dist/types/exodus/index.d.ts +14 -0
- package/dist/types/exodus/index.d.ts.map +1 -0
- package/dist/types/helpers/near.d.ts +57 -0
- package/dist/types/helpers/near.d.ts.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/keepkey-bex/index.d.ts +11 -0
- package/dist/types/keepkey-bex/index.d.ts.map +1 -0
- package/dist/types/keepkey-bex/walletHelpers.d.ts +45 -0
- package/dist/types/keepkey-bex/walletHelpers.d.ts.map +1 -0
- package/dist/types/keepkey.d.ts +2 -0
- package/dist/types/keepkey.d.ts.map +1 -0
- package/dist/types/keplr/chainRegistry.d.ts +4 -0
- package/dist/types/keplr/chainRegistry.d.ts.map +1 -0
- package/dist/types/keplr/index.d.ts +11 -0
- package/dist/types/keplr/index.d.ts.map +1 -0
- package/dist/types/keystore.d.ts +2 -0
- package/dist/types/keystore.d.ts.map +1 -0
- package/dist/types/ledger.d.ts +2 -0
- package/dist/types/ledger.d.ts.map +1 -0
- package/dist/types/okx/helpers.d.ts +227 -0
- package/dist/types/okx/helpers.d.ts.map +1 -0
- package/dist/types/okx/index.d.ts +11 -0
- package/dist/types/okx/index.d.ts.map +1 -0
- package/dist/types/okx/types.d.ts +104 -0
- package/dist/types/okx/types.d.ts.map +1 -0
- package/dist/types/onekey/evmSigner.d.ts +29 -0
- package/dist/types/onekey/evmSigner.d.ts.map +1 -0
- package/dist/types/onekey/index.d.ts +11 -0
- package/dist/types/onekey/index.d.ts.map +1 -0
- package/dist/types/phantom/index.d.ts +12 -0
- package/dist/types/phantom/index.d.ts.map +1 -0
- package/dist/types/polkadotjs/index.d.ts +11 -0
- package/dist/types/polkadotjs/index.d.ts.map +1 -0
- package/dist/types/radix/index.d.ts +11 -0
- package/dist/types/radix/index.d.ts.map +1 -0
- package/dist/types/talisman/index.d.ts +11 -0
- package/dist/types/talisman/index.d.ts.map +1 -0
- package/dist/types/trezor.d.ts +2 -0
- package/dist/types/trezor.d.ts.map +1 -0
- package/dist/types/types.d.ts +246 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/utils.d.ts +4 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/vultisig/index.d.ts +11 -0
- package/dist/types/vultisig/index.d.ts.map +1 -0
- package/dist/types/vultisig/walletHelpers.d.ts +34 -0
- package/dist/types/vultisig/walletHelpers.d.ts.map +1 -0
- package/dist/types/walletconnect/constants.d.ts +85 -0
- package/dist/types/walletconnect/constants.d.ts.map +1 -0
- package/dist/types/walletconnect/evmSigner.d.ts +25 -0
- package/dist/types/walletconnect/evmSigner.d.ts.map +1 -0
- package/dist/types/walletconnect/helpers.d.ts +4 -0
- package/dist/types/walletconnect/helpers.d.ts.map +1 -0
- package/dist/types/walletconnect/index.d.ts +22 -0
- package/dist/types/walletconnect/index.d.ts.map +1 -0
- package/dist/types/walletconnect/namespaces.d.ts +7 -0
- package/dist/types/walletconnect/namespaces.d.ts.map +1 -0
- package/dist/types/walletconnect/types.d.ts +7 -0
- package/dist/types/walletconnect/types.d.ts.map +1 -0
- package/dist/types/xaman/helpers.d.ts +54 -0
- package/dist/types/xaman/helpers.d.ts.map +1 -0
- package/dist/types/xaman/index.d.ts +14 -0
- package/dist/types/xaman/index.d.ts.map +1 -0
- package/dist/types/xaman/types.d.ts +24 -0
- package/dist/types/xaman/types.d.ts.map +1 -0
- package/dist/types/xaman/walletMethods.d.ts +16 -0
- package/dist/types/xaman/walletMethods.d.ts.map +1 -0
- package/package.json +44 -68
- package/dist/chunk-2aa1w78q.js +0 -4
- package/dist/chunk-2aa1w78q.js.map +0 -10
- package/dist/chunk-31bmhjxx.js +0 -4
- package/dist/chunk-31bmhjxx.js.map +0 -10
- package/dist/chunk-3etn0w20.js +0 -4
- package/dist/chunk-3etn0w20.js.map +0 -10
- package/dist/chunk-bk58smyr.js +0 -4
- package/dist/chunk-bk58smyr.js.map +0 -10
- package/dist/chunk-etm8zfkk.js +0 -4
- package/dist/chunk-etm8zfkk.js.map +0 -10
- package/dist/chunk-h7myvxxm.js +0 -5
- package/dist/chunk-h7myvxxm.js.map +0 -10
- package/dist/chunk-htvthkj1.js +0 -5
- package/dist/chunk-htvthkj1.js.map +0 -10
- package/dist/chunk-nfas79hz.js +0 -4
- package/dist/chunk-nfas79hz.js.map +0 -10
- package/dist/src/keepkey/index.cjs +0 -4
- package/dist/src/keepkey/index.cjs.map +0 -15
- package/dist/src/keepkey/index.js +0 -4
- package/dist/src/keepkey/index.js.map +0 -15
- package/dist/src/keystore/index.cjs +0 -4
- package/dist/src/keystore/index.cjs.map +0 -11
- package/dist/src/keystore/index.js +0 -4
- package/dist/src/keystore/index.js.map +0 -11
- package/dist/src/ledger/index.cjs +0 -5
- package/dist/src/ledger/index.cjs.map +0 -25
- package/dist/src/ledger/index.js +0 -5
- package/dist/src/ledger/index.js.map +0 -25
- package/dist/src/trezor/index.cjs +0 -4
- package/dist/src/trezor/index.cjs.map +0 -10
- package/dist/src/trezor/index.js +0 -4
- package/dist/src/trezor/index.js.map +0 -10
- package/src/bitget/helpers.ts +0 -167
- package/src/bitget/index.ts +0 -34
- package/src/coinbase/index.ts +0 -52
- package/src/coinbase/signer.ts +0 -83
- package/src/cosmostation/index.ts +0 -142
- package/src/ctrl/index.ts +0 -248
- package/src/ctrl/walletHelpers.ts +0 -297
- package/src/evm-extensions/index.ts +0 -134
- package/src/exodus/index.ts +0 -179
- package/src/helpers/near-browser-provider.d.ts +0 -286
- package/src/helpers/near.ts +0 -206
- package/src/index.ts +0 -2
- package/src/keepkey/chains/cosmos.ts +0 -78
- package/src/keepkey/chains/evm.ts +0 -125
- package/src/keepkey/chains/mayachain.ts +0 -123
- package/src/keepkey/chains/ripple.ts +0 -118
- package/src/keepkey/chains/thorchain.ts +0 -118
- package/src/keepkey/chains/utxo.ts +0 -147
- package/src/keepkey/coins.ts +0 -71
- package/src/keepkey/index.ts +0 -153
- package/src/keepkey-bex/index.ts +0 -162
- package/src/keepkey-bex/walletHelpers.ts +0 -255
- package/src/keplr/chainRegistry.ts +0 -211
- package/src/keplr/index.ts +0 -55
- package/src/keystore/helpers.ts +0 -102
- package/src/keystore/index.ts +0 -73
- package/src/ledger/clients/cosmos.ts +0 -102
- package/src/ledger/clients/evm.ts +0 -183
- package/src/ledger/clients/near.ts +0 -86
- package/src/ledger/clients/thorchain/common.ts +0 -117
- package/src/ledger/clients/thorchain/helpers.ts +0 -149
- package/src/ledger/clients/thorchain/index.ts +0 -94
- package/src/ledger/clients/thorchain/lib.ts +0 -300
- package/src/ledger/clients/thorchain/utils.ts +0 -76
- package/src/ledger/clients/tron.ts +0 -92
- package/src/ledger/clients/utxo.ts +0 -148
- package/src/ledger/clients/xrp.ts +0 -66
- package/src/ledger/cosmosTypes.ts +0 -101
- package/src/ledger/helpers/getLedgerAddress.ts +0 -67
- package/src/ledger/helpers/getLedgerClient.ts +0 -124
- package/src/ledger/helpers/getLedgerTransport.ts +0 -80
- package/src/ledger/helpers/index.ts +0 -3
- package/src/ledger/index.ts +0 -311
- package/src/ledger/interfaces/CosmosLedgerInterface.ts +0 -65
- package/src/ledger/types.ts +0 -45
- package/src/okx/helpers.ts +0 -181
- package/src/okx/index.ts +0 -43
- package/src/okx/types.ts +0 -117
- package/src/onekey/evmSigner.ts +0 -133
- package/src/onekey/index.ts +0 -213
- package/src/phantom/index.ts +0 -126
- package/src/polkadotjs/index.ts +0 -67
- package/src/radix/index.ts +0 -202
- package/src/talisman/index.ts +0 -130
- package/src/trezor/evmSigner.ts +0 -197
- package/src/trezor/index.ts +0 -260
- package/src/types.ts +0 -280
- package/src/utils.ts +0 -60
- package/src/vultisig/index.ts +0 -199
- package/src/vultisig/walletHelpers.ts +0 -359
- package/src/walletconnect/constants.ts +0 -104
- package/src/walletconnect/evmSigner.ts +0 -147
- package/src/walletconnect/helpers.ts +0 -77
- package/src/walletconnect/index.ts +0 -460
- package/src/walletconnect/namespaces.ts +0 -87
- package/src/walletconnect/types.ts +0 -6
- package/src/xaman/README.md +0 -66
- package/src/xaman/helpers.ts +0 -59
- package/src/xaman/index.ts +0 -79
- package/src/xaman/types.ts +0 -26
- package/src/xaman/walletMethods.ts +0 -126
- /package/dist/{chunk-mvbb9fwb.js.map → chunk-sbf0f2p4.js.map} +0 -0
package/src/types.ts
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AminoSignResponse,
|
|
3
|
-
OfflineAminoSigner,
|
|
4
|
-
StdSignDoc,
|
|
5
|
-
StdSignature,
|
|
6
|
-
} from "@cosmjs/amino";
|
|
7
|
-
import type { Keplr } from "@keplr-wallet/types";
|
|
8
|
-
import { type EthereumWindowProvider, WalletOption } from "@swapkit/helpers";
|
|
9
|
-
import type { SolanaProvider } from "@swapkit/toolboxes/solana";
|
|
10
|
-
import type { BrowserProvider, Eip1193Provider } from "ethers";
|
|
11
|
-
|
|
12
|
-
import type { SubstrateInjectedExtension } from "@swapkit/toolboxes/substrate";
|
|
13
|
-
import type { bitgetWallet } from "./bitget";
|
|
14
|
-
import type { coinbaseWallet } from "./coinbase";
|
|
15
|
-
import type { cosmostationWallet } from "./cosmostation";
|
|
16
|
-
import type { ctrlWallet } from "./ctrl";
|
|
17
|
-
import type { evmWallet } from "./evm-extensions";
|
|
18
|
-
import type { exodusWallet } from "./exodus";
|
|
19
|
-
import type { NearBrowserWalletProvider } from "./helpers/near";
|
|
20
|
-
import type { keepkeyWallet } from "./keepkey";
|
|
21
|
-
import type { keepkeyBexWallet } from "./keepkey-bex";
|
|
22
|
-
import type { keplrWallet } from "./keplr";
|
|
23
|
-
import type { keystoreWallet } from "./keystore";
|
|
24
|
-
import type { ledgerWallet } from "./ledger";
|
|
25
|
-
import type { okxWallet } from "./okx";
|
|
26
|
-
import type { onekeyWallet } from "./onekey";
|
|
27
|
-
import type { phantomWallet } from "./phantom";
|
|
28
|
-
import type { polkadotWallet } from "./polkadotjs";
|
|
29
|
-
import type { radixWallet } from "./radix";
|
|
30
|
-
import type { talismanWallet } from "./talisman";
|
|
31
|
-
import type { trezorWallet } from "./trezor";
|
|
32
|
-
import type { vultisigWallet } from "./vultisig";
|
|
33
|
-
import type { walletconnectWallet } from "./walletconnect";
|
|
34
|
-
import type { xamanWallet } from "./xaman";
|
|
35
|
-
|
|
36
|
-
export type Callback = (
|
|
37
|
-
error: Error | null,
|
|
38
|
-
result?: any, // https://github.com/vultisig/vultisig-windows/blob/baeb3e8099a0003404f9664c43b0183c26029041/clients/extension/src/utils/interfaces.ts#L11
|
|
39
|
-
) => void;
|
|
40
|
-
|
|
41
|
-
export type VultisigCosmosProvider = {
|
|
42
|
-
request(
|
|
43
|
-
request: { method: string; params?: any[] | Record<string, any> },
|
|
44
|
-
callback?: Callback,
|
|
45
|
-
): Promise<any>;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type SKWallets = {
|
|
49
|
-
[WalletOption.BITGET]: typeof bitgetWallet;
|
|
50
|
-
[WalletOption.BRAVE]: typeof evmWallet;
|
|
51
|
-
[WalletOption.COINBASE_MOBILE]: typeof coinbaseWallet;
|
|
52
|
-
[WalletOption.COINBASE_WEB]: typeof evmWallet;
|
|
53
|
-
[WalletOption.COSMOSTATION]: typeof cosmostationWallet;
|
|
54
|
-
[WalletOption.CTRL]: typeof ctrlWallet;
|
|
55
|
-
[WalletOption.EIP6963]: typeof evmWallet;
|
|
56
|
-
[WalletOption.EXODUS]: typeof exodusWallet;
|
|
57
|
-
[WalletOption.KEEPKEY]: typeof keepkeyWallet;
|
|
58
|
-
[WalletOption.KEEPKEY_BEX]: typeof keepkeyBexWallet;
|
|
59
|
-
[WalletOption.KEPLR]: typeof keplrWallet;
|
|
60
|
-
[WalletOption.KEYSTORE]: typeof keystoreWallet;
|
|
61
|
-
[WalletOption.LEAP]: typeof keplrWallet;
|
|
62
|
-
[WalletOption.LEDGER]: typeof ledgerWallet;
|
|
63
|
-
[WalletOption.LEDGER_LIVE]: typeof ledgerWallet;
|
|
64
|
-
[WalletOption.METAMASK]: typeof evmWallet;
|
|
65
|
-
[WalletOption.OKX]: typeof okxWallet;
|
|
66
|
-
[WalletOption.OKX_MOBILE]: typeof evmWallet;
|
|
67
|
-
[WalletOption.ONEKEY]: typeof onekeyWallet;
|
|
68
|
-
[WalletOption.PHANTOM]: typeof phantomWallet;
|
|
69
|
-
[WalletOption.POLKADOT_JS]: typeof polkadotWallet;
|
|
70
|
-
[WalletOption.RADIX_WALLET]: typeof radixWallet;
|
|
71
|
-
[WalletOption.TALISMAN]: typeof talismanWallet;
|
|
72
|
-
[WalletOption.TREZOR]: typeof trezorWallet;
|
|
73
|
-
[WalletOption.TRUSTWALLET_WEB]: typeof evmWallet;
|
|
74
|
-
[WalletOption.VULTISIG]: typeof vultisigWallet;
|
|
75
|
-
[WalletOption.WALLETCONNECT]: typeof walletconnectWallet;
|
|
76
|
-
[WalletOption.XAMAN]: typeof xamanWallet;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export type SKConnectWallets = SKWallets[keyof SKWallets];
|
|
80
|
-
|
|
81
|
-
export type SKWalletsSupportedChains = {
|
|
82
|
-
[WalletOption.BITGET]: typeof bitgetWallet.connectBitget.supportedChains;
|
|
83
|
-
[WalletOption.BRAVE]: typeof evmWallet.connectEVMWallet.supportedChains;
|
|
84
|
-
[WalletOption.COINBASE_MOBILE]: typeof coinbaseWallet.connectCoinbaseWallet.supportedChains;
|
|
85
|
-
[WalletOption.COINBASE_WEB]: typeof evmWallet.connectEVMWallet.supportedChains;
|
|
86
|
-
[WalletOption.COSMOSTATION]: typeof cosmostationWallet.connectCosmostation.supportedChains;
|
|
87
|
-
[WalletOption.CTRL]: typeof ctrlWallet.connectCtrl.supportedChains;
|
|
88
|
-
[WalletOption.EIP6963]: typeof evmWallet.connectEVMWallet.supportedChains;
|
|
89
|
-
[WalletOption.EXODUS]: typeof exodusWallet.connectExodusWallet.supportedChains;
|
|
90
|
-
[WalletOption.KEEPKEY]: typeof keepkeyWallet.connectKeepkey.supportedChains;
|
|
91
|
-
[WalletOption.KEEPKEY_BEX]: typeof keepkeyBexWallet.connectKeepkeyBex.supportedChains;
|
|
92
|
-
[WalletOption.KEPLR]: typeof keplrWallet.connectKeplr.supportedChains;
|
|
93
|
-
[WalletOption.KEYSTORE]: typeof keystoreWallet.connectKeystore.supportedChains;
|
|
94
|
-
[WalletOption.LEAP]: typeof keplrWallet.connectKeplr.supportedChains;
|
|
95
|
-
[WalletOption.LEDGER]: typeof ledgerWallet.connectLedger.supportedChains;
|
|
96
|
-
[WalletOption.LEDGER_LIVE]: typeof ledgerWallet.connectLedger.supportedChains;
|
|
97
|
-
[WalletOption.METAMASK]: typeof evmWallet.connectEVMWallet.supportedChains;
|
|
98
|
-
[WalletOption.OKX]: typeof okxWallet.connectOkx.supportedChains;
|
|
99
|
-
[WalletOption.OKX_MOBILE]: typeof evmWallet.connectEVMWallet.supportedChains;
|
|
100
|
-
[WalletOption.ONEKEY]: typeof onekeyWallet.connectOnekeyWallet.supportedChains;
|
|
101
|
-
[WalletOption.PHANTOM]: typeof phantomWallet.connectPhantom.supportedChains;
|
|
102
|
-
[WalletOption.POLKADOT_JS]: typeof polkadotWallet.connectPolkadotJs.supportedChains;
|
|
103
|
-
[WalletOption.RADIX_WALLET]: typeof radixWallet.connectRadixWallet.supportedChains;
|
|
104
|
-
[WalletOption.TALISMAN]: typeof talismanWallet.connectTalisman.supportedChains;
|
|
105
|
-
[WalletOption.TREZOR]: typeof trezorWallet.connectTrezor.supportedChains;
|
|
106
|
-
[WalletOption.TRUSTWALLET_WEB]: typeof evmWallet.connectEVMWallet.supportedChains;
|
|
107
|
-
[WalletOption.VULTISIG]: typeof vultisigWallet.connectVultisig.supportedChains;
|
|
108
|
-
[WalletOption.WALLETCONNECT]: typeof walletconnectWallet.connectWalletconnect.supportedChains;
|
|
109
|
-
[WalletOption.XAMAN]: typeof xamanWallet.connectXaman.supportedChains;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
type UnisatToSignInputs = {
|
|
113
|
-
index: number;
|
|
114
|
-
sighashTypes?: number[];
|
|
115
|
-
disableTweakSigner?: boolean;
|
|
116
|
-
} & ({ address: string } | { publicKey: string });
|
|
117
|
-
|
|
118
|
-
declare global {
|
|
119
|
-
interface Window {
|
|
120
|
-
injectedWeb3?: SubstrateInjectedExtension;
|
|
121
|
-
talismanEth?: EthereumWindowProvider;
|
|
122
|
-
$onekey?: any;
|
|
123
|
-
braveSolana: any;
|
|
124
|
-
coinbaseWalletExtension: EthereumWindowProvider;
|
|
125
|
-
ethereum: EthereumWindowProvider;
|
|
126
|
-
keplr: Keplr;
|
|
127
|
-
leap: Keplr;
|
|
128
|
-
trustwallet: EthereumWindowProvider;
|
|
129
|
-
phantom: {
|
|
130
|
-
solana: SolanaProvider;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
xfi?: {
|
|
134
|
-
binance: Eip1193Provider;
|
|
135
|
-
bitcoin: Eip1193Provider;
|
|
136
|
-
bitcoincash: Eip1193Provider;
|
|
137
|
-
dogecoin: Eip1193Provider;
|
|
138
|
-
ethereum: BrowserProvider;
|
|
139
|
-
keplr: Keplr;
|
|
140
|
-
litecoin: Eip1193Provider;
|
|
141
|
-
thorchain: Eip1193Provider;
|
|
142
|
-
mayachain: Eip1193Provider;
|
|
143
|
-
solana: SolanaProvider & { isXDEFI: boolean };
|
|
144
|
-
near: NearBrowserWalletProvider;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
vultisig?: {
|
|
148
|
-
bitcoin: Eip1193Provider;
|
|
149
|
-
bitcoincash: Eip1193Provider;
|
|
150
|
-
dogecoin: Eip1193Provider;
|
|
151
|
-
ethereum: Eip1193Provider;
|
|
152
|
-
keplr: Keplr;
|
|
153
|
-
cosmos: VultisigCosmosProvider;
|
|
154
|
-
litecoin: Eip1193Provider;
|
|
155
|
-
thorchain: Eip1193Provider;
|
|
156
|
-
mayachain: Eip1193Provider;
|
|
157
|
-
solana: SolanaProvider;
|
|
158
|
-
polkadot: Eip1193Provider;
|
|
159
|
-
ripple: Eip1193Provider;
|
|
160
|
-
dash: Eip1193Provider;
|
|
161
|
-
zcash: Eip1193Provider;
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
bitkeep?: {
|
|
165
|
-
unisat: {
|
|
166
|
-
requestAccounts: () => Promise<[string, ...string[]]>;
|
|
167
|
-
signMessage: (message: string, type?: "ecdsa" | "bip322-simple") => Promise<string>;
|
|
168
|
-
signPsbt: (
|
|
169
|
-
psbtHex: string,
|
|
170
|
-
{
|
|
171
|
-
autoFinalized,
|
|
172
|
-
toSignInputs,
|
|
173
|
-
}: { autoFinalized?: boolean; toSignInputs?: UnisatToSignInputs[] },
|
|
174
|
-
) => Promise<string>;
|
|
175
|
-
};
|
|
176
|
-
keplr: {
|
|
177
|
-
enable: (chainId: string | string[]) => Promise<void>;
|
|
178
|
-
signAmino: (
|
|
179
|
-
chainId: string,
|
|
180
|
-
signer: string,
|
|
181
|
-
signDoc: StdSignDoc,
|
|
182
|
-
signOptions: any,
|
|
183
|
-
) => Promise<AminoSignResponse>;
|
|
184
|
-
signArbitrary: (
|
|
185
|
-
chainId: string,
|
|
186
|
-
signer: string,
|
|
187
|
-
data: string | Uint8Array,
|
|
188
|
-
) => Promise<StdSignature>;
|
|
189
|
-
verifyArbitrary: (
|
|
190
|
-
chainId: string,
|
|
191
|
-
signer: string,
|
|
192
|
-
data: string | Uint8Array,
|
|
193
|
-
signature: StdSignature,
|
|
194
|
-
) => Promise<boolean>;
|
|
195
|
-
getOfflineSignerOnlyAmino: (chainId: string) => OfflineAminoSigner;
|
|
196
|
-
};
|
|
197
|
-
solana: SolanaProvider;
|
|
198
|
-
ethereum: EthereumWindowProvider;
|
|
199
|
-
tronLink: {
|
|
200
|
-
request: (args: { method: string; params?: any }) => Promise<any>;
|
|
201
|
-
ready: boolean;
|
|
202
|
-
};
|
|
203
|
-
tronWeb: {
|
|
204
|
-
defaultAddress: {
|
|
205
|
-
base58: string;
|
|
206
|
-
hex: string;
|
|
207
|
-
};
|
|
208
|
-
trx: {
|
|
209
|
-
sign: (transaction: any) => Promise<any>;
|
|
210
|
-
sendRawTransaction: (signedTransaction: any) => Promise<any>;
|
|
211
|
-
getAccount: (address: string) => Promise<any>;
|
|
212
|
-
getBalance: (address: string) => Promise<number>;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
|
|
217
|
-
okxwallet?:
|
|
218
|
-
| {
|
|
219
|
-
bitcoin: {
|
|
220
|
-
connect: () => Promise<{
|
|
221
|
-
address: string;
|
|
222
|
-
publicKey: string;
|
|
223
|
-
}>;
|
|
224
|
-
disconnect: () => Promise<void>;
|
|
225
|
-
signMessage: (message: string, { from }: { from: string }) => Promise<string>;
|
|
226
|
-
signPsbt: (
|
|
227
|
-
psbtHex: string,
|
|
228
|
-
{ from, type }: { from: string; type: string },
|
|
229
|
-
) => Promise<string>;
|
|
230
|
-
};
|
|
231
|
-
keplr: {
|
|
232
|
-
enable: (chainId: string | string[]) => Promise<void>;
|
|
233
|
-
signAmino: (
|
|
234
|
-
chainId: string,
|
|
235
|
-
signer: string,
|
|
236
|
-
signDoc: StdSignDoc,
|
|
237
|
-
signOptions: any,
|
|
238
|
-
) => Promise<AminoSignResponse>;
|
|
239
|
-
signArbitrary: (
|
|
240
|
-
chainId: string,
|
|
241
|
-
signer: string,
|
|
242
|
-
data: string | Uint8Array,
|
|
243
|
-
) => Promise<StdSignature>;
|
|
244
|
-
verifyArbitrary: (
|
|
245
|
-
chainId: string,
|
|
246
|
-
signer: string,
|
|
247
|
-
data: string | Uint8Array,
|
|
248
|
-
signature: StdSignature,
|
|
249
|
-
) => Promise<boolean>;
|
|
250
|
-
getOfflineSignerOnlyAmino: (chainId: string) => OfflineAminoSigner;
|
|
251
|
-
};
|
|
252
|
-
near: NearBrowserWalletProvider & {
|
|
253
|
-
requestSignIn: (params?: {
|
|
254
|
-
contractId?: string;
|
|
255
|
-
methodNames?: string[];
|
|
256
|
-
}) => Promise<{ accountId: string; accessKey?: any }>;
|
|
257
|
-
requestSignTransactions: (params: {
|
|
258
|
-
transactions: any[];
|
|
259
|
-
}) => Promise<any>;
|
|
260
|
-
};
|
|
261
|
-
tronLink: {
|
|
262
|
-
request: (args: { method: string; params?: any }) => Promise<any>;
|
|
263
|
-
ready: boolean;
|
|
264
|
-
tronWeb: {
|
|
265
|
-
defaultAddress: {
|
|
266
|
-
base58: string;
|
|
267
|
-
hex: string;
|
|
268
|
-
};
|
|
269
|
-
trx: {
|
|
270
|
-
sign: (transaction: any) => Promise<any>;
|
|
271
|
-
sendRawTransaction: (signedTransaction: any) => Promise<any>;
|
|
272
|
-
getAccount: (address: string) => Promise<any>;
|
|
273
|
-
getBalance: (address: string) => Promise<number>;
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
| EthereumWindowProvider;
|
|
279
|
-
}
|
|
280
|
-
}
|
package/src/utils.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { WalletOption, type createWallet } from "@swapkit/helpers";
|
|
2
|
-
import type { SKWallets } from "./types";
|
|
3
|
-
|
|
4
|
-
export function getWalletSupportedChains<
|
|
5
|
-
T extends ReturnType<typeof createWallet<any, any, any, any>>,
|
|
6
|
-
>(wallet: T): T[keyof T]["supportedChains"] {
|
|
7
|
-
const walletName = Object.keys(wallet)?.[0] || "";
|
|
8
|
-
return wallet?.[walletName]?.supportedChains || [];
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export async function loadWallet<W extends WalletOption>(walletOption: W): Promise<SKWallets[W]> {
|
|
12
|
-
const { match } = await import("ts-pattern");
|
|
13
|
-
|
|
14
|
-
const wallet = await match(walletOption as WalletOption)
|
|
15
|
-
.with(WalletOption.COINBASE_MOBILE, async () => (await import("./coinbase")).coinbaseWallet)
|
|
16
|
-
.with(WalletOption.BITGET, async () => (await import("./bitget")).bitgetWallet)
|
|
17
|
-
.with(WalletOption.CTRL, async () => (await import("./ctrl")).ctrlWallet)
|
|
18
|
-
.with(WalletOption.VULTISIG, async () => (await import("./vultisig")).vultisigWallet)
|
|
19
|
-
.with(WalletOption.OKX, async () => (await import("./okx")).okxWallet)
|
|
20
|
-
.with(WalletOption.ONEKEY, async () => (await import("./onekey")).onekeyWallet)
|
|
21
|
-
.with(WalletOption.EXODUS, async () => (await import("./exodus")).exodusWallet)
|
|
22
|
-
.with(WalletOption.KEEPKEY, async () => (await import("./keepkey")).keepkeyWallet)
|
|
23
|
-
.with(WalletOption.KEEPKEY_BEX, async () => (await import("./keepkey-bex")).keepkeyBexWallet)
|
|
24
|
-
.with(
|
|
25
|
-
WalletOption.WALLETCONNECT,
|
|
26
|
-
async () => (await import("./walletconnect")).walletconnectWallet,
|
|
27
|
-
)
|
|
28
|
-
.with(WalletOption.KEPLR, WalletOption.LEAP, async () => (await import("./keplr")).keplrWallet)
|
|
29
|
-
.with(
|
|
30
|
-
WalletOption.COSMOSTATION,
|
|
31
|
-
async () => (await import("./cosmostation")).cosmostationWallet,
|
|
32
|
-
)
|
|
33
|
-
.with(
|
|
34
|
-
WalletOption.BRAVE,
|
|
35
|
-
WalletOption.COINBASE_WEB,
|
|
36
|
-
WalletOption.EIP6963,
|
|
37
|
-
WalletOption.METAMASK,
|
|
38
|
-
WalletOption.OKX_MOBILE,
|
|
39
|
-
WalletOption.TRUSTWALLET_WEB,
|
|
40
|
-
async () => (await import("./evm-extensions")).evmWallet,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
.with(WalletOption.KEYSTORE, async () => (await import("./keystore")).keystoreWallet)
|
|
44
|
-
.with(WalletOption.TREZOR, async () => (await import("./trezor")).trezorWallet)
|
|
45
|
-
.with(
|
|
46
|
-
WalletOption.LEDGER,
|
|
47
|
-
// TODO: Remove
|
|
48
|
-
WalletOption.LEDGER_LIVE,
|
|
49
|
-
async () => (await import("./ledger")).ledgerWallet,
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
.with(WalletOption.PHANTOM, async () => (await import("./phantom")).phantomWallet)
|
|
53
|
-
.with(WalletOption.POLKADOT_JS, async () => (await import("./polkadotjs")).polkadotWallet)
|
|
54
|
-
.with(WalletOption.RADIX_WALLET, async () => (await import("./radix")).radixWallet)
|
|
55
|
-
.with(WalletOption.TALISMAN, async () => (await import("./talisman")).talismanWallet)
|
|
56
|
-
.with(WalletOption.XAMAN, async () => (await import("./xaman")).xamanWallet)
|
|
57
|
-
.exhaustive();
|
|
58
|
-
|
|
59
|
-
return wallet as SKWallets[W];
|
|
60
|
-
}
|
package/src/vultisig/index.ts
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Chain,
|
|
3
|
-
type EVMChain,
|
|
4
|
-
type GenericTransferParams,
|
|
5
|
-
SwapKitError,
|
|
6
|
-
type UTXOChain,
|
|
7
|
-
UTXOChains,
|
|
8
|
-
WalletOption,
|
|
9
|
-
createWallet,
|
|
10
|
-
filterSupportedChains,
|
|
11
|
-
} from "@swapkit/helpers";
|
|
12
|
-
|
|
13
|
-
import { getWalletSupportedChains } from "../utils";
|
|
14
|
-
import {
|
|
15
|
-
getVultisigAddress,
|
|
16
|
-
getVultisigMethods,
|
|
17
|
-
getVultisigProvider,
|
|
18
|
-
prepareNetworkSwitchCosmos,
|
|
19
|
-
walletTransfer,
|
|
20
|
-
} from "./walletHelpers";
|
|
21
|
-
|
|
22
|
-
export const vultisigWallet = createWallet({
|
|
23
|
-
name: "connectVultisig",
|
|
24
|
-
walletType: WalletOption.VULTISIG,
|
|
25
|
-
supportedChains: [
|
|
26
|
-
Chain.Arbitrum,
|
|
27
|
-
Chain.Avalanche,
|
|
28
|
-
Chain.Base,
|
|
29
|
-
Chain.BinanceSmartChain,
|
|
30
|
-
Chain.Bitcoin,
|
|
31
|
-
Chain.BitcoinCash,
|
|
32
|
-
Chain.Cosmos,
|
|
33
|
-
Chain.Dash,
|
|
34
|
-
Chain.Dogecoin,
|
|
35
|
-
Chain.Ethereum,
|
|
36
|
-
Chain.Kujira,
|
|
37
|
-
Chain.Litecoin,
|
|
38
|
-
Chain.Maya,
|
|
39
|
-
Chain.Optimism,
|
|
40
|
-
Chain.Polkadot,
|
|
41
|
-
Chain.Polygon,
|
|
42
|
-
Chain.Ripple,
|
|
43
|
-
Chain.Solana,
|
|
44
|
-
Chain.THORChain,
|
|
45
|
-
Chain.Zcash,
|
|
46
|
-
],
|
|
47
|
-
connect: ({ addChain, walletType, supportedChains }) =>
|
|
48
|
-
async function connectVultisig(chains: Chain[]) {
|
|
49
|
-
const filteredChains = filterSupportedChains({ chains, supportedChains, walletType });
|
|
50
|
-
|
|
51
|
-
const promises = filteredChains
|
|
52
|
-
.filter((chain) => chain !== Chain.Cosmos && chain !== Chain.Kujira)
|
|
53
|
-
.map(async (chain) => {
|
|
54
|
-
const address = await getVultisigAddress(chain);
|
|
55
|
-
const walletMethods = await getWalletMethods(chain);
|
|
56
|
-
|
|
57
|
-
addChain({ ...walletMethods, address, chain, walletType });
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
const cosmosIncluded = filteredChains.includes(Chain.Cosmos);
|
|
61
|
-
const kujiraIncluded = filteredChains.includes(Chain.Kujira);
|
|
62
|
-
|
|
63
|
-
// Race condition single cosmos provider exposed.
|
|
64
|
-
if (cosmosIncluded) {
|
|
65
|
-
const addressCosmos = await getVultisigAddress(Chain.Cosmos);
|
|
66
|
-
const walletMethodsCosmos = await getWalletMethods(Chain.Cosmos);
|
|
67
|
-
addChain({
|
|
68
|
-
...walletMethodsCosmos,
|
|
69
|
-
address: addressCosmos,
|
|
70
|
-
chain: Chain.Cosmos,
|
|
71
|
-
walletType,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (kujiraIncluded) {
|
|
75
|
-
const addressKujira = await getVultisigAddress(Chain.Kujira);
|
|
76
|
-
const walletMethodsKujira = await getWalletMethods(Chain.Kujira);
|
|
77
|
-
addChain({
|
|
78
|
-
...walletMethodsKujira,
|
|
79
|
-
address: addressKujira,
|
|
80
|
-
chain: Chain.Kujira,
|
|
81
|
-
walletType,
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
//--//
|
|
85
|
-
|
|
86
|
-
await Promise.all(promises);
|
|
87
|
-
|
|
88
|
-
return true;
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
export const VULTISIG_SUPPORTED_CHAINS = getWalletSupportedChains(vultisigWallet);
|
|
93
|
-
|
|
94
|
-
async function getWalletMethods(chain: (typeof VULTISIG_SUPPORTED_CHAINS)[number]) {
|
|
95
|
-
const { match } = await import("ts-pattern");
|
|
96
|
-
return match(chain)
|
|
97
|
-
.with(Chain.Solana, async () => {
|
|
98
|
-
const { getSolanaToolbox } = await import("@swapkit/toolboxes/solana");
|
|
99
|
-
const solanaProvider = window.vultisig?.solana;
|
|
100
|
-
if (!solanaProvider) throw new SwapKitError("wallet_vultisig_not_found");
|
|
101
|
-
const toolbox = await getSolanaToolbox({ signer: solanaProvider });
|
|
102
|
-
return { ...toolbox };
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
.with(Chain.Maya, Chain.THORChain, async () => {
|
|
106
|
-
const { getCosmosToolbox, THORCHAIN_GAS_VALUE, MAYA_GAS_VALUE } = await import(
|
|
107
|
-
"@swapkit/toolboxes/cosmos"
|
|
108
|
-
);
|
|
109
|
-
const gasLimit = chain === Chain.Maya ? MAYA_GAS_VALUE : THORCHAIN_GAS_VALUE;
|
|
110
|
-
const toolbox = await getCosmosToolbox(chain as Chain.Cosmos | Chain.Kujira);
|
|
111
|
-
return {
|
|
112
|
-
...toolbox,
|
|
113
|
-
deposit: (tx: GenericTransferParams) =>
|
|
114
|
-
walletTransfer({ ...tx, recipient: "" }, "deposit_transaction"),
|
|
115
|
-
transfer: (tx: GenericTransferParams) =>
|
|
116
|
-
walletTransfer({ ...tx, gasLimit }, "send_transaction"),
|
|
117
|
-
};
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
.with(Chain.Cosmos, Chain.Kujira, async () => {
|
|
121
|
-
const { getCosmosToolbox } = await import("@swapkit/toolboxes/cosmos");
|
|
122
|
-
const provider = await getVultisigProvider(chain as Chain.Cosmos | Chain.Kujira);
|
|
123
|
-
const toolbox = await getCosmosToolbox(chain as Chain.Cosmos | Chain.Kujira);
|
|
124
|
-
return prepareNetworkSwitchCosmos({
|
|
125
|
-
provider,
|
|
126
|
-
chain,
|
|
127
|
-
toolbox: {
|
|
128
|
-
...toolbox,
|
|
129
|
-
transfer: walletTransfer,
|
|
130
|
-
},
|
|
131
|
-
});
|
|
132
|
-
})
|
|
133
|
-
|
|
134
|
-
.with(...UTXOChains, async () => {
|
|
135
|
-
const { getUtxoToolbox } = await import("@swapkit/toolboxes/utxo");
|
|
136
|
-
const toolbox = await getUtxoToolbox(chain as UTXOChain);
|
|
137
|
-
return { ...toolbox, transfer: walletTransfer };
|
|
138
|
-
})
|
|
139
|
-
|
|
140
|
-
.with(
|
|
141
|
-
Chain.Arbitrum,
|
|
142
|
-
Chain.Avalanche,
|
|
143
|
-
Chain.Base,
|
|
144
|
-
Chain.BinanceSmartChain,
|
|
145
|
-
Chain.Ethereum,
|
|
146
|
-
Chain.Optimism,
|
|
147
|
-
Chain.Polygon,
|
|
148
|
-
async () => {
|
|
149
|
-
const { prepareNetworkSwitch, switchEVMWalletNetwork } = await import("@swapkit/helpers");
|
|
150
|
-
const { getEvmToolbox } = await import("@swapkit/toolboxes/evm");
|
|
151
|
-
const { BrowserProvider } = await import("ethers");
|
|
152
|
-
const ethereumWindowProvider = await getVultisigProvider(chain as EVMChain);
|
|
153
|
-
|
|
154
|
-
if (!ethereumWindowProvider) {
|
|
155
|
-
throw new SwapKitError("wallet_vultisig_not_found");
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
const provider = new BrowserProvider(ethereumWindowProvider, "any");
|
|
159
|
-
const signer = await provider.getSigner();
|
|
160
|
-
const toolbox = await getEvmToolbox(chain as EVMChain, { provider, signer });
|
|
161
|
-
const vultisigMethods = getVultisigMethods(provider, chain as EVMChain);
|
|
162
|
-
|
|
163
|
-
try {
|
|
164
|
-
if (chain !== Chain.Ethereum) {
|
|
165
|
-
const networkParams = toolbox.getNetworkParams();
|
|
166
|
-
await switchEVMWalletNetwork(provider, chain, networkParams);
|
|
167
|
-
}
|
|
168
|
-
} catch (_error) {
|
|
169
|
-
throw new SwapKitError({
|
|
170
|
-
errorKey: "wallet_failed_to_add_or_switch_network",
|
|
171
|
-
info: { wallet: WalletOption.VULTISIG, chain },
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
return prepareNetworkSwitch({
|
|
176
|
-
provider,
|
|
177
|
-
chain,
|
|
178
|
-
toolbox: {
|
|
179
|
-
...toolbox,
|
|
180
|
-
...vultisigMethods,
|
|
181
|
-
},
|
|
182
|
-
});
|
|
183
|
-
},
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
.with(Chain.Ripple, async () => {
|
|
187
|
-
const { getRippleToolbox } = await import("@swapkit/toolboxes/ripple");
|
|
188
|
-
const toolbox = await getRippleToolbox();
|
|
189
|
-
return { ...toolbox, transfer: walletTransfer };
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
.with(Chain.Polkadot, async () => {
|
|
193
|
-
const { getSubstrateToolbox } = await import("@swapkit/toolboxes/substrate");
|
|
194
|
-
const toolbox = await getSubstrateToolbox(chain as Chain.Polkadot);
|
|
195
|
-
return { ...toolbox, transfer: walletTransfer };
|
|
196
|
-
})
|
|
197
|
-
|
|
198
|
-
.otherwise(async () => null);
|
|
199
|
-
}
|