@dynamic-labs/wagmi-connector 0.19.0 → 0.19.2
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 +25 -0
- package/package.json +6 -3
- package/src/lib/Connector.d.ts +554 -4
- package/src/lib/Connector.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
|
|
2
|
+
### [0.19.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.1...v0.19.2) (2023-11-17)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* feat: add support for forced network validation via DynamicContext setting ([#3907](https://github.com/dynamic-labs/DynamicAuth/issues/3907)) ([87e31e4](https://github.com/dynamic-labs/DynamicAuth/commit/87e31e40b0874eb344fa161defdfb36819d9019b)), closes [#3879](https://github.com/dynamic-labs/DynamicAuth/issues/3879)
|
|
8
|
+
* feat: add help section to sign message modal ([4e0a0c4](https://github.com/dynamic-labs/DynamicAuth/commit/4e0a0c4cde73f802bfcaa99351d295060244382f))
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* fix(embedded wallets): allow switching primary wallet ([#3796](https://github.com/dynamic-labs/DynamicAuth/issues/3796)) ([#3797](https://github.com/dynamic-labs/DynamicAuth/issues/3797)) ([a01af71](https://github.com/dynamic-labs/DynamicAuth/commit/a01af71ce0c79a791c4c4bb7d3f3d41bd7fe8edf))
|
|
13
|
+
* fix(embedded wallets): improve logic to check for enabled providers ([5189b96](https://github.com/dynamic-labs/DynamicAuth/commit/5189b96d8fa82e656c916cad130619be6e3b7afd))
|
|
14
|
+
* fix(single wallet): improve account switching UX ([#3742](https://github.com/dynamic-labs/DynamicAuth/issues/3742)) ([#3856](https://github.com/dynamic-labs/DynamicAuth/issues/3856)) ([1efffab](https://github.com/dynamic-labs/DynamicAuth/commit/1efffabf4a668f266564ecaa4405f3fb063bbf38))
|
|
15
|
+
* fix(wagmi): ensure chain is defined on wallet client ([#3888](https://github.com/dynamic-labs/DynamicAuth/issues/3888)) ([#3897](https://github.com/dynamic-labs/DynamicAuth/issues/3897)) ([3ee4885](https://github.com/dynamic-labs/DynamicAuth/commit/3ee4885b129ee619bc82ce09e39a3d5934afd734))
|
|
16
|
+
* fix(ui): remove the coming soon label ([#3876](https://github.com/dynamic-labs/DynamicAuth/issues/3876)) ([298f777](https://github.com/dynamic-labs/DynamicAuth/commit/298f777e4c5923075856e8b47c792c1951615c0e)), closes [#3860](https://github.com/dynamic-labs/DynamicAuth/issues/3860)
|
|
17
|
+
* fix(ssr): add window null check to utils ([#3882](https://github.com/dynamic-labs/DynamicAuth/issues/3882)) ([#3885](https://github.com/dynamic-labs/DynamicAuth/issues/3885)) ([bc8b8e3](https://github.com/dynamic-labs/DynamicAuth/commit/bc8b8e386fd82d9ca6b53deaa3aa852d6ebdafdc))
|
|
18
|
+
* fix(callbacks): pass correct wallet connector onLinkSuccess ([#3904](https://github.com/dynamic-labs/DynamicAuth/issues/3904)) ([#3908](https://github.com/dynamic-labs/DynamicAuth/issues/3908)) ([f05f5f8](https://github.com/dynamic-labs/DynamicAuth/commit/f05f5f8f336c42e24a7422959ba06002aba8be02))
|
|
19
|
+
|
|
20
|
+
### [0.19.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0...v0.19.1) (2023-11-03)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* adding editable copies as typed data ([#3773](https://github.com/dynamic-labs/DynamicAuth/issues/3773)) ([#3793](https://github.com/dynamic-labs/DynamicAuth/issues/3793)) ([f2a4135](https://github.com/dynamic-labs/DynamicAuth/commit/f2a41356686aeb8381ee3f4ec3d1f52b7e2f6dcd))
|
|
26
|
+
|
|
2
27
|
## [0.19.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.19.0-alpha.28...v0.19.0) (2023-10-31)
|
|
3
28
|
|
|
4
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wagmi-connector",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.2",
|
|
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/
|
|
15
|
-
"@dynamic-labs/
|
|
14
|
+
"@dynamic-labs/rpc-providers": "0.19.2",
|
|
15
|
+
"@dynamic-labs/sdk-react-core": "0.19.2",
|
|
16
|
+
"@dynamic-labs/types": "0.19.2",
|
|
17
|
+
"@dynamic-labs/wallet-connector-core": "0.19.2",
|
|
18
|
+
"eventemitter3": "5.0.1"
|
|
16
19
|
},
|
|
17
20
|
"license": "MIT",
|
|
18
21
|
"main": "./src/index.cjs",
|
package/src/lib/Connector.d.ts
CHANGED
|
@@ -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<
|
|
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: {
|
package/src/lib/Connector.js
CHANGED
|
@@ -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
|
|
100
|
-
if (signer
|
|
99
|
+
const signer = yield this.walletConnector.getSigner();
|
|
100
|
+
if (signer.account && signer.chain) {
|
|
101
101
|
return signer;
|
|
102
102
|
}
|
|
103
|
-
|
|
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() {
|