@vechain/vechain-kit 0.8.0
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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/_esm-PNNCDNTB.js +10 -0
- package/dist/_esm-PNNCDNTB.js.map +1 -0
- package/dist/ccip-D55W35AK.js +2 -0
- package/dist/ccip-D55W35AK.js.map +1 -0
- package/dist/chunk-LURIOADG.js +2 -0
- package/dist/chunk-LURIOADG.js.map +1 -0
- package/dist/chunk-M3DCSJHB.js +22 -0
- package/dist/chunk-M3DCSJHB.js.map +1 -0
- package/dist/chunk-URCDOYB6.js +7 -0
- package/dist/chunk-URCDOYB6.js.map +1 -0
- package/dist/chunk-YUJRW7ZE.js +30 -0
- package/dist/chunk-YUJRW7ZE.js.map +1 -0
- package/dist/index.d.ts +1483 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/secp256k1-A6TZ3QZN.js +2 -0
- package/dist/secp256k1-A6TZ3QZN.js.map +1 -0
- package/package.json +51 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1483 @@
|
|
|
1
|
+
import { BoxProps, IconProps, ImageProps, IconButtonProps, StackProps } from '@chakra-ui/react';
|
|
2
|
+
export { useColorMode as useDAppKitPrivyColorMode } from '@chakra-ui/react';
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ReactElement, ReactNode, ElementType } from 'react';
|
|
5
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
|
+
import { IconType } from 'react-icons';
|
|
7
|
+
import { User, ConnectedWallet, WalletListEntry } from '@privy-io/react-auth';
|
|
8
|
+
export { useCrossAppAccounts, usePrivy } from '@privy-io/react-auth';
|
|
9
|
+
import { DAppKitUIOptions } from '@vechain/dapp-kit-react';
|
|
10
|
+
export { useConnex } from '@vechain/dapp-kit-react';
|
|
11
|
+
import { ThorClient } from '@vechain/sdk-network';
|
|
12
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
13
|
+
import * as abitype from 'abitype';
|
|
14
|
+
import * as viem__types_experimental_eip7702_types_authorization from 'viem/_types/experimental/eip7702/types/authorization';
|
|
15
|
+
import * as viem from 'viem';
|
|
16
|
+
import * as viem_accounts from 'viem/accounts';
|
|
17
|
+
|
|
18
|
+
declare const SimpleAccountABI: readonly [{
|
|
19
|
+
readonly inputs: readonly [];
|
|
20
|
+
readonly stateMutability: "nonpayable";
|
|
21
|
+
readonly type: "constructor";
|
|
22
|
+
}, {
|
|
23
|
+
readonly inputs: readonly [{
|
|
24
|
+
readonly internalType: "address";
|
|
25
|
+
readonly name: "target";
|
|
26
|
+
readonly type: "address";
|
|
27
|
+
}];
|
|
28
|
+
readonly name: "AddressEmptyCode";
|
|
29
|
+
readonly type: "error";
|
|
30
|
+
}, {
|
|
31
|
+
readonly inputs: readonly [];
|
|
32
|
+
readonly name: "ECDSAInvalidSignature";
|
|
33
|
+
readonly type: "error";
|
|
34
|
+
}, {
|
|
35
|
+
readonly inputs: readonly [{
|
|
36
|
+
readonly internalType: "uint256";
|
|
37
|
+
readonly name: "length";
|
|
38
|
+
readonly type: "uint256";
|
|
39
|
+
}];
|
|
40
|
+
readonly name: "ECDSAInvalidSignatureLength";
|
|
41
|
+
readonly type: "error";
|
|
42
|
+
}, {
|
|
43
|
+
readonly inputs: readonly [{
|
|
44
|
+
readonly internalType: "bytes32";
|
|
45
|
+
readonly name: "s";
|
|
46
|
+
readonly type: "bytes32";
|
|
47
|
+
}];
|
|
48
|
+
readonly name: "ECDSAInvalidSignatureS";
|
|
49
|
+
readonly type: "error";
|
|
50
|
+
}, {
|
|
51
|
+
readonly inputs: readonly [{
|
|
52
|
+
readonly internalType: "address";
|
|
53
|
+
readonly name: "implementation";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}];
|
|
56
|
+
readonly name: "ERC1967InvalidImplementation";
|
|
57
|
+
readonly type: "error";
|
|
58
|
+
}, {
|
|
59
|
+
readonly inputs: readonly [];
|
|
60
|
+
readonly name: "ERC1967NonPayable";
|
|
61
|
+
readonly type: "error";
|
|
62
|
+
}, {
|
|
63
|
+
readonly inputs: readonly [];
|
|
64
|
+
readonly name: "FailedCall";
|
|
65
|
+
readonly type: "error";
|
|
66
|
+
}, {
|
|
67
|
+
readonly inputs: readonly [];
|
|
68
|
+
readonly name: "InvalidInitialization";
|
|
69
|
+
readonly type: "error";
|
|
70
|
+
}, {
|
|
71
|
+
readonly inputs: readonly [];
|
|
72
|
+
readonly name: "NotInitializing";
|
|
73
|
+
readonly type: "error";
|
|
74
|
+
}, {
|
|
75
|
+
readonly inputs: readonly [];
|
|
76
|
+
readonly name: "UUPSUnauthorizedCallContext";
|
|
77
|
+
readonly type: "error";
|
|
78
|
+
}, {
|
|
79
|
+
readonly inputs: readonly [{
|
|
80
|
+
readonly internalType: "bytes32";
|
|
81
|
+
readonly name: "slot";
|
|
82
|
+
readonly type: "bytes32";
|
|
83
|
+
}];
|
|
84
|
+
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
85
|
+
readonly type: "error";
|
|
86
|
+
}, {
|
|
87
|
+
readonly anonymous: false;
|
|
88
|
+
readonly inputs: readonly [];
|
|
89
|
+
readonly name: "EIP712DomainChanged";
|
|
90
|
+
readonly type: "event";
|
|
91
|
+
}, {
|
|
92
|
+
readonly anonymous: false;
|
|
93
|
+
readonly inputs: readonly [{
|
|
94
|
+
readonly indexed: false;
|
|
95
|
+
readonly internalType: "uint64";
|
|
96
|
+
readonly name: "version";
|
|
97
|
+
readonly type: "uint64";
|
|
98
|
+
}];
|
|
99
|
+
readonly name: "Initialized";
|
|
100
|
+
readonly type: "event";
|
|
101
|
+
}, {
|
|
102
|
+
readonly anonymous: false;
|
|
103
|
+
readonly inputs: readonly [{
|
|
104
|
+
readonly indexed: true;
|
|
105
|
+
readonly internalType: "address";
|
|
106
|
+
readonly name: "owner";
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
}];
|
|
109
|
+
readonly name: "SimpleAccountInitialized";
|
|
110
|
+
readonly type: "event";
|
|
111
|
+
}, {
|
|
112
|
+
readonly anonymous: false;
|
|
113
|
+
readonly inputs: readonly [{
|
|
114
|
+
readonly indexed: true;
|
|
115
|
+
readonly internalType: "address";
|
|
116
|
+
readonly name: "implementation";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}];
|
|
119
|
+
readonly name: "Upgraded";
|
|
120
|
+
readonly type: "event";
|
|
121
|
+
}, {
|
|
122
|
+
readonly inputs: readonly [];
|
|
123
|
+
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
124
|
+
readonly outputs: readonly [{
|
|
125
|
+
readonly internalType: "string";
|
|
126
|
+
readonly name: "";
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
}];
|
|
129
|
+
readonly stateMutability: "view";
|
|
130
|
+
readonly type: "function";
|
|
131
|
+
}, {
|
|
132
|
+
readonly inputs: readonly [];
|
|
133
|
+
readonly name: "eip712Domain";
|
|
134
|
+
readonly outputs: readonly [{
|
|
135
|
+
readonly internalType: "bytes1";
|
|
136
|
+
readonly name: "fields";
|
|
137
|
+
readonly type: "bytes1";
|
|
138
|
+
}, {
|
|
139
|
+
readonly internalType: "string";
|
|
140
|
+
readonly name: "name";
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
}, {
|
|
143
|
+
readonly internalType: "string";
|
|
144
|
+
readonly name: "version";
|
|
145
|
+
readonly type: "string";
|
|
146
|
+
}, {
|
|
147
|
+
readonly internalType: "uint256";
|
|
148
|
+
readonly name: "chainId";
|
|
149
|
+
readonly type: "uint256";
|
|
150
|
+
}, {
|
|
151
|
+
readonly internalType: "address";
|
|
152
|
+
readonly name: "verifyingContract";
|
|
153
|
+
readonly type: "address";
|
|
154
|
+
}, {
|
|
155
|
+
readonly internalType: "bytes32";
|
|
156
|
+
readonly name: "salt";
|
|
157
|
+
readonly type: "bytes32";
|
|
158
|
+
}, {
|
|
159
|
+
readonly internalType: "uint256[]";
|
|
160
|
+
readonly name: "extensions";
|
|
161
|
+
readonly type: "uint256[]";
|
|
162
|
+
}];
|
|
163
|
+
readonly stateMutability: "view";
|
|
164
|
+
readonly type: "function";
|
|
165
|
+
}, {
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly internalType: "address";
|
|
168
|
+
readonly name: "dest";
|
|
169
|
+
readonly type: "address";
|
|
170
|
+
}, {
|
|
171
|
+
readonly internalType: "uint256";
|
|
172
|
+
readonly name: "value";
|
|
173
|
+
readonly type: "uint256";
|
|
174
|
+
}, {
|
|
175
|
+
readonly internalType: "bytes";
|
|
176
|
+
readonly name: "func";
|
|
177
|
+
readonly type: "bytes";
|
|
178
|
+
}];
|
|
179
|
+
readonly name: "execute";
|
|
180
|
+
readonly outputs: readonly [];
|
|
181
|
+
readonly stateMutability: "nonpayable";
|
|
182
|
+
readonly type: "function";
|
|
183
|
+
}, {
|
|
184
|
+
readonly inputs: readonly [{
|
|
185
|
+
readonly internalType: "address[]";
|
|
186
|
+
readonly name: "dest";
|
|
187
|
+
readonly type: "address[]";
|
|
188
|
+
}, {
|
|
189
|
+
readonly internalType: "uint256[]";
|
|
190
|
+
readonly name: "value";
|
|
191
|
+
readonly type: "uint256[]";
|
|
192
|
+
}, {
|
|
193
|
+
readonly internalType: "bytes[]";
|
|
194
|
+
readonly name: "func";
|
|
195
|
+
readonly type: "bytes[]";
|
|
196
|
+
}];
|
|
197
|
+
readonly name: "executeBatch";
|
|
198
|
+
readonly outputs: readonly [];
|
|
199
|
+
readonly stateMutability: "nonpayable";
|
|
200
|
+
readonly type: "function";
|
|
201
|
+
}, {
|
|
202
|
+
readonly inputs: readonly [{
|
|
203
|
+
readonly internalType: "address";
|
|
204
|
+
readonly name: "to";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}, {
|
|
207
|
+
readonly internalType: "uint256";
|
|
208
|
+
readonly name: "value";
|
|
209
|
+
readonly type: "uint256";
|
|
210
|
+
}, {
|
|
211
|
+
readonly internalType: "bytes";
|
|
212
|
+
readonly name: "data";
|
|
213
|
+
readonly type: "bytes";
|
|
214
|
+
}, {
|
|
215
|
+
readonly internalType: "uint256";
|
|
216
|
+
readonly name: "validAfter";
|
|
217
|
+
readonly type: "uint256";
|
|
218
|
+
}, {
|
|
219
|
+
readonly internalType: "uint256";
|
|
220
|
+
readonly name: "validBefore";
|
|
221
|
+
readonly type: "uint256";
|
|
222
|
+
}, {
|
|
223
|
+
readonly internalType: "bytes";
|
|
224
|
+
readonly name: "signature";
|
|
225
|
+
readonly type: "bytes";
|
|
226
|
+
}];
|
|
227
|
+
readonly name: "executeWithAuthorization";
|
|
228
|
+
readonly outputs: readonly [];
|
|
229
|
+
readonly stateMutability: "payable";
|
|
230
|
+
readonly type: "function";
|
|
231
|
+
}, {
|
|
232
|
+
readonly inputs: readonly [{
|
|
233
|
+
readonly internalType: "address";
|
|
234
|
+
readonly name: "anOwner";
|
|
235
|
+
readonly type: "address";
|
|
236
|
+
}];
|
|
237
|
+
readonly name: "initialize";
|
|
238
|
+
readonly outputs: readonly [];
|
|
239
|
+
readonly stateMutability: "nonpayable";
|
|
240
|
+
readonly type: "function";
|
|
241
|
+
}, {
|
|
242
|
+
readonly inputs: readonly [{
|
|
243
|
+
readonly internalType: "address";
|
|
244
|
+
readonly name: "";
|
|
245
|
+
readonly type: "address";
|
|
246
|
+
}, {
|
|
247
|
+
readonly internalType: "address";
|
|
248
|
+
readonly name: "";
|
|
249
|
+
readonly type: "address";
|
|
250
|
+
}, {
|
|
251
|
+
readonly internalType: "uint256[]";
|
|
252
|
+
readonly name: "";
|
|
253
|
+
readonly type: "uint256[]";
|
|
254
|
+
}, {
|
|
255
|
+
readonly internalType: "uint256[]";
|
|
256
|
+
readonly name: "";
|
|
257
|
+
readonly type: "uint256[]";
|
|
258
|
+
}, {
|
|
259
|
+
readonly internalType: "bytes";
|
|
260
|
+
readonly name: "";
|
|
261
|
+
readonly type: "bytes";
|
|
262
|
+
}];
|
|
263
|
+
readonly name: "onERC1155BatchReceived";
|
|
264
|
+
readonly outputs: readonly [{
|
|
265
|
+
readonly internalType: "bytes4";
|
|
266
|
+
readonly name: "";
|
|
267
|
+
readonly type: "bytes4";
|
|
268
|
+
}];
|
|
269
|
+
readonly stateMutability: "pure";
|
|
270
|
+
readonly type: "function";
|
|
271
|
+
}, {
|
|
272
|
+
readonly inputs: readonly [{
|
|
273
|
+
readonly internalType: "address";
|
|
274
|
+
readonly name: "";
|
|
275
|
+
readonly type: "address";
|
|
276
|
+
}, {
|
|
277
|
+
readonly internalType: "address";
|
|
278
|
+
readonly name: "";
|
|
279
|
+
readonly type: "address";
|
|
280
|
+
}, {
|
|
281
|
+
readonly internalType: "uint256";
|
|
282
|
+
readonly name: "";
|
|
283
|
+
readonly type: "uint256";
|
|
284
|
+
}, {
|
|
285
|
+
readonly internalType: "uint256";
|
|
286
|
+
readonly name: "";
|
|
287
|
+
readonly type: "uint256";
|
|
288
|
+
}, {
|
|
289
|
+
readonly internalType: "bytes";
|
|
290
|
+
readonly name: "";
|
|
291
|
+
readonly type: "bytes";
|
|
292
|
+
}];
|
|
293
|
+
readonly name: "onERC1155Received";
|
|
294
|
+
readonly outputs: readonly [{
|
|
295
|
+
readonly internalType: "bytes4";
|
|
296
|
+
readonly name: "";
|
|
297
|
+
readonly type: "bytes4";
|
|
298
|
+
}];
|
|
299
|
+
readonly stateMutability: "pure";
|
|
300
|
+
readonly type: "function";
|
|
301
|
+
}, {
|
|
302
|
+
readonly inputs: readonly [{
|
|
303
|
+
readonly internalType: "address";
|
|
304
|
+
readonly name: "";
|
|
305
|
+
readonly type: "address";
|
|
306
|
+
}, {
|
|
307
|
+
readonly internalType: "address";
|
|
308
|
+
readonly name: "";
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
}, {
|
|
311
|
+
readonly internalType: "uint256";
|
|
312
|
+
readonly name: "";
|
|
313
|
+
readonly type: "uint256";
|
|
314
|
+
}, {
|
|
315
|
+
readonly internalType: "bytes";
|
|
316
|
+
readonly name: "";
|
|
317
|
+
readonly type: "bytes";
|
|
318
|
+
}];
|
|
319
|
+
readonly name: "onERC721Received";
|
|
320
|
+
readonly outputs: readonly [{
|
|
321
|
+
readonly internalType: "bytes4";
|
|
322
|
+
readonly name: "";
|
|
323
|
+
readonly type: "bytes4";
|
|
324
|
+
}];
|
|
325
|
+
readonly stateMutability: "pure";
|
|
326
|
+
readonly type: "function";
|
|
327
|
+
}, {
|
|
328
|
+
readonly inputs: readonly [];
|
|
329
|
+
readonly name: "owner";
|
|
330
|
+
readonly outputs: readonly [{
|
|
331
|
+
readonly internalType: "address";
|
|
332
|
+
readonly name: "";
|
|
333
|
+
readonly type: "address";
|
|
334
|
+
}];
|
|
335
|
+
readonly stateMutability: "view";
|
|
336
|
+
readonly type: "function";
|
|
337
|
+
}, {
|
|
338
|
+
readonly inputs: readonly [];
|
|
339
|
+
readonly name: "proxiableUUID";
|
|
340
|
+
readonly outputs: readonly [{
|
|
341
|
+
readonly internalType: "bytes32";
|
|
342
|
+
readonly name: "";
|
|
343
|
+
readonly type: "bytes32";
|
|
344
|
+
}];
|
|
345
|
+
readonly stateMutability: "view";
|
|
346
|
+
readonly type: "function";
|
|
347
|
+
}, {
|
|
348
|
+
readonly inputs: readonly [{
|
|
349
|
+
readonly internalType: "bytes4";
|
|
350
|
+
readonly name: "interfaceId";
|
|
351
|
+
readonly type: "bytes4";
|
|
352
|
+
}];
|
|
353
|
+
readonly name: "supportsInterface";
|
|
354
|
+
readonly outputs: readonly [{
|
|
355
|
+
readonly internalType: "bool";
|
|
356
|
+
readonly name: "";
|
|
357
|
+
readonly type: "bool";
|
|
358
|
+
}];
|
|
359
|
+
readonly stateMutability: "view";
|
|
360
|
+
readonly type: "function";
|
|
361
|
+
}, {
|
|
362
|
+
readonly inputs: readonly [{
|
|
363
|
+
readonly internalType: "address";
|
|
364
|
+
readonly name: "newImplementation";
|
|
365
|
+
readonly type: "address";
|
|
366
|
+
}, {
|
|
367
|
+
readonly internalType: "bytes";
|
|
368
|
+
readonly name: "data";
|
|
369
|
+
readonly type: "bytes";
|
|
370
|
+
}];
|
|
371
|
+
readonly name: "upgradeToAndCall";
|
|
372
|
+
readonly outputs: readonly [];
|
|
373
|
+
readonly stateMutability: "payable";
|
|
374
|
+
readonly type: "function";
|
|
375
|
+
}, {
|
|
376
|
+
readonly stateMutability: "payable";
|
|
377
|
+
readonly type: "receive";
|
|
378
|
+
}];
|
|
379
|
+
declare const SimpleAccountFactoryABI: readonly [{
|
|
380
|
+
readonly inputs: readonly [];
|
|
381
|
+
readonly stateMutability: "nonpayable";
|
|
382
|
+
readonly type: "constructor";
|
|
383
|
+
}, {
|
|
384
|
+
readonly inputs: readonly [];
|
|
385
|
+
readonly name: "AccessControlBadConfirmation";
|
|
386
|
+
readonly type: "error";
|
|
387
|
+
}, {
|
|
388
|
+
readonly inputs: readonly [{
|
|
389
|
+
readonly internalType: "address";
|
|
390
|
+
readonly name: "account";
|
|
391
|
+
readonly type: "address";
|
|
392
|
+
}, {
|
|
393
|
+
readonly internalType: "bytes32";
|
|
394
|
+
readonly name: "neededRole";
|
|
395
|
+
readonly type: "bytes32";
|
|
396
|
+
}];
|
|
397
|
+
readonly name: "AccessControlUnauthorizedAccount";
|
|
398
|
+
readonly type: "error";
|
|
399
|
+
}, {
|
|
400
|
+
readonly inputs: readonly [{
|
|
401
|
+
readonly internalType: "address";
|
|
402
|
+
readonly name: "target";
|
|
403
|
+
readonly type: "address";
|
|
404
|
+
}];
|
|
405
|
+
readonly name: "AddressEmptyCode";
|
|
406
|
+
readonly type: "error";
|
|
407
|
+
}, {
|
|
408
|
+
readonly inputs: readonly [{
|
|
409
|
+
readonly internalType: "address";
|
|
410
|
+
readonly name: "implementation";
|
|
411
|
+
readonly type: "address";
|
|
412
|
+
}];
|
|
413
|
+
readonly name: "ERC1967InvalidImplementation";
|
|
414
|
+
readonly type: "error";
|
|
415
|
+
}, {
|
|
416
|
+
readonly inputs: readonly [];
|
|
417
|
+
readonly name: "ERC1967NonPayable";
|
|
418
|
+
readonly type: "error";
|
|
419
|
+
}, {
|
|
420
|
+
readonly inputs: readonly [];
|
|
421
|
+
readonly name: "FailedCall";
|
|
422
|
+
readonly type: "error";
|
|
423
|
+
}, {
|
|
424
|
+
readonly inputs: readonly [];
|
|
425
|
+
readonly name: "InvalidInitialization";
|
|
426
|
+
readonly type: "error";
|
|
427
|
+
}, {
|
|
428
|
+
readonly inputs: readonly [];
|
|
429
|
+
readonly name: "NotInitializing";
|
|
430
|
+
readonly type: "error";
|
|
431
|
+
}, {
|
|
432
|
+
readonly inputs: readonly [];
|
|
433
|
+
readonly name: "UUPSUnauthorizedCallContext";
|
|
434
|
+
readonly type: "error";
|
|
435
|
+
}, {
|
|
436
|
+
readonly inputs: readonly [{
|
|
437
|
+
readonly internalType: "bytes32";
|
|
438
|
+
readonly name: "slot";
|
|
439
|
+
readonly type: "bytes32";
|
|
440
|
+
}];
|
|
441
|
+
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
442
|
+
readonly type: "error";
|
|
443
|
+
}, {
|
|
444
|
+
readonly anonymous: false;
|
|
445
|
+
readonly inputs: readonly [{
|
|
446
|
+
readonly indexed: false;
|
|
447
|
+
readonly internalType: "contract SimpleAccount";
|
|
448
|
+
readonly name: "account";
|
|
449
|
+
readonly type: "address";
|
|
450
|
+
}, {
|
|
451
|
+
readonly indexed: false;
|
|
452
|
+
readonly internalType: "address";
|
|
453
|
+
readonly name: "owner";
|
|
454
|
+
readonly type: "address";
|
|
455
|
+
}, {
|
|
456
|
+
readonly indexed: false;
|
|
457
|
+
readonly internalType: "uint256";
|
|
458
|
+
readonly name: "salt";
|
|
459
|
+
readonly type: "uint256";
|
|
460
|
+
}];
|
|
461
|
+
readonly name: "AccountCreated";
|
|
462
|
+
readonly type: "event";
|
|
463
|
+
}, {
|
|
464
|
+
readonly anonymous: false;
|
|
465
|
+
readonly inputs: readonly [{
|
|
466
|
+
readonly indexed: false;
|
|
467
|
+
readonly internalType: "uint64";
|
|
468
|
+
readonly name: "version";
|
|
469
|
+
readonly type: "uint64";
|
|
470
|
+
}];
|
|
471
|
+
readonly name: "Initialized";
|
|
472
|
+
readonly type: "event";
|
|
473
|
+
}, {
|
|
474
|
+
readonly anonymous: false;
|
|
475
|
+
readonly inputs: readonly [{
|
|
476
|
+
readonly indexed: true;
|
|
477
|
+
readonly internalType: "bytes32";
|
|
478
|
+
readonly name: "role";
|
|
479
|
+
readonly type: "bytes32";
|
|
480
|
+
}, {
|
|
481
|
+
readonly indexed: true;
|
|
482
|
+
readonly internalType: "bytes32";
|
|
483
|
+
readonly name: "previousAdminRole";
|
|
484
|
+
readonly type: "bytes32";
|
|
485
|
+
}, {
|
|
486
|
+
readonly indexed: true;
|
|
487
|
+
readonly internalType: "bytes32";
|
|
488
|
+
readonly name: "newAdminRole";
|
|
489
|
+
readonly type: "bytes32";
|
|
490
|
+
}];
|
|
491
|
+
readonly name: "RoleAdminChanged";
|
|
492
|
+
readonly type: "event";
|
|
493
|
+
}, {
|
|
494
|
+
readonly anonymous: false;
|
|
495
|
+
readonly inputs: readonly [{
|
|
496
|
+
readonly indexed: true;
|
|
497
|
+
readonly internalType: "bytes32";
|
|
498
|
+
readonly name: "role";
|
|
499
|
+
readonly type: "bytes32";
|
|
500
|
+
}, {
|
|
501
|
+
readonly indexed: true;
|
|
502
|
+
readonly internalType: "address";
|
|
503
|
+
readonly name: "account";
|
|
504
|
+
readonly type: "address";
|
|
505
|
+
}, {
|
|
506
|
+
readonly indexed: true;
|
|
507
|
+
readonly internalType: "address";
|
|
508
|
+
readonly name: "sender";
|
|
509
|
+
readonly type: "address";
|
|
510
|
+
}];
|
|
511
|
+
readonly name: "RoleGranted";
|
|
512
|
+
readonly type: "event";
|
|
513
|
+
}, {
|
|
514
|
+
readonly anonymous: false;
|
|
515
|
+
readonly inputs: readonly [{
|
|
516
|
+
readonly indexed: true;
|
|
517
|
+
readonly internalType: "bytes32";
|
|
518
|
+
readonly name: "role";
|
|
519
|
+
readonly type: "bytes32";
|
|
520
|
+
}, {
|
|
521
|
+
readonly indexed: true;
|
|
522
|
+
readonly internalType: "address";
|
|
523
|
+
readonly name: "account";
|
|
524
|
+
readonly type: "address";
|
|
525
|
+
}, {
|
|
526
|
+
readonly indexed: true;
|
|
527
|
+
readonly internalType: "address";
|
|
528
|
+
readonly name: "sender";
|
|
529
|
+
readonly type: "address";
|
|
530
|
+
}];
|
|
531
|
+
readonly name: "RoleRevoked";
|
|
532
|
+
readonly type: "event";
|
|
533
|
+
}, {
|
|
534
|
+
readonly anonymous: false;
|
|
535
|
+
readonly inputs: readonly [{
|
|
536
|
+
readonly indexed: true;
|
|
537
|
+
readonly internalType: "address";
|
|
538
|
+
readonly name: "implementation";
|
|
539
|
+
readonly type: "address";
|
|
540
|
+
}];
|
|
541
|
+
readonly name: "Upgraded";
|
|
542
|
+
readonly type: "event";
|
|
543
|
+
}, {
|
|
544
|
+
readonly inputs: readonly [];
|
|
545
|
+
readonly name: "DEFAULT_ADMIN_ROLE";
|
|
546
|
+
readonly outputs: readonly [{
|
|
547
|
+
readonly internalType: "bytes32";
|
|
548
|
+
readonly name: "";
|
|
549
|
+
readonly type: "bytes32";
|
|
550
|
+
}];
|
|
551
|
+
readonly stateMutability: "view";
|
|
552
|
+
readonly type: "function";
|
|
553
|
+
}, {
|
|
554
|
+
readonly inputs: readonly [];
|
|
555
|
+
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
556
|
+
readonly outputs: readonly [{
|
|
557
|
+
readonly internalType: "string";
|
|
558
|
+
readonly name: "";
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
}];
|
|
561
|
+
readonly stateMutability: "view";
|
|
562
|
+
readonly type: "function";
|
|
563
|
+
}, {
|
|
564
|
+
readonly inputs: readonly [];
|
|
565
|
+
readonly name: "accountImplementation";
|
|
566
|
+
readonly outputs: readonly [{
|
|
567
|
+
readonly internalType: "contract SimpleAccount";
|
|
568
|
+
readonly name: "";
|
|
569
|
+
readonly type: "address";
|
|
570
|
+
}];
|
|
571
|
+
readonly stateMutability: "view";
|
|
572
|
+
readonly type: "function";
|
|
573
|
+
}, {
|
|
574
|
+
readonly inputs: readonly [{
|
|
575
|
+
readonly internalType: "address";
|
|
576
|
+
readonly name: "owner";
|
|
577
|
+
readonly type: "address";
|
|
578
|
+
}];
|
|
579
|
+
readonly name: "createAccount";
|
|
580
|
+
readonly outputs: readonly [{
|
|
581
|
+
readonly internalType: "contract SimpleAccount";
|
|
582
|
+
readonly name: "ret";
|
|
583
|
+
readonly type: "address";
|
|
584
|
+
}];
|
|
585
|
+
readonly stateMutability: "nonpayable";
|
|
586
|
+
readonly type: "function";
|
|
587
|
+
}, {
|
|
588
|
+
readonly inputs: readonly [{
|
|
589
|
+
readonly internalType: "address";
|
|
590
|
+
readonly name: "owner";
|
|
591
|
+
readonly type: "address";
|
|
592
|
+
}];
|
|
593
|
+
readonly name: "getAccountAddress";
|
|
594
|
+
readonly outputs: readonly [{
|
|
595
|
+
readonly internalType: "address";
|
|
596
|
+
readonly name: "";
|
|
597
|
+
readonly type: "address";
|
|
598
|
+
}];
|
|
599
|
+
readonly stateMutability: "view";
|
|
600
|
+
readonly type: "function";
|
|
601
|
+
}, {
|
|
602
|
+
readonly inputs: readonly [{
|
|
603
|
+
readonly internalType: "bytes32";
|
|
604
|
+
readonly name: "role";
|
|
605
|
+
readonly type: "bytes32";
|
|
606
|
+
}];
|
|
607
|
+
readonly name: "getRoleAdmin";
|
|
608
|
+
readonly outputs: readonly [{
|
|
609
|
+
readonly internalType: "bytes32";
|
|
610
|
+
readonly name: "";
|
|
611
|
+
readonly type: "bytes32";
|
|
612
|
+
}];
|
|
613
|
+
readonly stateMutability: "view";
|
|
614
|
+
readonly type: "function";
|
|
615
|
+
}, {
|
|
616
|
+
readonly inputs: readonly [{
|
|
617
|
+
readonly internalType: "bytes32";
|
|
618
|
+
readonly name: "role";
|
|
619
|
+
readonly type: "bytes32";
|
|
620
|
+
}, {
|
|
621
|
+
readonly internalType: "address";
|
|
622
|
+
readonly name: "account";
|
|
623
|
+
readonly type: "address";
|
|
624
|
+
}];
|
|
625
|
+
readonly name: "grantRole";
|
|
626
|
+
readonly outputs: readonly [];
|
|
627
|
+
readonly stateMutability: "nonpayable";
|
|
628
|
+
readonly type: "function";
|
|
629
|
+
}, {
|
|
630
|
+
readonly inputs: readonly [{
|
|
631
|
+
readonly internalType: "bytes32";
|
|
632
|
+
readonly name: "role";
|
|
633
|
+
readonly type: "bytes32";
|
|
634
|
+
}, {
|
|
635
|
+
readonly internalType: "address";
|
|
636
|
+
readonly name: "account";
|
|
637
|
+
readonly type: "address";
|
|
638
|
+
}];
|
|
639
|
+
readonly name: "hasRole";
|
|
640
|
+
readonly outputs: readonly [{
|
|
641
|
+
readonly internalType: "bool";
|
|
642
|
+
readonly name: "";
|
|
643
|
+
readonly type: "bool";
|
|
644
|
+
}];
|
|
645
|
+
readonly stateMutability: "view";
|
|
646
|
+
readonly type: "function";
|
|
647
|
+
}, {
|
|
648
|
+
readonly inputs: readonly [];
|
|
649
|
+
readonly name: "initialize";
|
|
650
|
+
readonly outputs: readonly [];
|
|
651
|
+
readonly stateMutability: "nonpayable";
|
|
652
|
+
readonly type: "function";
|
|
653
|
+
}, {
|
|
654
|
+
readonly inputs: readonly [];
|
|
655
|
+
readonly name: "proxiableUUID";
|
|
656
|
+
readonly outputs: readonly [{
|
|
657
|
+
readonly internalType: "bytes32";
|
|
658
|
+
readonly name: "";
|
|
659
|
+
readonly type: "bytes32";
|
|
660
|
+
}];
|
|
661
|
+
readonly stateMutability: "view";
|
|
662
|
+
readonly type: "function";
|
|
663
|
+
}, {
|
|
664
|
+
readonly inputs: readonly [{
|
|
665
|
+
readonly internalType: "bytes32";
|
|
666
|
+
readonly name: "role";
|
|
667
|
+
readonly type: "bytes32";
|
|
668
|
+
}, {
|
|
669
|
+
readonly internalType: "address";
|
|
670
|
+
readonly name: "callerConfirmation";
|
|
671
|
+
readonly type: "address";
|
|
672
|
+
}];
|
|
673
|
+
readonly name: "renounceRole";
|
|
674
|
+
readonly outputs: readonly [];
|
|
675
|
+
readonly stateMutability: "nonpayable";
|
|
676
|
+
readonly type: "function";
|
|
677
|
+
}, {
|
|
678
|
+
readonly inputs: readonly [{
|
|
679
|
+
readonly internalType: "bytes32";
|
|
680
|
+
readonly name: "role";
|
|
681
|
+
readonly type: "bytes32";
|
|
682
|
+
}, {
|
|
683
|
+
readonly internalType: "address";
|
|
684
|
+
readonly name: "account";
|
|
685
|
+
readonly type: "address";
|
|
686
|
+
}];
|
|
687
|
+
readonly name: "revokeRole";
|
|
688
|
+
readonly outputs: readonly [];
|
|
689
|
+
readonly stateMutability: "nonpayable";
|
|
690
|
+
readonly type: "function";
|
|
691
|
+
}, {
|
|
692
|
+
readonly inputs: readonly [{
|
|
693
|
+
readonly internalType: "bytes4";
|
|
694
|
+
readonly name: "interfaceId";
|
|
695
|
+
readonly type: "bytes4";
|
|
696
|
+
}];
|
|
697
|
+
readonly name: "supportsInterface";
|
|
698
|
+
readonly outputs: readonly [{
|
|
699
|
+
readonly internalType: "bool";
|
|
700
|
+
readonly name: "";
|
|
701
|
+
readonly type: "bool";
|
|
702
|
+
}];
|
|
703
|
+
readonly stateMutability: "view";
|
|
704
|
+
readonly type: "function";
|
|
705
|
+
}, {
|
|
706
|
+
readonly inputs: readonly [{
|
|
707
|
+
readonly internalType: "address";
|
|
708
|
+
readonly name: "newImplementation";
|
|
709
|
+
readonly type: "address";
|
|
710
|
+
}, {
|
|
711
|
+
readonly internalType: "bytes";
|
|
712
|
+
readonly name: "data";
|
|
713
|
+
readonly type: "bytes";
|
|
714
|
+
}];
|
|
715
|
+
readonly name: "upgradeToAndCall";
|
|
716
|
+
readonly outputs: readonly [];
|
|
717
|
+
readonly stateMutability: "payable";
|
|
718
|
+
readonly type: "function";
|
|
719
|
+
}, {
|
|
720
|
+
readonly inputs: readonly [];
|
|
721
|
+
readonly name: "version";
|
|
722
|
+
readonly outputs: readonly [{
|
|
723
|
+
readonly internalType: "string";
|
|
724
|
+
readonly name: "";
|
|
725
|
+
readonly type: "string";
|
|
726
|
+
}];
|
|
727
|
+
readonly stateMutability: "pure";
|
|
728
|
+
readonly type: "function";
|
|
729
|
+
}];
|
|
730
|
+
|
|
731
|
+
type Props$q = {
|
|
732
|
+
boxSize?: string | number;
|
|
733
|
+
} & Omit<BoxProps, 'dangerouslySetInnerHTML'>;
|
|
734
|
+
declare const GoogleLogo: React__default.FC<Props$q>;
|
|
735
|
+
|
|
736
|
+
type Props$p = {
|
|
737
|
+
isDark?: boolean;
|
|
738
|
+
boxSize?: string | number;
|
|
739
|
+
} & Omit<BoxProps, 'dangerouslySetInnerHTML'>;
|
|
740
|
+
declare const TwitterLogo: React__default.FC<Props$p>;
|
|
741
|
+
|
|
742
|
+
type Props$o = {
|
|
743
|
+
isDark?: boolean;
|
|
744
|
+
} & Omit<IconProps, 'dangerouslySetInnerHTML'>;
|
|
745
|
+
declare const VechainLogo: React__default.FC<Props$o>;
|
|
746
|
+
|
|
747
|
+
type Props$n = {
|
|
748
|
+
isDark?: boolean;
|
|
749
|
+
} & Omit<ImageProps, 'dangerouslySetInnerHTML'>;
|
|
750
|
+
declare const VechainLogoHorizontal: React__default.FC<Props$n>;
|
|
751
|
+
|
|
752
|
+
type Props$m = {
|
|
753
|
+
isOpen: boolean;
|
|
754
|
+
onClose: () => void;
|
|
755
|
+
logo?: string;
|
|
756
|
+
};
|
|
757
|
+
type ConnectModalContents = 'main' | 'ecosystem' | 'email-verification';
|
|
758
|
+
declare const ConnectModal: ({ isOpen, onClose, logo }: Props$m) => react_jsx_runtime.JSX.Element;
|
|
759
|
+
|
|
760
|
+
type Props$l = {
|
|
761
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<ConnectModalContents>>;
|
|
762
|
+
onClose: () => void;
|
|
763
|
+
};
|
|
764
|
+
declare const EcosystemContent: ({ setCurrentContent, onClose }: Props$l) => react_jsx_runtime.JSX.Element;
|
|
765
|
+
|
|
766
|
+
type Props$k = {
|
|
767
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<ConnectModalContents>>;
|
|
768
|
+
onClose: () => void;
|
|
769
|
+
logo?: string;
|
|
770
|
+
};
|
|
771
|
+
declare const MainContent: ({ setCurrentContent, onClose, logo }: Props$k) => react_jsx_runtime.JSX.Element;
|
|
772
|
+
|
|
773
|
+
interface ConnectionButtonProps {
|
|
774
|
+
isDark: boolean;
|
|
775
|
+
onClick: () => void;
|
|
776
|
+
text?: string;
|
|
777
|
+
leftIcon?: ReactElement;
|
|
778
|
+
icon?: IconType;
|
|
779
|
+
}
|
|
780
|
+
declare const ConnectionButton: ({ isDark, onClick, leftIcon, text, icon, }: ConnectionButtonProps) => react_jsx_runtime.JSX.Element | null;
|
|
781
|
+
|
|
782
|
+
declare const EmailLoginButton: () => react_jsx_runtime.JSX.Element;
|
|
783
|
+
|
|
784
|
+
declare const WalletButton: () => react_jsx_runtime.JSX.Element;
|
|
785
|
+
|
|
786
|
+
type TransactionModalProps = {
|
|
787
|
+
isOpen: boolean;
|
|
788
|
+
onClose: () => void;
|
|
789
|
+
status: string;
|
|
790
|
+
pendingTitle?: ReactNode;
|
|
791
|
+
confirmationTitle?: ReactNode;
|
|
792
|
+
errorTitle?: ReactNode;
|
|
793
|
+
errorDescription?: string;
|
|
794
|
+
successTitle?: ReactNode;
|
|
795
|
+
showSocialButtons?: boolean;
|
|
796
|
+
socialDescriptionEncoded?: string;
|
|
797
|
+
showTryAgainButton?: boolean;
|
|
798
|
+
onTryAgain?: () => void;
|
|
799
|
+
showExplorerButton?: boolean;
|
|
800
|
+
txId?: string;
|
|
801
|
+
};
|
|
802
|
+
declare const TransactionModal: ({ isOpen, onClose, status, pendingTitle, confirmationTitle, errorTitle, errorDescription, successTitle, showSocialButtons, socialDescriptionEncoded, showTryAgainButton, onTryAgain, showExplorerButton, txId, }: TransactionModalProps) => react_jsx_runtime.JSX.Element | null;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Data that the Privy user must sign in order to execute a transaction
|
|
806
|
+
* by authorizing the Smart Account contract
|
|
807
|
+
*/
|
|
808
|
+
type ExecuteWithAuthorizationSignData = {
|
|
809
|
+
domain: {
|
|
810
|
+
name: string;
|
|
811
|
+
version: string;
|
|
812
|
+
chainId: number;
|
|
813
|
+
verifyingContract: string;
|
|
814
|
+
};
|
|
815
|
+
types: {
|
|
816
|
+
ExecuteWithAuthorization: {
|
|
817
|
+
name: string;
|
|
818
|
+
type: string;
|
|
819
|
+
}[];
|
|
820
|
+
};
|
|
821
|
+
primaryType: string;
|
|
822
|
+
message: {
|
|
823
|
+
validAfter: number;
|
|
824
|
+
validBefore: number;
|
|
825
|
+
to: string | null | undefined;
|
|
826
|
+
value: string;
|
|
827
|
+
data: string;
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* ready: the user has not clicked on the button yet
|
|
832
|
+
* pending: the user has clicked on the button and we're waiting for the transaction to be sent
|
|
833
|
+
* waitingConfirmation: the transaction has been sent and we're waiting for the transaction to be confirmed by the chain
|
|
834
|
+
* success: the transaction has been confirmed by the chain
|
|
835
|
+
* error: the transaction has failed
|
|
836
|
+
* unknown: the transaction receipt has failed to load
|
|
837
|
+
*/
|
|
838
|
+
type TransactionStatus = 'ready' | 'pending' | 'waitingConfirmation' | 'success' | 'error' | 'unknown';
|
|
839
|
+
type TransactionStatusErrorType = {
|
|
840
|
+
type: 'SendTransactionError' | 'TxReceiptError' | 'RevertReasonError' | 'UserRejectedError';
|
|
841
|
+
reason?: string;
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* An enhanced clause with a comment and an abi
|
|
845
|
+
* @param comment a comment to add to the clause
|
|
846
|
+
* @param abi the abi of the contract to call
|
|
847
|
+
*/
|
|
848
|
+
type EnhancedClause = Connex.VM.Clause & {
|
|
849
|
+
comment?: string;
|
|
850
|
+
abi?: object;
|
|
851
|
+
};
|
|
852
|
+
type PrivyAppInfo$1 = {
|
|
853
|
+
name: string;
|
|
854
|
+
logo_url: string;
|
|
855
|
+
description?: string;
|
|
856
|
+
};
|
|
857
|
+
type SocialInfo = {
|
|
858
|
+
code: string;
|
|
859
|
+
name: string;
|
|
860
|
+
logo_url: string;
|
|
861
|
+
description?: string;
|
|
862
|
+
};
|
|
863
|
+
type PrivyLoginMethod = 'wallet' | 'email' | 'sms' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'spotify' | 'instagram' | 'tiktok' | 'apple' | 'farcaster' | 'telegram';
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Network URL.
|
|
867
|
+
* Defaults to mainnet.
|
|
868
|
+
*/
|
|
869
|
+
declare const NETWORK_URL: string;
|
|
870
|
+
/**
|
|
871
|
+
* Thor client instance
|
|
872
|
+
*/
|
|
873
|
+
declare const THOR_CLIENT: ThorClient;
|
|
874
|
+
/**
|
|
875
|
+
* Delegator url for the account abstraction factory contract
|
|
876
|
+
*/
|
|
877
|
+
declare const DELEGATOR_URL: string;
|
|
878
|
+
|
|
879
|
+
declare const ACCOUNT_FACTORY_ADDRESSES: {
|
|
880
|
+
readonly '14018334920824264832118464179726739019961432051877733167310318607178': "0xC06Ad8573022e2BE416CA89DA47E8c592971679A";
|
|
881
|
+
readonly '1176455790972829965191905223412607679856028701100105089447013101863': "0x7EABA81B4F3741Ac381af7e025f3B6e0428F05Fb";
|
|
882
|
+
};
|
|
883
|
+
declare const TOKEN_LOGOS: Record<string, string>;
|
|
884
|
+
declare const EXPLORER_URL: {
|
|
885
|
+
readonly '14018334920824264832118464179726739019961432051877733167310318607178': "https://vechainstats.com/transaction";
|
|
886
|
+
readonly '1176455790972829965191905223412607679856028701100105089447013101863': "https://explore-testnet.vechain.org/transactions";
|
|
887
|
+
};
|
|
888
|
+
declare const VECHAIN_PRIVY_APP_ID = "cm4wxxujb022fyujl7g0thb21";
|
|
889
|
+
declare const WALLET_INFOS: SocialInfo[];
|
|
890
|
+
declare const SOCIAL_INFOS: SocialInfo[];
|
|
891
|
+
|
|
892
|
+
declare const humanAddress: (address: string, charAtStart?: number, charAtEnd?: number) => string;
|
|
893
|
+
declare const humanDomain: (domain: string, lengthBefore?: number, lengthAfter?: number) => string;
|
|
894
|
+
declare const getPicassoImage: (address: string, base64?: boolean) => string;
|
|
895
|
+
|
|
896
|
+
declare const randomTransactionUser: {
|
|
897
|
+
privateKey: `0x${string}`;
|
|
898
|
+
account: {
|
|
899
|
+
address: viem_accounts.Address;
|
|
900
|
+
nonceManager?: viem_accounts.NonceManager | undefined;
|
|
901
|
+
sign: (parameters: {
|
|
902
|
+
hash: viem.Hash;
|
|
903
|
+
}) => Promise<viem.Hex>;
|
|
904
|
+
experimental_signAuthorization: (parameters: viem__types_experimental_eip7702_types_authorization.Authorization) => Promise<viem_accounts.SignAuthorizationReturnType>;
|
|
905
|
+
signMessage: ({ message }: {
|
|
906
|
+
message: viem.SignableMessage;
|
|
907
|
+
}) => Promise<viem.Hex>;
|
|
908
|
+
signTransaction: <serializer extends viem.SerializeTransactionFn<viem.TransactionSerializable> = viem.SerializeTransactionFn<viem.TransactionSerializable>, transaction extends Parameters<serializer>[0] = Parameters<serializer>[0]>(transaction: transaction, options?: {
|
|
909
|
+
serializer?: serializer | undefined;
|
|
910
|
+
} | undefined) => Promise<viem.IsNarrowable<viem.TransactionSerialized<viem.GetTransactionType<transaction>>, viem.Hex> extends true ? viem.TransactionSerialized<viem.GetTransactionType<transaction>> : viem.Hex>;
|
|
911
|
+
signTypedData: <const typedData extends abitype.TypedData | Record<string, unknown>, primaryType extends keyof typedData | "EIP712Domain" = keyof typedData>(parameters: viem.TypedDataDefinition<typedData, primaryType>) => Promise<viem.Hex>;
|
|
912
|
+
publicKey: viem.Hex;
|
|
913
|
+
source: "privateKey";
|
|
914
|
+
type: "local";
|
|
915
|
+
};
|
|
916
|
+
address: string;
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
/**
|
|
920
|
+
* Checks if two addresses are equal. Returns true if both values are strings AND:
|
|
921
|
+
* - The two values are equal OR
|
|
922
|
+
* - The checksumed addresses are equal
|
|
923
|
+
*
|
|
924
|
+
* @param address1
|
|
925
|
+
* @param address2
|
|
926
|
+
*/
|
|
927
|
+
declare const compareAddresses: (address1?: string, address2?: string) => boolean;
|
|
928
|
+
declare const compareListOfAddresses: (add1: string[], add2: string[]) => boolean;
|
|
929
|
+
declare const regexPattern: () => RegExp;
|
|
930
|
+
declare const isValidAddress: (addr: string | undefined | null) => boolean;
|
|
931
|
+
declare const leftPadWithZeros: (str: string, length: number) => string;
|
|
932
|
+
|
|
933
|
+
type TransactionToastProps = {
|
|
934
|
+
isOpen: boolean;
|
|
935
|
+
onClose: () => void;
|
|
936
|
+
status: string;
|
|
937
|
+
txReceipt: any;
|
|
938
|
+
resetStatus: () => void;
|
|
939
|
+
error?: TransactionStatusErrorType;
|
|
940
|
+
};
|
|
941
|
+
declare const TransactionToast: ({ isOpen, onClose, status, txReceipt, error, resetStatus, }: TransactionToastProps) => react_jsx_runtime.JSX.Element | null;
|
|
942
|
+
|
|
943
|
+
type Props$j = {
|
|
944
|
+
isOpen: boolean;
|
|
945
|
+
onClose: () => void;
|
|
946
|
+
};
|
|
947
|
+
declare const AccountModal: ({ isOpen, onClose }: Props$j) => react_jsx_runtime.JSX.Element;
|
|
948
|
+
|
|
949
|
+
type Wallet = {
|
|
950
|
+
address: string;
|
|
951
|
+
domain: string | undefined;
|
|
952
|
+
image: string;
|
|
953
|
+
};
|
|
954
|
+
type SmartAccount = Wallet & {
|
|
955
|
+
isDeployed: boolean;
|
|
956
|
+
owner: string;
|
|
957
|
+
};
|
|
958
|
+
type ConnectionSource = {
|
|
959
|
+
type: 'privy' | 'wallet' | 'privy-cross-app';
|
|
960
|
+
displayName: string;
|
|
961
|
+
};
|
|
962
|
+
type UseWalletReturnType = {
|
|
963
|
+
wallet: Wallet;
|
|
964
|
+
embeddedWallet: Wallet;
|
|
965
|
+
crossAppWallet: Wallet;
|
|
966
|
+
smartAccount: SmartAccount;
|
|
967
|
+
selectedAccount: Wallet;
|
|
968
|
+
connectedWallet: Wallet;
|
|
969
|
+
privyUser: User | null;
|
|
970
|
+
connection: {
|
|
971
|
+
isConnected: boolean;
|
|
972
|
+
isConnectedWithPrivy: boolean;
|
|
973
|
+
isConnectedWithDappKit: boolean;
|
|
974
|
+
isConnectedWithCrossAppPrivy: boolean;
|
|
975
|
+
isLoadingPrivyConnection: boolean;
|
|
976
|
+
source: ConnectionSource;
|
|
977
|
+
isInAppBrowser: boolean;
|
|
978
|
+
};
|
|
979
|
+
disconnect: () => Promise<void>;
|
|
980
|
+
};
|
|
981
|
+
declare const useWallet: () => UseWalletReturnType;
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Poll the chain for a transaction receipt until it is found (or timeout after 5 blocks)
|
|
985
|
+
* @param thor Thor instance
|
|
986
|
+
* @param id Transaction id
|
|
987
|
+
* @param blocksTimeout Number of blocks to wait for the receipt
|
|
988
|
+
* @returns Transaction receipt
|
|
989
|
+
*/
|
|
990
|
+
declare const pollForReceipt: (thor: Connex.Thor, id?: string, blocksTimeout?: number) => Promise<Connex.Thor.Transaction.Receipt>;
|
|
991
|
+
/**
|
|
992
|
+
* Get the tx receipt of a tx id with a block timeout to wait for the receipt
|
|
993
|
+
* @param txId The tx id to get the receipt
|
|
994
|
+
* @param blockTimeout The block timeout to wait for the receipt
|
|
995
|
+
* @returns The tx receipt
|
|
996
|
+
*/
|
|
997
|
+
declare const useTxReceipt: (txId?: string, blockTimeout?: number) => {
|
|
998
|
+
data: Connex.Thor.Transaction.Receipt | null | undefined;
|
|
999
|
+
error: Error | null;
|
|
1000
|
+
isLoading: boolean;
|
|
1001
|
+
};
|
|
1002
|
+
|
|
1003
|
+
interface SmartAccountContextType {
|
|
1004
|
+
address: string | undefined;
|
|
1005
|
+
owner: string | undefined;
|
|
1006
|
+
embeddedWallet: ConnectedWallet | undefined;
|
|
1007
|
+
isDeployed: boolean;
|
|
1008
|
+
sendTransaction: (tx: {
|
|
1009
|
+
txClauses: Connex.VM.Clause[];
|
|
1010
|
+
title?: string;
|
|
1011
|
+
description?: string;
|
|
1012
|
+
buttonText?: string;
|
|
1013
|
+
}) => Promise<string>;
|
|
1014
|
+
exportWallet: () => Promise<void>;
|
|
1015
|
+
thor: ThorClient;
|
|
1016
|
+
nodeUrl: string;
|
|
1017
|
+
delegatorUrl: string;
|
|
1018
|
+
accountFactory: string;
|
|
1019
|
+
delegateAllTransactions: boolean;
|
|
1020
|
+
chainId: string;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* This provider is responsible for retrieving the smart account address
|
|
1024
|
+
* of a Privy wallet and providing the necessary context for the smart account.
|
|
1025
|
+
* Upon initialization this provider will execute a few useEffect hooks to:
|
|
1026
|
+
* - retrieve the smart account address of the embedded wallet
|
|
1027
|
+
* - retrieve the chain id
|
|
1028
|
+
* - check if the smart account is deployed
|
|
1029
|
+
*
|
|
1030
|
+
* It also provides a function to send transactions on vechain by asking the privy wallet
|
|
1031
|
+
* to sign the transaction and then forwarding the transaction to the node api.
|
|
1032
|
+
* When sending a transaction this provider will check if the smart account is deployed and if not,
|
|
1033
|
+
* it will deploy it.
|
|
1034
|
+
*/
|
|
1035
|
+
declare const SmartAccountProvider: ({ children, nodeUrl, delegatorUrl, delegateAllTransactions, }: {
|
|
1036
|
+
children: React__default.ReactNode;
|
|
1037
|
+
nodeUrl: string;
|
|
1038
|
+
delegatorUrl: string;
|
|
1039
|
+
delegateAllTransactions: boolean;
|
|
1040
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1041
|
+
declare const useSmartAccount: () => SmartAccountContextType;
|
|
1042
|
+
|
|
1043
|
+
interface SmartAccountAddressResult {
|
|
1044
|
+
address: string | undefined;
|
|
1045
|
+
}
|
|
1046
|
+
declare const getSmartAccountAddress: (ownerAddress?: string) => Promise<SmartAccountAddressResult>;
|
|
1047
|
+
declare const getSmartAccountAddressQueryKey: (ownerAddress?: string) => (string | undefined)[];
|
|
1048
|
+
/**
|
|
1049
|
+
* Hook to get the smart account address for a given owner address
|
|
1050
|
+
* @param ownerAddress The address of the smart account owner
|
|
1051
|
+
* @returns The smart account address and loading/error states
|
|
1052
|
+
*/
|
|
1053
|
+
declare const useGetSmartAccountAddress: (ownerAddress?: string) => _tanstack_react_query.UseQueryResult<SmartAccountAddressResult, Error>;
|
|
1054
|
+
|
|
1055
|
+
declare const getAccountBalance: (thor: Connex.Thor, address?: string) => Promise<{
|
|
1056
|
+
balance: string;
|
|
1057
|
+
energy: string;
|
|
1058
|
+
}>;
|
|
1059
|
+
declare const getAccountBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1060
|
+
/**
|
|
1061
|
+
* Get the account balance for the given address
|
|
1062
|
+
* @param address The address of the account to get the balance for
|
|
1063
|
+
* @returns The account balance
|
|
1064
|
+
*/
|
|
1065
|
+
declare const useAccountBalance: (address?: string) => _tanstack_react_query.UseQueryResult<{
|
|
1066
|
+
balance: string;
|
|
1067
|
+
energy: string;
|
|
1068
|
+
}, Error>;
|
|
1069
|
+
|
|
1070
|
+
declare const PRICE_FEED_IDS: {
|
|
1071
|
+
readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
|
|
1072
|
+
readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
|
|
1073
|
+
readonly VTHO: "0x7674686f2d757364000000000000000000000000000000000000000000000000";
|
|
1074
|
+
};
|
|
1075
|
+
type SupportedToken = keyof typeof PRICE_FEED_IDS;
|
|
1076
|
+
declare const getTokenUsdPrice: (thor: Connex.Thor, token: SupportedToken) => Promise<number>;
|
|
1077
|
+
declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
|
|
1078
|
+
declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query.UseQueryResult<number, Error>;
|
|
1079
|
+
|
|
1080
|
+
declare const getB3trBalance: (thor: Connex.Thor, address?: string) => Promise<string>;
|
|
1081
|
+
declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1082
|
+
declare const useGetB3trBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1083
|
+
|
|
1084
|
+
declare const getVot3Balance: (thor: Connex.Thor, address?: string) => Promise<string>;
|
|
1085
|
+
declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1086
|
+
declare const useGetVot3Balance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1087
|
+
|
|
1088
|
+
declare const useBalances: () => {
|
|
1089
|
+
isLoading: boolean;
|
|
1090
|
+
balances: {
|
|
1091
|
+
vet: number;
|
|
1092
|
+
vtho: number;
|
|
1093
|
+
b3tr: number;
|
|
1094
|
+
vot3: number;
|
|
1095
|
+
veDelegate: number;
|
|
1096
|
+
};
|
|
1097
|
+
prices: {
|
|
1098
|
+
vet: number;
|
|
1099
|
+
vtho: number;
|
|
1100
|
+
b3tr: number;
|
|
1101
|
+
};
|
|
1102
|
+
totalBalance: number;
|
|
1103
|
+
};
|
|
1104
|
+
|
|
1105
|
+
declare const getVeDelegateBalance: (thor: Connex.Thor, address?: string) => Promise<string>;
|
|
1106
|
+
declare const getVeDelegateBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1107
|
+
declare const useGetVeDelegateBalance: (address?: string) => _tanstack_react_query.UseQueryResult<string, Error>;
|
|
1108
|
+
|
|
1109
|
+
interface PrivyAppInfo {
|
|
1110
|
+
id: string;
|
|
1111
|
+
name: string;
|
|
1112
|
+
logo_url: string;
|
|
1113
|
+
icon_url: string | null;
|
|
1114
|
+
terms_and_conditions_url: string;
|
|
1115
|
+
privacy_policy_url: string;
|
|
1116
|
+
theme: string;
|
|
1117
|
+
accent_color: string;
|
|
1118
|
+
wallet_auth: boolean;
|
|
1119
|
+
email_auth: boolean;
|
|
1120
|
+
google_oauth: boolean;
|
|
1121
|
+
twitter_oauth: boolean;
|
|
1122
|
+
}
|
|
1123
|
+
declare const fetchPrivyAppInfo: (appId: string) => Promise<PrivyAppInfo>;
|
|
1124
|
+
declare const getPrivyAppInfoQueryKey: (appIds: string | string[]) => string[];
|
|
1125
|
+
declare const useFetchAppInfo: (appIds: string | string[]) => _tanstack_react_query.UseQueryResult<{
|
|
1126
|
+
[k: string]: PrivyAppInfo;
|
|
1127
|
+
}, Error>;
|
|
1128
|
+
|
|
1129
|
+
interface VeChainDomainResult$1 {
|
|
1130
|
+
address?: string;
|
|
1131
|
+
domain?: string;
|
|
1132
|
+
isValidAddressOrDomain: boolean;
|
|
1133
|
+
isLoading: boolean;
|
|
1134
|
+
}
|
|
1135
|
+
declare const getVetDomainQueryKey: (addressOrDomain: string) => string[];
|
|
1136
|
+
declare const useGetVetDomain: (addressOrDomain: string) => _tanstack_react_query.UseQueryResult<VeChainDomainResult$1, Error>;
|
|
1137
|
+
|
|
1138
|
+
interface VeChainDomainResult {
|
|
1139
|
+
address?: string;
|
|
1140
|
+
domain?: string;
|
|
1141
|
+
isValidAddressOrDomain: boolean;
|
|
1142
|
+
isLoading: boolean;
|
|
1143
|
+
}
|
|
1144
|
+
interface CachedVeChainDomainResult {
|
|
1145
|
+
domainResult: VeChainDomainResult;
|
|
1146
|
+
getCachedDomain: () => string | null;
|
|
1147
|
+
saveCachedDomain: (domain: string) => void;
|
|
1148
|
+
}
|
|
1149
|
+
declare const useCachedVeChainDomain: (address: string) => CachedVeChainDomainResult;
|
|
1150
|
+
|
|
1151
|
+
declare const useConnectModal: () => {
|
|
1152
|
+
open: () => void;
|
|
1153
|
+
close: () => void;
|
|
1154
|
+
isOpen: boolean;
|
|
1155
|
+
};
|
|
1156
|
+
declare const ConnectModalProvider: ({ children }: {
|
|
1157
|
+
children: ReactNode;
|
|
1158
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1159
|
+
|
|
1160
|
+
declare const useAccountModal: () => {
|
|
1161
|
+
open: () => void;
|
|
1162
|
+
close: () => void;
|
|
1163
|
+
isOpen: boolean;
|
|
1164
|
+
};
|
|
1165
|
+
declare const AccountModalProvider: ({ children }: {
|
|
1166
|
+
children: ReactNode;
|
|
1167
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1168
|
+
|
|
1169
|
+
/**
|
|
1170
|
+
* Props for the {@link useSendTransaction} hook
|
|
1171
|
+
* @param signerAccountAddress the signer account to use
|
|
1172
|
+
* @param clauses clauses to send in the transaction
|
|
1173
|
+
* @param onTxConfirmed callback to run when the tx is confirmed
|
|
1174
|
+
* @param onTxFailedOrCancelled callback to run when the tx fails or is cancelled
|
|
1175
|
+
* @param suggestedMaxGas the suggested max gas for the transaction
|
|
1176
|
+
*/
|
|
1177
|
+
type UseSendTransactionProps = {
|
|
1178
|
+
signerAccountAddress?: string | null;
|
|
1179
|
+
clauses?: EnhancedClause[] | (() => EnhancedClause[]) | (() => Promise<EnhancedClause[]>);
|
|
1180
|
+
onTxConfirmed?: () => void | Promise<void>;
|
|
1181
|
+
onTxFailedOrCancelled?: () => void | Promise<void>;
|
|
1182
|
+
suggestedMaxGas?: number;
|
|
1183
|
+
privyUIOptions?: {
|
|
1184
|
+
title?: string;
|
|
1185
|
+
description?: string;
|
|
1186
|
+
buttonText?: string;
|
|
1187
|
+
};
|
|
1188
|
+
};
|
|
1189
|
+
/**
|
|
1190
|
+
* Return value of the {@link useSendTransaction} hook
|
|
1191
|
+
* @param sendTransaction function to trigger the transaction
|
|
1192
|
+
* @param isTransactionPending boolean indicating if the transaction is waiting for the wallet to sign it
|
|
1193
|
+
* @param txReceipt the transaction receipt
|
|
1194
|
+
* @param status the status of the transaction (see {@link TransactionStatus})
|
|
1195
|
+
* @param resetStatus function to reset the status to "ready"
|
|
1196
|
+
* @param error error that occurred while sending the transaction
|
|
1197
|
+
*/
|
|
1198
|
+
type UseSendTransactionReturnValue = {
|
|
1199
|
+
sendTransaction: (clauses?: EnhancedClause[]) => Promise<void>;
|
|
1200
|
+
isTransactionPending: boolean;
|
|
1201
|
+
txReceipt: Connex.Thor.Transaction.Receipt | null;
|
|
1202
|
+
status: TransactionStatus;
|
|
1203
|
+
resetStatus: () => void;
|
|
1204
|
+
error?: TransactionStatusErrorType;
|
|
1205
|
+
};
|
|
1206
|
+
/**
|
|
1207
|
+
* Generic hook to send a transaction using connex.
|
|
1208
|
+
* This hook supports both Privy and VeChain wallets.
|
|
1209
|
+
*
|
|
1210
|
+
* It returns a function to send the transaction and a status to indicate the state
|
|
1211
|
+
* of the transaction (together with the transaction id).
|
|
1212
|
+
*
|
|
1213
|
+
* @param signerAccount the signer account to use
|
|
1214
|
+
* @param clauses clauses to send in the transaction
|
|
1215
|
+
* @param onTxConfirmed callback to run when the tx is confirmed
|
|
1216
|
+
* @param onTxFailedOrCancelled callback to run when the tx fails or is cancelled
|
|
1217
|
+
* @param suggestedMaxGas the suggested max gas for the transaction
|
|
1218
|
+
* @param privyUIOptions options to pass to the Privy UI
|
|
1219
|
+
* @returns see {@link UseSendTransactionReturnValue}
|
|
1220
|
+
*/
|
|
1221
|
+
declare const useSendTransaction: ({ signerAccountAddress, clauses, onTxConfirmed, onTxFailedOrCancelled, suggestedMaxGas, privyUIOptions, }: UseSendTransactionProps) => UseSendTransactionReturnValue;
|
|
1222
|
+
|
|
1223
|
+
type useTransferERC20Props = {
|
|
1224
|
+
fromAddress: string;
|
|
1225
|
+
receiverAddress: string;
|
|
1226
|
+
amount: string;
|
|
1227
|
+
tokenAddress: string;
|
|
1228
|
+
tokenName: string;
|
|
1229
|
+
onSuccess?: () => void;
|
|
1230
|
+
onSuccessMessageTitle?: number;
|
|
1231
|
+
};
|
|
1232
|
+
type useTransferERC20ReturnValue = {
|
|
1233
|
+
sendTransaction: () => Promise<void>;
|
|
1234
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
1235
|
+
declare const useTransferERC20: ({ fromAddress, receiverAddress, amount, tokenAddress, tokenName, onSuccess, }: useTransferERC20Props) => useTransferERC20ReturnValue;
|
|
1236
|
+
|
|
1237
|
+
type useTransferVETProps = {
|
|
1238
|
+
fromAddress: string;
|
|
1239
|
+
receiverAddress: string;
|
|
1240
|
+
amount: string;
|
|
1241
|
+
onSuccess?: () => void;
|
|
1242
|
+
};
|
|
1243
|
+
type useTransferVETReturnValue = {
|
|
1244
|
+
sendTransaction: () => Promise<void>;
|
|
1245
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
1246
|
+
declare const useTransferVET: ({ fromAddress, receiverAddress, amount, onSuccess, }: useTransferVETProps) => useTransferVETReturnValue;
|
|
1247
|
+
|
|
1248
|
+
declare const useRefreshBalances: () => {
|
|
1249
|
+
refresh: () => Promise<void>;
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
type AccountModalContentTypes = 'main' | 'settings' | 'smart-account' | 'accounts' | 'send-token' | 'receive-token' | {
|
|
1253
|
+
type: 'send-token-summary';
|
|
1254
|
+
props: {
|
|
1255
|
+
toAddressOrDomain: string;
|
|
1256
|
+
resolvedDomain?: string;
|
|
1257
|
+
resolvedAddress?: string;
|
|
1258
|
+
amount: string;
|
|
1259
|
+
selectedToken: {
|
|
1260
|
+
symbol: string;
|
|
1261
|
+
balance: string;
|
|
1262
|
+
address: string;
|
|
1263
|
+
numericBalance: number;
|
|
1264
|
+
price: number;
|
|
1265
|
+
};
|
|
1266
|
+
onSend: (address: string, amount: string) => void;
|
|
1267
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
type Props$i = {
|
|
1272
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1273
|
+
onClose: () => void;
|
|
1274
|
+
wallet: Wallet;
|
|
1275
|
+
};
|
|
1276
|
+
declare const AccountMainContent: ({ setCurrentContent, wallet }: Props$i) => react_jsx_runtime.JSX.Element;
|
|
1277
|
+
|
|
1278
|
+
type Props$h = {
|
|
1279
|
+
setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
|
|
1280
|
+
onClose: () => void;
|
|
1281
|
+
wallet?: Wallet;
|
|
1282
|
+
};
|
|
1283
|
+
declare const AccountsListContent: ({ setCurrentContent, onClose }: Props$h) => react_jsx_runtime.JSX.Element;
|
|
1284
|
+
|
|
1285
|
+
type Props$g = {
|
|
1286
|
+
setCurrentContent: React__default.Dispatch<React__default.SetStateAction<AccountModalContentTypes>>;
|
|
1287
|
+
};
|
|
1288
|
+
declare const SmartAccountContent: ({ setCurrentContent }: Props$g) => react_jsx_runtime.JSX.Element;
|
|
1289
|
+
|
|
1290
|
+
type Props$f = {
|
|
1291
|
+
setCurrentContent: (content: AccountModalContentTypes) => void;
|
|
1292
|
+
onLogoutSuccess: () => void;
|
|
1293
|
+
};
|
|
1294
|
+
declare const WalletSettingsContent: ({ setCurrentContent, onLogoutSuccess, }: Props$f) => react_jsx_runtime.JSX.Element;
|
|
1295
|
+
|
|
1296
|
+
type Props$e = {
|
|
1297
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1298
|
+
onSend: (address: string, amount: string) => void;
|
|
1299
|
+
};
|
|
1300
|
+
declare const SendTokenContent: ({ setCurrentContent, onSend }: Props$e) => react_jsx_runtime.JSX.Element;
|
|
1301
|
+
|
|
1302
|
+
type Props$d = {
|
|
1303
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1304
|
+
onSend: (address: string, amount: string) => void;
|
|
1305
|
+
toAddressOrDomain: string;
|
|
1306
|
+
resolvedDomain?: string;
|
|
1307
|
+
resolvedAddress?: string;
|
|
1308
|
+
amount: string;
|
|
1309
|
+
selectedToken: {
|
|
1310
|
+
symbol: string;
|
|
1311
|
+
balance: string;
|
|
1312
|
+
address: string;
|
|
1313
|
+
numericBalance: number;
|
|
1314
|
+
price: number;
|
|
1315
|
+
};
|
|
1316
|
+
};
|
|
1317
|
+
declare const SendTokenSummaryContent: ({ setCurrentContent, toAddressOrDomain, resolvedDomain, resolvedAddress, amount, selectedToken, }: Props$d) => react_jsx_runtime.JSX.Element;
|
|
1318
|
+
|
|
1319
|
+
type Token = {
|
|
1320
|
+
symbol: string;
|
|
1321
|
+
balance: string;
|
|
1322
|
+
address: string;
|
|
1323
|
+
numericBalance: number;
|
|
1324
|
+
price: number;
|
|
1325
|
+
};
|
|
1326
|
+
type Props$c = {
|
|
1327
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1328
|
+
onSelectToken: (token: Token) => void;
|
|
1329
|
+
onBack: () => void;
|
|
1330
|
+
};
|
|
1331
|
+
declare const SelectTokenContent: ({ onSelectToken, onBack }: Props$c) => react_jsx_runtime.JSX.Element;
|
|
1332
|
+
|
|
1333
|
+
type Props$b = {
|
|
1334
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1335
|
+
};
|
|
1336
|
+
declare const ReceiveTokenContent: ({ setCurrentContent }: Props$b) => react_jsx_runtime.JSX.Element;
|
|
1337
|
+
|
|
1338
|
+
interface AccountDetailsButtonProps {
|
|
1339
|
+
title: string;
|
|
1340
|
+
address: string;
|
|
1341
|
+
onClick: () => void;
|
|
1342
|
+
leftIcon?: ElementType;
|
|
1343
|
+
rightIcon?: ElementType;
|
|
1344
|
+
leftImage?: string;
|
|
1345
|
+
backgroundColor?: string;
|
|
1346
|
+
border?: string;
|
|
1347
|
+
isActive?: boolean;
|
|
1348
|
+
}
|
|
1349
|
+
declare const AccountDetailsButton: ({ leftIcon, rightIcon, title, address, onClick, leftImage, isActive, }: AccountDetailsButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1350
|
+
|
|
1351
|
+
interface ActionButtonProps {
|
|
1352
|
+
title: string;
|
|
1353
|
+
description: string;
|
|
1354
|
+
onClick: () => void;
|
|
1355
|
+
leftIcon?: ElementType;
|
|
1356
|
+
rightIcon?: ElementType;
|
|
1357
|
+
leftImage?: string;
|
|
1358
|
+
backgroundColor?: string;
|
|
1359
|
+
border?: string;
|
|
1360
|
+
hide?: boolean;
|
|
1361
|
+
showComingSoon?: boolean;
|
|
1362
|
+
}
|
|
1363
|
+
declare const ActionButton: ({ leftIcon, rightIcon, title, description, onClick, leftImage, hide, showComingSoon, backgroundColor, }: ActionButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1364
|
+
|
|
1365
|
+
type Props$a = {
|
|
1366
|
+
wallet: Wallet;
|
|
1367
|
+
size?: string;
|
|
1368
|
+
onClick?: () => void;
|
|
1369
|
+
};
|
|
1370
|
+
declare const AccountSelector: ({ wallet, size, onClick }: Props$a) => react_jsx_runtime.JSX.Element;
|
|
1371
|
+
|
|
1372
|
+
declare const BalanceSection: ({ mb }: {
|
|
1373
|
+
mb?: number;
|
|
1374
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1375
|
+
|
|
1376
|
+
declare const AssetsSection: () => react_jsx_runtime.JSX.Element;
|
|
1377
|
+
|
|
1378
|
+
type Props$9 = {
|
|
1379
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
1380
|
+
};
|
|
1381
|
+
declare const QuickActionsSection: ({ setCurrentContent }: Props$9) => react_jsx_runtime.JSX.Element;
|
|
1382
|
+
|
|
1383
|
+
type Props$8 = {
|
|
1384
|
+
children: ReactNode;
|
|
1385
|
+
};
|
|
1386
|
+
declare const FadeInView: ({ children }: Props$8) => react_jsx_runtime.JSX.Element;
|
|
1387
|
+
|
|
1388
|
+
type Props$7 = {
|
|
1389
|
+
children: ReactNode;
|
|
1390
|
+
};
|
|
1391
|
+
declare const FadeInViewFromBottom: ({ children }: Props$7) => react_jsx_runtime.JSX.Element;
|
|
1392
|
+
|
|
1393
|
+
type Props$6 = {
|
|
1394
|
+
children: ReactNode;
|
|
1395
|
+
};
|
|
1396
|
+
declare const FadeInViewFromLeft: ({ children }: Props$6) => react_jsx_runtime.JSX.Element;
|
|
1397
|
+
|
|
1398
|
+
type Props$5 = {
|
|
1399
|
+
children: ReactNode;
|
|
1400
|
+
};
|
|
1401
|
+
declare const FadeInViewFromRight: ({ children }: Props$5) => react_jsx_runtime.JSX.Element;
|
|
1402
|
+
|
|
1403
|
+
type BackButtonProps = {
|
|
1404
|
+
onClick: () => void;
|
|
1405
|
+
} & Partial<IconButtonProps>;
|
|
1406
|
+
declare const ModalBackButton: ({ onClick, ...props }: BackButtonProps) => react_jsx_runtime.JSX.Element;
|
|
1407
|
+
|
|
1408
|
+
type Props$4 = {
|
|
1409
|
+
wallet: Wallet;
|
|
1410
|
+
label?: string;
|
|
1411
|
+
size?: string;
|
|
1412
|
+
};
|
|
1413
|
+
declare const AddressDisplay: ({ wallet, label, size }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
1414
|
+
|
|
1415
|
+
type Props$3 = {} & Omit<StackProps, 'dangerouslySetInnerHTML'>;
|
|
1416
|
+
declare const VersionFooter: ({ ...props }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
1417
|
+
|
|
1418
|
+
type Props$2 = {
|
|
1419
|
+
children: React.ReactNode;
|
|
1420
|
+
};
|
|
1421
|
+
declare const StickyHeaderContainer: ({ children }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
1422
|
+
|
|
1423
|
+
type Props$1 = {
|
|
1424
|
+
children: React.ReactNode;
|
|
1425
|
+
};
|
|
1426
|
+
declare const StickyFooterContainer: ({ children }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
1427
|
+
|
|
1428
|
+
type LoginLoadingModalProps = {
|
|
1429
|
+
isOpen: boolean;
|
|
1430
|
+
onClose: () => void;
|
|
1431
|
+
};
|
|
1432
|
+
declare const LoginLoadingModal: ({ isOpen, onClose, }: LoginLoadingModalProps) => react_jsx_runtime.JSX.Element;
|
|
1433
|
+
|
|
1434
|
+
type Props = {
|
|
1435
|
+
children: ReactNode;
|
|
1436
|
+
privyConfig: {
|
|
1437
|
+
appId: string;
|
|
1438
|
+
clientId: string;
|
|
1439
|
+
appearance: {
|
|
1440
|
+
walletList: WalletListEntry[];
|
|
1441
|
+
theme: 'dark' | 'light';
|
|
1442
|
+
accentColor: `#${string}`;
|
|
1443
|
+
loginMessage: string;
|
|
1444
|
+
logo: string;
|
|
1445
|
+
};
|
|
1446
|
+
embeddedWallets?: {
|
|
1447
|
+
createOnLogin: 'users-without-wallets' | 'all-users' | 'off';
|
|
1448
|
+
};
|
|
1449
|
+
loginMethods: PrivyLoginMethod[];
|
|
1450
|
+
ecosystemAppsID?: string[];
|
|
1451
|
+
allowPasskeyLinking?: boolean;
|
|
1452
|
+
};
|
|
1453
|
+
feeDelegationConfig: {
|
|
1454
|
+
delegatorUrl: string;
|
|
1455
|
+
delegateAllTransactions: boolean;
|
|
1456
|
+
};
|
|
1457
|
+
dappKitConfig: DAppKitUIOptions;
|
|
1458
|
+
};
|
|
1459
|
+
type DAppKitPrivyConfig = {
|
|
1460
|
+
privyConfig: Props['privyConfig'];
|
|
1461
|
+
feeDelegationConfig: Props['feeDelegationConfig'];
|
|
1462
|
+
dappKitConfig: Props['dappKitConfig'];
|
|
1463
|
+
openConnectModal: () => void;
|
|
1464
|
+
closeConnectModal: () => void;
|
|
1465
|
+
isConnectModalOpen: boolean;
|
|
1466
|
+
openAccountModal: () => void;
|
|
1467
|
+
closeAccountModal: () => void;
|
|
1468
|
+
isAccountModalOpen: boolean;
|
|
1469
|
+
};
|
|
1470
|
+
/**
|
|
1471
|
+
* Context to store the Privy and DAppKit configs so that they can be used by the hooks/components
|
|
1472
|
+
*/
|
|
1473
|
+
declare const DAppKitPrivyContext: React$1.Context<DAppKitPrivyConfig | null>;
|
|
1474
|
+
/**
|
|
1475
|
+
* Hook to get the Privy and DAppKit configs
|
|
1476
|
+
*/
|
|
1477
|
+
declare const useDAppKitPrivyConfig: () => DAppKitPrivyConfig;
|
|
1478
|
+
/**
|
|
1479
|
+
* Provider to wrap the application with Privy and DAppKit
|
|
1480
|
+
*/
|
|
1481
|
+
declare const DAppKitPrivyProvider: ({ children, privyConfig, feeDelegationConfig, dappKitConfig, }: Omit<Props, "queryClient">) => react_jsx_runtime.JSX.Element;
|
|
1482
|
+
|
|
1483
|
+
export { ACCOUNT_FACTORY_ADDRESSES, AccountDetailsButton, AccountMainContent, AccountModal, type AccountModalContentTypes, AccountModalProvider, AccountSelector, AccountsListContent, ActionButton, AddressDisplay, AssetsSection, BalanceSection, ConnectModal, type ConnectModalContents, ConnectModalProvider, ConnectionButton, type ConnectionSource, DAppKitPrivyContext, DAppKitPrivyProvider, DELEGATOR_URL, EXPLORER_URL, EcosystemContent, EmailLoginButton, type EnhancedClause, type ExecuteWithAuthorizationSignData, FadeInView, FadeInViewFromBottom, FadeInViewFromLeft, FadeInViewFromRight, GoogleLogo, LoginLoadingModal, MainContent, ModalBackButton, NETWORK_URL, PRICE_FEED_IDS, type PrivyAppInfo$1 as PrivyAppInfo, type PrivyLoginMethod, QuickActionsSection, ReceiveTokenContent, SOCIAL_INFOS, SelectTokenContent, SendTokenContent, SendTokenSummaryContent, SimpleAccountABI, SimpleAccountFactoryABI, type SmartAccount, SmartAccountContent, type SmartAccountContextType, SmartAccountProvider, type SocialInfo, StickyFooterContainer, StickyHeaderContainer, type SupportedToken, THOR_CLIENT, TOKEN_LOGOS, TransactionModal, type TransactionModalProps, type TransactionStatus, type TransactionStatusErrorType, TransactionToast, TwitterLogo, type UseSendTransactionReturnValue, type UseWalletReturnType, VECHAIN_PRIVY_APP_ID, VechainLogo, VechainLogoHorizontal, VersionFooter, WALLET_INFOS, type Wallet, WalletButton, WalletSettingsContent, compareAddresses, compareListOfAddresses, fetchPrivyAppInfo, getAccountBalance, getAccountBalanceQueryKey, getB3trBalance, getB3trBalanceQueryKey, getPicassoImage, getPrivyAppInfoQueryKey, getSmartAccountAddress, getSmartAccountAddressQueryKey, getTokenUsdPrice, getTokenUsdPriceQueryKey, getVeDelegateBalance, getVeDelegateBalanceQueryKey, getVetDomainQueryKey, getVot3Balance, getVot3BalanceQueryKey, humanAddress, humanDomain, isValidAddress, leftPadWithZeros, pollForReceipt, randomTransactionUser, regexPattern, useAccountBalance, useAccountModal, useBalances, useCachedVeChainDomain, useConnectModal, useDAppKitPrivyConfig, useFetchAppInfo, useGetB3trBalance, useGetSmartAccountAddress, useGetTokenUsdPrice, useGetVeDelegateBalance, useGetVetDomain, useGetVot3Balance, useRefreshBalances, useSendTransaction, useSmartAccount, useTransferERC20, useTransferVET, useTxReceipt, useWallet };
|