@dynamic-labs/ethereum 0.19.0-alpha.2 → 0.19.0-alpha.21

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.
Files changed (118) hide show
  1. package/CHANGELOG.md +293 -0
  2. package/package.json +13 -10
  3. package/src/EthWalletConnector.cjs +189 -193
  4. package/src/EthWalletConnector.d.ts +298 -41
  5. package/src/EthWalletConnector.js +190 -194
  6. package/src/coinbase/client/client.cjs +76 -0
  7. package/src/coinbase/client/client.d.ts +6 -0
  8. package/src/coinbase/client/client.js +69 -0
  9. package/src/coinbase/client/index.d.ts +2 -0
  10. package/src/coinbase/client/types.d.ts +14 -0
  11. package/src/coinbase/coinbase.cjs +71 -0
  12. package/src/coinbase/coinbase.d.ts +535 -0
  13. package/src/coinbase/coinbase.js +67 -0
  14. package/src/coinbase/index.d.ts +3 -0
  15. package/src/constants.d.ts +1 -1
  16. package/src/ethProviderHelper.cjs +132 -209
  17. package/src/ethProviderHelper.d.ts +28 -36
  18. package/src/ethProviderHelper.js +133 -210
  19. package/src/index.cjs +30 -26
  20. package/src/index.d.ts +9 -8
  21. package/src/index.js +25 -20
  22. package/src/injected/BloctoInjected.cjs +6 -6
  23. package/src/injected/BloctoInjected.d.ts +4 -4
  24. package/src/injected/BloctoInjected.js +6 -6
  25. package/src/injected/BraveEvm.cjs +6 -6
  26. package/src/injected/BraveEvm.d.ts +4 -4
  27. package/src/injected/BraveEvm.js +6 -6
  28. package/src/injected/Dawn.cjs +6 -6
  29. package/src/injected/Dawn.d.ts +4 -4
  30. package/src/injected/Dawn.js +6 -6
  31. package/src/injected/ExodusEvm.cjs +8 -8
  32. package/src/injected/ExodusEvm.d.ts +5 -5
  33. package/src/injected/ExodusEvm.js +7 -7
  34. package/src/injected/Frame.cjs +6 -6
  35. package/src/injected/Frame.d.ts +4 -4
  36. package/src/injected/Frame.js +6 -6
  37. package/src/injected/GameStop.cjs +6 -6
  38. package/src/injected/GameStop.d.ts +4 -4
  39. package/src/injected/GameStop.js +6 -6
  40. package/src/injected/InjectedWalletBase.cjs +86 -65
  41. package/src/injected/InjectedWalletBase.d.ts +29 -24
  42. package/src/injected/InjectedWalletBase.js +86 -65
  43. package/src/injected/LegacyInjectedWalletBase.cjs +83 -0
  44. package/src/injected/LegacyInjectedWalletBase.d.ts +24 -0
  45. package/src/injected/LegacyInjectedWalletBase.js +81 -0
  46. package/src/injected/Opera.cjs +6 -6
  47. package/src/injected/Opera.d.ts +4 -4
  48. package/src/injected/Opera.js +6 -6
  49. package/src/injected/PhantomEvm.cjs +28 -28
  50. package/src/injected/PhantomEvm.d.ts +5 -5
  51. package/src/injected/PhantomEvm.js +28 -28
  52. package/src/injected/Rabby.cjs +8 -8
  53. package/src/injected/Rabby.d.ts +5 -5
  54. package/src/injected/Rabby.js +7 -7
  55. package/src/injected/Superb.cjs +6 -6
  56. package/src/injected/Superb.d.ts +4 -4
  57. package/src/injected/Superb.js +6 -6
  58. package/src/injected/Trust.cjs +8 -8
  59. package/src/injected/Trust.d.ts +5 -5
  60. package/src/injected/Trust.js +7 -7
  61. package/src/injected/Zerion.cjs +8 -8
  62. package/src/injected/Zerion.d.ts +5 -5
  63. package/src/injected/Zerion.js +7 -7
  64. package/src/injected/fetchInjectedWalletConnectors.cjs +33 -0
  65. package/src/injected/fetchInjectedWalletConnectors.d.ts +6 -0
  66. package/src/injected/fetchInjectedWalletConnectors.js +29 -0
  67. package/src/injected/index.d.ts +13 -16
  68. package/src/injected/legacyInjectedWallets.cjs +48 -0
  69. package/src/injected/legacyInjectedWallets.d.ts +3 -0
  70. package/src/injected/legacyInjectedWallets.js +43 -0
  71. package/src/legacyEthProviderHelper.cjs +187 -0
  72. package/src/legacyEthProviderHelper.d.ts +34 -0
  73. package/src/legacyEthProviderHelper.js +183 -0
  74. package/src/polyfills.cjs +11 -11
  75. package/src/polyfills.d.ts +1 -1
  76. package/src/polyfills.js +11 -11
  77. package/src/types.d.ts +37 -24
  78. package/src/utils/eventListenerHandlers.cjs +34 -0
  79. package/src/utils/eventListenerHandlers.d.ts +8 -0
  80. package/src/utils/eventListenerHandlers.js +30 -0
  81. package/src/utils/findEvmNetwork.cjs +13 -13
  82. package/src/utils/findEvmNetwork.d.ts +6 -6
  83. package/src/utils/findEvmNetwork.js +13 -13
  84. package/src/utils/isString.d.ts +1 -1
  85. package/src/utils/isUnsupportedProviderError/index.d.ts +1 -1
  86. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.cjs +6 -6
  87. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.d.ts +6 -6
  88. package/src/utils/isUnsupportedProviderError/isUnsupportedProviderError.js +6 -6
  89. package/src/utils/last.d.ts +1 -1
  90. package/src/utils/parseIntSafe.cjs +13 -13
  91. package/src/utils/parseIntSafe.d.ts +1 -1
  92. package/src/utils/parseIntSafe.js +13 -13
  93. package/src/walletConnect/client/client.cjs +179 -176
  94. package/src/walletConnect/client/client.d.ts +17 -17
  95. package/src/walletConnect/client/client.js +179 -176
  96. package/src/walletConnect/client/index.d.ts +1 -1
  97. package/src/walletConnect/client/types.d.ts +4 -4
  98. package/src/walletConnect/fetchWalletConnectWallets.cjs +37 -52
  99. package/src/walletConnect/fetchWalletConnectWallets.d.ts +9 -10
  100. package/src/walletConnect/fetchWalletConnectWallets.js +38 -52
  101. package/src/walletConnect/index.d.ts +3 -3
  102. package/src/walletConnect/walletConnect.cjs +131 -130
  103. package/src/walletConnect/walletConnect.d.ts +52 -50
  104. package/src/walletConnect/walletConnect.js +131 -130
  105. package/src/walletConnect/walletConnectV2.cjs +419 -374
  106. package/src/walletConnect/walletConnectV2.d.ts +326 -61
  107. package/src/walletConnect/walletConnectV2.js +420 -375
  108. package/src/injected/MetaMask.cjs +0 -15
  109. package/src/injected/MetaMask.d.ts +0 -5
  110. package/src/injected/MetaMask.js +0 -11
  111. package/src/injected/OKX.cjs +0 -15
  112. package/src/injected/OKX.d.ts +0 -5
  113. package/src/injected/OKX.js +0 -11
  114. package/src/injected/UnknownInjectedWallet.cjs +0 -14
  115. package/src/injected/UnknownInjectedWallet.d.ts +0 -4
  116. package/src/injected/UnknownInjectedWallet.js +0 -10
  117. package/src/injected/index.cjs +0 -53
  118. package/src/injected/index.js +0 -49
@@ -1,61 +1,326 @@
1
- import { ethers } from 'ethers';
2
- import type { SessionTypes } from '@walletconnect/types';
3
- import { Chain, FetchPublicAddressOpts } from '@dynamic-labs/wallet-connector-core';
4
- import { EvmNetwork } from '@dynamic-labs/types';
5
- import { EthWalletConnector, EthWalletConnectorOpts } from '../EthWalletConnector';
6
- export type WalletConnectorV2Opts = EthWalletConnectorOpts & {
7
- projectId?: string;
8
- walletName: string;
9
- };
10
- export declare class WalletConnectV2 extends EthWalletConnector {
11
- supportedChains: Chain[];
12
- connectedChain: Chain;
13
- name: string;
14
- session: SessionTypes.Struct | undefined;
15
- activeAccount: string | undefined;
16
- isInitialized: boolean;
17
- initializePromise: Promise<void> | undefined;
18
- canConnectViaQrCode: boolean;
19
- isWalletConnect: boolean;
20
- private static provider;
21
- private projectId?;
22
- constructor(opts: WalletConnectorV2Opts);
23
- private initConnection;
24
- private createInitProviderPromise;
25
- private initProvider;
26
- private refreshSession;
27
- init(): Promise<void>;
28
- get sessionTopicKey(): string;
29
- get activeAccountKey(): string;
30
- supportsNetworkSwitching(): boolean;
31
- setupEventListeners(): void;
32
- teardownEventListeners(): void;
33
- getWeb3Provider(): ethers.providers.Web3Provider | undefined;
34
- fetchPublicAddress(opts?: FetchPublicAddressOpts): Promise<string | undefined>;
35
- /**
36
- * WalletConnect V2 will fail to send the sign message request if the chainId
37
- * is not the same as the one in the session. This method will wait for the
38
- * chainId to change and then retry the sign message request.
39
- *
40
- * Otherwise it will just return the result of the sign message request.
41
- *
42
- * @param signMessageFn - Function to sign message with provider
43
- * @param messageToSign - Message to sign
44
- * @returns
45
- */
46
- protected waitForSignMessage(signMessageFn: (messageToSign: string) => Promise<string | undefined>, messageToSign: string): Promise<string | undefined>;
47
- getDeepLink(): string | undefined;
48
- signMessage(messageToSign: string): Promise<string | undefined>;
49
- private clearActiveAccount;
50
- private clearSession;
51
- private setActiveAccount;
52
- private setSession;
53
- endSession(): Promise<void>;
54
- getNetwork(): Promise<number | undefined>;
55
- providerSwitchNetwork({ network, provider, }: {
56
- network: EvmNetwork;
57
- provider: ethers.providers.Web3Provider;
58
- }): Promise<void>;
59
- getConnectedAccounts(): Promise<string[]>;
60
- getSupportedNetworks(): Promise<string[] | undefined>;
61
- }
1
+ import type { SessionTypes } from '@walletconnect/types';
2
+ import { Hex, WalletClient } from 'viem';
3
+ import { Chain, FetchPublicAddressOpts, DeepLinkVariant } from '@dynamic-labs/wallet-connector-core';
4
+ import { EvmNetwork } from '@dynamic-labs/types';
5
+ import { EthWalletConnector, EthWalletConnectorOpts } from '../EthWalletConnector';
6
+ export type WalletConnectorV2Opts = EthWalletConnectorOpts & {
7
+ projectId?: string;
8
+ walletName: string;
9
+ deepLinkPreference?: DeepLinkVariant;
10
+ walletConnectPreferredChains?: `eip155:${number}`[];
11
+ };
12
+ export declare class WalletConnectV2 extends EthWalletConnector {
13
+ supportedChains: Chain[];
14
+ connectedChain: Chain;
15
+ name: string;
16
+ session: SessionTypes.Struct | undefined;
17
+ activeAccount: Hex | undefined;
18
+ isInitialized: boolean;
19
+ initializePromise: Promise<void> | undefined;
20
+ canConnectViaQrCode: boolean;
21
+ isWalletConnect: boolean;
22
+ private static provider;
23
+ private projectId?;
24
+ private deepLinkPreference;
25
+ private preferredChains;
26
+ constructor(opts: WalletConnectorV2Opts);
27
+ private defaultChainId;
28
+ private findSupportedChains;
29
+ private supportedChain;
30
+ private optionalChains;
31
+ private initConnection;
32
+ private createInitProviderPromise;
33
+ private initProvider;
34
+ private refreshSession;
35
+ init(): Promise<void>;
36
+ get sessionTopicKey(): string;
37
+ get activeAccountKey(): string;
38
+ supportsNetworkSwitching(): boolean;
39
+ setupEventListeners(): void;
40
+ teardownEventListeners(): void;
41
+ getWalletClient(): {
42
+ account: undefined;
43
+ batch?: {
44
+ multicall?: boolean | {
45
+ batchSize?: number | undefined;
46
+ wait?: number | undefined;
47
+ } | undefined;
48
+ } | undefined;
49
+ cacheTime: number;
50
+ chain: undefined;
51
+ key: string;
52
+ name: string;
53
+ pollingInterval: number;
54
+ request: import("viem").EIP1193RequestFn<import("viem").WalletRpcSchema>;
55
+ transport: import("viem").TransportConfig<"custom", import("viem").EIP1193RequestFn>;
56
+ type: string;
57
+ uid: string;
58
+ addChain: (args: import("viem").AddChainParameters) => Promise<void>;
59
+ deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi, undefined, undefined, TChainOverride>) => Promise<`0x${string}`>;
60
+ getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
61
+ getChainId: () => Promise<number>;
62
+ getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
63
+ prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<undefined, undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
64
+ requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
65
+ requestPermissions: (args: {
66
+ [x: string]: Record<string, any>;
67
+ eth_accounts: Record<string, any>;
68
+ }) => Promise<import("viem").RequestPermissionsReturnType>;
69
+ sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
70
+ sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<undefined, undefined, TChainOverride_2>) => Promise<`0x${string}`>;
71
+ signMessage: (args: import("viem").SignMessageParameters<undefined>) => Promise<`0x${string}`>;
72
+ signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<undefined, undefined, TChainOverride_3>) => Promise<`0x${string}`>;
73
+ signTypedData: <const TTypedData extends {
74
+ [x: string]: readonly import("viem").TypedDataParameter[];
75
+ [x: `string[${string}]`]: undefined;
76
+ [x: `function[${string}]`]: undefined;
77
+ [x: `address[${string}]`]: undefined;
78
+ [x: `bool[${string}]`]: undefined;
79
+ [x: `bytes[${string}]`]: undefined;
80
+ [x: `bytes16[${string}]`]: undefined;
81
+ [x: `bytes1[${string}]`]: undefined;
82
+ [x: `bytes2[${string}]`]: undefined;
83
+ [x: `bytes3[${string}]`]: undefined;
84
+ [x: `bytes4[${string}]`]: undefined;
85
+ [x: `bytes5[${string}]`]: undefined;
86
+ [x: `bytes6[${string}]`]: undefined;
87
+ [x: `bytes7[${string}]`]: undefined;
88
+ [x: `bytes8[${string}]`]: undefined;
89
+ [x: `bytes9[${string}]`]: undefined;
90
+ [x: `bytes10[${string}]`]: undefined;
91
+ [x: `bytes11[${string}]`]: undefined;
92
+ [x: `bytes12[${string}]`]: undefined;
93
+ [x: `bytes13[${string}]`]: undefined;
94
+ [x: `bytes14[${string}]`]: undefined;
95
+ [x: `bytes15[${string}]`]: undefined;
96
+ [x: `bytes17[${string}]`]: undefined;
97
+ [x: `bytes18[${string}]`]: undefined;
98
+ [x: `bytes19[${string}]`]: undefined;
99
+ [x: `bytes20[${string}]`]: undefined;
100
+ [x: `bytes21[${string}]`]: undefined;
101
+ [x: `bytes22[${string}]`]: undefined;
102
+ [x: `bytes23[${string}]`]: undefined;
103
+ [x: `bytes24[${string}]`]: undefined;
104
+ [x: `bytes25[${string}]`]: undefined;
105
+ [x: `bytes26[${string}]`]: undefined;
106
+ [x: `bytes27[${string}]`]: undefined;
107
+ [x: `bytes28[${string}]`]: undefined;
108
+ [x: `bytes29[${string}]`]: undefined;
109
+ [x: `bytes30[${string}]`]: undefined;
110
+ [x: `bytes31[${string}]`]: undefined;
111
+ [x: `bytes32[${string}]`]: undefined;
112
+ [x: `int[${string}]`]: undefined;
113
+ [x: `int16[${string}]`]: undefined;
114
+ [x: `int8[${string}]`]: undefined;
115
+ [x: `int24[${string}]`]: undefined;
116
+ [x: `int32[${string}]`]: undefined;
117
+ [x: `int40[${string}]`]: undefined;
118
+ [x: `int48[${string}]`]: undefined;
119
+ [x: `int56[${string}]`]: undefined;
120
+ [x: `int64[${string}]`]: undefined;
121
+ [x: `int72[${string}]`]: undefined;
122
+ [x: `int80[${string}]`]: undefined;
123
+ [x: `int88[${string}]`]: undefined;
124
+ [x: `int96[${string}]`]: undefined;
125
+ [x: `int104[${string}]`]: undefined;
126
+ [x: `int112[${string}]`]: undefined;
127
+ [x: `int120[${string}]`]: undefined;
128
+ [x: `int128[${string}]`]: undefined;
129
+ [x: `int136[${string}]`]: undefined;
130
+ [x: `int144[${string}]`]: undefined;
131
+ [x: `int152[${string}]`]: undefined;
132
+ [x: `int160[${string}]`]: undefined;
133
+ [x: `int168[${string}]`]: undefined;
134
+ [x: `int176[${string}]`]: undefined;
135
+ [x: `int184[${string}]`]: undefined;
136
+ [x: `int192[${string}]`]: undefined;
137
+ [x: `int200[${string}]`]: undefined;
138
+ [x: `int208[${string}]`]: undefined;
139
+ [x: `int216[${string}]`]: undefined;
140
+ [x: `int224[${string}]`]: undefined;
141
+ [x: `int232[${string}]`]: undefined;
142
+ [x: `int240[${string}]`]: undefined;
143
+ [x: `int248[${string}]`]: undefined;
144
+ [x: `int256[${string}]`]: undefined;
145
+ [x: `uint[${string}]`]: undefined;
146
+ [x: `uint16[${string}]`]: undefined;
147
+ [x: `uint8[${string}]`]: undefined;
148
+ [x: `uint24[${string}]`]: undefined;
149
+ [x: `uint32[${string}]`]: undefined;
150
+ [x: `uint40[${string}]`]: undefined;
151
+ [x: `uint48[${string}]`]: undefined;
152
+ [x: `uint56[${string}]`]: undefined;
153
+ [x: `uint64[${string}]`]: undefined;
154
+ [x: `uint72[${string}]`]: undefined;
155
+ [x: `uint80[${string}]`]: undefined;
156
+ [x: `uint88[${string}]`]: undefined;
157
+ [x: `uint96[${string}]`]: undefined;
158
+ [x: `uint104[${string}]`]: undefined;
159
+ [x: `uint112[${string}]`]: undefined;
160
+ [x: `uint120[${string}]`]: undefined;
161
+ [x: `uint128[${string}]`]: undefined;
162
+ [x: `uint136[${string}]`]: undefined;
163
+ [x: `uint144[${string}]`]: undefined;
164
+ [x: `uint152[${string}]`]: undefined;
165
+ [x: `uint160[${string}]`]: undefined;
166
+ [x: `uint168[${string}]`]: undefined;
167
+ [x: `uint176[${string}]`]: undefined;
168
+ [x: `uint184[${string}]`]: undefined;
169
+ [x: `uint192[${string}]`]: undefined;
170
+ [x: `uint200[${string}]`]: undefined;
171
+ [x: `uint208[${string}]`]: undefined;
172
+ [x: `uint216[${string}]`]: undefined;
173
+ [x: `uint224[${string}]`]: undefined;
174
+ [x: `uint232[${string}]`]: undefined;
175
+ [x: `uint240[${string}]`]: undefined;
176
+ [x: `uint248[${string}]`]: undefined;
177
+ [x: `uint256[${string}]`]: undefined;
178
+ string?: undefined;
179
+ address?: undefined;
180
+ bool?: undefined;
181
+ bytes?: undefined;
182
+ bytes16?: undefined;
183
+ bytes1?: undefined;
184
+ bytes2?: undefined;
185
+ bytes3?: undefined;
186
+ bytes4?: undefined;
187
+ bytes5?: undefined;
188
+ bytes6?: undefined;
189
+ bytes7?: undefined;
190
+ bytes8?: undefined;
191
+ bytes9?: undefined;
192
+ bytes10?: undefined;
193
+ bytes11?: undefined;
194
+ bytes12?: undefined;
195
+ bytes13?: undefined;
196
+ bytes14?: undefined;
197
+ bytes15?: undefined;
198
+ bytes17?: undefined;
199
+ bytes18?: undefined;
200
+ bytes19?: undefined;
201
+ bytes20?: undefined;
202
+ bytes21?: undefined;
203
+ bytes22?: undefined;
204
+ bytes23?: undefined;
205
+ bytes24?: undefined;
206
+ bytes25?: undefined;
207
+ bytes26?: undefined;
208
+ bytes27?: undefined;
209
+ bytes28?: undefined;
210
+ bytes29?: undefined;
211
+ bytes30?: undefined;
212
+ bytes31?: undefined;
213
+ bytes32?: undefined;
214
+ int16?: undefined;
215
+ int8?: undefined;
216
+ int24?: undefined;
217
+ int32?: undefined;
218
+ int40?: undefined;
219
+ int48?: undefined;
220
+ int56?: undefined;
221
+ int64?: undefined;
222
+ int72?: undefined;
223
+ int80?: undefined;
224
+ int88?: undefined;
225
+ int96?: undefined;
226
+ int104?: undefined;
227
+ int112?: undefined;
228
+ int120?: undefined;
229
+ int128?: undefined;
230
+ int136?: undefined;
231
+ int144?: undefined;
232
+ int152?: undefined;
233
+ int160?: undefined;
234
+ int168?: undefined;
235
+ int176?: undefined;
236
+ int184?: undefined;
237
+ int192?: undefined;
238
+ int200?: undefined;
239
+ int208?: undefined;
240
+ int216?: undefined;
241
+ int224?: undefined;
242
+ int232?: undefined;
243
+ int240?: undefined;
244
+ int248?: undefined;
245
+ int256?: undefined;
246
+ uint16?: undefined;
247
+ uint8?: undefined;
248
+ uint24?: undefined;
249
+ uint32?: undefined;
250
+ uint40?: undefined;
251
+ uint48?: undefined;
252
+ uint56?: undefined;
253
+ uint64?: undefined;
254
+ uint72?: undefined;
255
+ uint80?: undefined;
256
+ uint88?: undefined;
257
+ uint96?: undefined;
258
+ uint104?: undefined;
259
+ uint112?: undefined;
260
+ uint120?: undefined;
261
+ uint128?: undefined;
262
+ uint136?: undefined;
263
+ uint144?: undefined;
264
+ uint152?: undefined;
265
+ uint160?: undefined;
266
+ uint168?: undefined;
267
+ uint176?: undefined;
268
+ uint184?: undefined;
269
+ uint192?: undefined;
270
+ uint200?: undefined;
271
+ uint208?: undefined;
272
+ uint216?: undefined;
273
+ uint224?: undefined;
274
+ uint232?: undefined;
275
+ uint240?: undefined;
276
+ uint248?: undefined;
277
+ uint256?: undefined;
278
+ } | {
279
+ [key: string]: unknown;
280
+ }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, undefined>) => Promise<`0x${string}`>;
281
+ switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
282
+ watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
283
+ writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, undefined, undefined, TChainOverride_4>) => Promise<`0x${string}`>;
284
+ extend: <const client extends {
285
+ [x: string]: unknown;
286
+ account?: undefined;
287
+ batch?: undefined;
288
+ cacheTime?: undefined;
289
+ chain?: undefined;
290
+ key?: undefined;
291
+ name?: undefined;
292
+ pollingInterval?: undefined;
293
+ request?: undefined;
294
+ transport?: undefined;
295
+ type?: undefined;
296
+ uid?: undefined;
297
+ }>(fn: (client: import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<undefined, undefined>>) => client) => import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<undefined, undefined>>;
298
+ } | undefined;
299
+ fetchPublicAddress(opts?: FetchPublicAddressOpts): Promise<string | undefined>;
300
+ /**
301
+ * WalletConnect V2 will fail to send the sign message request if the chainId
302
+ * is not the same as the one in the session. This method will wait for the
303
+ * chainId to change and then retry the sign message request.
304
+ *
305
+ * Otherwise it will just return the result of the sign message request.
306
+ *
307
+ * @param signMessageFn - Function to sign message with provider
308
+ * @param messageToSign - Message to sign
309
+ * @returns
310
+ */
311
+ protected waitForSignMessage(signMessageFn: (messageToSign: string) => Promise<string | undefined>, messageToSign: string): Promise<string | undefined>;
312
+ getDeepLink(): string | undefined;
313
+ signMessage(messageToSign: string): Promise<string | undefined>;
314
+ private clearActiveAccount;
315
+ private clearSession;
316
+ private setActiveAccount;
317
+ private setSession;
318
+ endSession(): Promise<void>;
319
+ getNetwork(): Promise<number | undefined>;
320
+ providerSwitchNetwork({ network, provider, }: {
321
+ network: EvmNetwork;
322
+ provider: WalletClient;
323
+ }): Promise<void>;
324
+ getConnectedAccounts(): Promise<string[]>;
325
+ getSupportedNetworks(): Promise<string[] | undefined>;
326
+ }