@dynamic-labs/wagmi-connector 1.0.0-alpha.0 → 1.0.0-alpha.1

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/CHANGELOG.md CHANGED
@@ -1,4 +1,52 @@
1
1
 
2
+ ## [1.0.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) (2023-11-22)
3
+
4
+
5
+ ### Features
6
+
7
+ * add basic zerodev connector ([#3782](https://github.com/dynamic-labs/DynamicAuth/issues/3782)) ([3f8debd](https://github.com/dynamic-labs/DynamicAuth/commit/3f8debddb1bff325389193e0348128ebb9ba59b9))
8
+ * add hcaptcha to dynamic signin methods ([#3853](https://github.com/dynamic-labs/DynamicAuth/issues/3853)) ([a4a9ad3](https://github.com/dynamic-labs/DynamicAuth/commit/a4a9ad3b048e33acc5b885cd797697ca4f41995e))
9
+ * add hcaptcha to magic login methods ([#3894](https://github.com/dynamic-labs/DynamicAuth/issues/3894)) ([c76b750](https://github.com/dynamic-labs/DynamicAuth/commit/c76b750351557ad9cf5bbcc39bd7fd0970b66312))
10
+ * add need help section to sign message modal ([#3847](https://github.com/dynamic-labs/DynamicAuth/issues/3847)) ([4f90617](https://github.com/dynamic-labs/DynamicAuth/commit/4f90617bcf400a7171062435c731d95c6bbf41c7))
11
+ * add perawallet to wallet book ([#3868](https://github.com/dynamic-labs/DynamicAuth/issues/3868)) ([5f4e79d](https://github.com/dynamic-labs/DynamicAuth/commit/5f4e79df202b02088b15c5dfab7feee5789e9ece))
12
+ * add serialization to allow sending events callbacks and wallet connectors used by customers ([0077eb0](https://github.com/dynamic-labs/DynamicAuth/commit/0077eb0af05feb765d0c61911a48d5e98554760a))
13
+ * add support for dynamic domains for starknet signatures ([#3927](https://github.com/dynamic-labs/DynamicAuth/issues/3927)) ([52797ce](https://github.com/dynamic-labs/DynamicAuth/commit/52797ce867c956049bfa5021cf5b1c562e771a2e))
14
+ * add support for Pera Wallet ([#3866](https://github.com/dynamic-labs/DynamicAuth/issues/3866)) ([cb99ae7](https://github.com/dynamic-labs/DynamicAuth/commit/cb99ae77605d913932a77bf2ea565b7e7baf781a))
15
+ * add support for private starknet rpc providers ([#3881](https://github.com/dynamic-labs/DynamicAuth/issues/3881)) ([8fd5ef9](https://github.com/dynamic-labs/DynamicAuth/commit/8fd5ef902d48ef828b1cb89d0e462ea5b54f4e42))
16
+ * add zerodev to wallet book and render generic wallet icon ([#3822](https://github.com/dynamic-labs/DynamicAuth/issues/3822)) ([9c5768d](https://github.com/dynamic-labs/DynamicAuth/commit/9c5768d0fc1169c62927926c0e436b6a448d5656))
17
+ * allow updating evmNetworks in real time ([#3877](https://github.com/dynamic-labs/DynamicAuth/issues/3877)) ([b4a2521](https://github.com/dynamic-labs/DynamicAuth/commit/b4a2521830b859a129d70bad2ae1213db075550d))
18
+ * editable copies as typed data ([#3784](https://github.com/dynamic-labs/DynamicAuth/issues/3784)) ([d6c6d74](https://github.com/dynamic-labs/DynamicAuth/commit/d6c6d74e60c9c9d459414c452fbd780d3f6bc2f9))
19
+ * email inputs now use email keyboard ([#3843](https://github.com/dynamic-labs/DynamicAuth/issues/3843)) ([76926e2](https://github.com/dynamic-labs/DynamicAuth/commit/76926e26b6a188d9d8e3bba2512340610e218e9f))
20
+ * hide unlink if disabled in dashboard ([#3825](https://github.com/dynamic-labs/DynamicAuth/issues/3825)) ([a0625e6](https://github.com/dynamic-labs/DynamicAuth/commit/a0625e6fd01aa5b57e6b8542efe04e280e0c6830))
21
+ * initialize smart wallet from verified credentials ([#3790](https://github.com/dynamic-labs/DynamicAuth/issues/3790)) ([1fc5890](https://github.com/dynamic-labs/DynamicAuth/commit/1fc5890f2e0ef458bfb59d38d536c41d183bc2a2))
22
+ * set smart wallet as primary when owner is an embedded wallet ([#3898](https://github.com/dynamic-labs/DynamicAuth/issues/3898)) ([ec40172](https://github.com/dynamic-labs/DynamicAuth/commit/ec401729f38d946d5431bbbb15c5c1cdc66acb73))
23
+ * support forced network validation via DynamicContext setting ([#3879](https://github.com/dynamic-labs/DynamicAuth/issues/3879)) ([a7993b9](https://github.com/dynamic-labs/DynamicAuth/commit/a7993b9b6bdd739bcb4e66e46d14e7f8623bed66))
24
+ * **transaction:** add sponsored gas transaction ([#3869](https://github.com/dynamic-labs/DynamicAuth/issues/3869)) ([ccceb24](https://github.com/dynamic-labs/DynamicAuth/commit/ccceb2421e029dc60e53912e404b574324d6772f))
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * **account-abstraction:** set verified credentials before setting EOA to wallet connector ([#3941](https://github.com/dynamic-labs/DynamicAuth/issues/3941)) ([7475c46](https://github.com/dynamic-labs/DynamicAuth/commit/7475c465f5ddf9e27d0b05d23e58d9b474fa8fd4))
30
+ * add brand to zerodev object ([#3828](https://github.com/dynamic-labs/DynamicAuth/issues/3828)) ([81cb237](https://github.com/dynamic-labs/DynamicAuth/commit/81cb237df4def8e1c53b4ae145afafccf3b04683))
31
+ * add spriteId to zerodev ([#3829](https://github.com/dynamic-labs/DynamicAuth/issues/3829)) ([6b87c5c](https://github.com/dynamic-labs/DynamicAuth/commit/6b87c5c3d5869f6cd15a7534fb0260932845fbb1))
32
+ * allow metadata to be updated in updateUser hook ([#3928](https://github.com/dynamic-labs/DynamicAuth/issues/3928)) ([4f39fbd](https://github.com/dynamic-labs/DynamicAuth/commit/4f39fbd757b4e816dd60651252575c1f7e4d80aa))
33
+ * blocto flow connect only infinite recursion ([#3883](https://github.com/dynamic-labs/DynamicAuth/issues/3883)) ([6c6f5ba](https://github.com/dynamic-labs/DynamicAuth/commit/6c6f5ba5dc0657cc7ffdc82a4ea7935f65686088))
34
+ * clear project settings on page refresh ([#3826](https://github.com/dynamic-labs/DynamicAuth/issues/3826)) ([da5b8f0](https://github.com/dynamic-labs/DynamicAuth/commit/da5b8f0a99bf913ea11314954e5f08c2b019f50f))
35
+ * don't call computeConnectedStateForWallets too often to avoid infinite loops ([#3946](https://github.com/dynamic-labs/DynamicAuth/issues/3946)) ([de4e61a](https://github.com/dynamic-labs/DynamicAuth/commit/de4e61a3fcdc9c25cbe030c3c25cbc2c04929a93))
36
+ * don't call disconnect multiple times ([#3940](https://github.com/dynamic-labs/DynamicAuth/issues/3940)) ([3ea8623](https://github.com/dynamic-labs/DynamicAuth/commit/3ea86233d8d07dfb3c751a5fec45d5df84e9e143))
37
+ * **embedded wallet:** stop overriding primary wallet selection ([#3796](https://github.com/dynamic-labs/DynamicAuth/issues/3796)) ([75b81e7](https://github.com/dynamic-labs/DynamicAuth/commit/75b81e74d472ce8cc493646b441d2b4fe3962373))
38
+ * exodusevm wallet connect and mobile deep linking ([#3855](https://github.com/dynamic-labs/DynamicAuth/issues/3855)) ([cf0b3f0](https://github.com/dynamic-labs/DynamicAuth/commit/cf0b3f077f935eab32ce45947f62e73342d6c169))
39
+ * handle errors properly when engaging captcha ([#3896](https://github.com/dynamic-labs/DynamicAuth/issues/3896)) ([2596315](https://github.com/dynamic-labs/DynamicAuth/commit/25963153d699b26c6e04ea38b267446d3a3af13b))
40
+ * null safe check to window object ([#3882](https://github.com/dynamic-labs/DynamicAuth/issues/3882)) ([8856b5a](https://github.com/dynamic-labs/DynamicAuth/commit/8856b5ae40d43285eac667401387971b9e3f077d))
41
+ * pass correct wallet connector onLinkSuccess ([#3904](https://github.com/dynamic-labs/DynamicAuth/issues/3904)) ([79cca69](https://github.com/dynamic-labs/DynamicAuth/commit/79cca69ed53a5ef2c4e4d712ce0934e1a4c11459))
42
+ * remove extra captcha context provider instantiation causing unecessary rerenderings ([#3914](https://github.com/dynamic-labs/DynamicAuth/issues/3914)) ([14120a6](https://github.com/dynamic-labs/DynamicAuth/commit/14120a6ac0415f9a59608b376e88de6c729d4e5d))
43
+ * remove the coming soon label ([#3860](https://github.com/dynamic-labs/DynamicAuth/issues/3860)) ([1effb7f](https://github.com/dynamic-labs/DynamicAuth/commit/1effb7f124bda66aae3e8991b5386a1cee28fd99))
44
+ * Revert "chore: fix vite build ([#3849](https://github.com/dynamic-labs/DynamicAuth/issues/3849))" ([#3870](https://github.com/dynamic-labs/DynamicAuth/issues/3870)) ([13bc424](https://github.com/dynamic-labs/DynamicAuth/commit/13bc42483bcb9338babd46eae00988acada83578))
45
+ * **single-wallet:** prompt user to select correct wallet ([#3742](https://github.com/dynamic-labs/DynamicAuth/issues/3742)) ([ccfdd3c](https://github.com/dynamic-labs/DynamicAuth/commit/ccfdd3cc6a4ac7f3b1ea13be92e58982ecfb1c59))
46
+ * update walletconnect.json and walletconnect source schema ([#3854](https://github.com/dynamic-labs/DynamicAuth/issues/3854)) ([88ee546](https://github.com/dynamic-labs/DynamicAuth/commit/88ee5468db0130b19c6637a5632e64e0bb5197ba))
47
+ * useEmailProvider not checking for enabled providers properly ([7c16edc](https://github.com/dynamic-labs/DynamicAuth/commit/7c16edc3785ba10d69762b174f054b0d10b8a072))
48
+ * **wagmi:** ensure chain is defined on wallet client ([#3888](https://github.com/dynamic-labs/DynamicAuth/issues/3888)) ([0e145f6](https://github.com/dynamic-labs/DynamicAuth/commit/0e145f6ac42f55df7a020716d4ddc023554d72f9))
49
+
2
50
  ## [1.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0...v1.0.0-alpha.0) (2023-10-31)
3
51
 
4
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -11,8 +11,11 @@
11
11
  "react": "^17.0.2 || ^18.0.0",
12
12
  "viem": "^1.1.0",
13
13
  "wagmi": "^1.2.0",
14
- "@dynamic-labs/sdk-react-core": "1.0.0-alpha.0",
15
- "@dynamic-labs/types": "1.0.0-alpha.0"
14
+ "@dynamic-labs/rpc-providers": "1.0.0-alpha.1",
15
+ "@dynamic-labs/sdk-react-core": "1.0.0-alpha.1",
16
+ "@dynamic-labs/types": "1.0.0-alpha.1",
17
+ "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.1",
18
+ "eventemitter3": "5.0.1"
16
19
  },
17
20
  "license": "MIT",
18
21
  "main": "./src/index.cjs",
@@ -1,7 +1,7 @@
1
1
  import { Address, Connector as BaseWagmiConnector, ConnectorData, Chain } from 'wagmi';
2
- import { WalletClient } from 'viem';
2
+ import { Account, Transport, WalletClient } from 'viem';
3
3
  import { WalletConnector } from '@dynamic-labs/sdk-react-core';
4
- export declare class Connector extends BaseWagmiConnector<WalletClient, undefined> {
4
+ export declare class Connector extends BaseWagmiConnector<WalletClient<Transport, Chain, Account>, undefined> {
5
5
  handleLogOut: () => Promise<void>;
6
6
  walletConnector: WalletConnector;
7
7
  id: string;
@@ -28,10 +28,560 @@ export declare class Connector extends BaseWagmiConnector<WalletClient, undefine
28
28
  getChainId(): Promise<number>;
29
29
  getProvider(config?: {
30
30
  chainId?: number;
31
- } | undefined): Promise<WalletClient>;
31
+ } | undefined): Promise<WalletClient<Transport, Chain, Account>>;
32
32
  getWalletClient(config?: {
33
33
  chainId?: number;
34
- } | undefined): Promise<any>;
34
+ } | undefined): Promise<{
35
+ account: Account;
36
+ batch?: {
37
+ multicall?: boolean | {
38
+ batchSize?: number | undefined;
39
+ wait?: number | undefined;
40
+ } | undefined;
41
+ } | undefined;
42
+ cacheTime: number;
43
+ chain: Chain;
44
+ key: string;
45
+ name: string;
46
+ pollingInterval: number;
47
+ request: import("viem").EIP1193RequestFn<import("viem").WalletRpcSchema>;
48
+ transport: import("viem").TransportConfig<string, import("viem").EIP1193RequestFn> & Record<string, any>;
49
+ type: string;
50
+ uid: string;
51
+ addChain: (args: import("viem").AddChainParameters) => Promise<void>;
52
+ deployContract: <const TAbi extends import("viem").Abi | readonly unknown[], TChainOverride extends Chain | undefined>(args: import("viem").DeployContractParameters<TAbi, Chain, Account, TChainOverride>) => Promise<`0x${string}`>;
53
+ getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
54
+ getChainId: () => Promise<number>;
55
+ getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
56
+ prepareTransactionRequest: <TChainOverride_1 extends Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<Chain, Account, TChainOverride_1>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
57
+ requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
58
+ requestPermissions: (args: {
59
+ [x: string]: Record<string, any>;
60
+ eth_accounts: Record<string, any>;
61
+ }) => Promise<import("viem").RequestPermissionsReturnType>;
62
+ sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
63
+ sendTransaction: <TChainOverride_2 extends Chain | undefined>(args: import("viem").SendTransactionParameters<Chain, Account, TChainOverride_2>) => Promise<`0x${string}`>;
64
+ signMessage: (args: import("viem").SignMessageParameters<Account>) => Promise<`0x${string}`>;
65
+ signTransaction: <TChainOverride_3 extends Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<Chain, Account, TChainOverride_3>) => Promise<`0x${string}`>;
66
+ signTypedData: <const TTypedData extends {
67
+ [x: string]: readonly import("viem").TypedDataParameter[];
68
+ [x: `string[${string}]`]: undefined;
69
+ [x: `function[${string}]`]: undefined;
70
+ [x: `address[${string}]`]: undefined;
71
+ [x: `bool[${string}]`]: undefined;
72
+ [x: `bytes[${string}]`]: undefined;
73
+ [x: `bytes16[${string}]`]: undefined;
74
+ [x: `bytes1[${string}]`]: undefined;
75
+ [x: `bytes2[${string}]`]: undefined;
76
+ [x: `bytes3[${string}]`]: undefined;
77
+ [x: `bytes4[${string}]`]: undefined;
78
+ [x: `bytes5[${string}]`]: undefined;
79
+ [x: `bytes6[${string}]`]: undefined;
80
+ [x: `bytes7[${string}]`]: undefined;
81
+ [x: `bytes8[${string}]`]: undefined;
82
+ [x: `bytes9[${string}]`]: undefined;
83
+ [x: `bytes10[${string}]`]: undefined;
84
+ [x: `bytes11[${string}]`]: undefined;
85
+ [x: `bytes12[${string}]`]: undefined;
86
+ [x: `bytes13[${string}]`]: undefined;
87
+ [x: `bytes14[${string}]`]: undefined;
88
+ [x: `bytes15[${string}]`]: undefined;
89
+ [x: `bytes17[${string}]`]: undefined;
90
+ [x: `bytes18[${string}]`]: undefined;
91
+ [x: `bytes19[${string}]`]: undefined;
92
+ [x: `bytes20[${string}]`]: undefined;
93
+ [x: `bytes21[${string}]`]: undefined;
94
+ [x: `bytes22[${string}]`]: undefined;
95
+ [x: `bytes23[${string}]`]: undefined;
96
+ [x: `bytes24[${string}]`]: undefined;
97
+ [x: `bytes25[${string}]`]: undefined;
98
+ [x: `bytes26[${string}]`]: undefined;
99
+ [x: `bytes27[${string}]`]: undefined;
100
+ [x: `bytes28[${string}]`]: undefined;
101
+ [x: `bytes29[${string}]`]: undefined;
102
+ [x: `bytes30[${string}]`]: undefined;
103
+ [x: `bytes31[${string}]`]: undefined;
104
+ [x: `bytes32[${string}]`]: undefined;
105
+ [x: `int[${string}]`]: undefined;
106
+ [x: `int16[${string}]`]: undefined;
107
+ [x: `int8[${string}]`]: undefined;
108
+ [x: `int24[${string}]`]: undefined;
109
+ [x: `int32[${string}]`]: undefined;
110
+ [x: `int40[${string}]`]: undefined;
111
+ [x: `int48[${string}]`]: undefined;
112
+ [x: `int56[${string}]`]: undefined;
113
+ [x: `int64[${string}]`]: undefined;
114
+ [x: `int72[${string}]`]: undefined;
115
+ [x: `int80[${string}]`]: undefined;
116
+ [x: `int88[${string}]`]: undefined;
117
+ [x: `int96[${string}]`]: undefined;
118
+ [x: `int104[${string}]`]: undefined;
119
+ [x: `int112[${string}]`]: undefined;
120
+ [x: `int120[${string}]`]: undefined;
121
+ [x: `int128[${string}]`]: undefined;
122
+ [x: `int136[${string}]`]: undefined;
123
+ [x: `int144[${string}]`]: undefined;
124
+ [x: `int152[${string}]`]: undefined;
125
+ [x: `int160[${string}]`]: undefined;
126
+ [x: `int168[${string}]`]: undefined;
127
+ [x: `int176[${string}]`]: undefined;
128
+ [x: `int184[${string}]`]: undefined;
129
+ [x: `int192[${string}]`]: undefined;
130
+ [x: `int200[${string}]`]: undefined;
131
+ [x: `int208[${string}]`]: undefined;
132
+ [x: `int216[${string}]`]: undefined;
133
+ [x: `int224[${string}]`]: undefined;
134
+ [x: `int232[${string}]`]: undefined;
135
+ [x: `int240[${string}]`]: undefined;
136
+ [x: `int248[${string}]`]: undefined;
137
+ [x: `int256[${string}]`]: undefined;
138
+ [x: `uint[${string}]`]: undefined;
139
+ [x: `uint16[${string}]`]: undefined;
140
+ [x: `uint8[${string}]`]: undefined;
141
+ [x: `uint24[${string}]`]: undefined;
142
+ [x: `uint32[${string}]`]: undefined;
143
+ [x: `uint40[${string}]`]: undefined;
144
+ [x: `uint48[${string}]`]: undefined;
145
+ [x: `uint56[${string}]`]: undefined;
146
+ [x: `uint64[${string}]`]: undefined;
147
+ [x: `uint72[${string}]`]: undefined;
148
+ [x: `uint80[${string}]`]: undefined;
149
+ [x: `uint88[${string}]`]: undefined;
150
+ [x: `uint96[${string}]`]: undefined;
151
+ [x: `uint104[${string}]`]: undefined;
152
+ [x: `uint112[${string}]`]: undefined;
153
+ [x: `uint120[${string}]`]: undefined;
154
+ [x: `uint128[${string}]`]: undefined;
155
+ [x: `uint136[${string}]`]: undefined;
156
+ [x: `uint144[${string}]`]: undefined;
157
+ [x: `uint152[${string}]`]: undefined;
158
+ [x: `uint160[${string}]`]: undefined;
159
+ [x: `uint168[${string}]`]: undefined;
160
+ [x: `uint176[${string}]`]: undefined;
161
+ [x: `uint184[${string}]`]: undefined;
162
+ [x: `uint192[${string}]`]: undefined;
163
+ [x: `uint200[${string}]`]: undefined;
164
+ [x: `uint208[${string}]`]: undefined;
165
+ [x: `uint216[${string}]`]: undefined;
166
+ [x: `uint224[${string}]`]: undefined;
167
+ [x: `uint232[${string}]`]: undefined;
168
+ [x: `uint240[${string}]`]: undefined;
169
+ [x: `uint248[${string}]`]: undefined;
170
+ [x: `uint256[${string}]`]: undefined;
171
+ string?: undefined;
172
+ address?: undefined;
173
+ bool?: undefined;
174
+ bytes?: undefined;
175
+ bytes16?: undefined;
176
+ bytes1?: undefined;
177
+ bytes2?: undefined;
178
+ bytes3?: undefined;
179
+ bytes4?: undefined;
180
+ bytes5?: undefined;
181
+ bytes6?: undefined;
182
+ bytes7?: undefined;
183
+ bytes8?: undefined;
184
+ bytes9?: undefined;
185
+ bytes10?: undefined;
186
+ bytes11?: undefined;
187
+ bytes12?: undefined;
188
+ bytes13?: undefined;
189
+ bytes14?: undefined;
190
+ bytes15?: undefined;
191
+ bytes17?: undefined;
192
+ bytes18?: undefined;
193
+ bytes19?: undefined;
194
+ bytes20?: undefined;
195
+ bytes21?: undefined;
196
+ bytes22?: undefined;
197
+ bytes23?: undefined;
198
+ bytes24?: undefined;
199
+ bytes25?: undefined;
200
+ bytes26?: undefined;
201
+ bytes27?: undefined;
202
+ bytes28?: undefined;
203
+ bytes29?: undefined;
204
+ bytes30?: undefined;
205
+ bytes31?: undefined;
206
+ bytes32?: undefined;
207
+ int16?: undefined;
208
+ int8?: undefined;
209
+ int24?: undefined;
210
+ int32?: undefined;
211
+ int40?: undefined;
212
+ int48?: undefined;
213
+ int56?: undefined;
214
+ int64?: undefined;
215
+ int72?: undefined;
216
+ int80?: undefined;
217
+ int88?: undefined;
218
+ int96?: undefined;
219
+ int104?: undefined;
220
+ int112?: undefined;
221
+ int120?: undefined;
222
+ int128?: undefined;
223
+ int136?: undefined;
224
+ int144?: undefined;
225
+ int152?: undefined;
226
+ int160?: undefined;
227
+ int168?: undefined;
228
+ int176?: undefined;
229
+ int184?: undefined;
230
+ int192?: undefined;
231
+ int200?: undefined;
232
+ int208?: undefined;
233
+ int216?: undefined;
234
+ int224?: undefined;
235
+ int232?: undefined;
236
+ int240?: undefined;
237
+ int248?: undefined;
238
+ int256?: undefined;
239
+ uint16?: undefined;
240
+ uint8?: undefined;
241
+ uint24?: undefined;
242
+ uint32?: undefined;
243
+ uint40?: undefined;
244
+ uint48?: undefined;
245
+ uint56?: undefined;
246
+ uint64?: undefined;
247
+ uint72?: undefined;
248
+ uint80?: undefined;
249
+ uint88?: undefined;
250
+ uint96?: undefined;
251
+ uint104?: undefined;
252
+ uint112?: undefined;
253
+ uint120?: undefined;
254
+ uint128?: undefined;
255
+ uint136?: undefined;
256
+ uint144?: undefined;
257
+ uint152?: undefined;
258
+ uint160?: undefined;
259
+ uint168?: undefined;
260
+ uint176?: undefined;
261
+ uint184?: undefined;
262
+ uint192?: undefined;
263
+ uint200?: undefined;
264
+ uint208?: undefined;
265
+ uint216?: undefined;
266
+ uint224?: undefined;
267
+ uint232?: undefined;
268
+ uint240?: undefined;
269
+ uint248?: undefined;
270
+ uint256?: undefined;
271
+ } | {
272
+ [key: string]: unknown;
273
+ }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, Account>) => Promise<`0x${string}`>;
274
+ switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
275
+ watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
276
+ writeContract: <const TAbi_1 extends import("viem").Abi | readonly unknown[], TFunctionName extends string, TChainOverride_4 extends Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, Chain, Account, TChainOverride_4>) => Promise<`0x${string}`>;
277
+ extend: <const client extends {
278
+ [x: string]: unknown;
279
+ account?: undefined;
280
+ batch?: undefined;
281
+ cacheTime?: undefined;
282
+ chain?: undefined;
283
+ key?: undefined;
284
+ name?: undefined;
285
+ pollingInterval?: undefined;
286
+ request?: undefined;
287
+ transport?: undefined;
288
+ type?: undefined;
289
+ uid?: undefined;
290
+ }>(fn: (client: import("viem").Client<Transport, Chain, Account, import("viem").WalletRpcSchema, import("viem").WalletActions<Chain, Account>>) => client) => import("viem").Client<Transport, Chain, Account, import("viem").WalletRpcSchema, { [K in keyof client]: client[K]; } & import("viem").WalletActions<Chain, Account>>;
291
+ } | {
292
+ account: {
293
+ address: `0x${string}`;
294
+ type: "json-rpc";
295
+ };
296
+ batch?: {
297
+ multicall?: boolean | {
298
+ batchSize?: number | undefined;
299
+ wait?: number | undefined;
300
+ } | undefined;
301
+ } | undefined;
302
+ cacheTime: number;
303
+ chain: Chain;
304
+ key: string;
305
+ name: string;
306
+ pollingInterval: number;
307
+ request: import("viem").EIP1193RequestFn<import("viem").WalletRpcSchema>;
308
+ transport: import("viem").TransportConfig<"custom", import("viem").EIP1193RequestFn>;
309
+ type: string;
310
+ uid: string;
311
+ addChain: (args: import("viem").AddChainParameters) => Promise<void>;
312
+ deployContract: <const TAbi_2 extends import("viem").Abi | readonly unknown[], TChainOverride_5 extends Chain | undefined>(args: import("viem").DeployContractParameters<TAbi_2, Chain, {
313
+ address: `0x${string}`;
314
+ type: "json-rpc";
315
+ }, TChainOverride_5>) => Promise<`0x${string}`>;
316
+ getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
317
+ getChainId: () => Promise<number>;
318
+ getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
319
+ prepareTransactionRequest: <TChainOverride_6 extends Chain | undefined>(args: import("viem").PrepareTransactionRequestParameters<Chain, {
320
+ address: `0x${string}`;
321
+ type: "json-rpc";
322
+ }, TChainOverride_6>) => Promise<import("viem").PrepareTransactionRequestReturnType>;
323
+ requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
324
+ requestPermissions: (args: {
325
+ [x: string]: Record<string, any>;
326
+ eth_accounts: Record<string, any>;
327
+ }) => Promise<import("viem").RequestPermissionsReturnType>;
328
+ sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
329
+ sendTransaction: <TChainOverride_7 extends Chain | undefined>(args: import("viem").SendTransactionParameters<Chain, {
330
+ address: `0x${string}`;
331
+ type: "json-rpc";
332
+ }, TChainOverride_7>) => Promise<`0x${string}`>;
333
+ signMessage: (args: import("viem").SignMessageParameters<{
334
+ address: `0x${string}`;
335
+ type: "json-rpc";
336
+ }>) => Promise<`0x${string}`>;
337
+ signTransaction: <TChainOverride_8 extends Chain | undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<Chain, {
338
+ address: `0x${string}`;
339
+ type: "json-rpc";
340
+ }, TChainOverride_8>) => Promise<`0x${string}`>;
341
+ signTypedData: <const TTypedData_1 extends {
342
+ [x: string]: readonly import("viem").TypedDataParameter[];
343
+ [x: `string[${string}]`]: undefined;
344
+ [x: `function[${string}]`]: undefined;
345
+ [x: `address[${string}]`]: undefined;
346
+ [x: `bool[${string}]`]: undefined;
347
+ [x: `bytes[${string}]`]: undefined;
348
+ [x: `bytes16[${string}]`]: undefined;
349
+ [x: `bytes1[${string}]`]: undefined;
350
+ [x: `bytes2[${string}]`]: undefined;
351
+ [x: `bytes3[${string}]`]: undefined;
352
+ [x: `bytes4[${string}]`]: undefined;
353
+ [x: `bytes5[${string}]`]: undefined;
354
+ [x: `bytes6[${string}]`]: undefined;
355
+ [x: `bytes7[${string}]`]: undefined;
356
+ [x: `bytes8[${string}]`]: undefined;
357
+ [x: `bytes9[${string}]`]: undefined;
358
+ [x: `bytes10[${string}]`]: undefined;
359
+ [x: `bytes11[${string}]`]: undefined;
360
+ [x: `bytes12[${string}]`]: undefined;
361
+ [x: `bytes13[${string}]`]: undefined;
362
+ [x: `bytes14[${string}]`]: undefined;
363
+ [x: `bytes15[${string}]`]: undefined;
364
+ [x: `bytes17[${string}]`]: undefined;
365
+ [x: `bytes18[${string}]`]: undefined;
366
+ [x: `bytes19[${string}]`]: undefined;
367
+ [x: `bytes20[${string}]`]: undefined;
368
+ [x: `bytes21[${string}]`]: undefined;
369
+ [x: `bytes22[${string}]`]: undefined;
370
+ [x: `bytes23[${string}]`]: undefined;
371
+ [x: `bytes24[${string}]`]: undefined;
372
+ [x: `bytes25[${string}]`]: undefined;
373
+ [x: `bytes26[${string}]`]: undefined;
374
+ [x: `bytes27[${string}]`]: undefined;
375
+ [x: `bytes28[${string}]`]: undefined;
376
+ [x: `bytes29[${string}]`]: undefined;
377
+ [x: `bytes30[${string}]`]: undefined;
378
+ [x: `bytes31[${string}]`]: undefined;
379
+ [x: `bytes32[${string}]`]: undefined;
380
+ [x: `int[${string}]`]: undefined;
381
+ [x: `int16[${string}]`]: undefined;
382
+ [x: `int8[${string}]`]: undefined;
383
+ [x: `int24[${string}]`]: undefined;
384
+ [x: `int32[${string}]`]: undefined;
385
+ [x: `int40[${string}]`]: undefined;
386
+ [x: `int48[${string}]`]: undefined;
387
+ [x: `int56[${string}]`]: undefined;
388
+ [x: `int64[${string}]`]: undefined;
389
+ [x: `int72[${string}]`]: undefined;
390
+ [x: `int80[${string}]`]: undefined;
391
+ [x: `int88[${string}]`]: undefined;
392
+ [x: `int96[${string}]`]: undefined;
393
+ [x: `int104[${string}]`]: undefined;
394
+ [x: `int112[${string}]`]: undefined;
395
+ [x: `int120[${string}]`]: undefined;
396
+ [x: `int128[${string}]`]: undefined;
397
+ [x: `int136[${string}]`]: undefined;
398
+ [x: `int144[${string}]`]: undefined;
399
+ [x: `int152[${string}]`]: undefined;
400
+ [x: `int160[${string}]`]: undefined;
401
+ [x: `int168[${string}]`]: undefined;
402
+ [x: `int176[${string}]`]: undefined;
403
+ [x: `int184[${string}]`]: undefined;
404
+ [x: `int192[${string}]`]: undefined;
405
+ [x: `int200[${string}]`]: undefined;
406
+ [x: `int208[${string}]`]: undefined;
407
+ [x: `int216[${string}]`]: undefined;
408
+ [x: `int224[${string}]`]: undefined;
409
+ [x: `int232[${string}]`]: undefined;
410
+ [x: `int240[${string}]`]: undefined;
411
+ [x: `int248[${string}]`]: undefined;
412
+ [x: `int256[${string}]`]: undefined;
413
+ [x: `uint[${string}]`]: undefined;
414
+ [x: `uint16[${string}]`]: undefined;
415
+ [x: `uint8[${string}]`]: undefined;
416
+ [x: `uint24[${string}]`]: undefined;
417
+ [x: `uint32[${string}]`]: undefined;
418
+ [x: `uint40[${string}]`]: undefined;
419
+ [x: `uint48[${string}]`]: undefined;
420
+ [x: `uint56[${string}]`]: undefined;
421
+ [x: `uint64[${string}]`]: undefined;
422
+ [x: `uint72[${string}]`]: undefined;
423
+ [x: `uint80[${string}]`]: undefined;
424
+ [x: `uint88[${string}]`]: undefined;
425
+ [x: `uint96[${string}]`]: undefined;
426
+ [x: `uint104[${string}]`]: undefined;
427
+ [x: `uint112[${string}]`]: undefined;
428
+ [x: `uint120[${string}]`]: undefined;
429
+ [x: `uint128[${string}]`]: undefined;
430
+ [x: `uint136[${string}]`]: undefined;
431
+ [x: `uint144[${string}]`]: undefined;
432
+ [x: `uint152[${string}]`]: undefined;
433
+ [x: `uint160[${string}]`]: undefined;
434
+ [x: `uint168[${string}]`]: undefined;
435
+ [x: `uint176[${string}]`]: undefined;
436
+ [x: `uint184[${string}]`]: undefined;
437
+ [x: `uint192[${string}]`]: undefined;
438
+ [x: `uint200[${string}]`]: undefined;
439
+ [x: `uint208[${string}]`]: undefined;
440
+ [x: `uint216[${string}]`]: undefined;
441
+ [x: `uint224[${string}]`]: undefined;
442
+ [x: `uint232[${string}]`]: undefined;
443
+ [x: `uint240[${string}]`]: undefined;
444
+ [x: `uint248[${string}]`]: undefined;
445
+ [x: `uint256[${string}]`]: undefined;
446
+ string?: undefined;
447
+ address?: undefined;
448
+ bool?: undefined;
449
+ bytes?: undefined;
450
+ bytes16?: undefined;
451
+ bytes1?: undefined;
452
+ bytes2?: undefined;
453
+ bytes3?: undefined;
454
+ bytes4?: undefined;
455
+ bytes5?: undefined;
456
+ bytes6?: undefined;
457
+ bytes7?: undefined;
458
+ bytes8?: undefined;
459
+ bytes9?: undefined;
460
+ bytes10?: undefined;
461
+ bytes11?: undefined;
462
+ bytes12?: undefined;
463
+ bytes13?: undefined;
464
+ bytes14?: undefined;
465
+ bytes15?: undefined;
466
+ bytes17?: undefined;
467
+ bytes18?: undefined;
468
+ bytes19?: undefined;
469
+ bytes20?: undefined;
470
+ bytes21?: undefined;
471
+ bytes22?: undefined;
472
+ bytes23?: undefined;
473
+ bytes24?: undefined;
474
+ bytes25?: undefined;
475
+ bytes26?: undefined;
476
+ bytes27?: undefined;
477
+ bytes28?: undefined;
478
+ bytes29?: undefined;
479
+ bytes30?: undefined;
480
+ bytes31?: undefined;
481
+ bytes32?: undefined;
482
+ int16?: undefined;
483
+ int8?: undefined;
484
+ int24?: undefined;
485
+ int32?: undefined;
486
+ int40?: undefined;
487
+ int48?: undefined;
488
+ int56?: undefined;
489
+ int64?: undefined;
490
+ int72?: undefined;
491
+ int80?: undefined;
492
+ int88?: undefined;
493
+ int96?: undefined;
494
+ int104?: undefined;
495
+ int112?: undefined;
496
+ int120?: undefined;
497
+ int128?: undefined;
498
+ int136?: undefined;
499
+ int144?: undefined;
500
+ int152?: undefined;
501
+ int160?: undefined;
502
+ int168?: undefined;
503
+ int176?: undefined;
504
+ int184?: undefined;
505
+ int192?: undefined;
506
+ int200?: undefined;
507
+ int208?: undefined;
508
+ int216?: undefined;
509
+ int224?: undefined;
510
+ int232?: undefined;
511
+ int240?: undefined;
512
+ int248?: undefined;
513
+ int256?: undefined;
514
+ uint16?: undefined;
515
+ uint8?: undefined;
516
+ uint24?: undefined;
517
+ uint32?: undefined;
518
+ uint40?: undefined;
519
+ uint48?: undefined;
520
+ uint56?: undefined;
521
+ uint64?: undefined;
522
+ uint72?: undefined;
523
+ uint80?: undefined;
524
+ uint88?: undefined;
525
+ uint96?: undefined;
526
+ uint104?: undefined;
527
+ uint112?: undefined;
528
+ uint120?: undefined;
529
+ uint128?: undefined;
530
+ uint136?: undefined;
531
+ uint144?: undefined;
532
+ uint152?: undefined;
533
+ uint160?: undefined;
534
+ uint168?: undefined;
535
+ uint176?: undefined;
536
+ uint184?: undefined;
537
+ uint192?: undefined;
538
+ uint200?: undefined;
539
+ uint208?: undefined;
540
+ uint216?: undefined;
541
+ uint224?: undefined;
542
+ uint232?: undefined;
543
+ uint240?: undefined;
544
+ uint248?: undefined;
545
+ uint256?: undefined;
546
+ } | {
547
+ [key: string]: unknown;
548
+ }, TPrimaryType_1 extends string>(args: import("viem").SignTypedDataParameters<TTypedData_1, TPrimaryType_1, {
549
+ address: `0x${string}`;
550
+ type: "json-rpc";
551
+ }>) => Promise<`0x${string}`>;
552
+ switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
553
+ watchAsset: (args: import("viem").WatchAssetParams) => Promise<boolean>;
554
+ writeContract: <const TAbi_3 extends import("viem").Abi | readonly unknown[], TFunctionName_1 extends string, TChainOverride_9 extends Chain | undefined>(args: import("viem").WriteContractParameters<TAbi_3, TFunctionName_1, Chain, {
555
+ address: `0x${string}`;
556
+ type: "json-rpc";
557
+ }, TChainOverride_9>) => Promise<`0x${string}`>;
558
+ extend: <const client_1 extends {
559
+ [x: string]: unknown;
560
+ account?: undefined;
561
+ batch?: undefined;
562
+ cacheTime?: undefined;
563
+ chain?: undefined;
564
+ key?: undefined;
565
+ name?: undefined;
566
+ pollingInterval?: undefined;
567
+ request?: undefined;
568
+ transport?: undefined;
569
+ type?: undefined;
570
+ uid?: undefined;
571
+ }>(fn: (client: import("viem").Client<import("viem").CustomTransport, Chain, {
572
+ address: `0x${string}`;
573
+ type: "json-rpc";
574
+ }, import("viem").WalletRpcSchema, import("viem").WalletActions<Chain, {
575
+ address: `0x${string}`;
576
+ type: "json-rpc";
577
+ }>>) => client_1) => import("viem").Client<import("viem").CustomTransport, Chain, {
578
+ address: `0x${string}`;
579
+ type: "json-rpc";
580
+ }, import("viem").WalletRpcSchema, { [K_1 in keyof client_1]: client_1[K_1]; } & import("viem").WalletActions<Chain, {
581
+ address: `0x${string}`;
582
+ type: "json-rpc";
583
+ }>>;
584
+ }>;
35
585
  isAuthorized(): Promise<boolean>;
36
586
  switchChain?(chainId: number): Promise<Chain>;
37
587
  watchAsset?(asset: {
@@ -96,14 +96,16 @@ class Connector extends Connector$1 {
96
96
  getWalletClient(config) {
97
97
  var _a;
98
98
  return __awaiter(this, void 0, void 0, function* () {
99
- const signer = yield ((_a = this.walletConnector) === null || _a === void 0 ? void 0 : _a.getSigner());
100
- if (signer === null || signer === void 0 ? void 0 : signer.account) {
99
+ const signer = yield this.walletConnector.getSigner();
100
+ if (signer.account && signer.chain) {
101
101
  return signer;
102
102
  }
103
- return createWalletClient({
103
+ const walletClient = createWalletClient({
104
104
  account: yield this.getAccount(),
105
+ chain: (_a = this.chains.find((chain) => chain.id === (config === null || config === void 0 ? void 0 : config.chainId))) !== null && _a !== void 0 ? _a : this.chains[0],
105
106
  transport: custom(signer),
106
107
  });
108
+ return walletClient;
107
109
  });
108
110
  }
109
111
  isAuthorized() {