@tomo-inc/wallet-adaptor-base 0.0.6 → 0.0.7
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 +3524 -0
- package/dist/index.d.cts +350 -0
- package/dist/index.d.ts +350 -0
- package/dist/index.js +3439 -0
- package/package.json +3 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
type WalletProvider = any;
|
|
2
|
+
declare enum ProviderProtocol {
|
|
3
|
+
EIP6963 = "eip6963",
|
|
4
|
+
WALLET_STANDARD = "wallet-standard",
|
|
5
|
+
WALLET_CONNECT = "wallet-connect",
|
|
6
|
+
INJECT = "inject"
|
|
7
|
+
}
|
|
8
|
+
declare enum ProviderChainType {
|
|
9
|
+
inject = "inject",
|
|
10
|
+
deeplink = "deeplink",
|
|
11
|
+
walletConnect = "walletConnect"
|
|
12
|
+
}
|
|
13
|
+
type WalletConnectorType = "wagmi" | "tomo";
|
|
14
|
+
type AdaptorChainType = "all" | "evm" | "solana" | "aptos";
|
|
15
|
+
declare const SupportedChainTypes: string[];
|
|
16
|
+
interface WalletInfo {
|
|
17
|
+
uuid: string;
|
|
18
|
+
name: string;
|
|
19
|
+
sameNames?: string[];
|
|
20
|
+
namespace?: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
iconBackground?: string;
|
|
23
|
+
rdns?: string;
|
|
24
|
+
isWalletConnect?: boolean;
|
|
25
|
+
deeplink?: string;
|
|
26
|
+
mobile?: {
|
|
27
|
+
getUri?: (uri: string) => string;
|
|
28
|
+
getDeeplink?: (dappUrl?: string, chainId?: number) => string | Promise<string>;
|
|
29
|
+
};
|
|
30
|
+
links: {
|
|
31
|
+
homepage?: string;
|
|
32
|
+
ios_install?: string;
|
|
33
|
+
android_install?: string;
|
|
34
|
+
chrome_install?: string;
|
|
35
|
+
mobile?: string;
|
|
36
|
+
qrCode?: string;
|
|
37
|
+
edge?: string;
|
|
38
|
+
firefox?: string;
|
|
39
|
+
opera?: string;
|
|
40
|
+
safari?: string;
|
|
41
|
+
macos?: string;
|
|
42
|
+
windows?: string;
|
|
43
|
+
linux?: string;
|
|
44
|
+
desktop?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
interface ConnectorProvider {
|
|
48
|
+
provider: any;
|
|
49
|
+
protocol: ProviderProtocol;
|
|
50
|
+
}
|
|
51
|
+
interface Connector {
|
|
52
|
+
info: WalletInfo;
|
|
53
|
+
isInstalled?: boolean;
|
|
54
|
+
recommoned?: boolean;
|
|
55
|
+
providers: {
|
|
56
|
+
evm?: ConnectorProvider;
|
|
57
|
+
solana?: ConnectorProvider;
|
|
58
|
+
aptos?: ConnectorProvider;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
interface ConnectParams {
|
|
62
|
+
dappLink: string;
|
|
63
|
+
useWalletConnect?: boolean;
|
|
64
|
+
}
|
|
65
|
+
interface SignInParams {
|
|
66
|
+
scheme?: "https" | "http";
|
|
67
|
+
domain: string;
|
|
68
|
+
uri?: string;
|
|
69
|
+
chainId?: string;
|
|
70
|
+
address?: string;
|
|
71
|
+
statement: string;
|
|
72
|
+
version?: string;
|
|
73
|
+
nonce: string;
|
|
74
|
+
issuedAt?: string;
|
|
75
|
+
resources?: `https://${string}`[];
|
|
76
|
+
}
|
|
77
|
+
interface WalletOptions {
|
|
78
|
+
chainType: AdaptorChainType;
|
|
79
|
+
account: {
|
|
80
|
+
address: string;
|
|
81
|
+
chainId?: string;
|
|
82
|
+
network?: string;
|
|
83
|
+
};
|
|
84
|
+
provider: WalletProvider;
|
|
85
|
+
walletInfo?: WalletInfo;
|
|
86
|
+
}
|
|
87
|
+
interface ChainInfo {
|
|
88
|
+
chainId: string;
|
|
89
|
+
chainName: string;
|
|
90
|
+
rpcUrls: string[];
|
|
91
|
+
iconUrls: string[];
|
|
92
|
+
nativeCurrency: {
|
|
93
|
+
name: string;
|
|
94
|
+
symbol: string;
|
|
95
|
+
decimals: number;
|
|
96
|
+
};
|
|
97
|
+
blockExplorerUrls: string[];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare function isMobile(): boolean;
|
|
101
|
+
|
|
102
|
+
type WalletConfig = {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
rdns?: string;
|
|
106
|
+
namespace?: string;
|
|
107
|
+
flag?: string;
|
|
108
|
+
solana?: {
|
|
109
|
+
namespace?: string;
|
|
110
|
+
flag?: string;
|
|
111
|
+
};
|
|
112
|
+
aptos?: {
|
|
113
|
+
namespace?: string;
|
|
114
|
+
flag?: string;
|
|
115
|
+
};
|
|
116
|
+
icon: string;
|
|
117
|
+
iconAccent?: string;
|
|
118
|
+
iconBackground: string;
|
|
119
|
+
installed?: boolean;
|
|
120
|
+
deeplink?: string;
|
|
121
|
+
downloadUrls?: {
|
|
122
|
+
android?: string;
|
|
123
|
+
ios?: string;
|
|
124
|
+
mobile?: string;
|
|
125
|
+
qrCode?: string;
|
|
126
|
+
chrome?: string;
|
|
127
|
+
edge?: string;
|
|
128
|
+
firefox?: string;
|
|
129
|
+
opera?: string;
|
|
130
|
+
safari?: string;
|
|
131
|
+
browserExtension?: string;
|
|
132
|
+
macos?: string;
|
|
133
|
+
windows?: string;
|
|
134
|
+
linux?: string;
|
|
135
|
+
desktop?: string;
|
|
136
|
+
};
|
|
137
|
+
mobile?: {
|
|
138
|
+
getUri?: (uri: string) => string;
|
|
139
|
+
getDeeplink?: (dappUrl?: string, chainId?: number) => string | Promise<string>;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
type WagmiWalletConfig = any;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Set WalletConnect configuration
|
|
146
|
+
* Must be called before using WalletConnect wallet
|
|
147
|
+
*/
|
|
148
|
+
declare function setWalletConnectConfig(config: {
|
|
149
|
+
projectId: string;
|
|
150
|
+
metadata: {
|
|
151
|
+
name: string;
|
|
152
|
+
description: string;
|
|
153
|
+
url: string;
|
|
154
|
+
icons: string[];
|
|
155
|
+
};
|
|
156
|
+
}): void;
|
|
157
|
+
|
|
158
|
+
declare const connect: (connectParams: ConnectParams, walletOptions: Omit<WalletOptions, "account">) => Promise<{
|
|
159
|
+
address: string;
|
|
160
|
+
chainId?: string;
|
|
161
|
+
network?: string;
|
|
162
|
+
provider?: any;
|
|
163
|
+
}>;
|
|
164
|
+
declare const disconnect: (walletOptions: WalletOptions) => Promise<boolean>;
|
|
165
|
+
declare const connectMobile: ({ connectParams, walletOptions, }: {
|
|
166
|
+
connectParams: ConnectParams;
|
|
167
|
+
walletOptions: Omit<WalletOptions, "account">;
|
|
168
|
+
}) => Promise<unknown>;
|
|
169
|
+
|
|
170
|
+
declare const signInWithWallet: (signInData: SignInParams, walletOptions: WalletOptions & {
|
|
171
|
+
isInstalled?: boolean;
|
|
172
|
+
}) => Promise<string>;
|
|
173
|
+
|
|
174
|
+
declare const switchChain: (chainId: string | number, walletOptions: WalletOptions) => Promise<boolean>;
|
|
175
|
+
declare const addChain: (chainInfo: ChainInfo, walletOptions: WalletOptions) => Promise<boolean>;
|
|
176
|
+
|
|
177
|
+
interface BalanceParams {
|
|
178
|
+
address?: string;
|
|
179
|
+
chainId: string;
|
|
180
|
+
type?: "erc20" | "spl" | "native";
|
|
181
|
+
}
|
|
182
|
+
interface ITokenInfo {
|
|
183
|
+
name: string;
|
|
184
|
+
symbol: string;
|
|
185
|
+
decimals: number;
|
|
186
|
+
address?: string;
|
|
187
|
+
icon: string;
|
|
188
|
+
price?: number;
|
|
189
|
+
}
|
|
190
|
+
declare const getBalance: (token: BalanceParams, walletOptions: WalletOptions) => Promise<{
|
|
191
|
+
total: number;
|
|
192
|
+
tokenInfo: ITokenInfo;
|
|
193
|
+
}>;
|
|
194
|
+
|
|
195
|
+
declare const signMessage: (data: {
|
|
196
|
+
message: string;
|
|
197
|
+
nonce: string;
|
|
198
|
+
}, walletOptions: WalletOptions & {
|
|
199
|
+
isInstalled?: boolean;
|
|
200
|
+
}) => Promise<string>;
|
|
201
|
+
|
|
202
|
+
declare const backpackWallet: () => WalletConfig;
|
|
203
|
+
|
|
204
|
+
declare const berasigWallet: () => WalletConfig;
|
|
205
|
+
|
|
206
|
+
declare const binanceWallet: () => WalletConfig;
|
|
207
|
+
|
|
208
|
+
declare const bitgetWallet: () => WalletConfig;
|
|
209
|
+
|
|
210
|
+
declare const bitskiWallet: () => WalletConfig;
|
|
211
|
+
|
|
212
|
+
declare const bitverseWallet: () => WalletConfig;
|
|
213
|
+
|
|
214
|
+
declare const bloomWallet: () => WalletConfig;
|
|
215
|
+
|
|
216
|
+
declare const braveWallet: () => WalletConfig;
|
|
217
|
+
|
|
218
|
+
declare const bybitWallet: () => WalletConfig;
|
|
219
|
+
|
|
220
|
+
declare const clvWallet: () => WalletConfig;
|
|
221
|
+
|
|
222
|
+
declare const coin98Wallet: () => WalletConfig;
|
|
223
|
+
|
|
224
|
+
declare const coinbaseWallet: () => WalletConfig;
|
|
225
|
+
|
|
226
|
+
declare const compassWallet: () => WalletConfig;
|
|
227
|
+
|
|
228
|
+
declare const coreWallet: () => WalletConfig;
|
|
229
|
+
|
|
230
|
+
declare const ctrlWallet: () => WalletConfig;
|
|
231
|
+
|
|
232
|
+
declare const dawnWallet: () => WalletConfig;
|
|
233
|
+
|
|
234
|
+
declare const desigWallet: () => WalletConfig;
|
|
235
|
+
|
|
236
|
+
declare const enkryptWallet: () => WalletConfig;
|
|
237
|
+
|
|
238
|
+
declare const foxWallet: () => WalletConfig;
|
|
239
|
+
|
|
240
|
+
declare const frameWallet: () => WalletConfig;
|
|
241
|
+
|
|
242
|
+
declare const gateWallet: () => WalletConfig;
|
|
243
|
+
|
|
244
|
+
declare const imTokenWallet: () => WalletConfig;
|
|
245
|
+
|
|
246
|
+
declare const injectedWallet: () => WalletConfig;
|
|
247
|
+
|
|
248
|
+
declare const iopayWallet: () => WalletConfig;
|
|
249
|
+
|
|
250
|
+
declare const kaiaWallet: () => WalletConfig;
|
|
251
|
+
|
|
252
|
+
declare const kaikasWallet: () => WalletConfig;
|
|
253
|
+
|
|
254
|
+
declare const krakenWallet: () => WalletConfig;
|
|
255
|
+
|
|
256
|
+
declare const kresusWallet: () => WalletConfig;
|
|
257
|
+
|
|
258
|
+
declare const ledgerWallet: () => WalletConfig;
|
|
259
|
+
|
|
260
|
+
declare const magicEdenWallet: () => WalletConfig;
|
|
261
|
+
|
|
262
|
+
declare const mathWallet: () => WalletConfig;
|
|
263
|
+
|
|
264
|
+
declare const metaMaskWallet: () => WalletConfig;
|
|
265
|
+
|
|
266
|
+
declare const mydogeWallet: () => WalletConfig;
|
|
267
|
+
|
|
268
|
+
declare const nestWallet: () => WalletConfig;
|
|
269
|
+
|
|
270
|
+
declare const novaWallet: () => WalletConfig;
|
|
271
|
+
|
|
272
|
+
declare const oktoWallet: () => WalletConfig;
|
|
273
|
+
|
|
274
|
+
declare const okxWallet: () => WalletConfig;
|
|
275
|
+
|
|
276
|
+
declare const omniWallet: () => WalletConfig;
|
|
277
|
+
|
|
278
|
+
declare const oneInchWallet: () => WalletConfig;
|
|
279
|
+
|
|
280
|
+
declare const oneKeyWallet: () => WalletConfig;
|
|
281
|
+
|
|
282
|
+
declare const paraSwapWallet: () => WalletConfig;
|
|
283
|
+
|
|
284
|
+
declare const petraWallet: () => WalletConfig;
|
|
285
|
+
|
|
286
|
+
declare const phantomWallet: () => WalletConfig;
|
|
287
|
+
|
|
288
|
+
declare const rabbyWallet: () => WalletConfig;
|
|
289
|
+
|
|
290
|
+
declare const rainbowWallet: () => WalletConfig;
|
|
291
|
+
|
|
292
|
+
declare const ramperWallet: () => WalletConfig;
|
|
293
|
+
|
|
294
|
+
declare const readyWallet: () => WalletConfig;
|
|
295
|
+
|
|
296
|
+
declare const roninWallet: () => WalletConfig;
|
|
297
|
+
|
|
298
|
+
declare const safeWallet: () => WalletConfig;
|
|
299
|
+
|
|
300
|
+
declare const safeheronWallet: () => WalletConfig;
|
|
301
|
+
|
|
302
|
+
declare const safepalWallet: () => WalletConfig;
|
|
303
|
+
|
|
304
|
+
declare const seifWallet: () => WalletConfig;
|
|
305
|
+
|
|
306
|
+
declare const solflareWallet: () => WalletConfig;
|
|
307
|
+
|
|
308
|
+
declare const subWallet: () => WalletConfig;
|
|
309
|
+
|
|
310
|
+
declare const tahoWallet: () => WalletConfig;
|
|
311
|
+
|
|
312
|
+
declare const talismanWallet: () => WalletConfig;
|
|
313
|
+
|
|
314
|
+
declare const tokenPocketWallet: () => WalletConfig;
|
|
315
|
+
|
|
316
|
+
declare const tokenaryWallet: () => WalletConfig;
|
|
317
|
+
|
|
318
|
+
declare const trezorWallet: () => WalletConfig;
|
|
319
|
+
|
|
320
|
+
declare const trustWallet: () => WalletConfig;
|
|
321
|
+
|
|
322
|
+
declare const uniswapWallet: () => WalletConfig;
|
|
323
|
+
|
|
324
|
+
declare const universalProfilesWallet: () => WalletConfig;
|
|
325
|
+
|
|
326
|
+
declare const valoraWallet: () => WalletConfig;
|
|
327
|
+
|
|
328
|
+
declare const walletConnectWallet: () => WalletConfig;
|
|
329
|
+
|
|
330
|
+
declare const wigwamWallet: () => WalletConfig;
|
|
331
|
+
|
|
332
|
+
declare const xPortalWallet: () => WalletConfig;
|
|
333
|
+
|
|
334
|
+
declare const zealWallet: () => WalletConfig;
|
|
335
|
+
|
|
336
|
+
declare const zerionWallet: () => WalletConfig;
|
|
337
|
+
|
|
338
|
+
declare const zilPayWallet: () => WalletConfig;
|
|
339
|
+
|
|
340
|
+
declare const TomoDefaultConnectors: Connector[];
|
|
341
|
+
declare function loadConnectors({ chainType, recommonedConnectors, connectorTypes, }: {
|
|
342
|
+
chainType?: AdaptorChainType;
|
|
343
|
+
recommonedConnectors?: (WalletConfig | WagmiWalletConfig)[];
|
|
344
|
+
connectorTypes?: WalletConnectorType[];
|
|
345
|
+
}): Promise<{
|
|
346
|
+
all: Connector[];
|
|
347
|
+
recommoned: Connector[];
|
|
348
|
+
}>;
|
|
349
|
+
|
|
350
|
+
export { type AdaptorChainType, type BalanceParams, type ChainInfo, type ConnectParams, type Connector, type ConnectorProvider, type ITokenInfo, ProviderChainType, ProviderProtocol, type SignInParams, SupportedChainTypes, TomoDefaultConnectors, type WalletConfig, type WalletConnectorType, type WalletInfo, type WalletOptions, type WalletProvider, addChain, backpackWallet, berasigWallet, binanceWallet, bitgetWallet, bitskiWallet, bitverseWallet, bloomWallet, braveWallet, bybitWallet, clvWallet, coin98Wallet, coinbaseWallet, compassWallet, connect, connectMobile, coreWallet, ctrlWallet, dawnWallet, desigWallet, disconnect, enkryptWallet, foxWallet, frameWallet, gateWallet, getBalance, imTokenWallet, injectedWallet, iopayWallet, isMobile, kaiaWallet, kaikasWallet, krakenWallet, kresusWallet, ledgerWallet, loadConnectors, magicEdenWallet, mathWallet, metaMaskWallet, mydogeWallet, nestWallet, novaWallet, oktoWallet, okxWallet, omniWallet, oneInchWallet, oneKeyWallet, paraSwapWallet, petraWallet, phantomWallet, rabbyWallet, rainbowWallet, ramperWallet, readyWallet, roninWallet, safeWallet, safeheronWallet, safepalWallet, seifWallet, setWalletConnectConfig, signInWithWallet, signMessage, solflareWallet, subWallet, switchChain, tahoWallet, talismanWallet, tokenPocketWallet, tokenaryWallet, trezorWallet, trustWallet, uniswapWallet, universalProfilesWallet, valoraWallet, walletConnectWallet, wigwamWallet, xPortalWallet, zealWallet, zerionWallet, zilPayWallet };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
type WalletProvider = any;
|
|
2
|
+
declare enum ProviderProtocol {
|
|
3
|
+
EIP6963 = "eip6963",
|
|
4
|
+
WALLET_STANDARD = "wallet-standard",
|
|
5
|
+
WALLET_CONNECT = "wallet-connect",
|
|
6
|
+
INJECT = "inject"
|
|
7
|
+
}
|
|
8
|
+
declare enum ProviderChainType {
|
|
9
|
+
inject = "inject",
|
|
10
|
+
deeplink = "deeplink",
|
|
11
|
+
walletConnect = "walletConnect"
|
|
12
|
+
}
|
|
13
|
+
type WalletConnectorType = "wagmi" | "tomo";
|
|
14
|
+
type AdaptorChainType = "all" | "evm" | "solana" | "aptos";
|
|
15
|
+
declare const SupportedChainTypes: string[];
|
|
16
|
+
interface WalletInfo {
|
|
17
|
+
uuid: string;
|
|
18
|
+
name: string;
|
|
19
|
+
sameNames?: string[];
|
|
20
|
+
namespace?: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
iconBackground?: string;
|
|
23
|
+
rdns?: string;
|
|
24
|
+
isWalletConnect?: boolean;
|
|
25
|
+
deeplink?: string;
|
|
26
|
+
mobile?: {
|
|
27
|
+
getUri?: (uri: string) => string;
|
|
28
|
+
getDeeplink?: (dappUrl?: string, chainId?: number) => string | Promise<string>;
|
|
29
|
+
};
|
|
30
|
+
links: {
|
|
31
|
+
homepage?: string;
|
|
32
|
+
ios_install?: string;
|
|
33
|
+
android_install?: string;
|
|
34
|
+
chrome_install?: string;
|
|
35
|
+
mobile?: string;
|
|
36
|
+
qrCode?: string;
|
|
37
|
+
edge?: string;
|
|
38
|
+
firefox?: string;
|
|
39
|
+
opera?: string;
|
|
40
|
+
safari?: string;
|
|
41
|
+
macos?: string;
|
|
42
|
+
windows?: string;
|
|
43
|
+
linux?: string;
|
|
44
|
+
desktop?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
interface ConnectorProvider {
|
|
48
|
+
provider: any;
|
|
49
|
+
protocol: ProviderProtocol;
|
|
50
|
+
}
|
|
51
|
+
interface Connector {
|
|
52
|
+
info: WalletInfo;
|
|
53
|
+
isInstalled?: boolean;
|
|
54
|
+
recommoned?: boolean;
|
|
55
|
+
providers: {
|
|
56
|
+
evm?: ConnectorProvider;
|
|
57
|
+
solana?: ConnectorProvider;
|
|
58
|
+
aptos?: ConnectorProvider;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
interface ConnectParams {
|
|
62
|
+
dappLink: string;
|
|
63
|
+
useWalletConnect?: boolean;
|
|
64
|
+
}
|
|
65
|
+
interface SignInParams {
|
|
66
|
+
scheme?: "https" | "http";
|
|
67
|
+
domain: string;
|
|
68
|
+
uri?: string;
|
|
69
|
+
chainId?: string;
|
|
70
|
+
address?: string;
|
|
71
|
+
statement: string;
|
|
72
|
+
version?: string;
|
|
73
|
+
nonce: string;
|
|
74
|
+
issuedAt?: string;
|
|
75
|
+
resources?: `https://${string}`[];
|
|
76
|
+
}
|
|
77
|
+
interface WalletOptions {
|
|
78
|
+
chainType: AdaptorChainType;
|
|
79
|
+
account: {
|
|
80
|
+
address: string;
|
|
81
|
+
chainId?: string;
|
|
82
|
+
network?: string;
|
|
83
|
+
};
|
|
84
|
+
provider: WalletProvider;
|
|
85
|
+
walletInfo?: WalletInfo;
|
|
86
|
+
}
|
|
87
|
+
interface ChainInfo {
|
|
88
|
+
chainId: string;
|
|
89
|
+
chainName: string;
|
|
90
|
+
rpcUrls: string[];
|
|
91
|
+
iconUrls: string[];
|
|
92
|
+
nativeCurrency: {
|
|
93
|
+
name: string;
|
|
94
|
+
symbol: string;
|
|
95
|
+
decimals: number;
|
|
96
|
+
};
|
|
97
|
+
blockExplorerUrls: string[];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
declare function isMobile(): boolean;
|
|
101
|
+
|
|
102
|
+
type WalletConfig = {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
rdns?: string;
|
|
106
|
+
namespace?: string;
|
|
107
|
+
flag?: string;
|
|
108
|
+
solana?: {
|
|
109
|
+
namespace?: string;
|
|
110
|
+
flag?: string;
|
|
111
|
+
};
|
|
112
|
+
aptos?: {
|
|
113
|
+
namespace?: string;
|
|
114
|
+
flag?: string;
|
|
115
|
+
};
|
|
116
|
+
icon: string;
|
|
117
|
+
iconAccent?: string;
|
|
118
|
+
iconBackground: string;
|
|
119
|
+
installed?: boolean;
|
|
120
|
+
deeplink?: string;
|
|
121
|
+
downloadUrls?: {
|
|
122
|
+
android?: string;
|
|
123
|
+
ios?: string;
|
|
124
|
+
mobile?: string;
|
|
125
|
+
qrCode?: string;
|
|
126
|
+
chrome?: string;
|
|
127
|
+
edge?: string;
|
|
128
|
+
firefox?: string;
|
|
129
|
+
opera?: string;
|
|
130
|
+
safari?: string;
|
|
131
|
+
browserExtension?: string;
|
|
132
|
+
macos?: string;
|
|
133
|
+
windows?: string;
|
|
134
|
+
linux?: string;
|
|
135
|
+
desktop?: string;
|
|
136
|
+
};
|
|
137
|
+
mobile?: {
|
|
138
|
+
getUri?: (uri: string) => string;
|
|
139
|
+
getDeeplink?: (dappUrl?: string, chainId?: number) => string | Promise<string>;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
type WagmiWalletConfig = any;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Set WalletConnect configuration
|
|
146
|
+
* Must be called before using WalletConnect wallet
|
|
147
|
+
*/
|
|
148
|
+
declare function setWalletConnectConfig(config: {
|
|
149
|
+
projectId: string;
|
|
150
|
+
metadata: {
|
|
151
|
+
name: string;
|
|
152
|
+
description: string;
|
|
153
|
+
url: string;
|
|
154
|
+
icons: string[];
|
|
155
|
+
};
|
|
156
|
+
}): void;
|
|
157
|
+
|
|
158
|
+
declare const connect: (connectParams: ConnectParams, walletOptions: Omit<WalletOptions, "account">) => Promise<{
|
|
159
|
+
address: string;
|
|
160
|
+
chainId?: string;
|
|
161
|
+
network?: string;
|
|
162
|
+
provider?: any;
|
|
163
|
+
}>;
|
|
164
|
+
declare const disconnect: (walletOptions: WalletOptions) => Promise<boolean>;
|
|
165
|
+
declare const connectMobile: ({ connectParams, walletOptions, }: {
|
|
166
|
+
connectParams: ConnectParams;
|
|
167
|
+
walletOptions: Omit<WalletOptions, "account">;
|
|
168
|
+
}) => Promise<unknown>;
|
|
169
|
+
|
|
170
|
+
declare const signInWithWallet: (signInData: SignInParams, walletOptions: WalletOptions & {
|
|
171
|
+
isInstalled?: boolean;
|
|
172
|
+
}) => Promise<string>;
|
|
173
|
+
|
|
174
|
+
declare const switchChain: (chainId: string | number, walletOptions: WalletOptions) => Promise<boolean>;
|
|
175
|
+
declare const addChain: (chainInfo: ChainInfo, walletOptions: WalletOptions) => Promise<boolean>;
|
|
176
|
+
|
|
177
|
+
interface BalanceParams {
|
|
178
|
+
address?: string;
|
|
179
|
+
chainId: string;
|
|
180
|
+
type?: "erc20" | "spl" | "native";
|
|
181
|
+
}
|
|
182
|
+
interface ITokenInfo {
|
|
183
|
+
name: string;
|
|
184
|
+
symbol: string;
|
|
185
|
+
decimals: number;
|
|
186
|
+
address?: string;
|
|
187
|
+
icon: string;
|
|
188
|
+
price?: number;
|
|
189
|
+
}
|
|
190
|
+
declare const getBalance: (token: BalanceParams, walletOptions: WalletOptions) => Promise<{
|
|
191
|
+
total: number;
|
|
192
|
+
tokenInfo: ITokenInfo;
|
|
193
|
+
}>;
|
|
194
|
+
|
|
195
|
+
declare const signMessage: (data: {
|
|
196
|
+
message: string;
|
|
197
|
+
nonce: string;
|
|
198
|
+
}, walletOptions: WalletOptions & {
|
|
199
|
+
isInstalled?: boolean;
|
|
200
|
+
}) => Promise<string>;
|
|
201
|
+
|
|
202
|
+
declare const backpackWallet: () => WalletConfig;
|
|
203
|
+
|
|
204
|
+
declare const berasigWallet: () => WalletConfig;
|
|
205
|
+
|
|
206
|
+
declare const binanceWallet: () => WalletConfig;
|
|
207
|
+
|
|
208
|
+
declare const bitgetWallet: () => WalletConfig;
|
|
209
|
+
|
|
210
|
+
declare const bitskiWallet: () => WalletConfig;
|
|
211
|
+
|
|
212
|
+
declare const bitverseWallet: () => WalletConfig;
|
|
213
|
+
|
|
214
|
+
declare const bloomWallet: () => WalletConfig;
|
|
215
|
+
|
|
216
|
+
declare const braveWallet: () => WalletConfig;
|
|
217
|
+
|
|
218
|
+
declare const bybitWallet: () => WalletConfig;
|
|
219
|
+
|
|
220
|
+
declare const clvWallet: () => WalletConfig;
|
|
221
|
+
|
|
222
|
+
declare const coin98Wallet: () => WalletConfig;
|
|
223
|
+
|
|
224
|
+
declare const coinbaseWallet: () => WalletConfig;
|
|
225
|
+
|
|
226
|
+
declare const compassWallet: () => WalletConfig;
|
|
227
|
+
|
|
228
|
+
declare const coreWallet: () => WalletConfig;
|
|
229
|
+
|
|
230
|
+
declare const ctrlWallet: () => WalletConfig;
|
|
231
|
+
|
|
232
|
+
declare const dawnWallet: () => WalletConfig;
|
|
233
|
+
|
|
234
|
+
declare const desigWallet: () => WalletConfig;
|
|
235
|
+
|
|
236
|
+
declare const enkryptWallet: () => WalletConfig;
|
|
237
|
+
|
|
238
|
+
declare const foxWallet: () => WalletConfig;
|
|
239
|
+
|
|
240
|
+
declare const frameWallet: () => WalletConfig;
|
|
241
|
+
|
|
242
|
+
declare const gateWallet: () => WalletConfig;
|
|
243
|
+
|
|
244
|
+
declare const imTokenWallet: () => WalletConfig;
|
|
245
|
+
|
|
246
|
+
declare const injectedWallet: () => WalletConfig;
|
|
247
|
+
|
|
248
|
+
declare const iopayWallet: () => WalletConfig;
|
|
249
|
+
|
|
250
|
+
declare const kaiaWallet: () => WalletConfig;
|
|
251
|
+
|
|
252
|
+
declare const kaikasWallet: () => WalletConfig;
|
|
253
|
+
|
|
254
|
+
declare const krakenWallet: () => WalletConfig;
|
|
255
|
+
|
|
256
|
+
declare const kresusWallet: () => WalletConfig;
|
|
257
|
+
|
|
258
|
+
declare const ledgerWallet: () => WalletConfig;
|
|
259
|
+
|
|
260
|
+
declare const magicEdenWallet: () => WalletConfig;
|
|
261
|
+
|
|
262
|
+
declare const mathWallet: () => WalletConfig;
|
|
263
|
+
|
|
264
|
+
declare const metaMaskWallet: () => WalletConfig;
|
|
265
|
+
|
|
266
|
+
declare const mydogeWallet: () => WalletConfig;
|
|
267
|
+
|
|
268
|
+
declare const nestWallet: () => WalletConfig;
|
|
269
|
+
|
|
270
|
+
declare const novaWallet: () => WalletConfig;
|
|
271
|
+
|
|
272
|
+
declare const oktoWallet: () => WalletConfig;
|
|
273
|
+
|
|
274
|
+
declare const okxWallet: () => WalletConfig;
|
|
275
|
+
|
|
276
|
+
declare const omniWallet: () => WalletConfig;
|
|
277
|
+
|
|
278
|
+
declare const oneInchWallet: () => WalletConfig;
|
|
279
|
+
|
|
280
|
+
declare const oneKeyWallet: () => WalletConfig;
|
|
281
|
+
|
|
282
|
+
declare const paraSwapWallet: () => WalletConfig;
|
|
283
|
+
|
|
284
|
+
declare const petraWallet: () => WalletConfig;
|
|
285
|
+
|
|
286
|
+
declare const phantomWallet: () => WalletConfig;
|
|
287
|
+
|
|
288
|
+
declare const rabbyWallet: () => WalletConfig;
|
|
289
|
+
|
|
290
|
+
declare const rainbowWallet: () => WalletConfig;
|
|
291
|
+
|
|
292
|
+
declare const ramperWallet: () => WalletConfig;
|
|
293
|
+
|
|
294
|
+
declare const readyWallet: () => WalletConfig;
|
|
295
|
+
|
|
296
|
+
declare const roninWallet: () => WalletConfig;
|
|
297
|
+
|
|
298
|
+
declare const safeWallet: () => WalletConfig;
|
|
299
|
+
|
|
300
|
+
declare const safeheronWallet: () => WalletConfig;
|
|
301
|
+
|
|
302
|
+
declare const safepalWallet: () => WalletConfig;
|
|
303
|
+
|
|
304
|
+
declare const seifWallet: () => WalletConfig;
|
|
305
|
+
|
|
306
|
+
declare const solflareWallet: () => WalletConfig;
|
|
307
|
+
|
|
308
|
+
declare const subWallet: () => WalletConfig;
|
|
309
|
+
|
|
310
|
+
declare const tahoWallet: () => WalletConfig;
|
|
311
|
+
|
|
312
|
+
declare const talismanWallet: () => WalletConfig;
|
|
313
|
+
|
|
314
|
+
declare const tokenPocketWallet: () => WalletConfig;
|
|
315
|
+
|
|
316
|
+
declare const tokenaryWallet: () => WalletConfig;
|
|
317
|
+
|
|
318
|
+
declare const trezorWallet: () => WalletConfig;
|
|
319
|
+
|
|
320
|
+
declare const trustWallet: () => WalletConfig;
|
|
321
|
+
|
|
322
|
+
declare const uniswapWallet: () => WalletConfig;
|
|
323
|
+
|
|
324
|
+
declare const universalProfilesWallet: () => WalletConfig;
|
|
325
|
+
|
|
326
|
+
declare const valoraWallet: () => WalletConfig;
|
|
327
|
+
|
|
328
|
+
declare const walletConnectWallet: () => WalletConfig;
|
|
329
|
+
|
|
330
|
+
declare const wigwamWallet: () => WalletConfig;
|
|
331
|
+
|
|
332
|
+
declare const xPortalWallet: () => WalletConfig;
|
|
333
|
+
|
|
334
|
+
declare const zealWallet: () => WalletConfig;
|
|
335
|
+
|
|
336
|
+
declare const zerionWallet: () => WalletConfig;
|
|
337
|
+
|
|
338
|
+
declare const zilPayWallet: () => WalletConfig;
|
|
339
|
+
|
|
340
|
+
declare const TomoDefaultConnectors: Connector[];
|
|
341
|
+
declare function loadConnectors({ chainType, recommonedConnectors, connectorTypes, }: {
|
|
342
|
+
chainType?: AdaptorChainType;
|
|
343
|
+
recommonedConnectors?: (WalletConfig | WagmiWalletConfig)[];
|
|
344
|
+
connectorTypes?: WalletConnectorType[];
|
|
345
|
+
}): Promise<{
|
|
346
|
+
all: Connector[];
|
|
347
|
+
recommoned: Connector[];
|
|
348
|
+
}>;
|
|
349
|
+
|
|
350
|
+
export { type AdaptorChainType, type BalanceParams, type ChainInfo, type ConnectParams, type Connector, type ConnectorProvider, type ITokenInfo, ProviderChainType, ProviderProtocol, type SignInParams, SupportedChainTypes, TomoDefaultConnectors, type WalletConfig, type WalletConnectorType, type WalletInfo, type WalletOptions, type WalletProvider, addChain, backpackWallet, berasigWallet, binanceWallet, bitgetWallet, bitskiWallet, bitverseWallet, bloomWallet, braveWallet, bybitWallet, clvWallet, coin98Wallet, coinbaseWallet, compassWallet, connect, connectMobile, coreWallet, ctrlWallet, dawnWallet, desigWallet, disconnect, enkryptWallet, foxWallet, frameWallet, gateWallet, getBalance, imTokenWallet, injectedWallet, iopayWallet, isMobile, kaiaWallet, kaikasWallet, krakenWallet, kresusWallet, ledgerWallet, loadConnectors, magicEdenWallet, mathWallet, metaMaskWallet, mydogeWallet, nestWallet, novaWallet, oktoWallet, okxWallet, omniWallet, oneInchWallet, oneKeyWallet, paraSwapWallet, petraWallet, phantomWallet, rabbyWallet, rainbowWallet, ramperWallet, readyWallet, roninWallet, safeWallet, safeheronWallet, safepalWallet, seifWallet, setWalletConnectConfig, signInWithWallet, signMessage, solflareWallet, subWallet, switchChain, tahoWallet, talismanWallet, tokenPocketWallet, tokenaryWallet, trezorWallet, trustWallet, uniswapWallet, universalProfilesWallet, valoraWallet, walletConnectWallet, wigwamWallet, xPortalWallet, zealWallet, zerionWallet, zilPayWallet };
|