@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
@@ -0,0 +1,535 @@
1
+ import { Chain, FetchPublicAddressOpts } from '@dynamic-labs/wallet-connector-core';
2
+ import { EthWalletConnector, EthWalletConnectorOpts } from '../EthWalletConnector';
3
+ type CoinbaseOpts = EthWalletConnectorOpts & {
4
+ appLogoUrl?: string;
5
+ appName?: string;
6
+ };
7
+ export declare class Coinbase extends EthWalletConnector {
8
+ name: string;
9
+ supportedChains: Chain[];
10
+ connectedChain: Chain;
11
+ canConnectViaQrCode: boolean;
12
+ private coinbaseProviderOpts;
13
+ constructor({ appName, appLogoUrl, evmNetworks, ...props }: CoinbaseOpts);
14
+ setupEventListeners(): void;
15
+ getWalletClient(): {
16
+ account: import("viem").Account | undefined;
17
+ batch?: {
18
+ multicall?: boolean | {
19
+ batchSize?: number | undefined;
20
+ wait?: number | undefined;
21
+ } | undefined;
22
+ } | undefined;
23
+ cacheTime: number;
24
+ chain: import("viem").Chain | undefined;
25
+ key: string;
26
+ name: string;
27
+ pollingInterval: number;
28
+ request: import("viem").EIP1193RequestFn<import("viem").WalletRpcSchema>;
29
+ transport: import("viem").TransportConfig<string, import("viem").EIP1193RequestFn> & Record<string, any>;
30
+ type: string;
31
+ uid: string;
32
+ addChain: (args: import("viem").AddChainParameters) => Promise<void>;
33
+ deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride>) => Promise<`0x${string}`>;
34
+ getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
35
+ getChainId: () => Promise<number>;
36
+ getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
37
+ prepareTransactionRequest: <TChainOverride_1 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
38
+ requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
39
+ requestPermissions: (args: {
40
+ [x: string]: Record<string, any>;
41
+ eth_accounts: Record<string, any>;
42
+ }) => Promise<import("viem").RequestPermissionsReturnType>;
43
+ sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
44
+ sendTransaction: <TChainOverride_2 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_2>) => Promise<`0x${string}`>;
45
+ signMessage: (args: import("viem").SignMessageParameters<import("viem").Account | undefined>) => Promise<`0x${string}`>;
46
+ signTransaction: <TChainOverride_3 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_3>) => Promise<`0x${string}`>;
47
+ signTypedData: <const TTypedData extends {
48
+ [x: string]: readonly import("viem").TypedDataParameter[];
49
+ [x: `string[${string}]`]: undefined;
50
+ [x: `function[${string}]`]: undefined;
51
+ [x: `address[${string}]`]: undefined;
52
+ [x: `bool[${string}]`]: undefined;
53
+ [x: `bytes[${string}]`]: undefined;
54
+ [x: `bytes16[${string}]`]: undefined;
55
+ [x: `bytes1[${string}]`]: undefined;
56
+ [x: `bytes2[${string}]`]: undefined;
57
+ [x: `bytes3[${string}]`]: undefined;
58
+ [x: `bytes4[${string}]`]: undefined;
59
+ [x: `bytes5[${string}]`]: undefined;
60
+ [x: `bytes6[${string}]`]: undefined;
61
+ [x: `bytes7[${string}]`]: undefined;
62
+ [x: `bytes8[${string}]`]: undefined;
63
+ [x: `bytes9[${string}]`]: undefined;
64
+ [x: `bytes10[${string}]`]: undefined;
65
+ [x: `bytes11[${string}]`]: undefined;
66
+ [x: `bytes12[${string}]`]: undefined;
67
+ [x: `bytes13[${string}]`]: undefined;
68
+ [x: `bytes14[${string}]`]: undefined;
69
+ [x: `bytes15[${string}]`]: undefined;
70
+ [x: `bytes17[${string}]`]: undefined;
71
+ [x: `bytes18[${string}]`]: undefined;
72
+ [x: `bytes19[${string}]`]: undefined;
73
+ [x: `bytes20[${string}]`]: undefined;
74
+ [x: `bytes21[${string}]`]: undefined;
75
+ [x: `bytes22[${string}]`]: undefined;
76
+ [x: `bytes23[${string}]`]: undefined;
77
+ [x: `bytes24[${string}]`]: undefined;
78
+ [x: `bytes25[${string}]`]: undefined;
79
+ [x: `bytes26[${string}]`]: undefined;
80
+ [x: `bytes27[${string}]`]: undefined;
81
+ [x: `bytes28[${string}]`]: undefined;
82
+ [x: `bytes29[${string}]`]: undefined;
83
+ [x: `bytes30[${string}]`]: undefined;
84
+ [x: `bytes31[${string}]`]: undefined;
85
+ [x: `bytes32[${string}]`]: undefined;
86
+ [x: `int[${string}]`]: undefined;
87
+ [x: `int16[${string}]`]: undefined;
88
+ [x: `int8[${string}]`]: undefined;
89
+ [x: `int24[${string}]`]: undefined;
90
+ [x: `int32[${string}]`]: undefined;
91
+ [x: `int40[${string}]`]: undefined;
92
+ [x: `int48[${string}]`]: undefined;
93
+ [x: `int56[${string}]`]: undefined;
94
+ [x: `int64[${string}]`]: undefined;
95
+ [x: `int72[${string}]`]: undefined;
96
+ [x: `int80[${string}]`]: undefined;
97
+ [x: `int88[${string}]`]: undefined;
98
+ [x: `int96[${string}]`]: undefined;
99
+ [x: `int104[${string}]`]: undefined;
100
+ [x: `int112[${string}]`]: undefined;
101
+ [x: `int120[${string}]`]: undefined;
102
+ [x: `int128[${string}]`]: undefined;
103
+ [x: `int136[${string}]`]: undefined;
104
+ [x: `int144[${string}]`]: undefined;
105
+ [x: `int152[${string}]`]: undefined;
106
+ [x: `int160[${string}]`]: undefined;
107
+ [x: `int168[${string}]`]: undefined;
108
+ [x: `int176[${string}]`]: undefined;
109
+ [x: `int184[${string}]`]: undefined;
110
+ [x: `int192[${string}]`]: undefined;
111
+ [x: `int200[${string}]`]: undefined;
112
+ [x: `int208[${string}]`]: undefined;
113
+ [x: `int216[${string}]`]: undefined;
114
+ [x: `int224[${string}]`]: undefined;
115
+ [x: `int232[${string}]`]: undefined;
116
+ [x: `int240[${string}]`]: undefined;
117
+ [x: `int248[${string}]`]: undefined;
118
+ [x: `int256[${string}]`]: undefined;
119
+ [x: `uint[${string}]`]: undefined;
120
+ [x: `uint16[${string}]`]: undefined;
121
+ [x: `uint8[${string}]`]: undefined;
122
+ [x: `uint24[${string}]`]: undefined;
123
+ [x: `uint32[${string}]`]: undefined;
124
+ [x: `uint40[${string}]`]: undefined;
125
+ [x: `uint48[${string}]`]: undefined;
126
+ [x: `uint56[${string}]`]: undefined;
127
+ [x: `uint64[${string}]`]: undefined;
128
+ [x: `uint72[${string}]`]: undefined;
129
+ [x: `uint80[${string}]`]: undefined;
130
+ [x: `uint88[${string}]`]: undefined;
131
+ [x: `uint96[${string}]`]: undefined;
132
+ [x: `uint104[${string}]`]: undefined;
133
+ [x: `uint112[${string}]`]: undefined;
134
+ [x: `uint120[${string}]`]: undefined;
135
+ [x: `uint128[${string}]`]: undefined;
136
+ [x: `uint136[${string}]`]: undefined;
137
+ [x: `uint144[${string}]`]: undefined;
138
+ [x: `uint152[${string}]`]: undefined;
139
+ [x: `uint160[${string}]`]: undefined;
140
+ [x: `uint168[${string}]`]: undefined;
141
+ [x: `uint176[${string}]`]: undefined;
142
+ [x: `uint184[${string}]`]: undefined;
143
+ [x: `uint192[${string}]`]: undefined;
144
+ [x: `uint200[${string}]`]: undefined;
145
+ [x: `uint208[${string}]`]: undefined;
146
+ [x: `uint216[${string}]`]: undefined;
147
+ [x: `uint224[${string}]`]: undefined;
148
+ [x: `uint232[${string}]`]: undefined;
149
+ [x: `uint240[${string}]`]: undefined;
150
+ [x: `uint248[${string}]`]: undefined;
151
+ [x: `uint256[${string}]`]: undefined;
152
+ string?: undefined;
153
+ address?: undefined;
154
+ bool?: undefined;
155
+ bytes?: undefined;
156
+ bytes16?: undefined;
157
+ bytes1?: undefined;
158
+ bytes2?: undefined;
159
+ bytes3?: undefined;
160
+ bytes4?: undefined;
161
+ bytes5?: undefined;
162
+ bytes6?: undefined;
163
+ bytes7?: undefined;
164
+ bytes8?: undefined;
165
+ bytes9?: undefined;
166
+ bytes10?: undefined;
167
+ bytes11?: undefined;
168
+ bytes12?: undefined;
169
+ bytes13?: undefined;
170
+ bytes14?: undefined;
171
+ bytes15?: undefined;
172
+ bytes17?: undefined;
173
+ bytes18?: undefined;
174
+ bytes19?: undefined;
175
+ bytes20?: undefined;
176
+ bytes21?: undefined;
177
+ bytes22?: undefined;
178
+ bytes23?: undefined;
179
+ bytes24?: undefined;
180
+ bytes25?: undefined;
181
+ bytes26?: undefined;
182
+ bytes27?: undefined;
183
+ bytes28?: undefined;
184
+ bytes29?: undefined;
185
+ bytes30?: undefined;
186
+ bytes31?: undefined;
187
+ bytes32?: undefined;
188
+ int16?: undefined;
189
+ int8?: undefined;
190
+ int24?: undefined;
191
+ int32?: undefined;
192
+ int40?: undefined;
193
+ int48?: undefined;
194
+ int56?: undefined;
195
+ int64?: undefined;
196
+ int72?: undefined;
197
+ int80?: undefined;
198
+ int88?: undefined;
199
+ int96?: undefined;
200
+ int104?: undefined;
201
+ int112?: undefined;
202
+ int120?: undefined;
203
+ int128?: undefined;
204
+ int136?: undefined;
205
+ int144?: undefined;
206
+ int152?: undefined;
207
+ int160?: undefined;
208
+ int168?: undefined;
209
+ int176?: undefined;
210
+ int184?: undefined;
211
+ int192?: undefined;
212
+ int200?: undefined;
213
+ int208?: undefined;
214
+ int216?: undefined;
215
+ int224?: undefined;
216
+ int232?: undefined;
217
+ int240?: undefined;
218
+ int248?: undefined;
219
+ int256?: undefined;
220
+ uint16?: undefined;
221
+ uint8?: undefined;
222
+ uint24?: undefined;
223
+ uint32?: undefined;
224
+ uint40?: undefined;
225
+ uint48?: undefined;
226
+ uint56?: undefined;
227
+ uint64?: undefined;
228
+ uint72?: undefined;
229
+ uint80?: undefined;
230
+ uint88?: undefined;
231
+ uint96?: undefined;
232
+ uint104?: undefined;
233
+ uint112?: undefined;
234
+ uint120?: undefined;
235
+ uint128?: undefined;
236
+ uint136?: undefined;
237
+ uint144?: undefined;
238
+ uint152?: undefined;
239
+ uint160?: undefined;
240
+ uint168?: undefined;
241
+ uint176?: undefined;
242
+ uint184?: undefined;
243
+ uint192?: undefined;
244
+ uint200?: undefined;
245
+ uint208?: undefined;
246
+ uint216?: undefined;
247
+ uint224?: undefined;
248
+ uint232?: undefined;
249
+ uint240?: undefined;
250
+ uint248?: undefined;
251
+ uint256?: undefined;
252
+ } | {
253
+ [key: string]: unknown;
254
+ }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, import("viem").Account | undefined>) => Promise<`0x${string}`>;
255
+ switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
256
+ watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
257
+ 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, import("viem").Chain | undefined, import("viem").Account | undefined, TChainOverride_4>) => Promise<`0x${string}`>;
258
+ extend: <const client extends {
259
+ [x: string]: unknown;
260
+ account?: undefined;
261
+ batch?: undefined;
262
+ cacheTime?: undefined;
263
+ chain?: undefined;
264
+ key?: undefined;
265
+ name?: undefined;
266
+ pollingInterval?: undefined;
267
+ request?: undefined;
268
+ transport?: undefined;
269
+ type?: undefined;
270
+ uid?: undefined;
271
+ }>(fn: (client: import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>) => client) => import("viem").Client<import("viem").Transport, import("viem").Chain | undefined, import("viem").Account | undefined, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<import("viem").Chain | undefined, import("viem").Account | undefined>>;
272
+ } | {
273
+ account: undefined;
274
+ batch?: {
275
+ multicall?: boolean | {
276
+ batchSize?: number | undefined;
277
+ wait?: number | undefined;
278
+ } | undefined;
279
+ } | undefined;
280
+ cacheTime: number;
281
+ chain: undefined;
282
+ key: string;
283
+ name: string;
284
+ pollingInterval: number;
285
+ request: import("viem").EIP1193RequestFn<import("viem").WalletRpcSchema>;
286
+ transport: import("viem").TransportConfig<"custom", import("viem").EIP1193RequestFn>;
287
+ type: string;
288
+ uid: string;
289
+ addChain: (args: import("viem").AddChainParameters) => Promise<void>;
290
+ deployContract: <const TAbi_2 extends import("viem").Abi | readonly unknown[], TChainOverride_5 extends import("viem").Chain | undefined>(args: import("viem").DeployContractParameters<TAbi_2, undefined, undefined, TChainOverride_5>) => Promise<`0x${string}`>;
291
+ getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
292
+ getChainId: () => Promise<number>;
293
+ getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
294
+ prepareTransactionRequest: <TChainOverride_6 extends import("viem").Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<undefined, undefined, TChainOverride_6>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
295
+ requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
296
+ requestPermissions: (args: {
297
+ [x: string]: Record<string, any>;
298
+ eth_accounts: Record<string, any>;
299
+ }) => Promise<import("viem").RequestPermissionsReturnType>;
300
+ sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
301
+ sendTransaction: <TChainOverride_7 extends import("viem").Chain | undefined>(args: import("viem").SendTransactionParameters<undefined, undefined, TChainOverride_7>) => Promise<`0x${string}`>;
302
+ signMessage: (args: import("viem").SignMessageParameters<undefined>) => Promise<`0x${string}`>;
303
+ signTransaction: <TChainOverride_8 extends import("viem").Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<undefined, undefined, TChainOverride_8>) => Promise<`0x${string}`>;
304
+ signTypedData: <const TTypedData_1 extends {
305
+ [x: string]: readonly import("viem").TypedDataParameter[];
306
+ [x: `string[${string}]`]: undefined;
307
+ [x: `function[${string}]`]: undefined;
308
+ [x: `address[${string}]`]: undefined;
309
+ [x: `bool[${string}]`]: undefined;
310
+ [x: `bytes[${string}]`]: undefined;
311
+ [x: `bytes16[${string}]`]: undefined;
312
+ [x: `bytes1[${string}]`]: undefined;
313
+ [x: `bytes2[${string}]`]: undefined;
314
+ [x: `bytes3[${string}]`]: undefined;
315
+ [x: `bytes4[${string}]`]: undefined;
316
+ [x: `bytes5[${string}]`]: undefined;
317
+ [x: `bytes6[${string}]`]: undefined;
318
+ [x: `bytes7[${string}]`]: undefined;
319
+ [x: `bytes8[${string}]`]: undefined;
320
+ [x: `bytes9[${string}]`]: undefined;
321
+ [x: `bytes10[${string}]`]: undefined;
322
+ [x: `bytes11[${string}]`]: undefined;
323
+ [x: `bytes12[${string}]`]: undefined;
324
+ [x: `bytes13[${string}]`]: undefined;
325
+ [x: `bytes14[${string}]`]: undefined;
326
+ [x: `bytes15[${string}]`]: undefined;
327
+ [x: `bytes17[${string}]`]: undefined;
328
+ [x: `bytes18[${string}]`]: undefined;
329
+ [x: `bytes19[${string}]`]: undefined;
330
+ [x: `bytes20[${string}]`]: undefined;
331
+ [x: `bytes21[${string}]`]: undefined;
332
+ [x: `bytes22[${string}]`]: undefined;
333
+ [x: `bytes23[${string}]`]: undefined;
334
+ [x: `bytes24[${string}]`]: undefined;
335
+ [x: `bytes25[${string}]`]: undefined;
336
+ [x: `bytes26[${string}]`]: undefined;
337
+ [x: `bytes27[${string}]`]: undefined;
338
+ [x: `bytes28[${string}]`]: undefined;
339
+ [x: `bytes29[${string}]`]: undefined;
340
+ [x: `bytes30[${string}]`]: undefined;
341
+ [x: `bytes31[${string}]`]: undefined;
342
+ [x: `bytes32[${string}]`]: undefined;
343
+ [x: `int[${string}]`]: undefined;
344
+ [x: `int16[${string}]`]: undefined;
345
+ [x: `int8[${string}]`]: undefined;
346
+ [x: `int24[${string}]`]: undefined;
347
+ [x: `int32[${string}]`]: undefined;
348
+ [x: `int40[${string}]`]: undefined;
349
+ [x: `int48[${string}]`]: undefined;
350
+ [x: `int56[${string}]`]: undefined;
351
+ [x: `int64[${string}]`]: undefined;
352
+ [x: `int72[${string}]`]: undefined;
353
+ [x: `int80[${string}]`]: undefined;
354
+ [x: `int88[${string}]`]: undefined;
355
+ [x: `int96[${string}]`]: undefined;
356
+ [x: `int104[${string}]`]: undefined;
357
+ [x: `int112[${string}]`]: undefined;
358
+ [x: `int120[${string}]`]: undefined;
359
+ [x: `int128[${string}]`]: undefined;
360
+ [x: `int136[${string}]`]: undefined;
361
+ [x: `int144[${string}]`]: undefined;
362
+ [x: `int152[${string}]`]: undefined;
363
+ [x: `int160[${string}]`]: undefined;
364
+ [x: `int168[${string}]`]: undefined;
365
+ [x: `int176[${string}]`]: undefined;
366
+ [x: `int184[${string}]`]: undefined;
367
+ [x: `int192[${string}]`]: undefined;
368
+ [x: `int200[${string}]`]: undefined;
369
+ [x: `int208[${string}]`]: undefined;
370
+ [x: `int216[${string}]`]: undefined;
371
+ [x: `int224[${string}]`]: undefined;
372
+ [x: `int232[${string}]`]: undefined;
373
+ [x: `int240[${string}]`]: undefined;
374
+ [x: `int248[${string}]`]: undefined;
375
+ [x: `int256[${string}]`]: undefined;
376
+ [x: `uint[${string}]`]: undefined;
377
+ [x: `uint16[${string}]`]: undefined;
378
+ [x: `uint8[${string}]`]: undefined;
379
+ [x: `uint24[${string}]`]: undefined;
380
+ [x: `uint32[${string}]`]: undefined;
381
+ [x: `uint40[${string}]`]: undefined;
382
+ [x: `uint48[${string}]`]: undefined;
383
+ [x: `uint56[${string}]`]: undefined;
384
+ [x: `uint64[${string}]`]: undefined;
385
+ [x: `uint72[${string}]`]: undefined;
386
+ [x: `uint80[${string}]`]: undefined;
387
+ [x: `uint88[${string}]`]: undefined;
388
+ [x: `uint96[${string}]`]: undefined;
389
+ [x: `uint104[${string}]`]: undefined;
390
+ [x: `uint112[${string}]`]: undefined;
391
+ [x: `uint120[${string}]`]: undefined;
392
+ [x: `uint128[${string}]`]: undefined;
393
+ [x: `uint136[${string}]`]: undefined;
394
+ [x: `uint144[${string}]`]: undefined;
395
+ [x: `uint152[${string}]`]: undefined;
396
+ [x: `uint160[${string}]`]: undefined;
397
+ [x: `uint168[${string}]`]: undefined;
398
+ [x: `uint176[${string}]`]: undefined;
399
+ [x: `uint184[${string}]`]: undefined;
400
+ [x: `uint192[${string}]`]: undefined;
401
+ [x: `uint200[${string}]`]: undefined;
402
+ [x: `uint208[${string}]`]: undefined;
403
+ [x: `uint216[${string}]`]: undefined;
404
+ [x: `uint224[${string}]`]: undefined;
405
+ [x: `uint232[${string}]`]: undefined;
406
+ [x: `uint240[${string}]`]: undefined;
407
+ [x: `uint248[${string}]`]: undefined;
408
+ [x: `uint256[${string}]`]: undefined;
409
+ string?: undefined;
410
+ address?: undefined;
411
+ bool?: undefined;
412
+ bytes?: undefined;
413
+ bytes16?: undefined;
414
+ bytes1?: undefined;
415
+ bytes2?: undefined;
416
+ bytes3?: undefined;
417
+ bytes4?: undefined;
418
+ bytes5?: undefined;
419
+ bytes6?: undefined;
420
+ bytes7?: undefined;
421
+ bytes8?: undefined;
422
+ bytes9?: undefined;
423
+ bytes10?: undefined;
424
+ bytes11?: undefined;
425
+ bytes12?: undefined;
426
+ bytes13?: undefined;
427
+ bytes14?: undefined;
428
+ bytes15?: undefined;
429
+ bytes17?: undefined;
430
+ bytes18?: undefined;
431
+ bytes19?: undefined;
432
+ bytes20?: undefined;
433
+ bytes21?: undefined;
434
+ bytes22?: undefined;
435
+ bytes23?: undefined;
436
+ bytes24?: undefined;
437
+ bytes25?: undefined;
438
+ bytes26?: undefined;
439
+ bytes27?: undefined;
440
+ bytes28?: undefined;
441
+ bytes29?: undefined;
442
+ bytes30?: undefined;
443
+ bytes31?: undefined;
444
+ bytes32?: undefined;
445
+ int16?: undefined;
446
+ int8?: undefined;
447
+ int24?: undefined;
448
+ int32?: undefined;
449
+ int40?: undefined;
450
+ int48?: undefined;
451
+ int56?: undefined;
452
+ int64?: undefined;
453
+ int72?: undefined;
454
+ int80?: undefined;
455
+ int88?: undefined;
456
+ int96?: undefined;
457
+ int104?: undefined;
458
+ int112?: undefined;
459
+ int120?: undefined;
460
+ int128?: undefined;
461
+ int136?: undefined;
462
+ int144?: undefined;
463
+ int152?: undefined;
464
+ int160?: undefined;
465
+ int168?: undefined;
466
+ int176?: undefined;
467
+ int184?: undefined;
468
+ int192?: undefined;
469
+ int200?: undefined;
470
+ int208?: undefined;
471
+ int216?: undefined;
472
+ int224?: undefined;
473
+ int232?: undefined;
474
+ int240?: undefined;
475
+ int248?: undefined;
476
+ int256?: undefined;
477
+ uint16?: undefined;
478
+ uint8?: undefined;
479
+ uint24?: undefined;
480
+ uint32?: undefined;
481
+ uint40?: undefined;
482
+ uint48?: undefined;
483
+ uint56?: undefined;
484
+ uint64?: undefined;
485
+ uint72?: undefined;
486
+ uint80?: undefined;
487
+ uint88?: undefined;
488
+ uint96?: undefined;
489
+ uint104?: undefined;
490
+ uint112?: undefined;
491
+ uint120?: undefined;
492
+ uint128?: undefined;
493
+ uint136?: undefined;
494
+ uint144?: undefined;
495
+ uint152?: undefined;
496
+ uint160?: undefined;
497
+ uint168?: undefined;
498
+ uint176?: undefined;
499
+ uint184?: undefined;
500
+ uint192?: undefined;
501
+ uint200?: undefined;
502
+ uint208?: undefined;
503
+ uint216?: undefined;
504
+ uint224?: undefined;
505
+ uint232?: undefined;
506
+ uint240?: undefined;
507
+ uint248?: undefined;
508
+ uint256?: undefined;
509
+ } | {
510
+ [key: string]: unknown;
511
+ }, TPrimaryType_1 extends string>(args: import("viem").SignTypedDataParameters<TTypedData_1, TPrimaryType_1, undefined>) => Promise<`0x${string}`>;
512
+ switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
513
+ watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
514
+ writeContract: <const TAbi_3 extends import("viem").Abi | readonly unknown[], TFunctionName_1 extends string, TChainOverride_9 extends import("viem").Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_3, TFunctionName_1, undefined, undefined, TChainOverride_9>) => Promise<`0x${string}`>;
515
+ extend: <const client_1 extends {
516
+ [x: string]: unknown;
517
+ account?: undefined;
518
+ batch?: undefined;
519
+ cacheTime?: undefined;
520
+ chain?: undefined;
521
+ key?: undefined;
522
+ name?: undefined;
523
+ pollingInterval?: undefined;
524
+ request?: undefined;
525
+ transport?: undefined;
526
+ type?: undefined;
527
+ uid?: undefined;
528
+ }>(fn: (client: import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, import("viem").WalletActions<undefined, undefined>>) => client_1) => import("viem").Client<import("viem").CustomTransport, undefined, undefined, import("viem").WalletRpcSchema, { [K_1 in keyof client_1]: client_1[K_1]; } & import("viem").WalletActions<undefined, undefined>>;
529
+ } | undefined;
530
+ isInstalledOnBrowser(): boolean;
531
+ fetchPublicAddress(opts?: FetchPublicAddressOpts): Promise<string | undefined>;
532
+ signMessage(messageToSign: string): Promise<string | undefined>;
533
+ endSession(): Promise<void>;
534
+ }
535
+ export {};
@@ -0,0 +1,67 @@
1
+ import { __rest, __awaiter } from '../../_virtual/_tslib.js';
2
+ import { createPublicClient, custom, createWalletClient } from 'viem';
3
+ import { EthWalletConnector } from '../EthWalletConnector.js';
4
+ import { LegacyEthProviderHelper } from '../legacyEthProviderHelper.js';
5
+ import { getCoinbaseProvider, fetchPublicAddress, signMessage, killCoinbaseSession } from './client/client.js';
6
+
7
+ class Coinbase extends EthWalletConnector {
8
+ constructor(_a) {
9
+ var { appName, appLogoUrl, evmNetworks } = _a, props = __rest(_a, ["appName", "appLogoUrl", "evmNetworks"]);
10
+ super(Object.assign({ evmNetworks }, props));
11
+ this.name = 'Coinbase';
12
+ this.supportedChains = ['EVM', 'ETH'];
13
+ this.connectedChain = 'EVM';
14
+ this.canConnectViaQrCode = true;
15
+ this.coinbaseProviderOpts = {
16
+ appLogoUrl: appLogoUrl,
17
+ appName: appName,
18
+ evmNetworks: evmNetworks,
19
+ };
20
+ }
21
+ setupEventListeners() {
22
+ const provider = LegacyEthProviderHelper.findProvider(this.name);
23
+ if (!provider) {
24
+ return;
25
+ }
26
+ const { tearDownEventListeners } = LegacyEthProviderHelper._setupEventListeners(this.name, this, createPublicClient({ transport: custom(provider) }));
27
+ this.teardownEventListeners = tearDownEventListeners;
28
+ }
29
+ getWalletClient() {
30
+ if (this.isInstalledOnBrowser()) {
31
+ return LegacyEthProviderHelper.findWalletClient(this.name);
32
+ }
33
+ return createWalletClient({
34
+ transport: custom(getCoinbaseProvider({
35
+ opts: this.coinbaseProviderOpts,
36
+ })),
37
+ });
38
+ }
39
+ isInstalledOnBrowser() {
40
+ return LegacyEthProviderHelper.isInstalledHelper(this.name);
41
+ }
42
+ fetchPublicAddress(opts) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ if (this.isInstalledOnBrowser()) {
45
+ return LegacyEthProviderHelper.fetchPublicAddressWithName(this.name);
46
+ }
47
+ return fetchPublicAddress(this.coinbaseProviderOpts, opts);
48
+ });
49
+ }
50
+ signMessage(messageToSign) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ if (this.isInstalledOnBrowser()) {
53
+ return LegacyEthProviderHelper.signMessageWithName(messageToSign, this.name);
54
+ }
55
+ return signMessage(this.coinbaseProviderOpts, messageToSign);
56
+ });
57
+ }
58
+ endSession() {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ if (this.isInstalledOnBrowser())
61
+ return;
62
+ killCoinbaseSession();
63
+ });
64
+ }
65
+ }
66
+
67
+ export { Coinbase };
@@ -0,0 +1,3 @@
1
+ import { WalletConnectorConstructor } from '@dynamic-labs/wallet-connector-core';
2
+ export * from './coinbase';
3
+ export declare const CoinbaseWalletConnectors: (props: any) => WalletConnectorConstructor[];
@@ -1 +1 @@
1
- export declare const INFURA_ID: "87939db78f824920ada5c872db3e56b8";
1
+ export declare const INFURA_ID: "87939db78f824920ada5c872db3e56b8";