@vechain/vechain-kit 2.0.0-rc.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -5
- package/dist/assets/index.cjs +1 -104
- package/dist/assets/index.d.cts +2 -1158
- package/dist/assets/index.d.mts +2 -0
- package/dist/assets/index.mjs +1 -0
- package/dist/assets-DXVXPy3w.cjs +47 -0
- package/dist/assets-DXVXPy3w.cjs.map +1 -0
- package/dist/assets-aAdDxPJu.mjs +38 -0
- package/dist/assets-aAdDxPJu.mjs.map +1 -0
- package/dist/index-CWViOs1U.d.mts +136 -0
- package/dist/index-CWViOs1U.d.mts.map +1 -0
- package/dist/index-Ch2ZKl9r.d.mts +3965 -0
- package/dist/index-Ch2ZKl9r.d.mts.map +1 -0
- package/dist/index-D0cyivl4.d.cts +136 -0
- package/dist/index-D0cyivl4.d.cts.map +1 -0
- package/dist/index-ur27qfX4.d.cts +3965 -0
- package/dist/index-ur27qfX4.d.cts.map +1 -0
- package/dist/index.cjs +180 -20660
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2224
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +195 -0
- package/dist/index.mjs.map +1 -0
- package/dist/utils/index.cjs +1 -265
- package/dist/utils/index.d.cts +3 -261
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.mjs +1 -0
- package/dist/utils-Bl-JeVTg.cjs +2 -0
- package/dist/utils-Bl-JeVTg.cjs.map +1 -0
- package/dist/utils-DAs6kMGs.mjs +2 -0
- package/dist/utils-DAs6kMGs.mjs.map +1 -0
- package/package.json +155 -104
- package/dist/assets/index.cjs.map +0 -1
- package/dist/assets/index.d.ts +0 -1158
- package/dist/assets/index.js +0 -3
- package/dist/assets/index.js.map +0 -1
- package/dist/chunk-BCEQ6QWT.js +0 -863
- package/dist/chunk-BCEQ6QWT.js.map +0 -1
- package/dist/chunk-EESC6JDT.cjs +0 -1897
- package/dist/chunk-EESC6JDT.cjs.map +0 -1
- package/dist/chunk-M6WTSZ5C.cjs +0 -939
- package/dist/chunk-M6WTSZ5C.cjs.map +0 -1
- package/dist/chunk-Z4FE6MMP.js +0 -1872
- package/dist/chunk-Z4FE6MMP.js.map +0 -1
- package/dist/index.d.ts +0 -2224
- package/dist/index.js +0 -20322
- package/dist/index.js.map +0 -1
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
- package/dist/thorUtils-IptLtkeL.d.cts +0 -230
- package/dist/thorUtils-IptLtkeL.d.ts +0 -230
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.ts +0 -261
- package/dist/utils/index.js +0 -4
- package/dist/utils/index.js.map +0 -1
|
@@ -0,0 +1,3965 @@
|
|
|
1
|
+
import { ButtonProps, IconButtonProps, ImageProps, PropsOf, StackProps, ThemeTypings, VStack } from "@chakra-ui/react";
|
|
2
|
+
import * as react0 from "react";
|
|
3
|
+
import React$1, { ElementType, ReactElement, ReactNode } from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as _vechain_sdk_network0 from "@vechain/sdk-network";
|
|
6
|
+
import { CompressedBlockDetail, EventLogs, FilterEventLogsOptions, ThorClient, ThorClient as ThorClient$1, TransactionReceipt } from "@vechain/sdk-network";
|
|
7
|
+
import { LoginMethodOrderOption, OAuthProviderType, SignTypedDataParams, User, WalletListEntry, useMfaEnrollment, usePrivy, useSetWalletRecovery } from "@privy-io/react-auth";
|
|
8
|
+
import * as _vechain_sdk_core0 from "@vechain/sdk-core";
|
|
9
|
+
import { Address, Certificate, CertificateData, Clause, Transaction, TransactionClause } from "@vechain/sdk-core";
|
|
10
|
+
import { LogLevel, WalletSource } from "@vechain/dapp-kit";
|
|
11
|
+
import { WalletButton as DAppKitWalletButton, WalletConnectOptions, useThor, useWallet as useDAppKitWallet, useWalletModal as useDAppKitWalletModal } from "@vechain/dapp-kit-react";
|
|
12
|
+
import { CustomizedStyle, I18n, SourceInfo } from "@vechain/dapp-kit-ui";
|
|
13
|
+
import { IconType } from "react-icons";
|
|
14
|
+
import * as _tanstack_react_query8 from "@tanstack/react-query";
|
|
15
|
+
import { UseQueryOptions } from "@tanstack/react-query";
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import { CustomTokenInfo } from "@vechain/contract-getters";
|
|
18
|
+
import { Options } from "browser-image-compression";
|
|
19
|
+
import { Account } from "viem/accounts";
|
|
20
|
+
import * as abitype0 from "abitype";
|
|
21
|
+
import { AbiParametersToPrimitiveTypes, ExtractAbiFunction, ExtractAbiFunctionNames } from "abitype";
|
|
22
|
+
import { Abi, ContractEventName, ContractFunctionParameters, MulticallParameters, MulticallReturnType, decodeEventLog } from "viem";
|
|
23
|
+
import { UseFormRegister } from "react-hook-form";
|
|
24
|
+
|
|
25
|
+
//#region src/config/network.d.ts
|
|
26
|
+
/**
|
|
27
|
+
* The type of network that we are connected to (indentified by the genesis block)
|
|
28
|
+
* */
|
|
29
|
+
type NETWORK_TYPE = 'main' | 'test' | 'solo';
|
|
30
|
+
/**
|
|
31
|
+
* A model for the VechainThor network that we are connected to
|
|
32
|
+
* @field `id` - Unique ID for this network
|
|
33
|
+
* @field `defaultNet` - If the network is a default network
|
|
34
|
+
* @field `name` - A name for this network
|
|
35
|
+
* @field `type` - What type of network is it? `main, test, solo or custom`
|
|
36
|
+
* @field `urls` - A list of URLs for this network
|
|
37
|
+
* @field `currentUrl` - The current URL that we are connected to
|
|
38
|
+
* @field `explorerUrl` - The explorer URL for this network
|
|
39
|
+
* @field `genesis` - The genesis block for the network
|
|
40
|
+
* @field `blockTime` - The time it takes to mine a block in milliseconds
|
|
41
|
+
*/
|
|
42
|
+
type Network = {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultNet: boolean;
|
|
45
|
+
name: string;
|
|
46
|
+
type: NETWORK_TYPE;
|
|
47
|
+
urls: string[];
|
|
48
|
+
explorerUrl?: string;
|
|
49
|
+
genesis: typeof genesises.main;
|
|
50
|
+
blockTime: number;
|
|
51
|
+
};
|
|
52
|
+
declare const genesises: {
|
|
53
|
+
readonly main: CompressedBlockDetail;
|
|
54
|
+
readonly test: CompressedBlockDetail;
|
|
55
|
+
readonly solo: CompressedBlockDetail;
|
|
56
|
+
which(gid: string): "main" | "test" | "solo" | undefined;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/types/types.d.ts
|
|
60
|
+
type TokenBalance = {
|
|
61
|
+
original: string;
|
|
62
|
+
scaled: string;
|
|
63
|
+
formatted: string;
|
|
64
|
+
};
|
|
65
|
+
type ENSRecords = {
|
|
66
|
+
display?: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
email?: string;
|
|
69
|
+
url?: string;
|
|
70
|
+
header?: string;
|
|
71
|
+
notice?: string;
|
|
72
|
+
location?: string;
|
|
73
|
+
phone?: string;
|
|
74
|
+
[key: string]: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
type Wallet = {
|
|
77
|
+
address: string;
|
|
78
|
+
domain?: string;
|
|
79
|
+
image?: string;
|
|
80
|
+
isLoadingMetadata?: boolean;
|
|
81
|
+
metadata?: ENSRecords;
|
|
82
|
+
} | null;
|
|
83
|
+
type SmartAccount = Wallet & {
|
|
84
|
+
isDeployed: boolean;
|
|
85
|
+
isActive: boolean;
|
|
86
|
+
version: number | null;
|
|
87
|
+
};
|
|
88
|
+
type ConnectionSource = {
|
|
89
|
+
type: 'privy' | 'wallet' | 'privy-cross-app';
|
|
90
|
+
displayName: string;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Data that the Privy user must sign in order to execute a transaction
|
|
94
|
+
* by authorizing the Smart Account contract
|
|
95
|
+
*/
|
|
96
|
+
type ExecuteWithAuthorizationSignData = {
|
|
97
|
+
domain: {
|
|
98
|
+
name: string;
|
|
99
|
+
version: string;
|
|
100
|
+
chainId: number;
|
|
101
|
+
verifyingContract: string;
|
|
102
|
+
};
|
|
103
|
+
types: {
|
|
104
|
+
ExecuteWithAuthorization: {
|
|
105
|
+
name: string;
|
|
106
|
+
type: string;
|
|
107
|
+
}[];
|
|
108
|
+
EIP712Domain: {
|
|
109
|
+
name: string;
|
|
110
|
+
type: string;
|
|
111
|
+
}[];
|
|
112
|
+
};
|
|
113
|
+
primaryType: string;
|
|
114
|
+
message: {
|
|
115
|
+
validAfter: number;
|
|
116
|
+
validBefore: number;
|
|
117
|
+
to: string | null | undefined;
|
|
118
|
+
value: string;
|
|
119
|
+
data: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
type ExecuteBatchWithAuthorizationSignData = {
|
|
123
|
+
domain: {
|
|
124
|
+
name: string;
|
|
125
|
+
version: string;
|
|
126
|
+
chainId: number;
|
|
127
|
+
verifyingContract: string;
|
|
128
|
+
};
|
|
129
|
+
types: {
|
|
130
|
+
ExecuteBatchWithAuthorization: {
|
|
131
|
+
name: string;
|
|
132
|
+
type: string;
|
|
133
|
+
}[];
|
|
134
|
+
EIP712Domain: {
|
|
135
|
+
name: string;
|
|
136
|
+
type: string;
|
|
137
|
+
}[];
|
|
138
|
+
};
|
|
139
|
+
primaryType: string;
|
|
140
|
+
message: {
|
|
141
|
+
to: string[] | null | undefined;
|
|
142
|
+
value: string[] | null | undefined;
|
|
143
|
+
data: string[] | null | undefined;
|
|
144
|
+
validAfter: number;
|
|
145
|
+
validBefore: number;
|
|
146
|
+
nonce: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* ready: the user has not clicked on the button yet
|
|
151
|
+
* pending: the user has clicked on the button and we're waiting for the transaction to be sent
|
|
152
|
+
* waitingConfirmation: the transaction has been sent and we're waiting for the transaction to be confirmed by the chain
|
|
153
|
+
* success: the transaction has been confirmed by the chain
|
|
154
|
+
* error: the transaction has failed
|
|
155
|
+
* unknown: the transaction receipt has failed to load
|
|
156
|
+
*/
|
|
157
|
+
type TransactionStatus = 'ready' | 'pending' | 'waitingConfirmation' | 'success' | 'error' | 'unknown';
|
|
158
|
+
type TransactionStatusErrorType = {
|
|
159
|
+
type: 'SendTransactionError' | 'TxReceiptError' | 'RevertReasonError' | 'UserRejectedError';
|
|
160
|
+
reason?: string;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* An enhanced clause with a comment and an abi
|
|
164
|
+
* @param comment a comment to add to the clause
|
|
165
|
+
* @param abi the abi of the contract to call
|
|
166
|
+
*/
|
|
167
|
+
type EnhancedClause = TransactionClause;
|
|
168
|
+
type PrivyAppInfo = {
|
|
169
|
+
id: string;
|
|
170
|
+
name: string;
|
|
171
|
+
logo_url: string;
|
|
172
|
+
icon_url: string | null;
|
|
173
|
+
terms_and_conditions_url: string;
|
|
174
|
+
privacy_policy_url: string;
|
|
175
|
+
theme: string;
|
|
176
|
+
accent_color: string;
|
|
177
|
+
wallet_auth: boolean;
|
|
178
|
+
email_auth: boolean;
|
|
179
|
+
google_oauth: boolean;
|
|
180
|
+
twitter_oauth: boolean;
|
|
181
|
+
url: string;
|
|
182
|
+
website?: string;
|
|
183
|
+
};
|
|
184
|
+
type PrivyLoginMethod = LoginMethodOrderOption;
|
|
185
|
+
interface CrossAppConnectionCache {
|
|
186
|
+
timestamp: number;
|
|
187
|
+
ecosystemApp: {
|
|
188
|
+
name: string;
|
|
189
|
+
logoUrl?: string;
|
|
190
|
+
appId: string;
|
|
191
|
+
website?: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
declare enum NFTMediaType {
|
|
195
|
+
IMAGE = "image",
|
|
196
|
+
VIDEO = "video",
|
|
197
|
+
UNKNOWN = "unknown",
|
|
198
|
+
TEXT = "text",
|
|
199
|
+
}
|
|
200
|
+
declare enum VePassportUserStatus {
|
|
201
|
+
NONE = "NONE",
|
|
202
|
+
WHITELIST = "WHITELIST",
|
|
203
|
+
BLACKLIST = "BLACKLIST",
|
|
204
|
+
}
|
|
205
|
+
type CURRENCY = 'usd' | 'gbp' | 'eur';
|
|
206
|
+
declare const CURRENCY_SYMBOLS: Record<CURRENCY, string>;
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/types/ensTextRecords.d.ts
|
|
209
|
+
declare const ENS_TEXT_RECORDS: readonly ["display", "avatar", "description", "keywords", "email", "url", "header", "notice", "location", "phone", "com.x"];
|
|
210
|
+
type TextRecords = { [K in (typeof ENS_TEXT_RECORDS)[number]]?: string };
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/types/gasToken.d.ts
|
|
213
|
+
type GasTokenType = 'B3TR' | 'VET' | 'VTHO';
|
|
214
|
+
type TransactionSpeed = 'regular' | 'medium' | 'high';
|
|
215
|
+
interface GasTokenInfo {
|
|
216
|
+
type: GasTokenType;
|
|
217
|
+
name: string;
|
|
218
|
+
symbol: string;
|
|
219
|
+
address?: string;
|
|
220
|
+
description: string;
|
|
221
|
+
}
|
|
222
|
+
interface GasTokenPreferences {
|
|
223
|
+
tokenPriority: GasTokenType[];
|
|
224
|
+
availableGasTokens: GasTokenType[];
|
|
225
|
+
excludedTokens: GasTokenType[];
|
|
226
|
+
alwaysConfirm: boolean;
|
|
227
|
+
gasTokenToUse: GasTokenType;
|
|
228
|
+
}
|
|
229
|
+
interface GasTokenEstimate {
|
|
230
|
+
token: GasTokenType;
|
|
231
|
+
cost: string;
|
|
232
|
+
available: boolean;
|
|
233
|
+
balance?: string;
|
|
234
|
+
}
|
|
235
|
+
interface GasTokenSelection {
|
|
236
|
+
selectedToken: GasTokenType;
|
|
237
|
+
cost: string;
|
|
238
|
+
hasServiceFee: boolean;
|
|
239
|
+
}
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region src/types/gasEstimation.d.ts
|
|
242
|
+
interface VthoPerGasAtSpeed {
|
|
243
|
+
regular: number;
|
|
244
|
+
medium: number;
|
|
245
|
+
high: number;
|
|
246
|
+
legacy: number;
|
|
247
|
+
}
|
|
248
|
+
interface EstimatedGas {
|
|
249
|
+
vtho: number;
|
|
250
|
+
vet: number;
|
|
251
|
+
b3tr: number;
|
|
252
|
+
smartAccount: number;
|
|
253
|
+
}
|
|
254
|
+
interface Rate {
|
|
255
|
+
vtho: number;
|
|
256
|
+
vet: number;
|
|
257
|
+
b3tr: number;
|
|
258
|
+
}
|
|
259
|
+
interface CostLevel {
|
|
260
|
+
vtho: number;
|
|
261
|
+
vet: number;
|
|
262
|
+
b3tr: number;
|
|
263
|
+
vetWithSmartAccount: number;
|
|
264
|
+
b3trWithSmartAccount: number;
|
|
265
|
+
}
|
|
266
|
+
interface TransactionCost {
|
|
267
|
+
regular: CostLevel;
|
|
268
|
+
medium: CostLevel;
|
|
269
|
+
high: CostLevel;
|
|
270
|
+
legacy: CostLevel;
|
|
271
|
+
}
|
|
272
|
+
interface EstimationResponse {
|
|
273
|
+
vthoPerGasAtSpeed?: number;
|
|
274
|
+
estimatedGas?: number;
|
|
275
|
+
rate?: number;
|
|
276
|
+
transactionCost?: number;
|
|
277
|
+
serviceFee?: number;
|
|
278
|
+
totalGasUsed?: number;
|
|
279
|
+
}
|
|
280
|
+
interface DepositAccount {
|
|
281
|
+
depositAccount: string;
|
|
282
|
+
}
|
|
283
|
+
declare function calculateTotalCost(baseCost: number, serviceFeeRate: number): number;
|
|
284
|
+
declare function formatGasCost(amount: number, decimals?: number): string;
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/types/index.d.ts
|
|
287
|
+
declare enum LegalDocumentType {
|
|
288
|
+
TERMS = "terms",
|
|
289
|
+
PRIVACY = "privacy",
|
|
290
|
+
COOKIES = "cookies",
|
|
291
|
+
}
|
|
292
|
+
declare enum LegalDocumentSource {
|
|
293
|
+
VECHAIN_KIT = "vechain-kit",
|
|
294
|
+
APPLICATION = "application",
|
|
295
|
+
}
|
|
296
|
+
type EnrichedLegalDocument = LegalDocument & {
|
|
297
|
+
id: string;
|
|
298
|
+
documentType: LegalDocumentType;
|
|
299
|
+
documentSource: LegalDocumentSource;
|
|
300
|
+
};
|
|
301
|
+
type LegalDocumentAgreement = EnrichedLegalDocument & {
|
|
302
|
+
walletAddress: string;
|
|
303
|
+
timestamp: number;
|
|
304
|
+
};
|
|
305
|
+
//#endregion
|
|
306
|
+
//#region src/theme/tokens.d.ts
|
|
307
|
+
/**
|
|
308
|
+
* Theme token system for VeChain Kit
|
|
309
|
+
* Provides a single source of truth for all styling values
|
|
310
|
+
*/
|
|
311
|
+
/**
|
|
312
|
+
* Complete internal token type - all fields required
|
|
313
|
+
*/
|
|
314
|
+
interface ThemeTokens {
|
|
315
|
+
colors: {
|
|
316
|
+
background: {
|
|
317
|
+
modal: string;
|
|
318
|
+
overlay: string;
|
|
319
|
+
card: string;
|
|
320
|
+
cardElevated: string;
|
|
321
|
+
stickyHeader: string;
|
|
322
|
+
};
|
|
323
|
+
text: {
|
|
324
|
+
primary: string;
|
|
325
|
+
secondary: string;
|
|
326
|
+
tertiary: string;
|
|
327
|
+
disabled: string;
|
|
328
|
+
};
|
|
329
|
+
border: {
|
|
330
|
+
default: string;
|
|
331
|
+
hover: string;
|
|
332
|
+
focus: string;
|
|
333
|
+
button: string;
|
|
334
|
+
};
|
|
335
|
+
success: string;
|
|
336
|
+
error: string;
|
|
337
|
+
warning: string;
|
|
338
|
+
};
|
|
339
|
+
buttons: {
|
|
340
|
+
button: {
|
|
341
|
+
bg: string;
|
|
342
|
+
color: string;
|
|
343
|
+
border: string;
|
|
344
|
+
hoverBg?: string;
|
|
345
|
+
};
|
|
346
|
+
primaryButton: {
|
|
347
|
+
bg: string;
|
|
348
|
+
color: string;
|
|
349
|
+
border: string;
|
|
350
|
+
hoverBg?: string;
|
|
351
|
+
};
|
|
352
|
+
tertiaryButton: {
|
|
353
|
+
bg: string;
|
|
354
|
+
color: string;
|
|
355
|
+
border: string;
|
|
356
|
+
};
|
|
357
|
+
loginButton: {
|
|
358
|
+
bg: string;
|
|
359
|
+
color: string;
|
|
360
|
+
border: string;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
effects: {
|
|
364
|
+
backdropFilter: {
|
|
365
|
+
modal: string;
|
|
366
|
+
overlay: string;
|
|
367
|
+
stickyHeader: string;
|
|
368
|
+
};
|
|
369
|
+
glassOpacity: {
|
|
370
|
+
modal: number;
|
|
371
|
+
overlay: number;
|
|
372
|
+
stickyHeader: number;
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
fonts: {
|
|
376
|
+
body: string;
|
|
377
|
+
heading: string;
|
|
378
|
+
sizes: {
|
|
379
|
+
small: string;
|
|
380
|
+
medium: string;
|
|
381
|
+
large: string;
|
|
382
|
+
};
|
|
383
|
+
weights: {
|
|
384
|
+
normal: number;
|
|
385
|
+
medium: number;
|
|
386
|
+
bold: number;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
borders: {
|
|
390
|
+
radius: {
|
|
391
|
+
small: string;
|
|
392
|
+
medium: string;
|
|
393
|
+
large: string;
|
|
394
|
+
xl: string;
|
|
395
|
+
full: string;
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Developer-facing theme configuration
|
|
401
|
+
* Simplified interface - only backgroundColor and textColor required
|
|
402
|
+
* All other colors are automatically derived from these base colors
|
|
403
|
+
*/
|
|
404
|
+
interface VechainKitThemeConfig {
|
|
405
|
+
backgroundColor?: string;
|
|
406
|
+
textColor?: string;
|
|
407
|
+
overlay?: {
|
|
408
|
+
backgroundColor?: string;
|
|
409
|
+
blur?: string;
|
|
410
|
+
};
|
|
411
|
+
buttons?: {
|
|
412
|
+
secondaryButton?: {
|
|
413
|
+
bg?: string;
|
|
414
|
+
color?: string;
|
|
415
|
+
border?: string;
|
|
416
|
+
hoverBg?: string;
|
|
417
|
+
};
|
|
418
|
+
primaryButton?: {
|
|
419
|
+
bg?: string;
|
|
420
|
+
color?: string;
|
|
421
|
+
border?: string;
|
|
422
|
+
hoverBg?: string;
|
|
423
|
+
};
|
|
424
|
+
tertiaryButton?: {
|
|
425
|
+
bg?: string;
|
|
426
|
+
color?: string;
|
|
427
|
+
border?: string;
|
|
428
|
+
};
|
|
429
|
+
loginButton?: {
|
|
430
|
+
bg?: string;
|
|
431
|
+
color?: string;
|
|
432
|
+
border?: string;
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
fonts?: {
|
|
436
|
+
family?: string;
|
|
437
|
+
body?: string;
|
|
438
|
+
heading?: string;
|
|
439
|
+
sizes?: {
|
|
440
|
+
small?: string;
|
|
441
|
+
medium?: string;
|
|
442
|
+
large?: string;
|
|
443
|
+
};
|
|
444
|
+
weights?: {
|
|
445
|
+
normal?: number;
|
|
446
|
+
medium?: number;
|
|
447
|
+
bold?: number;
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
effects?: {
|
|
451
|
+
glass?: {
|
|
452
|
+
enabled?: boolean;
|
|
453
|
+
intensity?: 'low' | 'medium' | 'high';
|
|
454
|
+
};
|
|
455
|
+
backdropFilter?: {
|
|
456
|
+
modal?: string;
|
|
457
|
+
overlay?: string;
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region src/providers/VeChainKitProvider.d.ts
|
|
463
|
+
type AlwaysAvailableMethods = 'vechain' | 'dappkit' | 'ecosystem';
|
|
464
|
+
type PrivyDependentMethods = 'email' | 'google' | 'github' | 'passkey' | 'more';
|
|
465
|
+
type LoginMethodOrder = {
|
|
466
|
+
method: AlwaysAvailableMethods | (VechainKitProviderProps['privy'] extends undefined ? never : PrivyDependentMethods);
|
|
467
|
+
gridColumn?: number;
|
|
468
|
+
allowedApps?: string[];
|
|
469
|
+
};
|
|
470
|
+
type LegalDocumentOptions = {
|
|
471
|
+
privacyPolicy?: LegalDocument[];
|
|
472
|
+
termsAndConditions?: LegalDocument[];
|
|
473
|
+
cookiePolicy?: LegalDocument[];
|
|
474
|
+
};
|
|
475
|
+
type LegalDocument = {
|
|
476
|
+
url: string;
|
|
477
|
+
version: number;
|
|
478
|
+
required: boolean;
|
|
479
|
+
displayName?: string;
|
|
480
|
+
};
|
|
481
|
+
type VechainKitProviderProps = {
|
|
482
|
+
children: ReactNode;
|
|
483
|
+
privy?: {
|
|
484
|
+
appId: string;
|
|
485
|
+
clientId: string;
|
|
486
|
+
appearance: {
|
|
487
|
+
walletList?: WalletListEntry[];
|
|
488
|
+
accentColor?: `#${string}`;
|
|
489
|
+
loginMessage: string;
|
|
490
|
+
logo: string;
|
|
491
|
+
};
|
|
492
|
+
embeddedWallets?: {
|
|
493
|
+
createOnLogin: 'users-without-wallets' | 'all-users' | 'off';
|
|
494
|
+
};
|
|
495
|
+
loginMethods: PrivyLoginMethod[];
|
|
496
|
+
};
|
|
497
|
+
feeDelegation?: {
|
|
498
|
+
delegatorUrl?: string;
|
|
499
|
+
delegateAllTransactions?: boolean;
|
|
500
|
+
genericDelegatorUrl?: string;
|
|
501
|
+
b3trTransfers?: {
|
|
502
|
+
minAmountInEther: number;
|
|
503
|
+
};
|
|
504
|
+
};
|
|
505
|
+
dappKit: {
|
|
506
|
+
allowedWallets?: WalletSource[];
|
|
507
|
+
walletConnectOptions?: WalletConnectOptions;
|
|
508
|
+
usePersistence?: boolean;
|
|
509
|
+
useFirstDetectedSource?: boolean;
|
|
510
|
+
logLevel?: LogLevel;
|
|
511
|
+
themeVariables?: CustomizedStyle;
|
|
512
|
+
modalParent?: HTMLElement;
|
|
513
|
+
onSourceClick?: (source?: SourceInfo) => void;
|
|
514
|
+
v2Api?: {
|
|
515
|
+
enabled?: boolean;
|
|
516
|
+
external?: boolean;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
loginModalUI?: {
|
|
520
|
+
logo?: string;
|
|
521
|
+
description?: string;
|
|
522
|
+
};
|
|
523
|
+
loginMethods?: LoginMethodOrder[];
|
|
524
|
+
darkMode?: boolean;
|
|
525
|
+
i18n?: I18n;
|
|
526
|
+
language?: string;
|
|
527
|
+
network: {
|
|
528
|
+
type: NETWORK_TYPE;
|
|
529
|
+
nodeUrl?: string;
|
|
530
|
+
requireCertificate?: boolean;
|
|
531
|
+
connectionCertificate?: {
|
|
532
|
+
message?: Certificate;
|
|
533
|
+
options?: CertificateData;
|
|
534
|
+
};
|
|
535
|
+
};
|
|
536
|
+
allowCustomTokens?: boolean;
|
|
537
|
+
legalDocuments?: LegalDocumentOptions;
|
|
538
|
+
defaultCurrency?: CURRENCY;
|
|
539
|
+
theme?: VechainKitThemeConfig;
|
|
540
|
+
};
|
|
541
|
+
type VeChainKitConfig = {
|
|
542
|
+
privy?: VechainKitProviderProps['privy'];
|
|
543
|
+
privyEcosystemAppIDS: string[];
|
|
544
|
+
feeDelegation?: VechainKitProviderProps['feeDelegation'];
|
|
545
|
+
dappKit: VechainKitProviderProps['dappKit'];
|
|
546
|
+
loginModalUI?: VechainKitProviderProps['loginModalUI'];
|
|
547
|
+
loginMethods?: VechainKitProviderProps['loginMethods'];
|
|
548
|
+
darkMode: boolean;
|
|
549
|
+
i18n?: VechainKitProviderProps['i18n'];
|
|
550
|
+
language?: VechainKitProviderProps['language'];
|
|
551
|
+
network: VechainKitProviderProps['network'];
|
|
552
|
+
allowCustomTokens?: boolean;
|
|
553
|
+
legalDocuments?: VechainKitProviderProps['legalDocuments'];
|
|
554
|
+
defaultCurrency?: VechainKitProviderProps['defaultCurrency'];
|
|
555
|
+
theme?: VechainKitThemeConfig;
|
|
556
|
+
};
|
|
557
|
+
/**
|
|
558
|
+
* Context to store the Privy and DAppKit configs so that they can be used by the hooks/components
|
|
559
|
+
*/
|
|
560
|
+
declare const VeChainKitContext: react0.Context<VeChainKitConfig | null>;
|
|
561
|
+
/**
|
|
562
|
+
* Hook to get the Privy and DAppKit configs
|
|
563
|
+
*/
|
|
564
|
+
declare const useVeChainKitConfig: () => VeChainKitConfig;
|
|
565
|
+
/**
|
|
566
|
+
* Provider to wrap the application with Privy and DAppKit
|
|
567
|
+
*/
|
|
568
|
+
declare const VeChainKitProvider: (props: Omit<VechainKitProviderProps, "queryClient">) => react_jsx_runtime0.JSX.Element;
|
|
569
|
+
//#endregion
|
|
570
|
+
//#region src/providers/PrivyWalletProvider.d.ts
|
|
571
|
+
interface PrivyWalletProviderContextType {
|
|
572
|
+
accountFactory: string;
|
|
573
|
+
delegateAllTransactions: boolean;
|
|
574
|
+
sendTransaction: (tx: {
|
|
575
|
+
txClauses: TransactionClause[];
|
|
576
|
+
title?: string;
|
|
577
|
+
description?: string;
|
|
578
|
+
buttonText?: string;
|
|
579
|
+
currentGasToken?: GasTokenType;
|
|
580
|
+
}) => Promise<string>;
|
|
581
|
+
signTypedData: (data: SignTypedDataParams) => Promise<string>;
|
|
582
|
+
signMessage: (message: string) => Promise<string>;
|
|
583
|
+
exportWallet: () => Promise<void>;
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* This provider is responsible for retrieving the smart account address
|
|
587
|
+
* of a Privy wallet and providing the necessary context for the smart account.
|
|
588
|
+
* Upon initialization this provider will execute a few useEffect hooks to:
|
|
589
|
+
* - retrieve the smart account address of the embedded wallet
|
|
590
|
+
* - retrieve the chain id
|
|
591
|
+
* - check if the smart account is deployed
|
|
592
|
+
*
|
|
593
|
+
* It also provides a function to send transactions on vechain by asking the privy wallet
|
|
594
|
+
* to sign the transaction and then forwarding the transaction to the node api.
|
|
595
|
+
* When sending a transaction this provider will check if the smart account is deployed and if not,
|
|
596
|
+
* it will deploy it.
|
|
597
|
+
*/
|
|
598
|
+
declare const PrivyWalletProvider: ({
|
|
599
|
+
children,
|
|
600
|
+
nodeUrl,
|
|
601
|
+
delegatorUrl,
|
|
602
|
+
delegateAllTransactions,
|
|
603
|
+
genericDelegator
|
|
604
|
+
}: {
|
|
605
|
+
children: React$1.ReactNode;
|
|
606
|
+
nodeUrl: string;
|
|
607
|
+
delegatorUrl?: string;
|
|
608
|
+
delegateAllTransactions: boolean;
|
|
609
|
+
genericDelegator?: boolean;
|
|
610
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
611
|
+
declare const usePrivyWalletProvider: () => PrivyWalletProviderContextType;
|
|
612
|
+
//#endregion
|
|
613
|
+
//#region src/providers/VechainKitThemeProvider.d.ts
|
|
614
|
+
type Props$36 = {
|
|
615
|
+
children: ReactNode;
|
|
616
|
+
darkMode?: boolean;
|
|
617
|
+
theme?: VechainKitThemeConfig;
|
|
618
|
+
};
|
|
619
|
+
declare const useVechainKitThemeConfig: () => {
|
|
620
|
+
portalRootRef?: React.RefObject<HTMLDivElement | null>;
|
|
621
|
+
tokens?: ThemeTokens;
|
|
622
|
+
};
|
|
623
|
+
declare const ColorModeSync: ({
|
|
624
|
+
darkMode
|
|
625
|
+
}: {
|
|
626
|
+
darkMode: boolean;
|
|
627
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
628
|
+
declare const VechainKitThemeProvider: ({
|
|
629
|
+
children,
|
|
630
|
+
darkMode,
|
|
631
|
+
theme: customTheme
|
|
632
|
+
}: Props$36) => react_jsx_runtime0.JSX.Element;
|
|
633
|
+
//#endregion
|
|
634
|
+
//#region src/providers/LegalDocumentsProvider.d.ts
|
|
635
|
+
type Props$35 = {
|
|
636
|
+
children: Readonly<ReactNode>;
|
|
637
|
+
};
|
|
638
|
+
type LegalDocumentsContextType = {
|
|
639
|
+
hasAgreedToRequiredDocuments: boolean;
|
|
640
|
+
agreements: LegalDocumentAgreement[];
|
|
641
|
+
walletAddress?: string;
|
|
642
|
+
documents: EnrichedLegalDocument[];
|
|
643
|
+
documentsNotAgreed: EnrichedLegalDocument[];
|
|
644
|
+
};
|
|
645
|
+
declare const useLegalDocuments: () => LegalDocumentsContextType;
|
|
646
|
+
declare const LegalDocumentsProvider: ({
|
|
647
|
+
children
|
|
648
|
+
}: Props$35) => react_jsx_runtime0.JSX.Element;
|
|
649
|
+
//#endregion
|
|
650
|
+
//#region src/components/ConnectModal/ConnectModal.d.ts
|
|
651
|
+
type Props$34 = {
|
|
652
|
+
isOpen: boolean;
|
|
653
|
+
onClose: () => void;
|
|
654
|
+
};
|
|
655
|
+
type ConnectModalContentsTypes = 'main' | 'email-verification' | 'faq';
|
|
656
|
+
declare const ConnectModal: ({
|
|
657
|
+
isOpen,
|
|
658
|
+
onClose
|
|
659
|
+
}: Props$34) => react_jsx_runtime0.JSX.Element;
|
|
660
|
+
//#endregion
|
|
661
|
+
//#region src/components/ConnectModal/Contents/MainContent.d.ts
|
|
662
|
+
type Props$33 = {
|
|
663
|
+
setCurrentContent: React$1.Dispatch<React$1.SetStateAction<ConnectModalContentsTypes>>;
|
|
664
|
+
onClose: () => void;
|
|
665
|
+
};
|
|
666
|
+
declare const MainContent: ({
|
|
667
|
+
setCurrentContent,
|
|
668
|
+
onClose
|
|
669
|
+
}: Props$33) => react_jsx_runtime0.JSX.Element;
|
|
670
|
+
//#endregion
|
|
671
|
+
//#region src/components/ConnectModal/Components/ConnectionButton.d.ts
|
|
672
|
+
interface ConnectionButtonProps {
|
|
673
|
+
isDark: boolean;
|
|
674
|
+
onClick: () => void;
|
|
675
|
+
text?: string;
|
|
676
|
+
icon?: IconType;
|
|
677
|
+
customIcon?: ReactElement;
|
|
678
|
+
rightIcon?: ReactElement;
|
|
679
|
+
style?: ButtonProps;
|
|
680
|
+
variant?: string;
|
|
681
|
+
iconWidth?: string;
|
|
682
|
+
}
|
|
683
|
+
declare const ConnectionButton: ({
|
|
684
|
+
onClick,
|
|
685
|
+
text,
|
|
686
|
+
icon,
|
|
687
|
+
customIcon,
|
|
688
|
+
rightIcon,
|
|
689
|
+
style,
|
|
690
|
+
variant,
|
|
691
|
+
iconWidth
|
|
692
|
+
}: ConnectionButtonProps) => react_jsx_runtime0.JSX.Element | null;
|
|
693
|
+
//#endregion
|
|
694
|
+
//#region src/components/ConnectModal/Components/EmailLoginButton.d.ts
|
|
695
|
+
declare const EmailLoginButton: () => react_jsx_runtime0.JSX.Element;
|
|
696
|
+
//#endregion
|
|
697
|
+
//#region src/components/ConnectModal/Components/VeChainLoginButton.d.ts
|
|
698
|
+
type Props$32 = {
|
|
699
|
+
isDark: boolean;
|
|
700
|
+
gridColumn?: number;
|
|
701
|
+
};
|
|
702
|
+
declare const VeChainLoginButton: ({
|
|
703
|
+
isDark,
|
|
704
|
+
gridColumn
|
|
705
|
+
}: Props$32) => react_jsx_runtime0.JSX.Element;
|
|
706
|
+
//#endregion
|
|
707
|
+
//#region src/components/ConnectModal/Components/EcosystemButton.d.ts
|
|
708
|
+
type Props$31 = {
|
|
709
|
+
isDark: boolean;
|
|
710
|
+
appsInfo: PrivyAppInfo[];
|
|
711
|
+
isLoading: boolean;
|
|
712
|
+
gridColumn?: number;
|
|
713
|
+
};
|
|
714
|
+
declare const EcosystemButton: ({
|
|
715
|
+
appsInfo,
|
|
716
|
+
isLoading
|
|
717
|
+
}: Props$31) => react_jsx_runtime0.JSX.Element;
|
|
718
|
+
//#endregion
|
|
719
|
+
//#region src/components/ConnectModal/Components/PrivyButton.d.ts
|
|
720
|
+
type Props$30 = {
|
|
721
|
+
isDark: boolean;
|
|
722
|
+
onViewMoreLogin: () => void;
|
|
723
|
+
gridColumn?: number;
|
|
724
|
+
};
|
|
725
|
+
declare const PrivyButton: ({
|
|
726
|
+
isDark,
|
|
727
|
+
onViewMoreLogin,
|
|
728
|
+
gridColumn
|
|
729
|
+
}: Props$30) => react_jsx_runtime0.JSX.Element;
|
|
730
|
+
//#endregion
|
|
731
|
+
//#region src/components/ConnectModal/Components/LoginWithGoogleButton.d.ts
|
|
732
|
+
type Props$29 = {
|
|
733
|
+
isDark: boolean;
|
|
734
|
+
gridColumn?: number;
|
|
735
|
+
};
|
|
736
|
+
declare const LoginWithGoogleButton: ({
|
|
737
|
+
isDark,
|
|
738
|
+
gridColumn
|
|
739
|
+
}: Props$29) => react_jsx_runtime0.JSX.Element;
|
|
740
|
+
//#endregion
|
|
741
|
+
//#region src/components/ConnectModal/Components/PasskeyLoginButton.d.ts
|
|
742
|
+
type Props$28 = {
|
|
743
|
+
isDark: boolean;
|
|
744
|
+
gridColumn?: number;
|
|
745
|
+
};
|
|
746
|
+
declare const PasskeyLoginButton: ({
|
|
747
|
+
isDark,
|
|
748
|
+
gridColumn
|
|
749
|
+
}: Props$28) => react_jsx_runtime0.JSX.Element;
|
|
750
|
+
//#endregion
|
|
751
|
+
//#region src/components/ConnectModal/Components/DappKitButton.d.ts
|
|
752
|
+
type Props$27 = {
|
|
753
|
+
isDark: boolean;
|
|
754
|
+
gridColumn?: number;
|
|
755
|
+
};
|
|
756
|
+
declare const DappKitButton: ({
|
|
757
|
+
isDark,
|
|
758
|
+
gridColumn
|
|
759
|
+
}: Props$27) => react_jsx_runtime0.JSX.Element;
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/components/ConnectModal/Components/VeChainWithPrivyLoginButton.d.ts
|
|
762
|
+
type Props$26 = {
|
|
763
|
+
isDark: boolean;
|
|
764
|
+
gridColumn?: number;
|
|
765
|
+
};
|
|
766
|
+
declare const VeChainWithPrivyLoginButton: ({
|
|
767
|
+
isDark,
|
|
768
|
+
gridColumn
|
|
769
|
+
}: Props$26) => react_jsx_runtime0.JSX.Element;
|
|
770
|
+
//#endregion
|
|
771
|
+
//#region src/components/ConnectModal/Components/LoginWithGithubButton.d.ts
|
|
772
|
+
type Props$25 = {
|
|
773
|
+
isDark: boolean;
|
|
774
|
+
gridColumn?: number;
|
|
775
|
+
};
|
|
776
|
+
declare const LoginWithGithubButton: ({
|
|
777
|
+
isDark,
|
|
778
|
+
gridColumn
|
|
779
|
+
}: Props$25) => react_jsx_runtime0.JSX.Element;
|
|
780
|
+
//#endregion
|
|
781
|
+
//#region src/components/ConnectModal/ConnectPopover.d.ts
|
|
782
|
+
type ConnectPopoverProps = {
|
|
783
|
+
isLoading: boolean;
|
|
784
|
+
buttonStyle?: ButtonProps;
|
|
785
|
+
};
|
|
786
|
+
declare const ConnectPopover: ({
|
|
787
|
+
isLoading,
|
|
788
|
+
buttonStyle
|
|
789
|
+
}: ConnectPopoverProps) => react_jsx_runtime0.JSX.Element;
|
|
790
|
+
//#endregion
|
|
791
|
+
//#region src/components/WalletButton/types.d.ts
|
|
792
|
+
type WalletDisplayVariant = 'icon' | 'iconAndDomain' | 'iconDomainAndAddress' | 'iconDomainAndAssets';
|
|
793
|
+
//#endregion
|
|
794
|
+
//#region src/components/WalletButton/WalletButton.d.ts
|
|
795
|
+
type WalletButtonProps = {
|
|
796
|
+
mobileVariant?: WalletDisplayVariant;
|
|
797
|
+
desktopVariant?: WalletDisplayVariant;
|
|
798
|
+
buttonStyle?: ButtonProps;
|
|
799
|
+
connectionVariant?: 'modal' | 'popover';
|
|
800
|
+
};
|
|
801
|
+
declare const WalletButton: ({
|
|
802
|
+
mobileVariant,
|
|
803
|
+
desktopVariant,
|
|
804
|
+
buttonStyle,
|
|
805
|
+
connectionVariant
|
|
806
|
+
}: WalletButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
807
|
+
//#endregion
|
|
808
|
+
//#region src/components/WalletButton/SocialIcons.d.ts
|
|
809
|
+
declare const SocialIcons: () => react_jsx_runtime0.JSX.Element;
|
|
810
|
+
//#endregion
|
|
811
|
+
//#region src/components/TransactionModal/TransactionModal.d.ts
|
|
812
|
+
type TransactionModalProps = {
|
|
813
|
+
isOpen: boolean;
|
|
814
|
+
onClose: () => void;
|
|
815
|
+
onTryAgain: () => void;
|
|
816
|
+
status: TransactionStatus;
|
|
817
|
+
txReceipt: TransactionReceipt | null;
|
|
818
|
+
txError?: Error | TransactionStatusErrorType;
|
|
819
|
+
uiConfig?: {
|
|
820
|
+
isClosable?: boolean;
|
|
821
|
+
showShareOnSocials?: boolean;
|
|
822
|
+
showExplorerButton?: boolean;
|
|
823
|
+
loadingIcon?: ReactNode;
|
|
824
|
+
successIcon?: ReactNode;
|
|
825
|
+
errorIcon?: ReactNode;
|
|
826
|
+
title?: ReactNode;
|
|
827
|
+
description?: string;
|
|
828
|
+
showSocialButtons?: boolean;
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
declare const TransactionModal: ({
|
|
832
|
+
isOpen,
|
|
833
|
+
onClose,
|
|
834
|
+
status,
|
|
835
|
+
uiConfig,
|
|
836
|
+
txReceipt,
|
|
837
|
+
txError,
|
|
838
|
+
onTryAgain
|
|
839
|
+
}: TransactionModalProps) => react_jsx_runtime0.JSX.Element;
|
|
840
|
+
//#endregion
|
|
841
|
+
//#region src/components/TransactionModal/Components/ShareButtons.d.ts
|
|
842
|
+
type Props$24 = {
|
|
843
|
+
descriptionEncoded: string;
|
|
844
|
+
url?: string;
|
|
845
|
+
facebookHashtag?: string;
|
|
846
|
+
};
|
|
847
|
+
declare const ShareButtons: ({
|
|
848
|
+
descriptionEncoded
|
|
849
|
+
}: Props$24) => react_jsx_runtime0.JSX.Element;
|
|
850
|
+
//#endregion
|
|
851
|
+
//#region src/components/TransactionModal/TransactionModalContent.d.ts
|
|
852
|
+
declare const TransactionModalContent: ({
|
|
853
|
+
status,
|
|
854
|
+
uiConfig,
|
|
855
|
+
onTryAgain,
|
|
856
|
+
txReceipt,
|
|
857
|
+
txError,
|
|
858
|
+
onClose
|
|
859
|
+
}: Omit<TransactionModalProps, "isOpen">) => react_jsx_runtime0.JSX.Element;
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region src/components/TransactionToast/TransactionToast.d.ts
|
|
862
|
+
type TransactionToastProps = {
|
|
863
|
+
isOpen: boolean;
|
|
864
|
+
onClose: () => void;
|
|
865
|
+
status: TransactionStatus;
|
|
866
|
+
txReceipt: TransactionReceipt | null;
|
|
867
|
+
onTryAgain: () => void;
|
|
868
|
+
txError?: Error | TransactionStatusErrorType;
|
|
869
|
+
description?: string;
|
|
870
|
+
};
|
|
871
|
+
declare const TransactionToast: ({
|
|
872
|
+
isOpen,
|
|
873
|
+
onClose,
|
|
874
|
+
status,
|
|
875
|
+
txReceipt,
|
|
876
|
+
txError,
|
|
877
|
+
onTryAgain,
|
|
878
|
+
description
|
|
879
|
+
}: TransactionToastProps) => react_jsx_runtime0.JSX.Element | null;
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region src/components/AccountModal/Contents/Account/AccountMainContent.d.ts
|
|
882
|
+
type Props$23 = {
|
|
883
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
884
|
+
onClose: () => void;
|
|
885
|
+
wallet: Wallet;
|
|
886
|
+
};
|
|
887
|
+
declare const AccountMainContent: ({
|
|
888
|
+
setCurrentContent,
|
|
889
|
+
wallet,
|
|
890
|
+
onClose
|
|
891
|
+
}: Props$23) => react_jsx_runtime0.JSX.Element;
|
|
892
|
+
//#endregion
|
|
893
|
+
//#region src/components/AccountModal/Contents/Account/AccessAndSecurityContent.d.ts
|
|
894
|
+
type Props$22 = {
|
|
895
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
896
|
+
};
|
|
897
|
+
declare const AccessAndSecurityContent: ({
|
|
898
|
+
setCurrentContent
|
|
899
|
+
}: Props$22) => react_jsx_runtime0.JSX.Element;
|
|
900
|
+
//#endregion
|
|
901
|
+
//#region src/components/AccountModal/Contents/Account/SettingsContent.d.ts
|
|
902
|
+
type SettingsContentProps = {
|
|
903
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
904
|
+
onLogoutSuccess: () => void;
|
|
905
|
+
};
|
|
906
|
+
declare const SettingsContent: ({
|
|
907
|
+
setCurrentContent,
|
|
908
|
+
onLogoutSuccess
|
|
909
|
+
}: SettingsContentProps) => react_jsx_runtime0.JSX.Element;
|
|
910
|
+
//#endregion
|
|
911
|
+
//#region src/components/AccountModal/Contents/Account/EmbeddedWalletContent.d.ts
|
|
912
|
+
type Props$21 = {
|
|
913
|
+
setCurrentContent: (content: AccountModalContentTypes) => void;
|
|
914
|
+
};
|
|
915
|
+
declare const EmbeddedWalletContent: ({
|
|
916
|
+
setCurrentContent
|
|
917
|
+
}: Props$21) => react_jsx_runtime0.JSX.Element;
|
|
918
|
+
//#endregion
|
|
919
|
+
//#region src/components/AccountModal/Contents/Account/DisconnectConfirmContent.d.ts
|
|
920
|
+
type DisconnectConfirmContentProps = {
|
|
921
|
+
onDisconnect: () => void;
|
|
922
|
+
onBack: () => void;
|
|
923
|
+
onClose?: () => void;
|
|
924
|
+
text?: string;
|
|
925
|
+
showCloseButton?: boolean;
|
|
926
|
+
};
|
|
927
|
+
declare const DisconnectConfirmContent: ({
|
|
928
|
+
onDisconnect,
|
|
929
|
+
onBack,
|
|
930
|
+
onClose,
|
|
931
|
+
showCloseButton,
|
|
932
|
+
text
|
|
933
|
+
}: DisconnectConfirmContentProps) => react_jsx_runtime0.JSX.Element;
|
|
934
|
+
//#endregion
|
|
935
|
+
//#region src/hooks/api/privy/useFetchAppInfo.d.ts
|
|
936
|
+
declare const fetchPrivyAppInfo: (appId: string) => Promise<PrivyAppInfo>;
|
|
937
|
+
declare const getPrivyAppInfoQueryKey: (appIds: string | string[]) => string[];
|
|
938
|
+
declare const useFetchAppInfo: (appIds: string | string[]) => _tanstack_react_query8.UseQueryResult<{
|
|
939
|
+
[k: string]: {
|
|
940
|
+
website: string | undefined;
|
|
941
|
+
id: string;
|
|
942
|
+
name: string;
|
|
943
|
+
logo_url: string;
|
|
944
|
+
icon_url: string | null;
|
|
945
|
+
terms_and_conditions_url: string;
|
|
946
|
+
privacy_policy_url: string;
|
|
947
|
+
theme: string;
|
|
948
|
+
accent_color: string;
|
|
949
|
+
wallet_auth: boolean;
|
|
950
|
+
email_auth: boolean;
|
|
951
|
+
google_oauth: boolean;
|
|
952
|
+
twitter_oauth: boolean;
|
|
953
|
+
url: string;
|
|
954
|
+
};
|
|
955
|
+
}, Error>;
|
|
956
|
+
//#endregion
|
|
957
|
+
//#region src/hooks/api/privy/useFetchPrivyStatus.d.ts
|
|
958
|
+
declare const fetchPrivyStatus: () => Promise<string>;
|
|
959
|
+
declare const useFetchPrivyStatus: () => _tanstack_react_query8.UseQueryResult<string, Error>;
|
|
960
|
+
//#endregion
|
|
961
|
+
//#region src/hooks/api/vetDomains/useVechainDomain.d.ts
|
|
962
|
+
interface VeChainDomainResult {
|
|
963
|
+
address?: string;
|
|
964
|
+
domain?: string;
|
|
965
|
+
isValidAddressOrDomain: boolean;
|
|
966
|
+
isPrimaryDomain: boolean;
|
|
967
|
+
}
|
|
968
|
+
declare const getVechainDomainQueryKey: (addressOrDomain?: string | null) => (string | null | undefined)[];
|
|
969
|
+
declare const useVechainDomain: (addressOrDomain?: string | null) => _tanstack_react_query8.UseQueryResult<VeChainDomainResult, Error>;
|
|
970
|
+
//#endregion
|
|
971
|
+
//#region src/hooks/api/vetDomains/useEnsRecordExists.d.ts
|
|
972
|
+
declare const getEnsRecordExistsQueryKey: (name: string) => string[];
|
|
973
|
+
declare const useEnsRecordExists: (name: string) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
974
|
+
//#endregion
|
|
975
|
+
//#region src/hooks/api/vetDomains/useClaimVeWorldSubdomain.d.ts
|
|
976
|
+
type useClaimVeWorldSubdomainProps = {
|
|
977
|
+
subdomain: string;
|
|
978
|
+
domain: string;
|
|
979
|
+
onSuccess?: () => void;
|
|
980
|
+
onError?: () => void;
|
|
981
|
+
onSuccessMessageTitle?: number;
|
|
982
|
+
alreadyOwned?: boolean;
|
|
983
|
+
};
|
|
984
|
+
type useClaimVeWorldSubdomainReturnValue = {
|
|
985
|
+
sendTransaction: () => Promise<void>;
|
|
986
|
+
clauses: () => TransactionClause[];
|
|
987
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
988
|
+
/**
|
|
989
|
+
* Hook for claiming a .veworld.vet subdomain
|
|
990
|
+
*
|
|
991
|
+
* This hook specializes in handling subdomains in the .veworld.vet domain
|
|
992
|
+
*/
|
|
993
|
+
declare const useClaimVeWorldSubdomain: ({
|
|
994
|
+
subdomain,
|
|
995
|
+
domain,
|
|
996
|
+
onSuccess,
|
|
997
|
+
onError,
|
|
998
|
+
alreadyOwned
|
|
999
|
+
}: useClaimVeWorldSubdomainProps) => useClaimVeWorldSubdomainReturnValue;
|
|
1000
|
+
//#endregion
|
|
1001
|
+
//#region src/hooks/api/vetDomains/useClaimVetDomain.d.ts
|
|
1002
|
+
type useClaimVetDomainProps = {
|
|
1003
|
+
domain: string;
|
|
1004
|
+
onSuccess?: () => void;
|
|
1005
|
+
onError?: () => void;
|
|
1006
|
+
onSuccessMessageTitle?: number;
|
|
1007
|
+
alreadyOwned?: boolean;
|
|
1008
|
+
};
|
|
1009
|
+
type useClaimVetDomainReturnValue = {
|
|
1010
|
+
sendTransaction: () => Promise<void>;
|
|
1011
|
+
clauses: () => TransactionClause[];
|
|
1012
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
1013
|
+
declare const buildVetDomainClauses: (domain: string, alreadyOwned: boolean, account: Wallet, network: VechainKitProviderProps["network"]) => TransactionClause[];
|
|
1014
|
+
/**
|
|
1015
|
+
* Hook for claiming a .vet domain
|
|
1016
|
+
*
|
|
1017
|
+
* This hook specializes in handling primary .vet domains
|
|
1018
|
+
*/
|
|
1019
|
+
declare const useClaimVetDomain: ({
|
|
1020
|
+
domain,
|
|
1021
|
+
onSuccess,
|
|
1022
|
+
onError,
|
|
1023
|
+
alreadyOwned
|
|
1024
|
+
}: useClaimVetDomainProps) => useClaimVetDomainReturnValue;
|
|
1025
|
+
//#endregion
|
|
1026
|
+
//#region src/hooks/api/vetDomains/useIsDomainProtected.d.ts
|
|
1027
|
+
declare const getIsDomainProtectedQueryKey: (domain?: string) => (string | undefined)[];
|
|
1028
|
+
/**
|
|
1029
|
+
* Custom hook to fetch the protection status of a VeChain domain.
|
|
1030
|
+
*
|
|
1031
|
+
* @param {string} [domain] - The domain to fetch the protection status for.
|
|
1032
|
+
* @param {boolean} [enabled=true] - Flag to enable or disable the hook.
|
|
1033
|
+
* @returns The result of the useQuery hook, with the protection status.
|
|
1034
|
+
*/
|
|
1035
|
+
declare const useIsDomainProtected: (domain?: string, enabled?: boolean) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
1036
|
+
//#endregion
|
|
1037
|
+
//#region src/hooks/api/vetDomains/useGetDomainsOfAddress.d.ts
|
|
1038
|
+
declare const DomainSchema: z.ZodObject<{
|
|
1039
|
+
name: z.ZodString;
|
|
1040
|
+
}, z.core.$strip>;
|
|
1041
|
+
declare const DomainsResponseSchema: z.ZodObject<{
|
|
1042
|
+
domains: z.ZodArray<z.ZodObject<{
|
|
1043
|
+
name: z.ZodString;
|
|
1044
|
+
}, z.core.$strip>>;
|
|
1045
|
+
}, z.core.$strip>;
|
|
1046
|
+
type Domain = z.infer<typeof DomainSchema>;
|
|
1047
|
+
type DomainsResponse = z.infer<typeof DomainsResponseSchema>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Fetches all domains owned by an address
|
|
1050
|
+
* @param networkType The network type
|
|
1051
|
+
* @param address The owner's address
|
|
1052
|
+
* @param parentDomain The parent domain (e.g., "veworld.vet")
|
|
1053
|
+
* @returns The domains owned by the address
|
|
1054
|
+
*/
|
|
1055
|
+
declare const getDomainsOfAddress: (networkType: NETWORK_TYPE, address?: string, parentDomain?: string) => Promise<DomainsResponse>;
|
|
1056
|
+
declare const getDomainsOfAddressQueryKey: (address?: string, parentDomain?: string) => (string | undefined)[];
|
|
1057
|
+
/**
|
|
1058
|
+
* Hook to fetch all domains owned by an address
|
|
1059
|
+
* @param address The owner's address
|
|
1060
|
+
* @param parentDomain The parent domain (e.g., "veworld.vet")
|
|
1061
|
+
* @returns The domains owned by the address
|
|
1062
|
+
*/
|
|
1063
|
+
declare const useGetDomainsOfAddress: (address?: string, parentDomain?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1064
|
+
domains: {
|
|
1065
|
+
name: string;
|
|
1066
|
+
}[];
|
|
1067
|
+
}, Error>;
|
|
1068
|
+
//#endregion
|
|
1069
|
+
//#region src/hooks/api/vetDomains/useGetAvatar.d.ts
|
|
1070
|
+
declare const getAvatarQueryKey: (name: string, networkType: NETWORK_TYPE) => string[];
|
|
1071
|
+
/**
|
|
1072
|
+
* Hook to fetch the avatar URL for a VET domain name
|
|
1073
|
+
* @param name - The VET domain name
|
|
1074
|
+
* @returns The resolved avatar URL
|
|
1075
|
+
*/
|
|
1076
|
+
declare const useGetAvatar: (name: string) => _tanstack_react_query8.UseQueryResult<string | null, Error>;
|
|
1077
|
+
//#endregion
|
|
1078
|
+
//#region src/hooks/api/vetDomains/useGetTextRecords.d.ts
|
|
1079
|
+
/**
|
|
1080
|
+
* Get text records for a VET domain from the contract
|
|
1081
|
+
* @param nodeUrl The node URL to query
|
|
1082
|
+
* @param network The network type
|
|
1083
|
+
* @param domain The domain to get text records for. If not provided, will return empty object
|
|
1084
|
+
* @returns Object containing text records in the form of {@link TextRecords}
|
|
1085
|
+
*/
|
|
1086
|
+
declare const getTextRecords: (nodeUrl: string, network: NETWORK_TYPE, domain?: string) => Promise<TextRecords>;
|
|
1087
|
+
declare const getTextRecordsQueryKey: (domain?: string, network?: NETWORK_TYPE) => (string | undefined)[];
|
|
1088
|
+
declare const useGetTextRecords: (domain?: string) => _tanstack_react_query8.UseQueryResult<TextRecords, Error>;
|
|
1089
|
+
//#endregion
|
|
1090
|
+
//#region src/hooks/api/vetDomains/useUpdateTextRecord.d.ts
|
|
1091
|
+
type UpdateTextRecordVariables = {
|
|
1092
|
+
domain: string;
|
|
1093
|
+
key: string;
|
|
1094
|
+
value: string;
|
|
1095
|
+
};
|
|
1096
|
+
type UseUpdateTextRecordProps = {
|
|
1097
|
+
onSuccess?: () => void | Promise<void>;
|
|
1098
|
+
onError?: (error?: Error) => void | Promise<void>;
|
|
1099
|
+
signerAccountAddress?: string;
|
|
1100
|
+
resolverAddress?: string;
|
|
1101
|
+
};
|
|
1102
|
+
type UseUpdateTextRecordReturnValue = {
|
|
1103
|
+
sendTransaction: (params: UpdateTextRecordVariables[]) => Promise<void> | undefined;
|
|
1104
|
+
clauses: (params: UpdateTextRecordVariables[]) => TransactionClause[];
|
|
1105
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
1106
|
+
declare const buildClauses: (resolverAddress: string, params: UpdateTextRecordVariables[]) => TransactionClause[];
|
|
1107
|
+
declare const useUpdateTextRecord: ({
|
|
1108
|
+
onSuccess,
|
|
1109
|
+
onError,
|
|
1110
|
+
signerAccountAddress,
|
|
1111
|
+
resolverAddress
|
|
1112
|
+
}?: UseUpdateTextRecordProps) => UseUpdateTextRecordReturnValue;
|
|
1113
|
+
//#endregion
|
|
1114
|
+
//#region src/hooks/api/vetDomains/useGetResolverAddress.d.ts
|
|
1115
|
+
declare const getResolverAddressQueryKey: (domain?: string) => (string | undefined)[];
|
|
1116
|
+
/**
|
|
1117
|
+
* Hook to get resolver address for a VET domain
|
|
1118
|
+
* @param domain The domain to get resolver for
|
|
1119
|
+
* @returns The resolver address for the domain
|
|
1120
|
+
*/
|
|
1121
|
+
declare const useGetResolverAddress: (domain?: string) => _tanstack_react_query8.UseQueryResult<`0x${string}`, unknown>;
|
|
1122
|
+
//#endregion
|
|
1123
|
+
//#region src/hooks/api/vetDomains/useGetAvatarOfAddress.d.ts
|
|
1124
|
+
declare const getAvatarOfAddressQueryKey: (address?: string) => (string | undefined)[];
|
|
1125
|
+
/**
|
|
1126
|
+
* Hook to fetch the avatar for an address by first getting their domains
|
|
1127
|
+
* and then fetching the avatar for the first domain found
|
|
1128
|
+
* @param address The owner's address
|
|
1129
|
+
* @returns The avatar URL for the address's primary domain
|
|
1130
|
+
*/
|
|
1131
|
+
declare const useGetAvatarOfAddress: (address?: string) => _tanstack_react_query8.UseQueryResult<string, Error>;
|
|
1132
|
+
//#endregion
|
|
1133
|
+
//#region src/hooks/api/vetDomains/useGetAvatarLegacy.d.ts
|
|
1134
|
+
/**
|
|
1135
|
+
* Fetches the avatar for a given VET domain name
|
|
1136
|
+
* @param networkType - The network type ('main' or 'test')
|
|
1137
|
+
* @param nodeUrl - The node URL
|
|
1138
|
+
* @param name - The VET domain name
|
|
1139
|
+
* @returns The avatar URL from the response
|
|
1140
|
+
*/
|
|
1141
|
+
declare const getAvatarLegacy: (networkType: NETWORK_TYPE, nodeUrl: string, name: string) => Promise<string | null>;
|
|
1142
|
+
declare const getAvatarLegacyQueryKey: (name: string, networkType: NETWORK_TYPE) => string[];
|
|
1143
|
+
/**
|
|
1144
|
+
* Hook to fetch the avatar URL for a VET domain name
|
|
1145
|
+
* @param name - The VET domain name
|
|
1146
|
+
* @returns The resolved avatar URL
|
|
1147
|
+
*/
|
|
1148
|
+
declare const useGetAvatarLegacy: (name: string) => _tanstack_react_query8.UseQueryResult<string | null, Error>;
|
|
1149
|
+
//#endregion
|
|
1150
|
+
//#region src/hooks/api/vetDomains/useUnsetDomain.d.ts
|
|
1151
|
+
type useUnsetDomainProps = {
|
|
1152
|
+
onSuccess?: () => void;
|
|
1153
|
+
onError?: () => void;
|
|
1154
|
+
};
|
|
1155
|
+
type useUnsetDomainReturnValue = {
|
|
1156
|
+
sendTransaction: () => Promise<void>;
|
|
1157
|
+
clauses: () => TransactionClause[];
|
|
1158
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
1159
|
+
/**
|
|
1160
|
+
* Hook for unsetting any domain name (both .veworld.vet and .vet domains)
|
|
1161
|
+
*
|
|
1162
|
+
* This hook is a dedicated implementation for the unset functionality
|
|
1163
|
+
* that was previously part of the claim hooks.
|
|
1164
|
+
*/
|
|
1165
|
+
declare const useUnsetDomain: ({
|
|
1166
|
+
onSuccess,
|
|
1167
|
+
onError
|
|
1168
|
+
}: useUnsetDomainProps) => useUnsetDomainReturnValue;
|
|
1169
|
+
//#endregion
|
|
1170
|
+
//#region src/hooks/api/wallet/useTokenBalances.d.ts
|
|
1171
|
+
type WalletTokenBalance = {
|
|
1172
|
+
address: string;
|
|
1173
|
+
symbol: string;
|
|
1174
|
+
balance: string;
|
|
1175
|
+
};
|
|
1176
|
+
declare const useTokenBalances: (address?: string) => {
|
|
1177
|
+
balances: WalletTokenBalance[];
|
|
1178
|
+
isLoading: boolean;
|
|
1179
|
+
};
|
|
1180
|
+
//#endregion
|
|
1181
|
+
//#region src/hooks/api/wallet/useTokenPrices.d.ts
|
|
1182
|
+
type ExchangeRates = {
|
|
1183
|
+
eurUsdPrice: number;
|
|
1184
|
+
gbpUsdPrice: number;
|
|
1185
|
+
};
|
|
1186
|
+
declare const useTokenPrices: () => {
|
|
1187
|
+
prices: {
|
|
1188
|
+
[x: string]: number;
|
|
1189
|
+
};
|
|
1190
|
+
exchangeRates: ExchangeRates;
|
|
1191
|
+
isLoading: boolean;
|
|
1192
|
+
};
|
|
1193
|
+
//#endregion
|
|
1194
|
+
//#region src/hooks/api/wallet/useTokensWithValues.d.ts
|
|
1195
|
+
type TokenWithValue = WalletTokenBalance & {
|
|
1196
|
+
priceUsd: number;
|
|
1197
|
+
valueUsd: number;
|
|
1198
|
+
valueInCurrency: number;
|
|
1199
|
+
};
|
|
1200
|
+
type UseTokensWithValuesProps = {
|
|
1201
|
+
address?: string;
|
|
1202
|
+
};
|
|
1203
|
+
declare const useTokensWithValues: ({
|
|
1204
|
+
address
|
|
1205
|
+
}: UseTokensWithValuesProps) => {
|
|
1206
|
+
tokens: {
|
|
1207
|
+
priceUsd: number;
|
|
1208
|
+
valueUsd: number;
|
|
1209
|
+
valueInCurrency: number;
|
|
1210
|
+
address: string;
|
|
1211
|
+
symbol: string;
|
|
1212
|
+
balance: string;
|
|
1213
|
+
}[];
|
|
1214
|
+
sortedTokens: {
|
|
1215
|
+
priceUsd: number;
|
|
1216
|
+
valueUsd: number;
|
|
1217
|
+
valueInCurrency: number;
|
|
1218
|
+
address: string;
|
|
1219
|
+
symbol: string;
|
|
1220
|
+
balance: string;
|
|
1221
|
+
}[];
|
|
1222
|
+
tokensWithBalance: {
|
|
1223
|
+
priceUsd: number;
|
|
1224
|
+
valueUsd: number;
|
|
1225
|
+
valueInCurrency: number;
|
|
1226
|
+
address: string;
|
|
1227
|
+
symbol: string;
|
|
1228
|
+
balance: string;
|
|
1229
|
+
}[];
|
|
1230
|
+
isLoading: boolean;
|
|
1231
|
+
};
|
|
1232
|
+
//#endregion
|
|
1233
|
+
//#region src/hooks/api/wallet/useTotalBalance.d.ts
|
|
1234
|
+
type UseTotalBalanceProps = {
|
|
1235
|
+
address?: string;
|
|
1236
|
+
};
|
|
1237
|
+
declare const useTotalBalance: ({
|
|
1238
|
+
address
|
|
1239
|
+
}: UseTotalBalanceProps) => {
|
|
1240
|
+
totalBalanceInCurrency: number;
|
|
1241
|
+
totalBalanceUsd: number;
|
|
1242
|
+
formattedBalance: string;
|
|
1243
|
+
isLoading: boolean;
|
|
1244
|
+
hasAnyBalance: boolean;
|
|
1245
|
+
};
|
|
1246
|
+
//#endregion
|
|
1247
|
+
//#region src/hooks/api/wallet/useCurrentAllocationsRoundId.d.ts
|
|
1248
|
+
/**
|
|
1249
|
+
* Returns the query key for fetching the current allocations round ID.
|
|
1250
|
+
* @returns The query key for fetching the current allocations round ID.
|
|
1251
|
+
*/
|
|
1252
|
+
declare const getCurrentAllocationsRoundIdQueryKey: (address: string) => string[];
|
|
1253
|
+
/**
|
|
1254
|
+
* Hook to get the current roundId of allocations voting
|
|
1255
|
+
* @returns the current roundId of allocations voting
|
|
1256
|
+
*/
|
|
1257
|
+
declare const useCurrentAllocationsRoundId: () => _tanstack_react_query8.UseQueryResult<string, unknown>;
|
|
1258
|
+
//#endregion
|
|
1259
|
+
//#region src/hooks/api/wallet/useCustomTokens.d.ts
|
|
1260
|
+
declare const useCustomTokens: () => {
|
|
1261
|
+
customTokens: CustomTokenInfo[];
|
|
1262
|
+
addToken: (address: CustomTokenInfo["address"]) => Promise<void>;
|
|
1263
|
+
removeToken: (address: string) => void;
|
|
1264
|
+
isTokenIncluded: (address: string) => boolean;
|
|
1265
|
+
isDefaultToken: (address: string) => boolean;
|
|
1266
|
+
};
|
|
1267
|
+
//#endregion
|
|
1268
|
+
//#region src/hooks/api/wallet/useGetB3trBalance.d.ts
|
|
1269
|
+
declare const getB3trBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1270
|
+
declare const useGetB3trBalance: (address?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1271
|
+
original: string;
|
|
1272
|
+
scaled: string;
|
|
1273
|
+
formatted: string;
|
|
1274
|
+
}, Error>;
|
|
1275
|
+
//#endregion
|
|
1276
|
+
//#region src/hooks/api/wallet/useGetCustomTokenBalances.d.ts
|
|
1277
|
+
type TokenWithBalance = CustomTokenInfo & TokenBalance;
|
|
1278
|
+
declare const getCustomTokenBalanceQueryKey: (tokenAddress?: string, address?: string) => (string | undefined)[];
|
|
1279
|
+
declare const useGetCustomTokenBalances: (address?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1280
|
+
original: string;
|
|
1281
|
+
scaled: string;
|
|
1282
|
+
formatted: string;
|
|
1283
|
+
name: string;
|
|
1284
|
+
address: string;
|
|
1285
|
+
decimals: string;
|
|
1286
|
+
symbol: string;
|
|
1287
|
+
}, Error>[];
|
|
1288
|
+
//#endregion
|
|
1289
|
+
//#region src/hooks/api/wallet/useGetCustomTokenInfo.d.ts
|
|
1290
|
+
declare const getTokenInfo: (tokenAddress: string, networkUrl: string) => Promise<CustomTokenInfo>;
|
|
1291
|
+
declare const getCustomTokenInfoQueryKey: (tokenAddress: string) => string[];
|
|
1292
|
+
declare const useGetCustomTokenInfo: (tokenAddress: string) => _tanstack_react_query8.UseQueryResult<CustomTokenInfo, Error>;
|
|
1293
|
+
//#endregion
|
|
1294
|
+
//#region src/hooks/api/wallet/useGetErc20Balance.d.ts
|
|
1295
|
+
declare const getErc20BalanceQueryKey: (tokenAddress: string, address?: string) => (string | undefined)[];
|
|
1296
|
+
declare const useGetErc20Balance: (tokenAddress: string, address?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1297
|
+
original: string;
|
|
1298
|
+
scaled: string;
|
|
1299
|
+
formatted: string;
|
|
1300
|
+
}, Error>;
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region src/hooks/api/wallet/useGetTokenUsdPrice.d.ts
|
|
1303
|
+
declare const PRICE_FEED_IDS: {
|
|
1304
|
+
readonly B3TR: "0x623374722d757364000000000000000000000000000000000000000000000000";
|
|
1305
|
+
readonly VET: "0x7665742d75736400000000000000000000000000000000000000000000000000";
|
|
1306
|
+
readonly VTHO: "0x7674686f2d757364000000000000000000000000000000000000000000000000";
|
|
1307
|
+
readonly GBP: "0x6762702d75736400000000000000000000000000000000000000000000000000";
|
|
1308
|
+
readonly EUR: "0x657572742d757364000000000000000000000000000000000000000000000000";
|
|
1309
|
+
};
|
|
1310
|
+
type SupportedToken = keyof typeof PRICE_FEED_IDS;
|
|
1311
|
+
declare const getTokenUsdPrice: (thor: ThorClient, token: SupportedToken, network: NETWORK_TYPE) => Promise<number>;
|
|
1312
|
+
declare const getTokenUsdPriceQueryKey: (token: SupportedToken) => string[];
|
|
1313
|
+
declare const useGetTokenUsdPrice: (token: SupportedToken) => _tanstack_react_query8.UseQueryResult<number, Error>;
|
|
1314
|
+
//#endregion
|
|
1315
|
+
//#region src/hooks/api/wallet/useGetVot3Balance.d.ts
|
|
1316
|
+
declare const getVot3BalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
1317
|
+
declare const useGetVot3Balance: (address?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1318
|
+
original: string;
|
|
1319
|
+
scaled: string;
|
|
1320
|
+
formatted: string;
|
|
1321
|
+
}, Error>;
|
|
1322
|
+
//#endregion
|
|
1323
|
+
//#region src/hooks/api/wallet/useIsPerson.d.ts
|
|
1324
|
+
/**
|
|
1325
|
+
* Returns the query key for fetching the isPerson status.
|
|
1326
|
+
* @param user - The user address.
|
|
1327
|
+
* @param networkType - The network type.
|
|
1328
|
+
* @returns The query key for fetching the isPerson status.
|
|
1329
|
+
*/
|
|
1330
|
+
declare const getIsPersonQueryKey: (user: string, networkType: NETWORK_TYPE) => string[];
|
|
1331
|
+
/**
|
|
1332
|
+
* Hook to get the isPerson status from the VeBetterPassport contract.
|
|
1333
|
+
* @param user - The user address.
|
|
1334
|
+
* @returns The isPerson status.
|
|
1335
|
+
*/
|
|
1336
|
+
declare const useIsPerson: (user?: string | null) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
1337
|
+
//#endregion
|
|
1338
|
+
//#region src/hooks/api/wallet/useMostVotedAppsInRound.d.ts
|
|
1339
|
+
type XApp = {
|
|
1340
|
+
id: string;
|
|
1341
|
+
teamWalletAddress: string;
|
|
1342
|
+
name: string;
|
|
1343
|
+
metadataURI: string;
|
|
1344
|
+
createdAtTimestamp: string;
|
|
1345
|
+
};
|
|
1346
|
+
type MostVotedAppsInRoundReturnType = {
|
|
1347
|
+
percentage: number;
|
|
1348
|
+
id: string;
|
|
1349
|
+
app: XApp;
|
|
1350
|
+
};
|
|
1351
|
+
/**
|
|
1352
|
+
* Get the most voted apps in a round
|
|
1353
|
+
*
|
|
1354
|
+
* @param roundId the id of the round to get the most voted apps
|
|
1355
|
+
* @returns a sorted array of the most voted apps in the round
|
|
1356
|
+
*/
|
|
1357
|
+
declare const useMostVotedAppsInRound: (roundId?: string) => {
|
|
1358
|
+
data: MostVotedAppsInRoundReturnType[];
|
|
1359
|
+
isLoading: boolean;
|
|
1360
|
+
};
|
|
1361
|
+
//#endregion
|
|
1362
|
+
//#region src/hooks/api/wallet/useRefreshBalances.d.ts
|
|
1363
|
+
declare const useRefreshBalances: () => {
|
|
1364
|
+
refresh: () => Promise<void>;
|
|
1365
|
+
};
|
|
1366
|
+
//#endregion
|
|
1367
|
+
//#region src/hooks/api/wallet/useRefreshMetadata.d.ts
|
|
1368
|
+
declare const useRefreshMetadata: (domain: string, address: string) => {
|
|
1369
|
+
refresh: () => Promise<void>;
|
|
1370
|
+
};
|
|
1371
|
+
//#endregion
|
|
1372
|
+
//#region src/hooks/api/wallet/useRoundXApps.d.ts
|
|
1373
|
+
declare const getRoundXAppsQueryKey: (roundId: string, networkType: NETWORK_TYPE) => (string | unknown[])[];
|
|
1374
|
+
declare const useRoundXApps: (roundId?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1375
|
+
id: string;
|
|
1376
|
+
teamWalletAddress: `0x${string}`;
|
|
1377
|
+
name: string;
|
|
1378
|
+
metadataURI: string;
|
|
1379
|
+
createdAtTimestamp: string;
|
|
1380
|
+
}[], unknown>;
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region src/hooks/api/wallet/useWallet.d.ts
|
|
1383
|
+
type UseWalletReturnType = {
|
|
1384
|
+
account: Wallet;
|
|
1385
|
+
connectedWallet: Wallet;
|
|
1386
|
+
smartAccount: SmartAccount;
|
|
1387
|
+
privyUser: User | null;
|
|
1388
|
+
connection: {
|
|
1389
|
+
isConnected: boolean;
|
|
1390
|
+
isLoading: boolean;
|
|
1391
|
+
isConnectedWithSocialLogin: boolean;
|
|
1392
|
+
isConnectedWithDappKit: boolean;
|
|
1393
|
+
isConnectedWithCrossApp: boolean;
|
|
1394
|
+
isConnectedWithPrivy: boolean;
|
|
1395
|
+
isConnectedWithVeChain: boolean;
|
|
1396
|
+
source: ConnectionSource;
|
|
1397
|
+
isInAppBrowser: boolean;
|
|
1398
|
+
nodeUrl: string;
|
|
1399
|
+
delegatorUrl?: string;
|
|
1400
|
+
chainId?: string;
|
|
1401
|
+
network: NETWORK_TYPE;
|
|
1402
|
+
};
|
|
1403
|
+
disconnect: () => Promise<void>;
|
|
1404
|
+
};
|
|
1405
|
+
declare const useWallet: () => UseWalletReturnType;
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region src/hooks/api/wallet/useWalletMetadata.d.ts
|
|
1408
|
+
declare const useWalletMetadata: (address: string, networkType: NETWORK_TYPE) => {
|
|
1409
|
+
domain: string | undefined;
|
|
1410
|
+
image: string | undefined;
|
|
1411
|
+
records: ENSRecords;
|
|
1412
|
+
isLoading: boolean;
|
|
1413
|
+
};
|
|
1414
|
+
//#endregion
|
|
1415
|
+
//#region src/hooks/api/wallet/useXAppMetadata.d.ts
|
|
1416
|
+
/**
|
|
1417
|
+
* The metadata of an xApp from the xApps metadata base uri
|
|
1418
|
+
* @property name - The name of the xApp
|
|
1419
|
+
* @property description - The description of the xApp
|
|
1420
|
+
* @property distribution_strategy - The B3TR distribution strategy of the xApp
|
|
1421
|
+
* @property external_url - The external url of the xApp
|
|
1422
|
+
* @property logo - The logo of the xApp (ipfs uri)
|
|
1423
|
+
* @property banner - The banner of the xApp (ipfs uri)
|
|
1424
|
+
* @property screenshots - The screenshots of the xApp (ipfs uri)
|
|
1425
|
+
* @property social_urls - The social urls of the xApp
|
|
1426
|
+
* @property app_urls - The app urls of the xApp
|
|
1427
|
+
* @property categories - The categories of the xApp
|
|
1428
|
+
*/
|
|
1429
|
+
type XAppMetadata = {
|
|
1430
|
+
name: string;
|
|
1431
|
+
description: string;
|
|
1432
|
+
distribution_strategy?: string;
|
|
1433
|
+
external_url: string;
|
|
1434
|
+
logo: string;
|
|
1435
|
+
banner: string;
|
|
1436
|
+
screenshots: string[];
|
|
1437
|
+
social_urls: {
|
|
1438
|
+
name: string;
|
|
1439
|
+
url: string;
|
|
1440
|
+
}[];
|
|
1441
|
+
app_urls: {
|
|
1442
|
+
code: string;
|
|
1443
|
+
url: string;
|
|
1444
|
+
}[];
|
|
1445
|
+
tweets: string[];
|
|
1446
|
+
ve_world: {
|
|
1447
|
+
banner: string;
|
|
1448
|
+
};
|
|
1449
|
+
categories: string[];
|
|
1450
|
+
};
|
|
1451
|
+
/**
|
|
1452
|
+
dapp-kit broke the pre-fetching
|
|
1453
|
+
* @param uri - The uri of the xApps metadata
|
|
1454
|
+
* @returns The metadata of the xApp see {@link XAppMetadata}
|
|
1455
|
+
*/
|
|
1456
|
+
declare const getXAppMetadata: (uri: string, networkType: NETWORK_TYPE) => Promise<XAppMetadata | undefined>;
|
|
1457
|
+
declare const useXAppMetadata: (xAppId: string) => _tanstack_react_query8.UseQueryResult<XAppMetadata | undefined, Error>;
|
|
1458
|
+
//#endregion
|
|
1459
|
+
//#region src/hooks/api/wallet/useXAppShares.d.ts
|
|
1460
|
+
/**
|
|
1461
|
+
* Returns the query key for the shares of multiple xApps in an allocation round.
|
|
1462
|
+
* @param roundId the roundId the get the shares for
|
|
1463
|
+
*/
|
|
1464
|
+
declare const getXAppsSharesQueryKey: (roundId?: number | string) => (string | number | undefined)[];
|
|
1465
|
+
/**
|
|
1466
|
+
* Fetch shares of multiple xApps in an allocation round
|
|
1467
|
+
* @param apps the xApps to get the shares for
|
|
1468
|
+
* @param roundId the round id to get the shares for
|
|
1469
|
+
* @returns the shares (% of allocation pool) for the xApps in the round { allocated: number, unallocated: number }
|
|
1470
|
+
*
|
|
1471
|
+
*/
|
|
1472
|
+
declare const useXAppsShares: (apps: string[], roundId?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
1473
|
+
app: string;
|
|
1474
|
+
share: number;
|
|
1475
|
+
unallocatedShare: number;
|
|
1476
|
+
}[], Error>;
|
|
1477
|
+
//#endregion
|
|
1478
|
+
//#region src/hooks/api/ipfs/useIpfsMetadata.d.ts
|
|
1479
|
+
/**
|
|
1480
|
+
* Fetches metadata from IPFS for a given URI
|
|
1481
|
+
*
|
|
1482
|
+
* @param networkType - The network type
|
|
1483
|
+
* @param uri - The IPFS URI
|
|
1484
|
+
* @param parseJson - Whether to parse the JSON
|
|
1485
|
+
* @returns The metadata
|
|
1486
|
+
*/
|
|
1487
|
+
declare const getIpfsMetadata: <T$1>(networkType: NETWORK_TYPE, uri?: string, parseJson?: boolean) => Promise<T$1>;
|
|
1488
|
+
declare const getIpfsMetadataQueryKey: (networkType: NETWORK_TYPE, ipfsUri?: string) => (string | undefined)[];
|
|
1489
|
+
/**
|
|
1490
|
+
* Fetches metadata from IPFS for a given URI
|
|
1491
|
+
* @param ipfsUri - The IPFS URI
|
|
1492
|
+
* @returns The metadata from IPFS
|
|
1493
|
+
*/
|
|
1494
|
+
declare const useIpfsMetadata: <T$1>(ipfsUri?: string, parseJson?: boolean) => _tanstack_react_query8.UseQueryResult<_tanstack_react_query8.NoInfer<T$1>, Error>;
|
|
1495
|
+
//#endregion
|
|
1496
|
+
//#region src/hooks/api/ipfs/useIpfsImage.d.ts
|
|
1497
|
+
interface IpfsImage {
|
|
1498
|
+
image: string;
|
|
1499
|
+
mime: string;
|
|
1500
|
+
mediaType: NFTMediaType;
|
|
1501
|
+
}
|
|
1502
|
+
declare const MAX_IMAGE_SIZE: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* Fetches NFT media from IPFS
|
|
1505
|
+
* @param networkType - The network type
|
|
1506
|
+
* @param uri - The IPFS URI of the NFT media
|
|
1507
|
+
* @returns The NFT media
|
|
1508
|
+
*/
|
|
1509
|
+
declare const getIpfsImage: (networkType: NETWORK_TYPE, uri?: string) => Promise<IpfsImage>;
|
|
1510
|
+
/**
|
|
1511
|
+
* @param networkType - The network type
|
|
1512
|
+
* @param imageIpfsUri - The IPFS URI of the NFT media
|
|
1513
|
+
* @returns The NFT media
|
|
1514
|
+
*/
|
|
1515
|
+
declare const getIpfsImageQueryKey: (networkType: NETWORK_TYPE, imageIpfsUri?: null | string) => (string | null | undefined)[];
|
|
1516
|
+
/**
|
|
1517
|
+
* Hook to fetch NFT media from IPFS
|
|
1518
|
+
* @param imageIpfsUri - The IPFS URI of the NFT media
|
|
1519
|
+
* @returns The NFT media
|
|
1520
|
+
*/
|
|
1521
|
+
declare const useIpfsImage: (imageIpfsUri?: null | string) => _tanstack_react_query8.UseQueryResult<IpfsImage, Error>;
|
|
1522
|
+
/**
|
|
1523
|
+
* Custom hook to fetch a list of IPFS images.
|
|
1524
|
+
*
|
|
1525
|
+
* @param imageIpfsUriList - An array of IPFS URIs for the images.
|
|
1526
|
+
* @returns An array of queries for each IPFS image URI.
|
|
1527
|
+
*/
|
|
1528
|
+
declare const useIpfsImageList: (imageIpfsUriList: string[]) => _tanstack_react_query8.UseQueryResult<IpfsImage, Error>[];
|
|
1529
|
+
//#endregion
|
|
1530
|
+
//#region src/hooks/api/ipfs/useIpfsMetadatas.d.ts
|
|
1531
|
+
/**
|
|
1532
|
+
* Fetches metadatas from IPFS for given URIs
|
|
1533
|
+
* @param ipfsUris - The IPFS URIs
|
|
1534
|
+
* @returns The metadata from IPFS for each URI
|
|
1535
|
+
*/
|
|
1536
|
+
declare const useIpfsMetadatas: <T$1>(ipfsUris: string[], parseJson?: boolean) => _tanstack_react_query8.UseQueryResult<T$1, Error>[];
|
|
1537
|
+
//#endregion
|
|
1538
|
+
//#region src/hooks/api/ipfs/useUploadImages.d.ts
|
|
1539
|
+
declare const imageCompressionOptions: Options;
|
|
1540
|
+
declare const compressImages: (images: UploadedImage[]) => Promise<File[]>;
|
|
1541
|
+
type Props$20 = {
|
|
1542
|
+
compressImages?: boolean;
|
|
1543
|
+
defaultImages?: UploadedImage[];
|
|
1544
|
+
};
|
|
1545
|
+
/**
|
|
1546
|
+
* Hook to handle image uploads and compressions in a dropzone
|
|
1547
|
+
* @param param0 compressImages: boolean to indicate if the images should be compressed (default: true)
|
|
1548
|
+
* @returns uploadedImages: array of uploaded images, setUploadedImages: function to set the uploaded images, onDrop: function to handle the drop event
|
|
1549
|
+
*/
|
|
1550
|
+
type UploadedImage = {
|
|
1551
|
+
file: File;
|
|
1552
|
+
image: string;
|
|
1553
|
+
};
|
|
1554
|
+
declare const useUploadImages: ({
|
|
1555
|
+
compressImages,
|
|
1556
|
+
defaultImages
|
|
1557
|
+
}: Props$20) => {
|
|
1558
|
+
uploadedImages: UploadedImage[];
|
|
1559
|
+
setUploadedImages: react0.Dispatch<react0.SetStateAction<UploadedImage[]>>;
|
|
1560
|
+
onUpload: (acceptedFiles: File[], keepCurrent?: boolean) => Promise<void>;
|
|
1561
|
+
onRemove: (index: number) => void;
|
|
1562
|
+
invalidDateError: number[];
|
|
1563
|
+
};
|
|
1564
|
+
//#endregion
|
|
1565
|
+
//#region src/hooks/api/ipfs/useSingleImageUpload.d.ts
|
|
1566
|
+
type Props$19 = {
|
|
1567
|
+
compressImage?: boolean;
|
|
1568
|
+
defaultImage?: UploadedImage;
|
|
1569
|
+
};
|
|
1570
|
+
/**
|
|
1571
|
+
* Hook to handle image uploads and compressions in a dropzone
|
|
1572
|
+
* @param param0 compressImags: boolean to indicate if the image should be compressed (default: true)
|
|
1573
|
+
* @param param1 defaultImage: default image to be displayed
|
|
1574
|
+
* @returns uploaded image, setUploadedImage: function to set the uploaded image, onDrop: function to handle the drop event
|
|
1575
|
+
*/
|
|
1576
|
+
declare const useSingleImageUpload: ({
|
|
1577
|
+
compressImage,
|
|
1578
|
+
defaultImage
|
|
1579
|
+
}: Props$19) => {
|
|
1580
|
+
uploadedImage: UploadedImage | undefined;
|
|
1581
|
+
setUploadedImage: react0.Dispatch<react0.SetStateAction<UploadedImage | undefined>>;
|
|
1582
|
+
onUpload: (acceptedFile: File) => Promise<UploadedImage>;
|
|
1583
|
+
onRemove: () => void;
|
|
1584
|
+
};
|
|
1585
|
+
//#endregion
|
|
1586
|
+
//#region src/types/swap.d.ts
|
|
1587
|
+
/**
|
|
1588
|
+
* Swap quote from an aggregator
|
|
1589
|
+
*/
|
|
1590
|
+
interface SwapQuote {
|
|
1591
|
+
/**
|
|
1592
|
+
* The aggregator name (e.g., "BetterSwap", "VeTrade")
|
|
1593
|
+
*/
|
|
1594
|
+
aggregatorName: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* Reference to the aggregator that generated this quote
|
|
1597
|
+
*/
|
|
1598
|
+
aggregator: SwapAggregator;
|
|
1599
|
+
/**
|
|
1600
|
+
* Amount of output token to receive
|
|
1601
|
+
*/
|
|
1602
|
+
outputAmount: bigint;
|
|
1603
|
+
/**
|
|
1604
|
+
* Estimated price impact percentage
|
|
1605
|
+
*/
|
|
1606
|
+
priceImpact?: number;
|
|
1607
|
+
/**
|
|
1608
|
+
* Minimum amount of output token (considering slippage)
|
|
1609
|
+
*/
|
|
1610
|
+
minimumOutputAmount?: bigint;
|
|
1611
|
+
/**
|
|
1612
|
+
* Additional data needed for transaction building
|
|
1613
|
+
*/
|
|
1614
|
+
data?: unknown;
|
|
1615
|
+
/**
|
|
1616
|
+
* Whether the transaction simulation reverted
|
|
1617
|
+
*/
|
|
1618
|
+
reverted?: boolean;
|
|
1619
|
+
/**
|
|
1620
|
+
* Revert reason if simulation failed
|
|
1621
|
+
*/
|
|
1622
|
+
revertReason?: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* Estimated gas cost in VTHO (from simulation)
|
|
1625
|
+
*/
|
|
1626
|
+
gasCostVTHO?: number;
|
|
1627
|
+
}
|
|
1628
|
+
/**
|
|
1629
|
+
* Swap simulation result
|
|
1630
|
+
*/
|
|
1631
|
+
interface SwapSimulation {
|
|
1632
|
+
/**
|
|
1633
|
+
* Estimated gas cost in VTHO
|
|
1634
|
+
*/
|
|
1635
|
+
gasCostVTHO: number;
|
|
1636
|
+
/**
|
|
1637
|
+
* Whether the simulation was successful
|
|
1638
|
+
*/
|
|
1639
|
+
success: boolean;
|
|
1640
|
+
/**
|
|
1641
|
+
* Error message if simulation failed
|
|
1642
|
+
*/
|
|
1643
|
+
error?: string;
|
|
1644
|
+
}
|
|
1645
|
+
/**
|
|
1646
|
+
* Swap parameters
|
|
1647
|
+
*/
|
|
1648
|
+
interface SwapParams {
|
|
1649
|
+
/**
|
|
1650
|
+
* Address of the token to swap from
|
|
1651
|
+
*/
|
|
1652
|
+
fromTokenAddress: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* Address of the token to swap to
|
|
1655
|
+
*/
|
|
1656
|
+
toTokenAddress: string;
|
|
1657
|
+
/**
|
|
1658
|
+
* Amount of input token (in raw format, e.g., Wei)
|
|
1659
|
+
*/
|
|
1660
|
+
amountIn: string;
|
|
1661
|
+
/**
|
|
1662
|
+
* Address of the user making the swap
|
|
1663
|
+
*/
|
|
1664
|
+
userAddress: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* Slippage tolerance percentage (default: 1)
|
|
1667
|
+
*/
|
|
1668
|
+
slippageTolerance?: number;
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* Aggregator module interface
|
|
1672
|
+
* Each aggregator must implement these functions
|
|
1673
|
+
*/
|
|
1674
|
+
interface SwapAggregator {
|
|
1675
|
+
/**
|
|
1676
|
+
* Get a swap quote
|
|
1677
|
+
* @param params Swap parameters
|
|
1678
|
+
* @param thor Thor client instance for contract calls
|
|
1679
|
+
* @returns Promise resolving to a swap quote
|
|
1680
|
+
*/
|
|
1681
|
+
getQuote(params: SwapParams, thor: ThorClient): Promise<SwapQuote>;
|
|
1682
|
+
/**
|
|
1683
|
+
* Simulate the swap transaction to estimate gas
|
|
1684
|
+
* @param params Swap parameters
|
|
1685
|
+
* @param quote The quote from getQuote
|
|
1686
|
+
* @param thor Thor client instance for transaction simulation
|
|
1687
|
+
* @returns Promise resolving to simulation result
|
|
1688
|
+
*/
|
|
1689
|
+
simulateSwap(params: SwapParams, quote: SwapQuote, thor: ThorClient): Promise<SwapSimulation>;
|
|
1690
|
+
/**
|
|
1691
|
+
* Build transaction clauses for the swap
|
|
1692
|
+
* @param params Swap parameters
|
|
1693
|
+
* @param quote The quote from getQuote
|
|
1694
|
+
* @returns Promise resolving to transaction clauses
|
|
1695
|
+
*/
|
|
1696
|
+
buildSwapTransaction(params: SwapParams, quote: SwapQuote): Promise<TransactionClause[]>;
|
|
1697
|
+
/**
|
|
1698
|
+
* Display name of the aggregator
|
|
1699
|
+
*/
|
|
1700
|
+
name: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* Icon component for the aggregator
|
|
1703
|
+
* @param boxSize Size of the icon (e.g., "20px", "24px")
|
|
1704
|
+
* @returns React element representing the aggregator icon
|
|
1705
|
+
*/
|
|
1706
|
+
getIcon: (boxSize?: string) => React$1.ReactElement;
|
|
1707
|
+
}
|
|
1708
|
+
//#endregion
|
|
1709
|
+
//#region src/hooks/api/swap/useSwapTransaction.d.ts
|
|
1710
|
+
/**
|
|
1711
|
+
* Hook to execute a swap transaction
|
|
1712
|
+
*/
|
|
1713
|
+
declare const useSwapTransaction: (params: SwapParams | null, quote: SwapQuote | null) => {
|
|
1714
|
+
executeSwap: () => Promise<void>;
|
|
1715
|
+
isTransactionPending: boolean;
|
|
1716
|
+
isWaitingForWalletConfirmation: boolean;
|
|
1717
|
+
txReceipt: _vechain_sdk_network0.TransactionReceipt | null;
|
|
1718
|
+
status: TransactionStatus;
|
|
1719
|
+
resetStatus: () => void;
|
|
1720
|
+
error: TransactionStatusErrorType | undefined;
|
|
1721
|
+
};
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region src/hooks/api/swap/useSwapQuotes.d.ts
|
|
1724
|
+
type UnifiedSwapQuotesResult = {
|
|
1725
|
+
bestQuote: SwapQuote | null;
|
|
1726
|
+
quotes: SwapQuote[];
|
|
1727
|
+
isLoading: boolean;
|
|
1728
|
+
error: unknown;
|
|
1729
|
+
from: TokenWithValue & {
|
|
1730
|
+
address: string;
|
|
1731
|
+
decimals: number;
|
|
1732
|
+
} | null;
|
|
1733
|
+
to: TokenWithValue & {
|
|
1734
|
+
address: string;
|
|
1735
|
+
decimals: number;
|
|
1736
|
+
} | null;
|
|
1737
|
+
};
|
|
1738
|
+
/**
|
|
1739
|
+
* Unified hook: fetches quotes from all aggregators, simulates each, returns
|
|
1740
|
+
* - bestQuote (filtered against reverts when at least one succeeds)
|
|
1741
|
+
* - quotes: full list with revert flags and gas
|
|
1742
|
+
*/
|
|
1743
|
+
declare const useSwapQuotes: (fromToken: TokenWithValue | null, toToken: TokenWithValue | null, amountIn: string, userAddress: string, slippageTolerance?: number, enabled?: boolean) => UnifiedSwapQuotesResult;
|
|
1744
|
+
//#endregion
|
|
1745
|
+
//#region src/hooks/modals/useConnectModal.d.ts
|
|
1746
|
+
declare const useConnectModal: () => {
|
|
1747
|
+
open: () => void;
|
|
1748
|
+
close: () => void;
|
|
1749
|
+
isOpen: boolean;
|
|
1750
|
+
};
|
|
1751
|
+
declare const ConnectModalProvider: ({
|
|
1752
|
+
children
|
|
1753
|
+
}: {
|
|
1754
|
+
children: ReactNode;
|
|
1755
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1756
|
+
//#endregion
|
|
1757
|
+
//#region src/hooks/modals/useAccountModal.d.ts
|
|
1758
|
+
declare const useAccountModal: () => {
|
|
1759
|
+
open: () => void;
|
|
1760
|
+
close: () => void;
|
|
1761
|
+
isOpen: boolean;
|
|
1762
|
+
};
|
|
1763
|
+
declare const AccountModalProvider: ({
|
|
1764
|
+
children
|
|
1765
|
+
}: {
|
|
1766
|
+
children: ReactNode;
|
|
1767
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1768
|
+
//#endregion
|
|
1769
|
+
//#region src/hooks/modals/useTransactionModal.d.ts
|
|
1770
|
+
declare const useTransactionModal: () => {
|
|
1771
|
+
open: () => void;
|
|
1772
|
+
close: () => void;
|
|
1773
|
+
isOpen: boolean;
|
|
1774
|
+
};
|
|
1775
|
+
declare const TransactionModalProvider: ({
|
|
1776
|
+
children
|
|
1777
|
+
}: {
|
|
1778
|
+
children: ReactNode;
|
|
1779
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1780
|
+
//#endregion
|
|
1781
|
+
//#region src/hooks/modals/useTransactionToast.d.ts
|
|
1782
|
+
declare const useTransactionToast: () => {
|
|
1783
|
+
open: () => void;
|
|
1784
|
+
close: () => void;
|
|
1785
|
+
isOpen: boolean;
|
|
1786
|
+
};
|
|
1787
|
+
declare const TransactionToastProvider: ({
|
|
1788
|
+
children
|
|
1789
|
+
}: {
|
|
1790
|
+
children: ReactNode;
|
|
1791
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1792
|
+
//#endregion
|
|
1793
|
+
//#region src/hooks/modals/useWalletModal.d.ts
|
|
1794
|
+
declare const useWalletModal: () => {
|
|
1795
|
+
open: () => void;
|
|
1796
|
+
close: () => void;
|
|
1797
|
+
isOpen: boolean;
|
|
1798
|
+
};
|
|
1799
|
+
declare const WalletModalProvider: ({
|
|
1800
|
+
children
|
|
1801
|
+
}: {
|
|
1802
|
+
children: ReactNode;
|
|
1803
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1804
|
+
//#endregion
|
|
1805
|
+
//#region src/hooks/modals/useChooseNameModal.d.ts
|
|
1806
|
+
declare const useChooseNameModal: () => {
|
|
1807
|
+
open: (options?: AccountModalOptions) => void;
|
|
1808
|
+
close: () => void;
|
|
1809
|
+
isOpen: boolean;
|
|
1810
|
+
};
|
|
1811
|
+
declare const ChooseNameModalProvider: ({
|
|
1812
|
+
children
|
|
1813
|
+
}: {
|
|
1814
|
+
children: ReactNode;
|
|
1815
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1816
|
+
//#endregion
|
|
1817
|
+
//#region src/hooks/modals/useSendTokenModal.d.ts
|
|
1818
|
+
declare const useSendTokenModal: () => {
|
|
1819
|
+
open: (options?: AccountModalOptions) => void;
|
|
1820
|
+
close: () => void;
|
|
1821
|
+
isOpen: boolean;
|
|
1822
|
+
};
|
|
1823
|
+
declare const SendTokenModalProvider: ({
|
|
1824
|
+
children
|
|
1825
|
+
}: {
|
|
1826
|
+
children: ReactNode;
|
|
1827
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1828
|
+
//#endregion
|
|
1829
|
+
//#region src/hooks/modals/useSwapTokenModal.d.ts
|
|
1830
|
+
type SwapTokenModalOptions = {
|
|
1831
|
+
fromTokenAddress?: string;
|
|
1832
|
+
toTokenAddress?: string;
|
|
1833
|
+
isolatedView?: boolean;
|
|
1834
|
+
};
|
|
1835
|
+
declare const useSwapTokenModal: () => {
|
|
1836
|
+
open: (options?: SwapTokenModalOptions) => void;
|
|
1837
|
+
close: () => void;
|
|
1838
|
+
isOpen: boolean;
|
|
1839
|
+
};
|
|
1840
|
+
declare const SwapTokenModalProvider: ({
|
|
1841
|
+
children
|
|
1842
|
+
}: {
|
|
1843
|
+
children: ReactNode;
|
|
1844
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1845
|
+
//#endregion
|
|
1846
|
+
//#region src/hooks/modals/useAccessAndSecurityModal.d.ts
|
|
1847
|
+
declare const useAccessAndSecurityModal: () => {
|
|
1848
|
+
open: (options?: AccountModalOptions) => void;
|
|
1849
|
+
close: () => void;
|
|
1850
|
+
isOpen: boolean;
|
|
1851
|
+
};
|
|
1852
|
+
declare const AccessAndSecurityModalProvider: ({
|
|
1853
|
+
children
|
|
1854
|
+
}: {
|
|
1855
|
+
children: ReactNode;
|
|
1856
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1857
|
+
//#endregion
|
|
1858
|
+
//#region src/hooks/modals/useExploreEcosystemModal.d.ts
|
|
1859
|
+
declare const useExploreEcosystemModal: () => {
|
|
1860
|
+
open: (options?: AccountModalOptions) => void;
|
|
1861
|
+
close: () => void;
|
|
1862
|
+
isOpen: boolean;
|
|
1863
|
+
};
|
|
1864
|
+
declare const ExploreEcosystemModalProvider: ({
|
|
1865
|
+
children
|
|
1866
|
+
}: {
|
|
1867
|
+
children: ReactNode;
|
|
1868
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1869
|
+
//#endregion
|
|
1870
|
+
//#region src/hooks/modals/useNotificationsModal.d.ts
|
|
1871
|
+
declare const useNotificationsModal: () => {
|
|
1872
|
+
open: (options?: AccountModalOptions) => void;
|
|
1873
|
+
close: () => void;
|
|
1874
|
+
isOpen: boolean;
|
|
1875
|
+
};
|
|
1876
|
+
declare const NotificationsModalProvider: ({
|
|
1877
|
+
children
|
|
1878
|
+
}: {
|
|
1879
|
+
children: ReactNode;
|
|
1880
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1881
|
+
//#endregion
|
|
1882
|
+
//#region src/hooks/modals/useFAQModal.d.ts
|
|
1883
|
+
declare const useFAQModal: () => {
|
|
1884
|
+
open: (options?: AccountModalOptions) => void;
|
|
1885
|
+
close: () => void;
|
|
1886
|
+
isOpen: boolean;
|
|
1887
|
+
};
|
|
1888
|
+
declare const FAQModalProvider: ({
|
|
1889
|
+
children
|
|
1890
|
+
}: {
|
|
1891
|
+
children: ReactNode;
|
|
1892
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1893
|
+
//#endregion
|
|
1894
|
+
//#region src/hooks/modals/useAccountCustomizationModal.d.ts
|
|
1895
|
+
declare const useAccountCustomizationModal: () => {
|
|
1896
|
+
open: () => void;
|
|
1897
|
+
close: () => void;
|
|
1898
|
+
isOpen: boolean;
|
|
1899
|
+
};
|
|
1900
|
+
declare const AccountCustomizationModalProvider: ({
|
|
1901
|
+
children
|
|
1902
|
+
}: {
|
|
1903
|
+
children: ReactNode;
|
|
1904
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1905
|
+
//#endregion
|
|
1906
|
+
//#region src/hooks/modals/useReceiveModal.d.ts
|
|
1907
|
+
declare const useReceiveModal: () => {
|
|
1908
|
+
open: (options?: AccountModalOptions) => void;
|
|
1909
|
+
close: () => void;
|
|
1910
|
+
isOpen: boolean;
|
|
1911
|
+
};
|
|
1912
|
+
declare const ReceiveModalProvider: ({
|
|
1913
|
+
children
|
|
1914
|
+
}: {
|
|
1915
|
+
children: ReactNode;
|
|
1916
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1917
|
+
//#endregion
|
|
1918
|
+
//#region src/hooks/modals/useLoginModalContent.d.ts
|
|
1919
|
+
type LoginModalContentConfig = {
|
|
1920
|
+
showGoogleLogin: boolean;
|
|
1921
|
+
showEmailLogin: boolean;
|
|
1922
|
+
showPasskey: boolean;
|
|
1923
|
+
showVeChainLogin: boolean;
|
|
1924
|
+
showDappKit: boolean;
|
|
1925
|
+
showEcosystem: boolean;
|
|
1926
|
+
showMoreLogin: boolean;
|
|
1927
|
+
showGithubLogin: boolean;
|
|
1928
|
+
isOfficialVeChainApp: boolean;
|
|
1929
|
+
};
|
|
1930
|
+
declare const useLoginModalContent: () => LoginModalContentConfig;
|
|
1931
|
+
//#endregion
|
|
1932
|
+
//#region src/hooks/modals/useUpgradeSmartAccountModal.d.ts
|
|
1933
|
+
declare const useUpgradeSmartAccountModal: (style?: UpgradeSmartAccountModalStyle) => {
|
|
1934
|
+
open: () => void;
|
|
1935
|
+
close: () => void;
|
|
1936
|
+
isOpen: boolean;
|
|
1937
|
+
};
|
|
1938
|
+
declare const UpgradeSmartAccountModalProvider: ({
|
|
1939
|
+
children
|
|
1940
|
+
}: {
|
|
1941
|
+
children: ReactNode;
|
|
1942
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1943
|
+
//#endregion
|
|
1944
|
+
//#region src/hooks/modals/useProfileModal.d.ts
|
|
1945
|
+
declare const useProfileModal: () => {
|
|
1946
|
+
open: (options?: AccountModalOptions) => void;
|
|
1947
|
+
close: () => void;
|
|
1948
|
+
isOpen: boolean;
|
|
1949
|
+
};
|
|
1950
|
+
declare const ProfileModalProvider: ({
|
|
1951
|
+
children
|
|
1952
|
+
}: {
|
|
1953
|
+
children: ReactNode;
|
|
1954
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
1955
|
+
//#endregion
|
|
1956
|
+
//#region src/hooks/modals/useAccountModalOptions.d.ts
|
|
1957
|
+
declare const useAccountModalOptions: () => {
|
|
1958
|
+
isolatedView: boolean;
|
|
1959
|
+
closeAccountModal: () => void;
|
|
1960
|
+
};
|
|
1961
|
+
//#endregion
|
|
1962
|
+
//#region src/hooks/notifications/types.d.ts
|
|
1963
|
+
type NotificationAction = {
|
|
1964
|
+
label: string;
|
|
1965
|
+
content: AccountModalContentTypes;
|
|
1966
|
+
};
|
|
1967
|
+
type Notification = {
|
|
1968
|
+
id: string;
|
|
1969
|
+
title: string;
|
|
1970
|
+
description: string;
|
|
1971
|
+
timestamp: number;
|
|
1972
|
+
status: 'success' | 'info' | 'warning' | 'error';
|
|
1973
|
+
isRead: boolean;
|
|
1974
|
+
action?: NotificationAction;
|
|
1975
|
+
};
|
|
1976
|
+
//#endregion
|
|
1977
|
+
//#region src/hooks/notifications/useNotifications.d.ts
|
|
1978
|
+
declare const useNotifications: () => {
|
|
1979
|
+
getNotifications: () => Notification[];
|
|
1980
|
+
getArchivedNotifications: () => Notification[];
|
|
1981
|
+
addNotification: (notification: Omit<Notification, "timestamp" | "isRead">) => void;
|
|
1982
|
+
clearAllNotifications: () => void;
|
|
1983
|
+
markAsRead: (notificationId: string) => void;
|
|
1984
|
+
deleteNotification: (notificationId: string) => void;
|
|
1985
|
+
};
|
|
1986
|
+
//#endregion
|
|
1987
|
+
//#region src/hooks/notifications/useNotificationAlerts.d.ts
|
|
1988
|
+
declare const useNotificationAlerts: () => void;
|
|
1989
|
+
//#endregion
|
|
1990
|
+
//#region src/hooks/signing/useSignMessage.d.ts
|
|
1991
|
+
type UseSignMessageReturnValue = {
|
|
1992
|
+
signMessage: (message: string) => Promise<string>;
|
|
1993
|
+
isSigningPending: boolean;
|
|
1994
|
+
signature: string | null;
|
|
1995
|
+
error: Error | null;
|
|
1996
|
+
reset: () => void;
|
|
1997
|
+
};
|
|
1998
|
+
/**
|
|
1999
|
+
* Hook to sign messages using the connected wallet.
|
|
2000
|
+
* Supports both Privy and VeChain wallets.
|
|
2001
|
+
*
|
|
2002
|
+
* @returns {UseSignMessageReturnValue} Object containing the signing function and status
|
|
2003
|
+
*/
|
|
2004
|
+
declare const useSignMessage: () => UseSignMessageReturnValue;
|
|
2005
|
+
//#endregion
|
|
2006
|
+
//#region src/hooks/signing/useSignTypedData.d.ts
|
|
2007
|
+
type UseSignTypedDataReturnValue = {
|
|
2008
|
+
signTypedData: (data: SignTypedDataParams, options?: {
|
|
2009
|
+
signer?: string;
|
|
2010
|
+
}) => Promise<string>;
|
|
2011
|
+
isSigningPending: boolean;
|
|
2012
|
+
signature: string | null;
|
|
2013
|
+
error: Error | null;
|
|
2014
|
+
reset: () => void;
|
|
2015
|
+
};
|
|
2016
|
+
/**
|
|
2017
|
+
* Hook to sign typed data using the connected wallet.
|
|
2018
|
+
* Supports both Privy and VeChain wallets.
|
|
2019
|
+
*
|
|
2020
|
+
* @returns {UseSignTypedDataReturnValue} Object containing the signing function and status
|
|
2021
|
+
*/
|
|
2022
|
+
declare const useSignTypedData: () => UseSignTypedDataReturnValue;
|
|
2023
|
+
//#endregion
|
|
2024
|
+
//#region src/hooks/login/useLoginWithPasskey.d.ts
|
|
2025
|
+
declare const useLoginWithPasskey: () => {
|
|
2026
|
+
loginWithPasskey: () => Promise<void>;
|
|
2027
|
+
};
|
|
2028
|
+
//#endregion
|
|
2029
|
+
//#region src/hooks/login/useLoginWithOAuth.d.ts
|
|
2030
|
+
interface OAuthOptions {
|
|
2031
|
+
provider: OAuthProviderType;
|
|
2032
|
+
}
|
|
2033
|
+
declare const useLoginWithOAuth: () => {
|
|
2034
|
+
initOAuth: ({
|
|
2035
|
+
provider
|
|
2036
|
+
}: OAuthOptions) => Promise<void>;
|
|
2037
|
+
};
|
|
2038
|
+
//#endregion
|
|
2039
|
+
//#region src/hooks/login/useLoginWithVeChain.d.ts
|
|
2040
|
+
declare const useLoginWithVeChain: () => {
|
|
2041
|
+
login: () => Promise<void>;
|
|
2042
|
+
};
|
|
2043
|
+
//#endregion
|
|
2044
|
+
//#region src/components/AccountModal/Contents/Ecosystem/Components/CategoryLabel.d.ts
|
|
2045
|
+
type AllowedCategories = 'defi' | 'games' | 'collectibles' | 'marketplaces' | 'utilities' | 'vebetter';
|
|
2046
|
+
//#endregion
|
|
2047
|
+
//#region src/hooks/utils/useAppHubApps.d.ts
|
|
2048
|
+
type AppHubApp = {
|
|
2049
|
+
id: string;
|
|
2050
|
+
name: string;
|
|
2051
|
+
description: string;
|
|
2052
|
+
url: string;
|
|
2053
|
+
logo: string;
|
|
2054
|
+
category: AllowedCategories;
|
|
2055
|
+
tags: string[];
|
|
2056
|
+
isVeWorldSupported: boolean;
|
|
2057
|
+
repo?: string;
|
|
2058
|
+
contracts?: string[];
|
|
2059
|
+
veBetterDaoId?: string;
|
|
2060
|
+
};
|
|
2061
|
+
/**
|
|
2062
|
+
* Query key for AppHub apps
|
|
2063
|
+
*/
|
|
2064
|
+
declare const getAppHubAppsQueryKey: () => string[];
|
|
2065
|
+
/**
|
|
2066
|
+
* Fetches apps from the VeChain App Hub repository
|
|
2067
|
+
* @returns A list of apps from the VeChain App Hub
|
|
2068
|
+
*/
|
|
2069
|
+
declare const fetchAppHubApps: () => Promise<AppHubApp[]>;
|
|
2070
|
+
/**
|
|
2071
|
+
* Hook to fetch apps from the VeChain App Hub repository
|
|
2072
|
+
* @returns The query result containing apps from the VeChain App Hub
|
|
2073
|
+
*
|
|
2074
|
+
* @example
|
|
2075
|
+
* ```tsx
|
|
2076
|
+
* const { data: apps, isLoading, error } = useAppHubApps();
|
|
2077
|
+
*
|
|
2078
|
+
* if (isLoading) return <div>Loading...</div>;
|
|
2079
|
+
* if (error) return <div>Error loading apps</div>;
|
|
2080
|
+
*
|
|
2081
|
+
* return (
|
|
2082
|
+
* <div>
|
|
2083
|
+
* {apps?.map(app => (
|
|
2084
|
+
* <AppCard key={app.id} app={app} />
|
|
2085
|
+
* ))}
|
|
2086
|
+
* </div>
|
|
2087
|
+
* );
|
|
2088
|
+
* ```
|
|
2089
|
+
*/
|
|
2090
|
+
declare const useAppHubApps: () => _tanstack_react_query8.UseQueryResult<AppHubApp[], Error>;
|
|
2091
|
+
//#endregion
|
|
2092
|
+
//#region src/utils/constants.d.ts
|
|
2093
|
+
declare const TOKEN_LOGOS: Record<string, string>;
|
|
2094
|
+
declare const TOKEN_LOGO_COMPONENTS: Record<string, JSX.Element>;
|
|
2095
|
+
declare const VECHAIN_PRIVY_APP_ID = "cm4wxxujb022fyujl7g0thb21";
|
|
2096
|
+
declare const notFoundImage = "https://upload.wikimedia.org/wikipedia/commons/a/a3/Image-not-found.png";
|
|
2097
|
+
declare enum TogglePassportCheck {
|
|
2098
|
+
WhitelistCheck = 1,
|
|
2099
|
+
BlacklistCheck = 2,
|
|
2100
|
+
SignalingCheck = 3,
|
|
2101
|
+
ParticipationScoreCheck = 4,
|
|
2102
|
+
GmOwnershipCheck = 5,
|
|
2103
|
+
}
|
|
2104
|
+
declare const VECHAIN_KIT_STORAGE_KEYS: {
|
|
2105
|
+
NETWORK: string;
|
|
2106
|
+
};
|
|
2107
|
+
declare const getENV: () => {
|
|
2108
|
+
isDevelopment: boolean;
|
|
2109
|
+
isProduction: boolean;
|
|
2110
|
+
};
|
|
2111
|
+
declare const ENV: {
|
|
2112
|
+
readonly isDevelopment: boolean;
|
|
2113
|
+
readonly isProduction: boolean;
|
|
2114
|
+
};
|
|
2115
|
+
declare const getGenericDelegatorUrl: () => "https://mainnet.delegator.vechain.org/api/v1/" | "https://testnet.delegator.vechain.org/api/v1/";
|
|
2116
|
+
type PrivyEcosystemApp = {
|
|
2117
|
+
id: string;
|
|
2118
|
+
name: string;
|
|
2119
|
+
website: string;
|
|
2120
|
+
};
|
|
2121
|
+
declare const DEFAULT_PRIVY_ECOSYSTEM_APPS: PrivyEcosystemApp[];
|
|
2122
|
+
declare const VECHAIN_KIT_TERMS_CONFIG: {
|
|
2123
|
+
url: string;
|
|
2124
|
+
version: number;
|
|
2125
|
+
required: boolean;
|
|
2126
|
+
displayName: string;
|
|
2127
|
+
};
|
|
2128
|
+
declare const VECHAIN_KIT_COOKIES_CONFIG: {
|
|
2129
|
+
url: string;
|
|
2130
|
+
version: number;
|
|
2131
|
+
required: boolean;
|
|
2132
|
+
displayName: string;
|
|
2133
|
+
};
|
|
2134
|
+
declare const DEFAULT_GAS_TOKEN_PREFERENCES: GasTokenPreferences;
|
|
2135
|
+
declare const SUPPORTED_GAS_TOKENS: Record<GasTokenType, GasTokenInfo>;
|
|
2136
|
+
//#endregion
|
|
2137
|
+
//#region src/utils/formattingUtils.d.ts
|
|
2138
|
+
declare const humanAddress: (address: string, charAtStart?: number, charAtEnd?: number) => string;
|
|
2139
|
+
declare const humanDomain: (domain: string, lengthBefore?: number, lengthAfter?: number) => string;
|
|
2140
|
+
declare const humanNumber: (formattedValue: BigNumber.Value, originalValue?: BigNumber.Value, symbol?: string | null) => string;
|
|
2141
|
+
declare const isZero: (value?: BigNumber.Value) => boolean;
|
|
2142
|
+
declare const getPicassoImage: (address: string, base64?: boolean) => string;
|
|
2143
|
+
/**
|
|
2144
|
+
* Format the token balance human friendly
|
|
2145
|
+
* @param balance - balance in bigint
|
|
2146
|
+
* @returns the formatted balance in the form of {@link TokenBalance} (original, scaled down and formatted)
|
|
2147
|
+
*/
|
|
2148
|
+
declare const formatTokenBalance: (balance: bigint) => {
|
|
2149
|
+
original: string;
|
|
2150
|
+
scaled: string;
|
|
2151
|
+
formatted: string;
|
|
2152
|
+
};
|
|
2153
|
+
//#endregion
|
|
2154
|
+
//#region src/utils/randomTxForwarder.d.ts
|
|
2155
|
+
declare const randomTransactionUser: {
|
|
2156
|
+
privateKey: string;
|
|
2157
|
+
account: Account;
|
|
2158
|
+
address: string;
|
|
2159
|
+
};
|
|
2160
|
+
//#endregion
|
|
2161
|
+
//#region src/utils/addressUtils.d.ts
|
|
2162
|
+
/**
|
|
2163
|
+
* Checks if two addresses are equal. Returns true if both values are strings AND:
|
|
2164
|
+
* - The two values are equal OR
|
|
2165
|
+
* - The checksumed addresses are equal
|
|
2166
|
+
*
|
|
2167
|
+
* @param address1
|
|
2168
|
+
* @param address2
|
|
2169
|
+
*/
|
|
2170
|
+
declare const compareAddresses: (address1?: string, address2?: string) => boolean;
|
|
2171
|
+
declare const compareListOfAddresses: (add1: string[], add2: string[]) => boolean;
|
|
2172
|
+
declare const regexPattern: () => RegExp;
|
|
2173
|
+
declare const isValidAddress: typeof Address.isValid;
|
|
2174
|
+
declare const leftPadWithZeros: (str: string, length: number) => string;
|
|
2175
|
+
//#endregion
|
|
2176
|
+
//#region src/utils/ipfs.d.ts
|
|
2177
|
+
/**
|
|
2178
|
+
* Validate IPFS URI strings. An example of a valid IPFS URI is:
|
|
2179
|
+
* - ipfs://QmfSTia1TJUiKQ2fyW9NTPzEKNdjMGzbUgrC3QPSTpkum6/406.json
|
|
2180
|
+
* - ipfs://QmVPqKfwRXjg5Fqwy6RNRbKR2ZP4pKKVLvmfjmhQfdM3MH/4
|
|
2181
|
+
* - ipfs://QmVPqKfwRXjg5Fqwy6RNRbKR2ZP4pKKVLvmfjmhQfdM3MH
|
|
2182
|
+
* @param uri
|
|
2183
|
+
* @returns
|
|
2184
|
+
*/
|
|
2185
|
+
declare const validateIpfsUri: (uri: string) => boolean;
|
|
2186
|
+
/**
|
|
2187
|
+
* Converts a CID to an IPFS native URL.
|
|
2188
|
+
*
|
|
2189
|
+
* @param cid - The CID to convert.
|
|
2190
|
+
* @param fileName - The name of the file to append to the URL.
|
|
2191
|
+
*
|
|
2192
|
+
* @returns The IPFS URL in the format `ipfs://${cid}/${fileName}`.
|
|
2193
|
+
*/
|
|
2194
|
+
declare function toIPFSURL(cid: string, fileName?: string): string;
|
|
2195
|
+
/**
|
|
2196
|
+
* Uploads a blob to IPFS.
|
|
2197
|
+
* @param blob The Blob object to upload.
|
|
2198
|
+
* @param filename A name for the file in the FormData payload.
|
|
2199
|
+
* @param networkType The network type to use for the IPFS pinning service.
|
|
2200
|
+
* @returns The IPFS hash of the uploaded blob.
|
|
2201
|
+
*/
|
|
2202
|
+
declare function uploadBlobToIPFS(blob: Blob, filename: string, networkType: NETWORK_TYPE): Promise<string>;
|
|
2203
|
+
//#endregion
|
|
2204
|
+
//#region src/utils/media.d.ts
|
|
2205
|
+
declare const resolveMediaTypeFromMimeType: (mimeType: string) => NFTMediaType;
|
|
2206
|
+
//#endregion
|
|
2207
|
+
//#region src/utils/uri.d.ts
|
|
2208
|
+
/**
|
|
2209
|
+
* Convert a URI to a URL
|
|
2210
|
+
* We support both IPFS and Arweave URIs. Both should be converted to their https gateway URLs.
|
|
2211
|
+
* All other URIs should pass through unchanged.
|
|
2212
|
+
*
|
|
2213
|
+
* @param uri
|
|
2214
|
+
*/
|
|
2215
|
+
declare const convertUriToUrl: (uri: string, networkType: NETWORK_TYPE) => string | null;
|
|
2216
|
+
//#endregion
|
|
2217
|
+
//#region src/utils/gmNfts.d.ts
|
|
2218
|
+
declare const gmNfts: {
|
|
2219
|
+
level: string;
|
|
2220
|
+
name: string;
|
|
2221
|
+
image: string;
|
|
2222
|
+
multiplier: number;
|
|
2223
|
+
b3trToUpgrade: number;
|
|
2224
|
+
}[];
|
|
2225
|
+
/**
|
|
2226
|
+
* Maps the XNode level to the GM starting level.
|
|
2227
|
+
*/
|
|
2228
|
+
declare const xNodeToGMstartingLevel: Record<number, number>;
|
|
2229
|
+
//#endregion
|
|
2230
|
+
//#region src/utils/buildQueryString.d.ts
|
|
2231
|
+
declare const buildQueryString: (params: {
|
|
2232
|
+
[key: string]: any;
|
|
2233
|
+
}) => string;
|
|
2234
|
+
//#endregion
|
|
2235
|
+
//#region src/utils/xNode.d.ts
|
|
2236
|
+
/**
|
|
2237
|
+
* Map strength level coming from contract to hq image
|
|
2238
|
+
*/
|
|
2239
|
+
declare const NodeStrengthLevelToImage: {
|
|
2240
|
+
[key: string]: string;
|
|
2241
|
+
};
|
|
2242
|
+
declare const MinXNodeLevel = 4;
|
|
2243
|
+
declare const EconomicNodeStrengthLevelToName: {
|
|
2244
|
+
[key: string]: string;
|
|
2245
|
+
};
|
|
2246
|
+
declare const XNodeStrengthLevelToName: {
|
|
2247
|
+
[key: string]: string;
|
|
2248
|
+
};
|
|
2249
|
+
declare const allNodeStrengthLevelToName: {
|
|
2250
|
+
[key: string]: string;
|
|
2251
|
+
};
|
|
2252
|
+
//#endregion
|
|
2253
|
+
//#region src/utils/time.d.ts
|
|
2254
|
+
declare const TIME: {
|
|
2255
|
+
SECOND: number;
|
|
2256
|
+
MINUTE: number;
|
|
2257
|
+
HOUR: number;
|
|
2258
|
+
DAY: number;
|
|
2259
|
+
WEEK: number;
|
|
2260
|
+
MONTH: number;
|
|
2261
|
+
YEAR: number;
|
|
2262
|
+
};
|
|
2263
|
+
//#endregion
|
|
2264
|
+
//#region src/utils/stringUtils.d.ts
|
|
2265
|
+
/**
|
|
2266
|
+
* Checks if a string contains common rejection-related terms
|
|
2267
|
+
* @param errorMessage The error message to check
|
|
2268
|
+
* @returns boolean indicating if the message contains rejection terms
|
|
2269
|
+
*/
|
|
2270
|
+
declare const isRejectionError: (errorMessage: string) => boolean;
|
|
2271
|
+
//#endregion
|
|
2272
|
+
//#region src/utils/hexUtils.d.ts
|
|
2273
|
+
/**
|
|
2274
|
+
* Returns the provied hex string with the hex prefix removed.
|
|
2275
|
+
* If the prefix doesn't exist the hex is returned unmodified
|
|
2276
|
+
* @param hex - the input hex string
|
|
2277
|
+
* @returns the input hex string with the hex prefix removed
|
|
2278
|
+
* @throws an error if the input is not a valid hex string
|
|
2279
|
+
*/
|
|
2280
|
+
declare const removePrefix: (hex: string) => string;
|
|
2281
|
+
/**
|
|
2282
|
+
* Returns the provided hex string with the hex prefix added.
|
|
2283
|
+
* If the prefix already exists the string is returned unmodified.
|
|
2284
|
+
* If the string contains an UPPER case `X` in the prefix it will be replaced with a lower case `x`
|
|
2285
|
+
* @param hex - the input hex string
|
|
2286
|
+
* @returns the input hex string with the hex prefix added
|
|
2287
|
+
* @throws an error if the input is not a valid hex string
|
|
2288
|
+
*/
|
|
2289
|
+
declare const addPrefix: (hex: string) => string;
|
|
2290
|
+
/**
|
|
2291
|
+
* Validate the hex string. Throws an Error if not valid
|
|
2292
|
+
* @param hex - the input hex string
|
|
2293
|
+
* @throws an error if the input is not a valid hex string
|
|
2294
|
+
*/
|
|
2295
|
+
declare const validate: (hex: string) => void;
|
|
2296
|
+
/**
|
|
2297
|
+
* Check if input string is valid
|
|
2298
|
+
* @param hex - the input hex string
|
|
2299
|
+
* @returns boolean representing whether the input hex is valid
|
|
2300
|
+
*/
|
|
2301
|
+
declare const isValid: (hex?: string | null) => boolean;
|
|
2302
|
+
declare const isInvalid: (hex?: string | null) => boolean;
|
|
2303
|
+
declare const normalize: (hex: string) => string;
|
|
2304
|
+
declare const compare: (hex1: string, hex2: string) => boolean;
|
|
2305
|
+
//#endregion
|
|
2306
|
+
//#region src/utils/url.d.ts
|
|
2307
|
+
declare const isValidUrl: (value: string) => boolean;
|
|
2308
|
+
//#endregion
|
|
2309
|
+
//#region src/utils/thorUtils.d.ts
|
|
2310
|
+
type ExtractViewFunction$1<TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, 'pure' | 'view'>> = Extract<TAbi[number], {
|
|
2311
|
+
type: 'function';
|
|
2312
|
+
stateMutability: 'pure' | 'view';
|
|
2313
|
+
name: TMethod;
|
|
2314
|
+
}>;
|
|
2315
|
+
type ViewFunctionResult<TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, 'pure' | 'view'>> = AbiParametersToPrimitiveTypes<ExtractViewFunction$1<TAbi, TMethod>['outputs'], 'outputs'>;
|
|
2316
|
+
type MultipleClausesCallParameters<contracts extends readonly unknown[] = readonly ContractFunctionParameters[], allowFailure extends boolean = true> = MulticallParameters<contracts, allowFailure>['contracts'];
|
|
2317
|
+
type MultipleClausesCallReturnType<contracts extends readonly unknown[] = readonly ContractFunctionParameters[], allowFailure extends boolean = true> = MulticallReturnType<contracts, allowFailure>;
|
|
2318
|
+
declare const executeCallClause: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">>({
|
|
2319
|
+
thor,
|
|
2320
|
+
contractAddress,
|
|
2321
|
+
abi,
|
|
2322
|
+
method,
|
|
2323
|
+
args
|
|
2324
|
+
}: {
|
|
2325
|
+
thor: ThorClient;
|
|
2326
|
+
contractAddress: string;
|
|
2327
|
+
abi: TAbi;
|
|
2328
|
+
method: TMethod;
|
|
2329
|
+
args: AbiParametersToPrimitiveTypes<ExtractAbiFunction<TAbi, TMethod>["inputs"], "inputs">;
|
|
2330
|
+
}) => Promise<(Extract<TAbi[number], {
|
|
2331
|
+
type: "function";
|
|
2332
|
+
stateMutability: "pure" | "view";
|
|
2333
|
+
name: TMethod;
|
|
2334
|
+
}>["outputs"] extends infer T_1 extends readonly abitype0.AbiParameter[] ? { [key_1 in keyof T_1]: abitype0.AbiParameterToPrimitiveType<T_1[key_1], abiParameterKind> } : never) extends infer T ? { [key in keyof T]: T[key] } : never>;
|
|
2335
|
+
declare const executeMultipleClausesCall: <contracts extends readonly ContractFunctionParameters[], allowFailure extends boolean = false>({
|
|
2336
|
+
thor,
|
|
2337
|
+
calls
|
|
2338
|
+
}: {
|
|
2339
|
+
thor: ThorClient;
|
|
2340
|
+
calls: MultipleClausesCallParameters<contracts, allowFailure>;
|
|
2341
|
+
}) => Promise<MultipleClausesCallReturnType<contracts, allowFailure>>;
|
|
2342
|
+
declare const buildCallClauses: <contracts extends readonly ContractFunctionParameters[], allowFailure extends boolean = false>({
|
|
2343
|
+
thor,
|
|
2344
|
+
calls
|
|
2345
|
+
}: {
|
|
2346
|
+
thor: ThorClient;
|
|
2347
|
+
calls: MultipleClausesCallParameters<contracts, allowFailure>;
|
|
2348
|
+
}) => _vechain_sdk_core0.ContractClause[];
|
|
2349
|
+
//#endregion
|
|
2350
|
+
//#region src/utils/ssrUtils.d.ts
|
|
2351
|
+
/**
|
|
2352
|
+
* SSR-safe utilities for browser API access
|
|
2353
|
+
*/
|
|
2354
|
+
/**
|
|
2355
|
+
* SSR-safe localStorage getter
|
|
2356
|
+
*/
|
|
2357
|
+
declare const getLocalStorageItem: (key: string) => string | null;
|
|
2358
|
+
/**
|
|
2359
|
+
* SSR-safe localStorage setter
|
|
2360
|
+
*/
|
|
2361
|
+
declare const setLocalStorageItem: (key: string, value: string) => void;
|
|
2362
|
+
/**
|
|
2363
|
+
* SSR-safe localStorage remover
|
|
2364
|
+
*/
|
|
2365
|
+
declare const removeLocalStorageItem: (key: string) => void;
|
|
2366
|
+
/**
|
|
2367
|
+
* SSR-safe document.title getter
|
|
2368
|
+
*/
|
|
2369
|
+
declare const getDocumentTitle: () => string;
|
|
2370
|
+
/**
|
|
2371
|
+
* SSR-safe window.location.origin getter
|
|
2372
|
+
*/
|
|
2373
|
+
declare const getWindowOrigin: () => string;
|
|
2374
|
+
/**
|
|
2375
|
+
* Check if we're in a browser environment
|
|
2376
|
+
*/
|
|
2377
|
+
declare const isBrowser: () => boolean;
|
|
2378
|
+
/**
|
|
2379
|
+
* SSR-safe window.open
|
|
2380
|
+
*/
|
|
2381
|
+
declare const safeWindowOpen: (url?: string, target?: string, features?: string) => void;
|
|
2382
|
+
/**
|
|
2383
|
+
* SSR-safe document.querySelector
|
|
2384
|
+
*/
|
|
2385
|
+
declare const safeQuerySelector: <T$1 extends Element>(selector: string) => T$1 | null;
|
|
2386
|
+
/**
|
|
2387
|
+
* SSR-safe navigator check
|
|
2388
|
+
*/
|
|
2389
|
+
declare const hasNavigator: () => boolean;
|
|
2390
|
+
/**
|
|
2391
|
+
* SSR-safe navigator.onLine check
|
|
2392
|
+
*/
|
|
2393
|
+
declare const isOnline: () => boolean;
|
|
2394
|
+
/**
|
|
2395
|
+
* SSR-safe clipboard write
|
|
2396
|
+
*/
|
|
2397
|
+
declare const copyToClipboard: (text: string) => Promise<boolean>;
|
|
2398
|
+
//#endregion
|
|
2399
|
+
//#region src/hooks/utils/useCallClause.d.ts
|
|
2400
|
+
type ExtractViewFunction<TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, 'pure' | 'view'>> = Extract<TAbi[number], {
|
|
2401
|
+
type: 'function';
|
|
2402
|
+
stateMutability: 'pure' | 'view';
|
|
2403
|
+
name: TMethod;
|
|
2404
|
+
}>;
|
|
2405
|
+
declare const getCallClauseQueryKey: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">>({
|
|
2406
|
+
abi,
|
|
2407
|
+
address,
|
|
2408
|
+
method
|
|
2409
|
+
}: {
|
|
2410
|
+
abi: TAbi;
|
|
2411
|
+
address: string;
|
|
2412
|
+
method: TMethod;
|
|
2413
|
+
}) => string[];
|
|
2414
|
+
declare const getCallClauseQueryKeyWithArgs: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">>({
|
|
2415
|
+
abi,
|
|
2416
|
+
address,
|
|
2417
|
+
method,
|
|
2418
|
+
args
|
|
2419
|
+
}: {
|
|
2420
|
+
abi: TAbi;
|
|
2421
|
+
address: string;
|
|
2422
|
+
method: TMethod;
|
|
2423
|
+
args?: AbiParametersToPrimitiveTypes<ExtractViewFunction<TAbi, TMethod>["inputs"], "inputs">;
|
|
2424
|
+
}) => (string | unknown[])[];
|
|
2425
|
+
declare const useCallClause: <TAbi extends Abi, TMethod extends ExtractAbiFunctionNames<TAbi, "pure" | "view">, TData = ViewFunctionResult<TAbi, TMethod>>({
|
|
2426
|
+
address,
|
|
2427
|
+
abi,
|
|
2428
|
+
method,
|
|
2429
|
+
args,
|
|
2430
|
+
queryOptions
|
|
2431
|
+
}: {
|
|
2432
|
+
address: string;
|
|
2433
|
+
abi: TAbi;
|
|
2434
|
+
method: TMethod;
|
|
2435
|
+
args: AbiParametersToPrimitiveTypes<ExtractViewFunction<TAbi, TMethod>["inputs"], "inputs">;
|
|
2436
|
+
queryOptions?: Omit<UseQueryOptions<ViewFunctionResult<TAbi, TMethod>, unknown, TData, ReturnType<typeof getCallClauseQueryKeyWithArgs<TAbi, TMethod>>>, "queryKey" | "queryFn">;
|
|
2437
|
+
}) => _tanstack_react_query8.UseQueryResult<_tanstack_react_query8.NoInfer<TData>, unknown>;
|
|
2438
|
+
declare const useMultipleClausesCall: <contracts extends readonly ContractFunctionParameters[], allowFailure extends boolean = false>({
|
|
2439
|
+
thor,
|
|
2440
|
+
calls,
|
|
2441
|
+
queryKey,
|
|
2442
|
+
enabled
|
|
2443
|
+
}: {
|
|
2444
|
+
thor: ThorClient;
|
|
2445
|
+
calls: MultipleClausesCallParameters<contracts, allowFailure>;
|
|
2446
|
+
queryKey: string[];
|
|
2447
|
+
enabled?: boolean;
|
|
2448
|
+
}) => _tanstack_react_query8.UseQueryResult<_tanstack_react_query8.NoInfer<MultipleClausesCallReturnType<contracts, false>>, Error>;
|
|
2449
|
+
//#endregion
|
|
2450
|
+
//#region src/hooks/utils/useCurrency.d.ts
|
|
2451
|
+
/**
|
|
2452
|
+
* Hook for managing currency preferences
|
|
2453
|
+
*/
|
|
2454
|
+
declare const useCurrency: () => {
|
|
2455
|
+
currentCurrency: CURRENCY;
|
|
2456
|
+
allCurrencies: CURRENCY[];
|
|
2457
|
+
changeCurrency: (newCurrency: CURRENCY) => void;
|
|
2458
|
+
};
|
|
2459
|
+
//#endregion
|
|
2460
|
+
//#region src/hooks/utils/useFeatureAnnouncement.d.ts
|
|
2461
|
+
declare const useFeatureAnnouncement: () => {
|
|
2462
|
+
isVisible: boolean;
|
|
2463
|
+
closeAnnouncement: () => void;
|
|
2464
|
+
};
|
|
2465
|
+
//#endregion
|
|
2466
|
+
//#region src/hooks/utils/useGetNodeUrl.d.ts
|
|
2467
|
+
declare const useGetNodeUrl: () => string;
|
|
2468
|
+
//#endregion
|
|
2469
|
+
//#region src/hooks/utils/useIsPwa.d.ts
|
|
2470
|
+
declare const useIsPWA: () => boolean;
|
|
2471
|
+
//#endregion
|
|
2472
|
+
//#region src/hooks/utils/useScrollToTop.d.ts
|
|
2473
|
+
declare const useScrollToTop: () => void;
|
|
2474
|
+
//#endregion
|
|
2475
|
+
//#region src/hooks/utils/useEvents.d.ts
|
|
2476
|
+
declare const decodeEventLog$1: <TAbi extends Abi>(event: EventLogs, abi: TAbi) => {
|
|
2477
|
+
meta: EventLogs["meta"];
|
|
2478
|
+
decodedData: ReturnType<typeof decodeEventLog<TAbi>>;
|
|
2479
|
+
};
|
|
2480
|
+
type UseEventsParams<T$1 extends Abi, K extends ContractEventName<T$1>, R> = {
|
|
2481
|
+
abi: T$1;
|
|
2482
|
+
contractAddress: string;
|
|
2483
|
+
eventName: K;
|
|
2484
|
+
filterParams?: Record<string, unknown> | unknown[] | undefined;
|
|
2485
|
+
mapResponse: ({
|
|
2486
|
+
meta,
|
|
2487
|
+
decodedData
|
|
2488
|
+
}: {
|
|
2489
|
+
meta: EventLogs['meta'];
|
|
2490
|
+
decodedData: ReturnType<typeof decodeEventLog<T$1, K>>;
|
|
2491
|
+
}) => R;
|
|
2492
|
+
nodeUrl: string;
|
|
2493
|
+
};
|
|
2494
|
+
type GetEventsKeyParams = {
|
|
2495
|
+
eventName: string;
|
|
2496
|
+
filterParams?: object;
|
|
2497
|
+
};
|
|
2498
|
+
declare const getEventsKey: ({
|
|
2499
|
+
eventName,
|
|
2500
|
+
filterParams
|
|
2501
|
+
}: GetEventsKeyParams) => string[];
|
|
2502
|
+
/**
|
|
2503
|
+
* Custom hook for fetching contract events.
|
|
2504
|
+
*/
|
|
2505
|
+
declare const useEvents: <T$1 extends Abi, K extends ContractEventName<T$1>, R>({
|
|
2506
|
+
abi,
|
|
2507
|
+
contractAddress,
|
|
2508
|
+
eventName,
|
|
2509
|
+
filterParams,
|
|
2510
|
+
mapResponse,
|
|
2511
|
+
nodeUrl
|
|
2512
|
+
}: UseEventsParams<T$1, K, R>) => _tanstack_react_query8.UseQueryResult<R[], Error>;
|
|
2513
|
+
//#endregion
|
|
2514
|
+
//#region src/hooks/utils/useBuildClauses.d.ts
|
|
2515
|
+
interface BuildClausesParams {
|
|
2516
|
+
clauses: EnhancedClause[];
|
|
2517
|
+
smartAccount: SmartAccountReturnType;
|
|
2518
|
+
version: number | undefined;
|
|
2519
|
+
title?: string;
|
|
2520
|
+
description?: string;
|
|
2521
|
+
buttonText?: string;
|
|
2522
|
+
}
|
|
2523
|
+
/**
|
|
2524
|
+
* Build the typed data structure for executeBatchWithAuthorization
|
|
2525
|
+
* @param clauses - The clauses to sign
|
|
2526
|
+
* @param chainId - The chain id
|
|
2527
|
+
* @param verifyingContract - The address of the smart account
|
|
2528
|
+
* @returns The typed data structure for executeBatchWithAuthorization
|
|
2529
|
+
*/
|
|
2530
|
+
declare function buildBatchAuthorizationTypedData({
|
|
2531
|
+
clauses,
|
|
2532
|
+
chainId,
|
|
2533
|
+
verifyingContract
|
|
2534
|
+
}: {
|
|
2535
|
+
clauses: TransactionClause[];
|
|
2536
|
+
chainId: number;
|
|
2537
|
+
verifyingContract: string;
|
|
2538
|
+
}): ExecuteBatchWithAuthorizationSignData;
|
|
2539
|
+
/**
|
|
2540
|
+
* Build the typed data structure for executeWithAuthorization
|
|
2541
|
+
* @param clause - The clause to sign
|
|
2542
|
+
* @param chainId - The chain id
|
|
2543
|
+
* @param smartAccount - The smart account object
|
|
2544
|
+
* @returns The typed data structure for executeWithAuthorization
|
|
2545
|
+
*/
|
|
2546
|
+
declare function buildSingleAuthorizationTypedData({
|
|
2547
|
+
clause,
|
|
2548
|
+
chainId,
|
|
2549
|
+
smartAccount
|
|
2550
|
+
}: {
|
|
2551
|
+
clause: TransactionClause;
|
|
2552
|
+
chainId: number;
|
|
2553
|
+
smartAccount: SmartAccountReturnType;
|
|
2554
|
+
}): ExecuteWithAuthorizationSignData;
|
|
2555
|
+
/**
|
|
2556
|
+
* Build either executeWithAuthorization or executeBatchWithAuthorization clauses based on smart account version using buildClausesWithAuth
|
|
2557
|
+
* @param clauses - Either VET or ERC20 clauses
|
|
2558
|
+
* @param smartAccount - The user's smart account object
|
|
2559
|
+
* @param version - The smart account version
|
|
2560
|
+
* @param title - The title of the transaction
|
|
2561
|
+
* @param description - The description of the transaction
|
|
2562
|
+
* @param buttonText - The button text of the transaction
|
|
2563
|
+
* @returns The clauses for the executeWithAuthorization or executeBatchWithAuthorization function using buildClausesWithAuth
|
|
2564
|
+
*/
|
|
2565
|
+
declare const useBuildClauses: () => {
|
|
2566
|
+
buildClausesWithAuth: (params: BuildClausesParams) => Promise<Clause[]>;
|
|
2567
|
+
};
|
|
2568
|
+
//#endregion
|
|
2569
|
+
//#region src/hooks/cache/useLocalStorage.d.ts
|
|
2570
|
+
declare enum LocalStorageKey {
|
|
2571
|
+
CUSTOM_TOKENS = "vechain_kit_custom_tokens",
|
|
2572
|
+
ECOSYSTEM_SHORTCUTS = "vechain-kit-ecosystem-shortcuts",
|
|
2573
|
+
CURRENCY = "vechain_kit_currency",
|
|
2574
|
+
NODE_URL = "vechain_kit_node_url",
|
|
2575
|
+
NETWORK = "vechain_kit_network",
|
|
2576
|
+
GAS_TOKEN_PREFERENCES = "vechain_kit_gas_token_preferences",
|
|
2577
|
+
}
|
|
2578
|
+
declare const useLocalStorage: <T$1>(key: LocalStorageKey, initialValue: T$1) => readonly [T$1, react0.Dispatch<react0.SetStateAction<T$1>>];
|
|
2579
|
+
//#endregion
|
|
2580
|
+
//#region src/hooks/cache/useSyncableLocalStorage.d.ts
|
|
2581
|
+
declare const useSyncableLocalStorage: <T$1>(key: string, defaultValue: T$1) => readonly [T$1, react0.Dispatch<react0.SetStateAction<T$1>>, () => void, () => T$1];
|
|
2582
|
+
//#endregion
|
|
2583
|
+
//#region src/hooks/cache/useEcosystemShortcuts.d.ts
|
|
2584
|
+
type EcosystemShortcut = {
|
|
2585
|
+
name: string;
|
|
2586
|
+
image: string;
|
|
2587
|
+
url: string;
|
|
2588
|
+
description?: string;
|
|
2589
|
+
};
|
|
2590
|
+
declare const useEcosystemShortcuts: () => {
|
|
2591
|
+
shortcuts: EcosystemShortcut[];
|
|
2592
|
+
addShortcut: (shortcut: EcosystemShortcut) => void;
|
|
2593
|
+
removeShortcut: (url: string) => void;
|
|
2594
|
+
isShortcut: (url: string) => boolean;
|
|
2595
|
+
};
|
|
2596
|
+
//#endregion
|
|
2597
|
+
//#region src/hooks/cache/useCrossAppConnectionCache.d.ts
|
|
2598
|
+
declare const useCrossAppConnectionCache: () => {
|
|
2599
|
+
setConnectionCache: (ecosystemApp: {
|
|
2600
|
+
name: string;
|
|
2601
|
+
logoUrl?: string;
|
|
2602
|
+
appId: string;
|
|
2603
|
+
website?: string;
|
|
2604
|
+
}) => void;
|
|
2605
|
+
getConnectionCache: () => CrossAppConnectionCache | null;
|
|
2606
|
+
clearConnectionCache: () => void;
|
|
2607
|
+
};
|
|
2608
|
+
//#endregion
|
|
2609
|
+
//#region src/hooks/generic-delegator/useGenericDelegator.d.ts
|
|
2610
|
+
declare const estimateGas: (signerAddress: string, genericDelegatorUrl: string, clauses: any[], token: GasTokenType, speed: TransactionSpeed) => Promise<any>;
|
|
2611
|
+
declare const getDepositAccount: (genericDelegatorUrl: string) => Promise<DepositAccount>;
|
|
2612
|
+
declare const delegateAuthorized: (encodedSignedTx: string, origin: string, token: GasTokenType, genericDelegatorUrl: string) => Promise<any>;
|
|
2613
|
+
declare const estimateAndBuildTxBody: (clauses: TransactionClause[], thor: ThorClient, randomTransactionUser: Wallet, isDelegated: boolean) => Promise<_vechain_sdk_core0.TransactionBody>;
|
|
2614
|
+
/**
|
|
2615
|
+
* Sign the final transaction with the given private key and signature
|
|
2616
|
+
* returned by the generic delegator.
|
|
2617
|
+
* @param decodedTx The decoded transaction returned by the generic delegator.
|
|
2618
|
+
* @param gasPayerSignature The signature returned by the generic delegator.
|
|
2619
|
+
* @returns The signed final transaction.
|
|
2620
|
+
*/
|
|
2621
|
+
declare function signVip191Transaction(decodedTx: Transaction, gasPayerSignature: string): Transaction;
|
|
2622
|
+
declare function decodeRawTx(raw: any, isSigned: boolean): Transaction;
|
|
2623
|
+
/**
|
|
2624
|
+
* This function is used to send a transaction using the generic delegator.
|
|
2625
|
+
* It will build the necessary clauses, estimate the gas, and send the transaction.
|
|
2626
|
+
* @param clauses The clauses to send in the transaction.
|
|
2627
|
+
* @param genericDelegatorUrl The URL of the generic delegator.
|
|
2628
|
+
* @returns
|
|
2629
|
+
*/
|
|
2630
|
+
declare const useGenericDelegator: () => {
|
|
2631
|
+
sendTransactionUsingGenericDelegator: ({
|
|
2632
|
+
clauses,
|
|
2633
|
+
genericDelegatorUrl
|
|
2634
|
+
}: {
|
|
2635
|
+
clauses: TransactionClause[];
|
|
2636
|
+
genericDelegatorUrl: string;
|
|
2637
|
+
}) => Promise<string>;
|
|
2638
|
+
};
|
|
2639
|
+
//#endregion
|
|
2640
|
+
//#region src/hooks/generic-delegator/useGasTokenSelection.d.ts
|
|
2641
|
+
declare const useGasTokenSelection: () => {
|
|
2642
|
+
preferences: GasTokenPreferences;
|
|
2643
|
+
supportedTokens: Record<GasTokenType, GasTokenInfo>;
|
|
2644
|
+
updatePreferences: (updates: Partial<GasTokenPreferences>) => void;
|
|
2645
|
+
reorderTokenPriority: (newOrder: GasTokenType[]) => void;
|
|
2646
|
+
toggleTokenExclusion: (token: GasTokenType) => void;
|
|
2647
|
+
};
|
|
2648
|
+
//#endregion
|
|
2649
|
+
//#region src/hooks/generic-delegator/useGasEstimation.d.ts
|
|
2650
|
+
interface UseGasEstimationParams {
|
|
2651
|
+
clauses: EnhancedClause[];
|
|
2652
|
+
enabled?: boolean;
|
|
2653
|
+
tokens: string[];
|
|
2654
|
+
sendingAmount?: string;
|
|
2655
|
+
sendingTokenSymbol?: string;
|
|
2656
|
+
}
|
|
2657
|
+
declare const useGasEstimation: ({
|
|
2658
|
+
clauses,
|
|
2659
|
+
enabled,
|
|
2660
|
+
tokens,
|
|
2661
|
+
sendingAmount,
|
|
2662
|
+
sendingTokenSymbol
|
|
2663
|
+
}: UseGasEstimationParams) => _tanstack_react_query8.UseQueryResult<EstimationResponse & {
|
|
2664
|
+
usedToken: string;
|
|
2665
|
+
}, Error>;
|
|
2666
|
+
//#endregion
|
|
2667
|
+
//#region src/hooks/generic-delegator/useEstimateAllTokens.d.ts
|
|
2668
|
+
interface UseEstimateAllTokensParams {
|
|
2669
|
+
clauses: TransactionClause[];
|
|
2670
|
+
tokens: GasTokenType[];
|
|
2671
|
+
enabled?: boolean;
|
|
2672
|
+
}
|
|
2673
|
+
declare const useEstimateAllTokens: ({
|
|
2674
|
+
clauses,
|
|
2675
|
+
tokens,
|
|
2676
|
+
enabled
|
|
2677
|
+
}: UseEstimateAllTokensParams) => _tanstack_react_query8.UseQueryResult<Record<GasTokenType, {
|
|
2678
|
+
cost: number;
|
|
2679
|
+
loading: boolean;
|
|
2680
|
+
error?: string;
|
|
2681
|
+
}>, Error>;
|
|
2682
|
+
//#endregion
|
|
2683
|
+
//#region src/hooks/thor/accounts/useAccountBalance.d.ts
|
|
2684
|
+
declare const getAccountBalance: (thor: ThorClient, address?: string) => Promise<{
|
|
2685
|
+
balance: string;
|
|
2686
|
+
energy: string;
|
|
2687
|
+
}>;
|
|
2688
|
+
declare const getAccountBalanceQueryKey: (address?: string) => (string | undefined)[];
|
|
2689
|
+
/**
|
|
2690
|
+
* Get the account balance for the given address
|
|
2691
|
+
* @param address The address of the account to get the balance for
|
|
2692
|
+
* @returns The account balance
|
|
2693
|
+
*/
|
|
2694
|
+
declare const useAccountBalance: (address?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
2695
|
+
balance: string;
|
|
2696
|
+
energy: string;
|
|
2697
|
+
}, Error>;
|
|
2698
|
+
//#endregion
|
|
2699
|
+
//#region src/hooks/thor/smartAccounts/useAccountImplementationAddress.d.ts
|
|
2700
|
+
declare const getAccountImplementationAddress: (thor: ThorClient, version?: number, networkType?: NETWORK_TYPE) => Promise<string>;
|
|
2701
|
+
declare const getAccountImplementationAddressQueryKey: (version?: number, networkType?: NETWORK_TYPE) => (string | number | undefined)[];
|
|
2702
|
+
/**
|
|
2703
|
+
* Get the address of a smart account implementation for a given version
|
|
2704
|
+
* @param version - The version of the smart account implementation
|
|
2705
|
+
* @returns The address of the smart account implementation
|
|
2706
|
+
*/
|
|
2707
|
+
declare const useAccountImplementationAddress: (version?: number) => _tanstack_react_query8.UseQueryResult<string, Error>;
|
|
2708
|
+
//#endregion
|
|
2709
|
+
//#region src/hooks/thor/smartAccounts/useCurrentAccountImplementationVersion.d.ts
|
|
2710
|
+
declare const getCurrentAccountImplementationVersion: (thor: ThorClient, networkType?: NETWORK_TYPE) => Promise<number>;
|
|
2711
|
+
declare const getCurrentAccountImplementationVersionQueryKey: (networkType?: NETWORK_TYPE) => (string | undefined)[];
|
|
2712
|
+
/**
|
|
2713
|
+
* Get the current account implementation version used by the smart account factory
|
|
2714
|
+
* @returns The current account implementation version
|
|
2715
|
+
*/
|
|
2716
|
+
declare const useCurrentAccountImplementationVersion: () => _tanstack_react_query8.UseQueryResult<number, Error>;
|
|
2717
|
+
//#endregion
|
|
2718
|
+
//#region src/hooks/thor/smartAccounts/useGetAccountAddress.d.ts
|
|
2719
|
+
declare const getAccountAddress: (thor: ThorClient, ownerAddress?: string, networkType?: NETWORK_TYPE) => Promise<string>;
|
|
2720
|
+
declare const getAccountAddressQueryKey: (ownerAddress?: string, networkType?: NETWORK_TYPE) => (string | undefined)[];
|
|
2721
|
+
/**
|
|
2722
|
+
* Get the address of a smart account
|
|
2723
|
+
* @param ownerAddress - The address of the owner of the smart account
|
|
2724
|
+
* @returns The address of the smart account
|
|
2725
|
+
*/
|
|
2726
|
+
declare const useGetAccountAddress: (ownerAddress?: string) => _tanstack_react_query8.UseQueryResult<string, Error>;
|
|
2727
|
+
//#endregion
|
|
2728
|
+
//#region src/hooks/thor/smartAccounts/useGetAccountVersion.d.ts
|
|
2729
|
+
declare const getAccountVersionQueryKey: (accountAddress: string, ownerAddress: string, networkType: NETWORK_TYPE) => (string | unknown[])[];
|
|
2730
|
+
/**
|
|
2731
|
+
* Check if a smart account has a v1 smart account
|
|
2732
|
+
* @param accountAddress - The address of the smart account
|
|
2733
|
+
* @param ownerAddress - The address of the owner of the smart account
|
|
2734
|
+
* @returns The version of the smart account
|
|
2735
|
+
*/
|
|
2736
|
+
declare const useGetAccountVersion: (accountAddress: string, ownerAddress: string) => _tanstack_react_query8.UseQueryResult<{
|
|
2737
|
+
version: number;
|
|
2738
|
+
isDeployed: boolean;
|
|
2739
|
+
}, unknown>;
|
|
2740
|
+
//#endregion
|
|
2741
|
+
//#region src/hooks/thor/smartAccounts/useHasV1SmartAccount.d.ts
|
|
2742
|
+
declare const getHasV1SmartAccount: (thor: ThorClient, ownerAddress?: string, networkType?: NETWORK_TYPE) => Promise<boolean>;
|
|
2743
|
+
declare const getHasV1SmartAccountQueryKey: (ownerAddress?: string, networkType?: NETWORK_TYPE) => (string | undefined)[];
|
|
2744
|
+
/**
|
|
2745
|
+
* Check if a smart account has a v1 smart account
|
|
2746
|
+
* @param ownerAddress - The address of the owner of the smart account
|
|
2747
|
+
* @returns True if the smart account has a v1 smart account, false otherwise
|
|
2748
|
+
*/
|
|
2749
|
+
declare const useHasV1SmartAccount: (ownerAddress?: string) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
2750
|
+
//#endregion
|
|
2751
|
+
//#region src/hooks/thor/smartAccounts/useIsSmartAccountDeployed.d.ts
|
|
2752
|
+
declare const getIsDeployed: (thor: ThorClient, accountAddress?: string) => Promise<boolean>;
|
|
2753
|
+
declare const getIsDeployedQueryKey: (contractAddress?: string) => (string | undefined)[];
|
|
2754
|
+
/**
|
|
2755
|
+
* Check if a smart account is deployed
|
|
2756
|
+
* @returns True if the smart account is deployed, false otherwise
|
|
2757
|
+
*/
|
|
2758
|
+
declare const useIsSmartAccountDeployed: (accountAddress?: string) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
2759
|
+
//#endregion
|
|
2760
|
+
//#region src/hooks/thor/smartAccounts/useRefreshFactoryQueries.d.ts
|
|
2761
|
+
/**
|
|
2762
|
+
* Hook to refresh smart account factory-related queries
|
|
2763
|
+
* @returns Object with refresh function
|
|
2764
|
+
*/
|
|
2765
|
+
declare const useRefreshFactoryQueries: () => {
|
|
2766
|
+
refresh: () => Promise<void>;
|
|
2767
|
+
};
|
|
2768
|
+
//#endregion
|
|
2769
|
+
//#region src/hooks/thor/smartAccounts/useRefreshSmartAccountQueries.d.ts
|
|
2770
|
+
/**
|
|
2771
|
+
* Hook to refresh smart account-related queries
|
|
2772
|
+
* @returns Object with refresh function
|
|
2773
|
+
*/
|
|
2774
|
+
declare const useRefreshSmartAccountQueries: () => {
|
|
2775
|
+
refresh: () => Promise<void>;
|
|
2776
|
+
};
|
|
2777
|
+
//#endregion
|
|
2778
|
+
//#region src/hooks/thor/smartAccounts/useSmartAccount.d.ts
|
|
2779
|
+
interface SmartAccountReturnType {
|
|
2780
|
+
address: string | undefined;
|
|
2781
|
+
isDeployed: boolean;
|
|
2782
|
+
}
|
|
2783
|
+
declare const getSmartAccount: (thor: ThorClient, network: NETWORK_TYPE, ownerAddress?: string) => Promise<{
|
|
2784
|
+
address: undefined;
|
|
2785
|
+
isDeployed?: undefined;
|
|
2786
|
+
} | {
|
|
2787
|
+
address: string;
|
|
2788
|
+
isDeployed: boolean;
|
|
2789
|
+
}>;
|
|
2790
|
+
declare const getSmartAccountQueryKey: (ownerAddress?: string) => (string | undefined)[];
|
|
2791
|
+
declare const useSmartAccount: (ownerAddress?: string) => _tanstack_react_query8.UseQueryResult<{
|
|
2792
|
+
address: undefined;
|
|
2793
|
+
isDeployed?: undefined;
|
|
2794
|
+
} | {
|
|
2795
|
+
address: string;
|
|
2796
|
+
isDeployed: boolean;
|
|
2797
|
+
}, Error>;
|
|
2798
|
+
//#endregion
|
|
2799
|
+
//#region src/hooks/thor/smartAccounts/useUpgradeRequired.d.ts
|
|
2800
|
+
declare const getUpgradeRequired: (thor: ThorClient, accountAddress: string, ownerAddress: string, targetVersion: number, networkType: NETWORK_TYPE) => Promise<boolean>;
|
|
2801
|
+
declare const getUpgradeRequiredQueryKey: (accountAddress: string, ownerAddress: string, targetVersion: number, networkType: NETWORK_TYPE) => (string | number)[];
|
|
2802
|
+
/**
|
|
2803
|
+
* Check if a smart account needs an upgrade (even if it's not yet deployed)
|
|
2804
|
+
* @param accountAddress - The address of the smart account
|
|
2805
|
+
* @param ownerAddress - The address of the owner of the smart account
|
|
2806
|
+
* @param targetVersion - The version of the smart account to check for
|
|
2807
|
+
* @returns True if the smart account needs an upgrade, false otherwise
|
|
2808
|
+
*/
|
|
2809
|
+
declare const useUpgradeRequired: (accountAddress: string, ownerAddress: string, targetVersion: number) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
2810
|
+
//#endregion
|
|
2811
|
+
//#region src/hooks/thor/smartAccounts/useUpgradeRequiredForAccount.d.ts
|
|
2812
|
+
declare const getUpgradeRequiredForAccount: (thor: ThorClient, contractAddress: string, targetVersion: number, networkType: NETWORK_TYPE) => Promise<boolean>;
|
|
2813
|
+
declare const getUpgradeRequiredForAccountQueryKey: (contractAddress: string, targetVersion: number, networkType: NETWORK_TYPE) => (string | number)[];
|
|
2814
|
+
/**
|
|
2815
|
+
* Check if a smart account needs an upgrade
|
|
2816
|
+
* @param contractAddress - The address of the smart account
|
|
2817
|
+
* @param targetVersion - The target version of the smart account
|
|
2818
|
+
* @returns True if the smart account needs an upgrade, false otherwise
|
|
2819
|
+
*/
|
|
2820
|
+
declare const useUpgradeRequiredForAccount: (contractAddress: string, targetVersion: number) => _tanstack_react_query8.UseQueryResult<boolean, Error>;
|
|
2821
|
+
//#endregion
|
|
2822
|
+
//#region src/hooks/thor/smartAccounts/useUpgradeSmartAccount.d.ts
|
|
2823
|
+
type UseUpgradeSmartAccountVersionProps = {
|
|
2824
|
+
smartAccountAddress: string;
|
|
2825
|
+
targetVersion: number;
|
|
2826
|
+
onSuccess?: () => void;
|
|
2827
|
+
onError?: () => void;
|
|
2828
|
+
};
|
|
2829
|
+
type UseUpgradeSmartAccountVersionReturnValue = {
|
|
2830
|
+
sendTransaction: () => Promise<void>;
|
|
2831
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
2832
|
+
declare const useUpgradeSmartAccount: ({
|
|
2833
|
+
smartAccountAddress,
|
|
2834
|
+
targetVersion,
|
|
2835
|
+
onSuccess,
|
|
2836
|
+
onError
|
|
2837
|
+
}: UseUpgradeSmartAccountVersionProps) => UseUpgradeSmartAccountVersionReturnValue;
|
|
2838
|
+
//#endregion
|
|
2839
|
+
//#region src/hooks/thor/blocks/useCurrentBlock.d.ts
|
|
2840
|
+
declare const currentBlockQueryKey: () => string[];
|
|
2841
|
+
/**
|
|
2842
|
+
* Fetches the current block from the blockchain. The block is refetched every 10 seconds.
|
|
2843
|
+
* @returns the current block
|
|
2844
|
+
*/
|
|
2845
|
+
declare const useCurrentBlock: () => _tanstack_react_query8.UseQueryResult<_vechain_sdk_network0.ExpandedBlockDetail, Error>;
|
|
2846
|
+
//#endregion
|
|
2847
|
+
//#region src/hooks/thor/blocks/useGetChainId.d.ts
|
|
2848
|
+
declare const getChainId: (thor: ThorClient) => Promise<string>;
|
|
2849
|
+
declare const getChainIdQueryKey: () => string[];
|
|
2850
|
+
/**
|
|
2851
|
+
* Get the chain id
|
|
2852
|
+
* @returns The chain id
|
|
2853
|
+
*/
|
|
2854
|
+
declare const useGetChainId: () => _tanstack_react_query8.UseQueryResult<string, Error>;
|
|
2855
|
+
//#endregion
|
|
2856
|
+
//#region src/hooks/thor/logs/logUtils.d.ts
|
|
2857
|
+
/**
|
|
2858
|
+
* Params for getEvents function
|
|
2859
|
+
* @param nodeUrl the node url
|
|
2860
|
+
* @param thor the thor client
|
|
2861
|
+
* @param auctionId the auction id to get the events
|
|
2862
|
+
* @param order the order of the events (asc or desc)
|
|
2863
|
+
* @param offset the offset of the events
|
|
2864
|
+
* @param limit the limit of the events (max 256)
|
|
2865
|
+
* @param from the block number to start from
|
|
2866
|
+
* @param filterCriteria the filter criteria for the events
|
|
2867
|
+
* @returns the encoded events
|
|
2868
|
+
*/
|
|
2869
|
+
type GetEventsProps = {
|
|
2870
|
+
nodeUrl: string;
|
|
2871
|
+
thor: ThorClient;
|
|
2872
|
+
order?: 'asc' | 'desc';
|
|
2873
|
+
offset?: number;
|
|
2874
|
+
limit?: number;
|
|
2875
|
+
from?: number;
|
|
2876
|
+
to?: number;
|
|
2877
|
+
filterCriteria: FilterEventLogsOptions['criteriaSet'];
|
|
2878
|
+
};
|
|
2879
|
+
/**
|
|
2880
|
+
* Get events from blockchain (auction created, auction successful, auction cancelled)
|
|
2881
|
+
* @param order
|
|
2882
|
+
* @param offset
|
|
2883
|
+
* @param limit
|
|
2884
|
+
* @param from block parse start from
|
|
2885
|
+
*/
|
|
2886
|
+
declare const getEventLogs: ({
|
|
2887
|
+
thor,
|
|
2888
|
+
order,
|
|
2889
|
+
offset,
|
|
2890
|
+
limit,
|
|
2891
|
+
from,
|
|
2892
|
+
to,
|
|
2893
|
+
filterCriteria
|
|
2894
|
+
}: GetEventsProps) => Promise<EventLogs[]>;
|
|
2895
|
+
/**
|
|
2896
|
+
* call getEvents iteratively to get all the events
|
|
2897
|
+
* @param nodeUrl the node url
|
|
2898
|
+
* @param thor the thor client
|
|
2899
|
+
* @param order the order of the events (asc or desc)
|
|
2900
|
+
* @param from the block number to start from
|
|
2901
|
+
* @param filterCriteria the filter criteria for the events
|
|
2902
|
+
* @returns all the events from the blockchain
|
|
2903
|
+
*/
|
|
2904
|
+
declare const getAllEventLogs: ({
|
|
2905
|
+
nodeUrl,
|
|
2906
|
+
thor,
|
|
2907
|
+
order,
|
|
2908
|
+
from,
|
|
2909
|
+
to,
|
|
2910
|
+
filterCriteria
|
|
2911
|
+
}: Omit<GetEventsProps, "offset" | "limit">) => Promise<EventLogs[]>;
|
|
2912
|
+
//#endregion
|
|
2913
|
+
//#region src/hooks/thor/transactions/useSendTransaction.d.ts
|
|
2914
|
+
/**
|
|
2915
|
+
* Props for the {@link useSendTransaction} hook
|
|
2916
|
+
* @param signerAccountAddress the signer account to use
|
|
2917
|
+
* @param clauses clauses to send in the transaction
|
|
2918
|
+
* @param onTxConfirmed callback to run when the tx is confirmed
|
|
2919
|
+
* @param onTxFailedOrCancelled callback to run when the tx fails or is cancelled
|
|
2920
|
+
* @param suggestedMaxGas the suggested max gas for the transaction
|
|
2921
|
+
* @param privyUIOptions options to pass to the Privy UI
|
|
2922
|
+
* @param gasPadding the gas padding to use for the transaction (Eg. 0.1 for 10%)
|
|
2923
|
+
*/
|
|
2924
|
+
type UseSendTransactionProps = {
|
|
2925
|
+
signerAccountAddress?: string | null;
|
|
2926
|
+
clauses?: TransactionClause[];
|
|
2927
|
+
onTxConfirmed?: () => void | Promise<void>;
|
|
2928
|
+
onTxFailedOrCancelled?: (error?: Error | string) => void | Promise<void>;
|
|
2929
|
+
suggestedMaxGas?: number;
|
|
2930
|
+
privyUIOptions?: {
|
|
2931
|
+
title?: string;
|
|
2932
|
+
description?: string;
|
|
2933
|
+
buttonText?: string;
|
|
2934
|
+
};
|
|
2935
|
+
gasPadding?: number;
|
|
2936
|
+
};
|
|
2937
|
+
/**
|
|
2938
|
+
* Return value of the {@link useSendTransaction} hook
|
|
2939
|
+
* @param sendTransaction function to trigger the transaction
|
|
2940
|
+
* @param isTransactionPending boolean indicating if the transaction is waiting for the wallet to sign it
|
|
2941
|
+
* @param isWaitingForWalletConfirmation boolean indicating if the transaction is waiting for the wallet to confirm it
|
|
2942
|
+
* @param txReceipt the transaction receipt
|
|
2943
|
+
* @param status the status of the transaction (see {@link TransactionStatus})
|
|
2944
|
+
* @param resetStatus function to reset the status to "ready"
|
|
2945
|
+
* @param error error that occurred while sending the transaction
|
|
2946
|
+
*/
|
|
2947
|
+
type UseSendTransactionReturnValue = {
|
|
2948
|
+
sendTransaction: (clauses?: TransactionClause[]) => Promise<void>;
|
|
2949
|
+
isTransactionPending: boolean;
|
|
2950
|
+
isWaitingForWalletConfirmation: boolean;
|
|
2951
|
+
txReceipt: TransactionReceipt | null;
|
|
2952
|
+
status: TransactionStatus;
|
|
2953
|
+
resetStatus: () => void;
|
|
2954
|
+
error?: TransactionStatusErrorType;
|
|
2955
|
+
};
|
|
2956
|
+
/**
|
|
2957
|
+
* Generic hook to send a transaction using dapp-kit-react.
|
|
2958
|
+
* This hook supports both Privy and VeChain wallets.
|
|
2959
|
+
*
|
|
2960
|
+
* It returns a function to send the transaction and a status to indicate the state
|
|
2961
|
+
* of the transaction (together with the transaction id).
|
|
2962
|
+
*
|
|
2963
|
+
* * ⚠️ IMPORTANT: When using this hook with Privy cross-app connections, ensure all
|
|
2964
|
+
* data fetching is done before triggering the transaction. Fetching data after
|
|
2965
|
+
* the transaction is triggered may cause browser popup blocking. Pre-fetch any
|
|
2966
|
+
* required data and pass it to your transaction building logic.
|
|
2967
|
+
*
|
|
2968
|
+
* @example
|
|
2969
|
+
* ```typescript
|
|
2970
|
+
* // ❌ Bad: Fetching during transaction
|
|
2971
|
+
* const sendTx = async () => {
|
|
2972
|
+
* const data = await fetchSomeData(); // May cause popup blocking
|
|
2973
|
+
* return sendTransaction(data);
|
|
2974
|
+
* };
|
|
2975
|
+
*
|
|
2976
|
+
* // ✅ Good: Pre-fetch data
|
|
2977
|
+
* const { data } = useQuery(['someData'], fetchSomeData);
|
|
2978
|
+
* const sendTx = () => sendTransaction(data); // No async operations
|
|
2979
|
+
* ```
|
|
2980
|
+
*
|
|
2981
|
+
* @param signerAccount the signer account to use
|
|
2982
|
+
* @param clauses clauses to send in the transaction
|
|
2983
|
+
* @param onTxConfirmed callback to run when the tx is confirmed
|
|
2984
|
+
* @param onTxFailedOrCancelled callback to run when the tx fails or is cancelled
|
|
2985
|
+
* @param suggestedMaxGas the suggested max gas for the transaction
|
|
2986
|
+
* @param privyUIOptions options to pass to the Privy UI
|
|
2987
|
+
* @param gasPadding the gas padding to use for the transaction (Eg. 0.1 for 10%)
|
|
2988
|
+
* @returns see {@link UseSendTransactionReturnValue}
|
|
2989
|
+
*/
|
|
2990
|
+
declare const useSendTransaction: ({
|
|
2991
|
+
signerAccountAddress,
|
|
2992
|
+
clauses,
|
|
2993
|
+
onTxConfirmed,
|
|
2994
|
+
onTxFailedOrCancelled,
|
|
2995
|
+
suggestedMaxGas,
|
|
2996
|
+
privyUIOptions,
|
|
2997
|
+
gasPadding
|
|
2998
|
+
}: UseSendTransactionProps) => UseSendTransactionReturnValue;
|
|
2999
|
+
//#endregion
|
|
3000
|
+
//#region src/hooks/thor/transactions/useTransferERC20.d.ts
|
|
3001
|
+
type useTransferERC20Props = {
|
|
3002
|
+
fromAddress: string;
|
|
3003
|
+
receiverAddress: string;
|
|
3004
|
+
amount: string;
|
|
3005
|
+
tokenAddress: string;
|
|
3006
|
+
tokenName: string;
|
|
3007
|
+
onSuccess?: () => void;
|
|
3008
|
+
onSuccessMessageTitle?: number;
|
|
3009
|
+
onError?: (error?: string) => void;
|
|
3010
|
+
};
|
|
3011
|
+
type useTransferERC20ReturnValue = {
|
|
3012
|
+
sendTransaction: () => Promise<void>;
|
|
3013
|
+
clauses: EnhancedClause[];
|
|
3014
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
3015
|
+
declare const buildERC20Clauses: (receiverAddress: string, amount: string, tokenAddress: string, tokenName: string) => EnhancedClause[];
|
|
3016
|
+
declare const useTransferERC20: ({
|
|
3017
|
+
fromAddress,
|
|
3018
|
+
receiverAddress,
|
|
3019
|
+
amount,
|
|
3020
|
+
tokenAddress,
|
|
3021
|
+
tokenName,
|
|
3022
|
+
onSuccess,
|
|
3023
|
+
onError
|
|
3024
|
+
}: useTransferERC20Props) => useTransferERC20ReturnValue;
|
|
3025
|
+
//#endregion
|
|
3026
|
+
//#region src/hooks/thor/transactions/useTransferVET.d.ts
|
|
3027
|
+
type useTransferVETProps = {
|
|
3028
|
+
fromAddress: string;
|
|
3029
|
+
receiverAddress: string;
|
|
3030
|
+
amount: string;
|
|
3031
|
+
onSuccess?: () => void;
|
|
3032
|
+
onError?: (error?: string) => void;
|
|
3033
|
+
};
|
|
3034
|
+
type useTransferVETReturnValue = {
|
|
3035
|
+
sendTransaction: () => Promise<void>;
|
|
3036
|
+
clauses: EnhancedClause[];
|
|
3037
|
+
} & Omit<UseSendTransactionReturnValue, 'sendTransaction'>;
|
|
3038
|
+
declare const buildVETClauses: (receiverAddress: string, amount: string) => EnhancedClause[];
|
|
3039
|
+
declare const useTransferVET: ({
|
|
3040
|
+
fromAddress,
|
|
3041
|
+
receiverAddress,
|
|
3042
|
+
amount,
|
|
3043
|
+
onSuccess,
|
|
3044
|
+
onError
|
|
3045
|
+
}: useTransferVETProps) => useTransferVETReturnValue;
|
|
3046
|
+
//#endregion
|
|
3047
|
+
//#region src/hooks/thor/transactions/useBuildTransaction.d.ts
|
|
3048
|
+
type BuildTransactionProps<ClausesParams> = {
|
|
3049
|
+
clauseBuilder: (props: ClausesParams) => TransactionClause[];
|
|
3050
|
+
refetchQueryKeys?: (string | undefined)[][];
|
|
3051
|
+
onSuccess?: () => void;
|
|
3052
|
+
invalidateCache?: boolean;
|
|
3053
|
+
suggestedMaxGas?: number;
|
|
3054
|
+
gasPadding?: number;
|
|
3055
|
+
onFailure?: () => void;
|
|
3056
|
+
};
|
|
3057
|
+
/**
|
|
3058
|
+
* Custom hook for building and sending transactions.
|
|
3059
|
+
* @param clauseBuilder - A function that builds an array of enhanced clauses based on the provided parameters.
|
|
3060
|
+
* @param refetchQueryKeys - An optional array of query keys to refetch after the transaction is sent.
|
|
3061
|
+
* @param invalidateCache - A flag indicating whether to invalidate the cache and refetch queries after the transaction is sent.
|
|
3062
|
+
* @param onSuccess - An optional callback function to be called after the transaction is successfully sent.
|
|
3063
|
+
* @param onFailure - An optional callback function to be called after the transaction is failed or cancelled.
|
|
3064
|
+
* @param suggestedMaxGas - The suggested maximum gas for the transaction.
|
|
3065
|
+
* @param gasPadding - The padding to add to the suggested maximum gas.
|
|
3066
|
+
* @returns An object containing the result of the `useSendTransaction` hook and a `sendTransaction` function.
|
|
3067
|
+
*/
|
|
3068
|
+
declare const useBuildTransaction: <ClausesParams>({
|
|
3069
|
+
clauseBuilder,
|
|
3070
|
+
refetchQueryKeys,
|
|
3071
|
+
invalidateCache,
|
|
3072
|
+
onSuccess,
|
|
3073
|
+
onFailure,
|
|
3074
|
+
suggestedMaxGas,
|
|
3075
|
+
gasPadding
|
|
3076
|
+
}: BuildTransactionProps<ClausesParams>) => {
|
|
3077
|
+
sendTransaction: (props: ClausesParams) => Promise<void>;
|
|
3078
|
+
isTransactionPending: boolean;
|
|
3079
|
+
isWaitingForWalletConfirmation: boolean;
|
|
3080
|
+
txReceipt: _vechain_sdk_network0.TransactionReceipt | null;
|
|
3081
|
+
status: TransactionStatus;
|
|
3082
|
+
resetStatus: () => void;
|
|
3083
|
+
error?: TransactionStatusErrorType;
|
|
3084
|
+
};
|
|
3085
|
+
//#endregion
|
|
3086
|
+
//#region src/hooks/thor/transactions/useTxReceipt.d.ts
|
|
3087
|
+
declare const txReceiptQueryKey: (txId: string) => string[];
|
|
3088
|
+
/**
|
|
3089
|
+
* Retrieve the receipt of a transaction identified by its ID.
|
|
3090
|
+
* If the transaction is not found, the response will be null.
|
|
3091
|
+
* @param txId The ID of the transaction to retrieve the receipt for
|
|
3092
|
+
* @param blockTimeout Optional timeout in milliseconds to stop polling for receipt
|
|
3093
|
+
* @returns Query result containing the transaction receipt
|
|
3094
|
+
*/
|
|
3095
|
+
declare const useTxReceipt: (txId: string, blockTimeout?: number) => _tanstack_react_query8.UseQueryResult<_vechain_sdk_network0.TransactionReceipt, Error>;
|
|
3096
|
+
//#endregion
|
|
3097
|
+
//#region src/components/AccountModal/Contents/SendToken/SendTokenContent.d.ts
|
|
3098
|
+
type SendTokenContentProps = {
|
|
3099
|
+
setCurrentContent: React$1.Dispatch<React$1.SetStateAction<AccountModalContentTypes>>;
|
|
3100
|
+
preselectedToken?: TokenWithValue;
|
|
3101
|
+
initialAmount?: string;
|
|
3102
|
+
initialToAddressOrDomain?: string;
|
|
3103
|
+
onBack?: () => void;
|
|
3104
|
+
};
|
|
3105
|
+
declare const SendTokenContent: ({
|
|
3106
|
+
setCurrentContent,
|
|
3107
|
+
preselectedToken,
|
|
3108
|
+
initialAmount,
|
|
3109
|
+
initialToAddressOrDomain,
|
|
3110
|
+
onBack: parentOnBack
|
|
3111
|
+
}: SendTokenContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3112
|
+
//#endregion
|
|
3113
|
+
//#region src/components/AccountModal/Contents/SendToken/SendTokenSummaryContent.d.ts
|
|
3114
|
+
type SendTokenSummaryContentProps = {
|
|
3115
|
+
setCurrentContent: React$1.Dispatch<React$1.SetStateAction<AccountModalContentTypes>>;
|
|
3116
|
+
toAddressOrDomain: string;
|
|
3117
|
+
resolvedDomain?: string;
|
|
3118
|
+
resolvedAddress?: string;
|
|
3119
|
+
amount: string;
|
|
3120
|
+
selectedToken: TokenWithValue;
|
|
3121
|
+
formattedTotalAmount: string;
|
|
3122
|
+
};
|
|
3123
|
+
declare const SendTokenSummaryContent: ({
|
|
3124
|
+
setCurrentContent,
|
|
3125
|
+
toAddressOrDomain,
|
|
3126
|
+
resolvedDomain,
|
|
3127
|
+
resolvedAddress,
|
|
3128
|
+
amount,
|
|
3129
|
+
selectedToken,
|
|
3130
|
+
formattedTotalAmount
|
|
3131
|
+
}: SendTokenSummaryContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3132
|
+
//#endregion
|
|
3133
|
+
//#region src/components/AccountModal/Contents/SendToken/SelectTokenContent.d.ts
|
|
3134
|
+
type Props$18 = {
|
|
3135
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3136
|
+
onSelectToken: (token: TokenWithValue) => void;
|
|
3137
|
+
onBack: () => void;
|
|
3138
|
+
/**
|
|
3139
|
+
* If true, shows all tokens (not just tokens with balance) and sorts owned tokens first
|
|
3140
|
+
*/
|
|
3141
|
+
showAllTokens?: boolean;
|
|
3142
|
+
};
|
|
3143
|
+
declare const SelectTokenContent: ({
|
|
3144
|
+
onSelectToken,
|
|
3145
|
+
onBack,
|
|
3146
|
+
showAllTokens
|
|
3147
|
+
}: Props$18) => react_jsx_runtime0.JSX.Element;
|
|
3148
|
+
//#endregion
|
|
3149
|
+
//#region src/components/AccountModal/Contents/Receive/ReceiveTokenContent.d.ts
|
|
3150
|
+
type Props$17 = {
|
|
3151
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3152
|
+
};
|
|
3153
|
+
declare const ReceiveTokenContent: ({
|
|
3154
|
+
setCurrentContent
|
|
3155
|
+
}: Props$17) => react_jsx_runtime0.JSX.Element;
|
|
3156
|
+
//#endregion
|
|
3157
|
+
//#region src/components/AccountModal/Contents/Swap/SwapTokenContent.d.ts
|
|
3158
|
+
type Props$16 = {
|
|
3159
|
+
setCurrentContent: React$1.Dispatch<React$1.SetStateAction<AccountModalContentTypes>>;
|
|
3160
|
+
fromTokenAddress?: string;
|
|
3161
|
+
toTokenAddress?: string;
|
|
3162
|
+
};
|
|
3163
|
+
declare const SwapTokenContent: ({
|
|
3164
|
+
setCurrentContent,
|
|
3165
|
+
fromTokenAddress,
|
|
3166
|
+
toTokenAddress
|
|
3167
|
+
}: Props$16) => react_jsx_runtime0.JSX.Element;
|
|
3168
|
+
//#endregion
|
|
3169
|
+
//#region src/components/AccountModal/Contents/ChooseName/ChooseNameContent.d.ts
|
|
3170
|
+
type ChooseNameContentProps = {
|
|
3171
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3172
|
+
onBack?: () => void;
|
|
3173
|
+
initialContentSource?: AccountModalContentTypes;
|
|
3174
|
+
};
|
|
3175
|
+
declare const ChooseNameContent: ({
|
|
3176
|
+
setCurrentContent,
|
|
3177
|
+
onBack,
|
|
3178
|
+
initialContentSource
|
|
3179
|
+
}: ChooseNameContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3180
|
+
//#endregion
|
|
3181
|
+
//#region src/components/AccountModal/Contents/ChooseName/ChooseNameSearchContent.d.ts
|
|
3182
|
+
type ChooseNameSearchContentProps = {
|
|
3183
|
+
name: string;
|
|
3184
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3185
|
+
initialContentSource?: AccountModalContentTypes;
|
|
3186
|
+
};
|
|
3187
|
+
declare const ChooseNameSearchContent: ({
|
|
3188
|
+
name: initialName,
|
|
3189
|
+
setCurrentContent,
|
|
3190
|
+
initialContentSource
|
|
3191
|
+
}: ChooseNameSearchContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3192
|
+
//#endregion
|
|
3193
|
+
//#region src/components/AccountModal/Contents/ChooseName/ChooseNameSummaryContent.d.ts
|
|
3194
|
+
type ChooseNameSummaryContentProps = {
|
|
3195
|
+
setCurrentContent: React$1.Dispatch<React$1.SetStateAction<AccountModalContentTypes>>;
|
|
3196
|
+
fullDomain: string;
|
|
3197
|
+
domainType?: string;
|
|
3198
|
+
isOwnDomain: boolean;
|
|
3199
|
+
isUnsetting?: boolean;
|
|
3200
|
+
initialContentSource?: AccountModalContentTypes;
|
|
3201
|
+
};
|
|
3202
|
+
declare const ChooseNameSummaryContent: ({
|
|
3203
|
+
setCurrentContent,
|
|
3204
|
+
fullDomain,
|
|
3205
|
+
domainType,
|
|
3206
|
+
isOwnDomain,
|
|
3207
|
+
isUnsetting,
|
|
3208
|
+
initialContentSource
|
|
3209
|
+
}: ChooseNameSummaryContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3210
|
+
//#endregion
|
|
3211
|
+
//#region src/components/AccountModal/Contents/FAQ/FAQContent.d.ts
|
|
3212
|
+
type FAQContentProps = {
|
|
3213
|
+
onGoBack: () => void;
|
|
3214
|
+
showLanguageSelector?: boolean;
|
|
3215
|
+
};
|
|
3216
|
+
declare const FAQContent: ({
|
|
3217
|
+
onGoBack,
|
|
3218
|
+
showLanguageSelector
|
|
3219
|
+
}: FAQContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3220
|
+
//#endregion
|
|
3221
|
+
//#region src/components/AccountModal/Contents/Profile/Customization/CustomizationContent.d.ts
|
|
3222
|
+
type AccountCustomizationContentProps = {
|
|
3223
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3224
|
+
initialContentSource?: AccountModalContentTypes;
|
|
3225
|
+
};
|
|
3226
|
+
declare const CustomizationContent: ({
|
|
3227
|
+
setCurrentContent,
|
|
3228
|
+
initialContentSource
|
|
3229
|
+
}: AccountCustomizationContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3230
|
+
//#endregion
|
|
3231
|
+
//#region src/components/AccountModal/Contents/Profile/Customization/CustomizationSummaryContent.d.ts
|
|
3232
|
+
type CustomizationSummaryContentProps = {
|
|
3233
|
+
setCurrentContent: React$1.Dispatch<React$1.SetStateAction<AccountModalContentTypes>>;
|
|
3234
|
+
changes: {
|
|
3235
|
+
avatarIpfsHash?: string | null;
|
|
3236
|
+
displayName?: string;
|
|
3237
|
+
description?: string;
|
|
3238
|
+
twitter?: string;
|
|
3239
|
+
website?: string;
|
|
3240
|
+
email?: string;
|
|
3241
|
+
};
|
|
3242
|
+
onDoneRedirectContent: AccountModalContentTypes;
|
|
3243
|
+
};
|
|
3244
|
+
declare const CustomizationSummaryContent: ({
|
|
3245
|
+
setCurrentContent,
|
|
3246
|
+
changes,
|
|
3247
|
+
onDoneRedirectContent
|
|
3248
|
+
}: CustomizationSummaryContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3249
|
+
//#endregion
|
|
3250
|
+
//#region src/components/AccountModal/Contents/Profile/ProfileContent.d.ts
|
|
3251
|
+
type ProfileContentProps = {
|
|
3252
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3253
|
+
onLogoutSuccess: () => void;
|
|
3254
|
+
};
|
|
3255
|
+
declare const ProfileContent: ({
|
|
3256
|
+
setCurrentContent,
|
|
3257
|
+
onLogoutSuccess
|
|
3258
|
+
}: ProfileContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3259
|
+
//#endregion
|
|
3260
|
+
//#region src/components/AccountModal/Contents/UpgradeSmartAccount/UpgradeSmartAccountContent.d.ts
|
|
3261
|
+
type UpgradeSmartAccountContentProps = {
|
|
3262
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3263
|
+
handleClose?: () => void;
|
|
3264
|
+
initialContent?: AccountModalContentTypes;
|
|
3265
|
+
};
|
|
3266
|
+
declare const UpgradeSmartAccountContent: ({
|
|
3267
|
+
setCurrentContent,
|
|
3268
|
+
handleClose,
|
|
3269
|
+
initialContent
|
|
3270
|
+
}: UpgradeSmartAccountContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3271
|
+
//#endregion
|
|
3272
|
+
//#region src/components/AccountModal/Contents/Assets/AssetsContent.d.ts
|
|
3273
|
+
type AssetsContentProps = {
|
|
3274
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3275
|
+
};
|
|
3276
|
+
declare const AssetsContent: ({
|
|
3277
|
+
setCurrentContent
|
|
3278
|
+
}: AssetsContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3279
|
+
//#endregion
|
|
3280
|
+
//#region src/components/AccountModal/Contents/Assets/ManageCustomTokenContent.d.ts
|
|
3281
|
+
type ManageCustomTokenContentProps = {
|
|
3282
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3283
|
+
};
|
|
3284
|
+
declare const ManageCustomTokenContent: ({
|
|
3285
|
+
setCurrentContent
|
|
3286
|
+
}: ManageCustomTokenContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3287
|
+
//#endregion
|
|
3288
|
+
//#region src/components/AccountModal/Contents/Bridge/BridgeContent.d.ts
|
|
3289
|
+
type Props$15 = {
|
|
3290
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3291
|
+
};
|
|
3292
|
+
declare const BridgeContent: ({
|
|
3293
|
+
setCurrentContent
|
|
3294
|
+
}: Props$15) => react_jsx_runtime0.JSX.Element;
|
|
3295
|
+
//#endregion
|
|
3296
|
+
//#region src/components/AccountModal/Contents/KitSettings/ChangeCurrencyContent.d.ts
|
|
3297
|
+
type ChangeCurrencyContentProps = {
|
|
3298
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3299
|
+
};
|
|
3300
|
+
declare const ChangeCurrencyContent: ({
|
|
3301
|
+
setCurrentContent
|
|
3302
|
+
}: ChangeCurrencyContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3303
|
+
//#endregion
|
|
3304
|
+
//#region src/components/AccountModal/Contents/KitSettings/GeneralSettingsContent.d.ts
|
|
3305
|
+
type Props$14 = {
|
|
3306
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3307
|
+
};
|
|
3308
|
+
declare const GeneralSettingsContent: ({
|
|
3309
|
+
setCurrentContent
|
|
3310
|
+
}: Props$14) => react_jsx_runtime0.JSX.Element;
|
|
3311
|
+
//#endregion
|
|
3312
|
+
//#region src/components/AccountModal/Contents/KitSettings/LanguageSettingsContent.d.ts
|
|
3313
|
+
type Props$13 = {
|
|
3314
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3315
|
+
};
|
|
3316
|
+
declare const LanguageSettingsContent: ({
|
|
3317
|
+
setCurrentContent
|
|
3318
|
+
}: Props$13) => react_jsx_runtime0.JSX.Element;
|
|
3319
|
+
//#endregion
|
|
3320
|
+
//#region src/components/AccountModal/Contents/KitSettings/AppearanceSettingsContent.d.ts
|
|
3321
|
+
type Props$12 = {
|
|
3322
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3323
|
+
};
|
|
3324
|
+
declare const AppearanceSettingsContent: ({
|
|
3325
|
+
setCurrentContent
|
|
3326
|
+
}: Props$12) => react_jsx_runtime0.JSX.Element;
|
|
3327
|
+
//#endregion
|
|
3328
|
+
//#region src/components/AccountModal/Contents/KitSettings/GasTokenSettingsContent.d.ts
|
|
3329
|
+
type Props$11 = {
|
|
3330
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3331
|
+
};
|
|
3332
|
+
declare const GasTokenSettingsContent: ({
|
|
3333
|
+
setCurrentContent
|
|
3334
|
+
}: Props$11) => react_jsx_runtime0.JSX.Element;
|
|
3335
|
+
//#endregion
|
|
3336
|
+
//#region src/components/AccountModal/Contents/TermsAndPrivacy/TermsAndPrivacyContent.d.ts
|
|
3337
|
+
type TermsAndPrivacyContentProps = {
|
|
3338
|
+
onGoBack: () => void;
|
|
3339
|
+
};
|
|
3340
|
+
declare const TermsAndPrivacyContent: ({
|
|
3341
|
+
onGoBack
|
|
3342
|
+
}: TermsAndPrivacyContentProps) => react_jsx_runtime0.JSX.Element;
|
|
3343
|
+
//#endregion
|
|
3344
|
+
//#region src/components/AccountModal/Contents/Ecosystem/Components/CategoryFilterSection.d.ts
|
|
3345
|
+
type CategoryFilter = string | null;
|
|
3346
|
+
//#endregion
|
|
3347
|
+
//#region src/components/AccountModal/Contents/Ecosystem/AppOverviewContent.d.ts
|
|
3348
|
+
type AppOverviewContentProps = {
|
|
3349
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3350
|
+
name: string;
|
|
3351
|
+
image: string;
|
|
3352
|
+
url: string;
|
|
3353
|
+
description: string;
|
|
3354
|
+
category?: AllowedCategories;
|
|
3355
|
+
selectedCategory?: CategoryFilter;
|
|
3356
|
+
logoComponent?: JSX.Element;
|
|
3357
|
+
};
|
|
3358
|
+
//#endregion
|
|
3359
|
+
//#region src/components/AccountModal/Contents/SuccessfulOperation/SuccessfulOperationContent.d.ts
|
|
3360
|
+
type SuccessfulOperationContentProps$1 = {
|
|
3361
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3362
|
+
txId?: string;
|
|
3363
|
+
title: string;
|
|
3364
|
+
description?: string;
|
|
3365
|
+
onDone: () => void;
|
|
3366
|
+
showSocialButtons?: boolean;
|
|
3367
|
+
};
|
|
3368
|
+
//#endregion
|
|
3369
|
+
//#region src/components/AccountModal/Contents/FailedOperation/FailedOperationContent.d.ts
|
|
3370
|
+
type FailedOperationContentProps = {
|
|
3371
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3372
|
+
txId?: string;
|
|
3373
|
+
title: string;
|
|
3374
|
+
description?: string;
|
|
3375
|
+
onDone: () => void;
|
|
3376
|
+
};
|
|
3377
|
+
//#endregion
|
|
3378
|
+
//#region src/components/AccountModal/Types/Types.d.ts
|
|
3379
|
+
type AccountModalContentTypes = 'main' | 'settings' | 'profile' | 'access-and-security' | 'embedded-wallet' | 'manage-mfa' | 'receive-token' | 'swap-token' | 'connection-details' | 'ecosystem' | 'notifications' | 'privy-linked-accounts' | 'add-custom-token' | 'assets' | 'bridge' | 'change-currency' | 'general-settings' | 'change-language' | 'appearance-settings' | 'gas-token-settings' | {
|
|
3380
|
+
type: 'swap-token';
|
|
3381
|
+
props: {
|
|
3382
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3383
|
+
fromTokenAddress?: string;
|
|
3384
|
+
toTokenAddress?: string;
|
|
3385
|
+
};
|
|
3386
|
+
} | {
|
|
3387
|
+
type: 'account-customization';
|
|
3388
|
+
props: AccountCustomizationContentProps;
|
|
3389
|
+
} | {
|
|
3390
|
+
type: 'successful-operation';
|
|
3391
|
+
props: SuccessfulOperationContentProps$1;
|
|
3392
|
+
} | {
|
|
3393
|
+
type: 'failed-operation';
|
|
3394
|
+
props: FailedOperationContentProps;
|
|
3395
|
+
} | {
|
|
3396
|
+
type: 'account-customization-summary';
|
|
3397
|
+
props: CustomizationSummaryContentProps;
|
|
3398
|
+
} | {
|
|
3399
|
+
type: 'app-overview';
|
|
3400
|
+
props: AppOverviewContentProps;
|
|
3401
|
+
} | {
|
|
3402
|
+
type: 'ecosystem-with-category';
|
|
3403
|
+
props: {
|
|
3404
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3405
|
+
selectedCategory: CategoryFilter;
|
|
3406
|
+
};
|
|
3407
|
+
} | {
|
|
3408
|
+
type: 'send-token';
|
|
3409
|
+
props: SendTokenContentProps;
|
|
3410
|
+
} | {
|
|
3411
|
+
type: 'send-token-summary';
|
|
3412
|
+
props: SendTokenSummaryContentProps;
|
|
3413
|
+
} | {
|
|
3414
|
+
type: 'choose-name';
|
|
3415
|
+
props: ChooseNameContentProps;
|
|
3416
|
+
} | {
|
|
3417
|
+
type: 'choose-name-search';
|
|
3418
|
+
props: ChooseNameSearchContentProps;
|
|
3419
|
+
} | {
|
|
3420
|
+
type: 'choose-name-summary';
|
|
3421
|
+
props: ChooseNameSummaryContentProps;
|
|
3422
|
+
} | {
|
|
3423
|
+
type: 'disconnect-confirm';
|
|
3424
|
+
props: DisconnectConfirmContentProps;
|
|
3425
|
+
} | {
|
|
3426
|
+
type: 'upgrade-smart-account';
|
|
3427
|
+
props: UpgradeSmartAccountContentProps;
|
|
3428
|
+
} | {
|
|
3429
|
+
type: 'faq';
|
|
3430
|
+
props: FAQContentProps;
|
|
3431
|
+
} | {
|
|
3432
|
+
type: 'terms-and-privacy';
|
|
3433
|
+
props: TermsAndPrivacyContentProps;
|
|
3434
|
+
};
|
|
3435
|
+
//#endregion
|
|
3436
|
+
//#region src/components/AccountModal/AccountModal.d.ts
|
|
3437
|
+
type Props$10 = {
|
|
3438
|
+
isOpen: boolean;
|
|
3439
|
+
onClose: () => void;
|
|
3440
|
+
initialContent?: AccountModalContentTypes;
|
|
3441
|
+
};
|
|
3442
|
+
declare const AccountModal: ({
|
|
3443
|
+
isOpen,
|
|
3444
|
+
onClose,
|
|
3445
|
+
initialContent
|
|
3446
|
+
}: Props$10) => react_jsx_runtime0.JSX.Element;
|
|
3447
|
+
//#endregion
|
|
3448
|
+
//#region src/components/AccountModal/Components/AccountDetailsButton.d.ts
|
|
3449
|
+
interface AccountDetailsButtonProps {
|
|
3450
|
+
title: string;
|
|
3451
|
+
wallet: Wallet;
|
|
3452
|
+
onClick: () => void;
|
|
3453
|
+
leftIcon?: ElementType;
|
|
3454
|
+
rightIcon?: ElementType;
|
|
3455
|
+
leftImage?: string;
|
|
3456
|
+
backgroundColor?: string;
|
|
3457
|
+
border?: string;
|
|
3458
|
+
isActive?: boolean;
|
|
3459
|
+
}
|
|
3460
|
+
declare const AccountDetailsButton: ({
|
|
3461
|
+
leftIcon,
|
|
3462
|
+
rightIcon,
|
|
3463
|
+
title,
|
|
3464
|
+
wallet,
|
|
3465
|
+
onClick,
|
|
3466
|
+
leftImage,
|
|
3467
|
+
isActive
|
|
3468
|
+
}: AccountDetailsButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
3469
|
+
//#endregion
|
|
3470
|
+
//#region src/components/AccountModal/Components/ActionButton.d.ts
|
|
3471
|
+
type ActionButtonProps = {
|
|
3472
|
+
title: string;
|
|
3473
|
+
description?: string;
|
|
3474
|
+
onClick: () => void;
|
|
3475
|
+
leftIcon?: IconType;
|
|
3476
|
+
rightIcon?: IconType;
|
|
3477
|
+
leftImage?: string;
|
|
3478
|
+
backgroundColor?: string;
|
|
3479
|
+
border?: string;
|
|
3480
|
+
hide?: boolean;
|
|
3481
|
+
_hover?: object;
|
|
3482
|
+
showComingSoon?: boolean;
|
|
3483
|
+
isDisabled?: boolean;
|
|
3484
|
+
stacked?: boolean;
|
|
3485
|
+
isLoading?: boolean;
|
|
3486
|
+
loadingText?: string;
|
|
3487
|
+
style?: ButtonProps;
|
|
3488
|
+
extraContent?: React.ReactNode;
|
|
3489
|
+
dataTestId?: string;
|
|
3490
|
+
variant?: string;
|
|
3491
|
+
};
|
|
3492
|
+
declare const ActionButton: ({
|
|
3493
|
+
leftIcon,
|
|
3494
|
+
rightIcon,
|
|
3495
|
+
title,
|
|
3496
|
+
onClick,
|
|
3497
|
+
leftImage,
|
|
3498
|
+
hide,
|
|
3499
|
+
showComingSoon,
|
|
3500
|
+
backgroundColor,
|
|
3501
|
+
_hover,
|
|
3502
|
+
isDisabled,
|
|
3503
|
+
stacked,
|
|
3504
|
+
isLoading,
|
|
3505
|
+
loadingText,
|
|
3506
|
+
style,
|
|
3507
|
+
extraContent,
|
|
3508
|
+
dataTestId,
|
|
3509
|
+
variant
|
|
3510
|
+
}: ActionButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
3511
|
+
//#endregion
|
|
3512
|
+
//#region src/components/AccountModal/Components/AccountSelector.d.ts
|
|
3513
|
+
type Props$9 = {
|
|
3514
|
+
wallet: Wallet;
|
|
3515
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3516
|
+
size?: string;
|
|
3517
|
+
onClick?: () => void;
|
|
3518
|
+
onClose: () => void;
|
|
3519
|
+
mt?: number;
|
|
3520
|
+
style?: StackProps;
|
|
3521
|
+
};
|
|
3522
|
+
declare const AccountSelector: ({
|
|
3523
|
+
wallet,
|
|
3524
|
+
setCurrentContent,
|
|
3525
|
+
size,
|
|
3526
|
+
onClick,
|
|
3527
|
+
onClose,
|
|
3528
|
+
mt,
|
|
3529
|
+
style
|
|
3530
|
+
}: Props$9) => react_jsx_runtime0.JSX.Element;
|
|
3531
|
+
//#endregion
|
|
3532
|
+
//#region src/components/AccountModal/Components/BalanceSection.d.ts
|
|
3533
|
+
declare const BalanceSection: ({
|
|
3534
|
+
mb,
|
|
3535
|
+
mt,
|
|
3536
|
+
onAssetsClick
|
|
3537
|
+
}: {
|
|
3538
|
+
mb?: number;
|
|
3539
|
+
mt?: number;
|
|
3540
|
+
onAssetsClick?: () => void;
|
|
3541
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
3542
|
+
//#endregion
|
|
3543
|
+
//#region src/components/AccountModal/Components/QuickActionsSection.d.ts
|
|
3544
|
+
type Props$8 = {
|
|
3545
|
+
mt?: number;
|
|
3546
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3547
|
+
};
|
|
3548
|
+
declare const QuickActionsSection: ({
|
|
3549
|
+
mt,
|
|
3550
|
+
setCurrentContent
|
|
3551
|
+
}: Props$8) => react_jsx_runtime0.JSX.Element;
|
|
3552
|
+
//#endregion
|
|
3553
|
+
//#region src/components/AccountModal/Components/Alerts/FeatureAnnouncementCard.d.ts
|
|
3554
|
+
type FeatureAnnouncementCardProps = {
|
|
3555
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3556
|
+
};
|
|
3557
|
+
declare const FeatureAnnouncementCard: ({
|
|
3558
|
+
setCurrentContent
|
|
3559
|
+
}: FeatureAnnouncementCardProps) => react_jsx_runtime0.JSX.Element | null;
|
|
3560
|
+
//#endregion
|
|
3561
|
+
//#region src/components/AccountModal/Components/Alerts/ExchangeWarningAlert.d.ts
|
|
3562
|
+
declare const ExchangeWarningAlert: () => react_jsx_runtime0.JSX.Element;
|
|
3563
|
+
//#endregion
|
|
3564
|
+
//#region src/components/AccountModal/Components/Alerts/DomainRequiredAlert.d.ts
|
|
3565
|
+
declare const DomainRequiredAlert: () => react_jsx_runtime0.JSX.Element;
|
|
3566
|
+
//#endregion
|
|
3567
|
+
//#region src/components/AccountModal/Components/CrossAppConnectionSecurityCard.d.ts
|
|
3568
|
+
declare const CrossAppConnectionSecurityCard: () => react_jsx_runtime0.JSX.Element;
|
|
3569
|
+
//#endregion
|
|
3570
|
+
//#region src/components/common/ModalBackButton.d.ts
|
|
3571
|
+
type BackButtonProps = {
|
|
3572
|
+
onClick: () => void;
|
|
3573
|
+
} & Partial<IconButtonProps>;
|
|
3574
|
+
declare const ModalBackButton: ({
|
|
3575
|
+
onClick,
|
|
3576
|
+
...props
|
|
3577
|
+
}: BackButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
3578
|
+
//#endregion
|
|
3579
|
+
//#region src/components/common/AddressDisplay.d.ts
|
|
3580
|
+
type Props$7 = {
|
|
3581
|
+
wallet: Wallet;
|
|
3582
|
+
label?: string;
|
|
3583
|
+
style?: PropsOf<typeof VStack>;
|
|
3584
|
+
showHumanAddress?: boolean;
|
|
3585
|
+
};
|
|
3586
|
+
declare const AddressDisplay: ({
|
|
3587
|
+
wallet,
|
|
3588
|
+
label,
|
|
3589
|
+
style,
|
|
3590
|
+
showHumanAddress
|
|
3591
|
+
}: Props$7) => react_jsx_runtime0.JSX.Element;
|
|
3592
|
+
//#endregion
|
|
3593
|
+
//#region src/components/common/VersionFooter.d.ts
|
|
3594
|
+
type Props$6 = {} & Omit<StackProps, 'dangerouslySetInnerHTML'>;
|
|
3595
|
+
declare const VersionFooter: ({
|
|
3596
|
+
...props
|
|
3597
|
+
}: Props$6) => react_jsx_runtime0.JSX.Element;
|
|
3598
|
+
//#endregion
|
|
3599
|
+
//#region src/components/common/StickyHeaderContainer.d.ts
|
|
3600
|
+
type Props$5 = {
|
|
3601
|
+
children: React.ReactNode;
|
|
3602
|
+
};
|
|
3603
|
+
declare const StickyHeaderContainer: ({
|
|
3604
|
+
children
|
|
3605
|
+
}: Props$5) => react_jsx_runtime0.JSX.Element;
|
|
3606
|
+
//#endregion
|
|
3607
|
+
//#region src/components/common/StickyFooterContainer.d.ts
|
|
3608
|
+
type Props$4 = {
|
|
3609
|
+
children: React.ReactNode;
|
|
3610
|
+
};
|
|
3611
|
+
declare const StickyFooterContainer: ({
|
|
3612
|
+
children
|
|
3613
|
+
}: Props$4) => react_jsx_runtime0.JSX.Element;
|
|
3614
|
+
//#endregion
|
|
3615
|
+
//#region src/components/common/BaseModal.d.ts
|
|
3616
|
+
type BaseModalProps = {
|
|
3617
|
+
isOpen: boolean;
|
|
3618
|
+
onClose: () => void;
|
|
3619
|
+
children: ReactNode;
|
|
3620
|
+
size?: string;
|
|
3621
|
+
isCentered?: boolean;
|
|
3622
|
+
motionPreset?: 'slideInBottom' | 'none';
|
|
3623
|
+
trapFocus?: boolean;
|
|
3624
|
+
closeOnOverlayClick?: boolean;
|
|
3625
|
+
blockScrollOnMount?: boolean;
|
|
3626
|
+
autoFocus?: boolean;
|
|
3627
|
+
initialFocusRef?: React.RefObject<HTMLElement>;
|
|
3628
|
+
allowExternalFocus?: boolean;
|
|
3629
|
+
backdropFilter?: string;
|
|
3630
|
+
isCloseable?: boolean;
|
|
3631
|
+
};
|
|
3632
|
+
declare const BaseModal: ({
|
|
3633
|
+
isOpen,
|
|
3634
|
+
onClose,
|
|
3635
|
+
children,
|
|
3636
|
+
size,
|
|
3637
|
+
isCentered,
|
|
3638
|
+
motionPreset,
|
|
3639
|
+
closeOnOverlayClick,
|
|
3640
|
+
blockScrollOnMount,
|
|
3641
|
+
allowExternalFocus,
|
|
3642
|
+
backdropFilter,
|
|
3643
|
+
isCloseable
|
|
3644
|
+
}: BaseModalProps) => react_jsx_runtime0.JSX.Element;
|
|
3645
|
+
//#endregion
|
|
3646
|
+
//#region src/components/common/AssetButton.d.ts
|
|
3647
|
+
type AssetButtonProps = ButtonProps & {
|
|
3648
|
+
symbol: string;
|
|
3649
|
+
amount: number;
|
|
3650
|
+
currencyValue: number;
|
|
3651
|
+
currentCurrency: CURRENCY;
|
|
3652
|
+
isDisabled?: boolean;
|
|
3653
|
+
onClick?: () => void;
|
|
3654
|
+
};
|
|
3655
|
+
declare const AssetButton: ({
|
|
3656
|
+
symbol,
|
|
3657
|
+
amount,
|
|
3658
|
+
currencyValue,
|
|
3659
|
+
currentCurrency,
|
|
3660
|
+
isDisabled,
|
|
3661
|
+
onClick,
|
|
3662
|
+
...buttonProps
|
|
3663
|
+
}: AssetButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
3664
|
+
//#endregion
|
|
3665
|
+
//#region src/components/common/AddressDisplayCard.d.ts
|
|
3666
|
+
type AddressDisplayCardProps = {
|
|
3667
|
+
label: string;
|
|
3668
|
+
address: string;
|
|
3669
|
+
domain?: string;
|
|
3670
|
+
imageSrc: string;
|
|
3671
|
+
imageAlt?: string;
|
|
3672
|
+
hideAddress?: boolean;
|
|
3673
|
+
balance?: number;
|
|
3674
|
+
tokenAddress?: string;
|
|
3675
|
+
};
|
|
3676
|
+
declare const AddressDisplayCard: ({
|
|
3677
|
+
label,
|
|
3678
|
+
address,
|
|
3679
|
+
domain,
|
|
3680
|
+
imageSrc,
|
|
3681
|
+
imageAlt,
|
|
3682
|
+
hideAddress,
|
|
3683
|
+
balance,
|
|
3684
|
+
tokenAddress
|
|
3685
|
+
}: AddressDisplayCardProps) => react_jsx_runtime0.JSX.Element;
|
|
3686
|
+
//#endregion
|
|
3687
|
+
//#region src/components/common/ModalFAQButton.d.ts
|
|
3688
|
+
type FAQButtonProps = {
|
|
3689
|
+
onClick: () => void;
|
|
3690
|
+
} & Partial<IconButtonProps>;
|
|
3691
|
+
declare const ModalFAQButton: ({
|
|
3692
|
+
onClick,
|
|
3693
|
+
...props
|
|
3694
|
+
}: FAQButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
3695
|
+
//#endregion
|
|
3696
|
+
//#region src/components/common/ScrollToTopWrapper.d.ts
|
|
3697
|
+
declare const ScrollToTopWrapper: ({
|
|
3698
|
+
children,
|
|
3699
|
+
...props
|
|
3700
|
+
}: StackProps) => react_jsx_runtime0.JSX.Element;
|
|
3701
|
+
//#endregion
|
|
3702
|
+
//#region src/components/common/AccountAvatar.d.ts
|
|
3703
|
+
type AccountAvatarProps = {
|
|
3704
|
+
wallet?: Wallet;
|
|
3705
|
+
props?: ImageProps;
|
|
3706
|
+
};
|
|
3707
|
+
declare const AccountAvatar: ({
|
|
3708
|
+
wallet,
|
|
3709
|
+
props
|
|
3710
|
+
}: AccountAvatarProps) => react_jsx_runtime0.JSX.Element;
|
|
3711
|
+
//#endregion
|
|
3712
|
+
//#region src/components/common/TransactionButtonAndStatus.d.ts
|
|
3713
|
+
type TransactionButtonAndStatusProps = {
|
|
3714
|
+
isSubmitting: boolean;
|
|
3715
|
+
isTxWaitingConfirmation: boolean;
|
|
3716
|
+
onConfirm: () => void;
|
|
3717
|
+
onRetry?: () => void;
|
|
3718
|
+
transactionPendingText: string;
|
|
3719
|
+
txReceipt: TransactionReceipt | null;
|
|
3720
|
+
transactionError?: Error | TransactionStatusErrorType | null;
|
|
3721
|
+
isSubmitForm?: boolean;
|
|
3722
|
+
buttonText: string;
|
|
3723
|
+
isDisabled?: boolean;
|
|
3724
|
+
style?: {
|
|
3725
|
+
accentColor?: string;
|
|
3726
|
+
};
|
|
3727
|
+
onError?: (error: string) => void;
|
|
3728
|
+
gasEstimationError?: Error | null;
|
|
3729
|
+
hasEnoughGasBalance?: boolean;
|
|
3730
|
+
isLoadingGasEstimation?: boolean;
|
|
3731
|
+
showGasEstimationError?: boolean;
|
|
3732
|
+
context?: 'send' | 'customization' | 'domain' | 'transaction';
|
|
3733
|
+
};
|
|
3734
|
+
declare const TransactionButtonAndStatus: ({
|
|
3735
|
+
transactionError,
|
|
3736
|
+
isSubmitting,
|
|
3737
|
+
isTxWaitingConfirmation,
|
|
3738
|
+
onConfirm,
|
|
3739
|
+
onRetry,
|
|
3740
|
+
transactionPendingText,
|
|
3741
|
+
txReceipt,
|
|
3742
|
+
isSubmitForm,
|
|
3743
|
+
buttonText,
|
|
3744
|
+
isDisabled,
|
|
3745
|
+
style,
|
|
3746
|
+
onError,
|
|
3747
|
+
gasEstimationError,
|
|
3748
|
+
hasEnoughGasBalance,
|
|
3749
|
+
isLoadingGasEstimation,
|
|
3750
|
+
showGasEstimationError,
|
|
3751
|
+
context
|
|
3752
|
+
}: TransactionButtonAndStatusProps) => react_jsx_runtime0.JSX.Element;
|
|
3753
|
+
//#endregion
|
|
3754
|
+
//#region src/components/common/ModalNotificationButton.d.ts
|
|
3755
|
+
type NotificationButtonProps = {
|
|
3756
|
+
onClick: () => void;
|
|
3757
|
+
hasUnreadNotifications?: boolean;
|
|
3758
|
+
} & Partial<IconButtonProps>;
|
|
3759
|
+
declare const ModalNotificationButton: ({
|
|
3760
|
+
onClick,
|
|
3761
|
+
hasUnreadNotifications,
|
|
3762
|
+
...props
|
|
3763
|
+
}: NotificationButtonProps) => react_jsx_runtime0.JSX.Element;
|
|
3764
|
+
//#endregion
|
|
3765
|
+
//#region src/components/common/GasFeeSummary.d.ts
|
|
3766
|
+
interface GasFeeSummaryProps {
|
|
3767
|
+
estimation: (EstimationResponse & {
|
|
3768
|
+
usedToken: string;
|
|
3769
|
+
}) | undefined;
|
|
3770
|
+
isLoading: boolean | undefined;
|
|
3771
|
+
isLoadingTransaction?: boolean;
|
|
3772
|
+
onTokenChange?: (token: GasTokenType) => void;
|
|
3773
|
+
clauses?: TransactionClause[];
|
|
3774
|
+
userSelectedToken?: GasTokenType | null;
|
|
3775
|
+
}
|
|
3776
|
+
declare const GasFeeSummary: React$1.FC<GasFeeSummaryProps>;
|
|
3777
|
+
//#endregion
|
|
3778
|
+
//#region src/components/common/GasFeeTokenSelector.d.ts
|
|
3779
|
+
interface GasFeeTokenSelectorProps {
|
|
3780
|
+
isOpen: boolean;
|
|
3781
|
+
onClose: () => void;
|
|
3782
|
+
selectedToken: GasTokenType;
|
|
3783
|
+
onTokenSelect: (token: GasTokenType, rememberChoice: boolean) => void;
|
|
3784
|
+
availableTokens: GasTokenType[];
|
|
3785
|
+
tokenEstimations: Record<GasTokenType, {
|
|
3786
|
+
cost: number;
|
|
3787
|
+
loading: boolean;
|
|
3788
|
+
}>;
|
|
3789
|
+
walletAddress: string;
|
|
3790
|
+
}
|
|
3791
|
+
declare const GasFeeTokenSelector: ({
|
|
3792
|
+
isOpen,
|
|
3793
|
+
onClose,
|
|
3794
|
+
selectedToken,
|
|
3795
|
+
onTokenSelect,
|
|
3796
|
+
availableTokens,
|
|
3797
|
+
tokenEstimations,
|
|
3798
|
+
walletAddress
|
|
3799
|
+
}: GasFeeTokenSelectorProps) => react_jsx_runtime0.JSX.Element;
|
|
3800
|
+
//#endregion
|
|
3801
|
+
//#region src/components/LoginLoadingModal/LoginLoadingModal.d.ts
|
|
3802
|
+
type LoginLoadingModalProps = {
|
|
3803
|
+
isOpen: boolean;
|
|
3804
|
+
onClose: () => void;
|
|
3805
|
+
error?: string;
|
|
3806
|
+
title?: string;
|
|
3807
|
+
loadingText?: string;
|
|
3808
|
+
onTryAgain?: () => void;
|
|
3809
|
+
};
|
|
3810
|
+
declare const LoginLoadingModal: ({
|
|
3811
|
+
isOpen,
|
|
3812
|
+
onClose,
|
|
3813
|
+
error,
|
|
3814
|
+
title,
|
|
3815
|
+
loadingText,
|
|
3816
|
+
onTryAgain
|
|
3817
|
+
}: LoginLoadingModalProps) => react_jsx_runtime0.JSX.Element;
|
|
3818
|
+
//#endregion
|
|
3819
|
+
//#region src/components/EcosystemModal/EcosystemModal.d.ts
|
|
3820
|
+
type Props$3 = {
|
|
3821
|
+
isOpen: boolean;
|
|
3822
|
+
onClose: () => void;
|
|
3823
|
+
appsInfo: PrivyAppInfo[];
|
|
3824
|
+
isLoading: boolean;
|
|
3825
|
+
};
|
|
3826
|
+
declare const EcosystemModal: ({
|
|
3827
|
+
isOpen,
|
|
3828
|
+
onClose,
|
|
3829
|
+
appsInfo,
|
|
3830
|
+
isLoading
|
|
3831
|
+
}: Props$3) => react_jsx_runtime0.JSX.Element;
|
|
3832
|
+
//#endregion
|
|
3833
|
+
//#region src/components/UpgradeSmartAccountModal/Contents/SuccessfulOperationContent.d.ts
|
|
3834
|
+
type SuccessfulOperationContentProps = {
|
|
3835
|
+
setCurrentContent: React.Dispatch<React.SetStateAction<UpgradeSmartAccountModalContentsTypes>>;
|
|
3836
|
+
txId?: string;
|
|
3837
|
+
title: string;
|
|
3838
|
+
description?: string;
|
|
3839
|
+
onDone: () => void;
|
|
3840
|
+
showSocialButtons?: boolean;
|
|
3841
|
+
};
|
|
3842
|
+
//#endregion
|
|
3843
|
+
//#region src/components/UpgradeSmartAccountModal/UpgradeSmartAccountModal.d.ts
|
|
3844
|
+
type UpgradeSmartAccountModalStyle = {
|
|
3845
|
+
accentColor?: string;
|
|
3846
|
+
modalSize?: ThemeTypings['components']['Modal']['sizes'];
|
|
3847
|
+
};
|
|
3848
|
+
type Props$2 = {
|
|
3849
|
+
isOpen: boolean;
|
|
3850
|
+
onClose: () => void;
|
|
3851
|
+
style?: UpgradeSmartAccountModalStyle;
|
|
3852
|
+
};
|
|
3853
|
+
type UpgradeSmartAccountModalContentsTypes = 'upgrade-smart-account' | {
|
|
3854
|
+
type: 'successful-operation';
|
|
3855
|
+
props: SuccessfulOperationContentProps;
|
|
3856
|
+
};
|
|
3857
|
+
declare const UpgradeSmartAccountModal: ({
|
|
3858
|
+
isOpen,
|
|
3859
|
+
onClose,
|
|
3860
|
+
style
|
|
3861
|
+
}: Props$2) => react_jsx_runtime0.JSX.Element;
|
|
3862
|
+
//#endregion
|
|
3863
|
+
//#region src/components/LegalDocumentsModal/LegalDocumentsModal.d.ts
|
|
3864
|
+
type Props$1 = {
|
|
3865
|
+
isOpen: boolean;
|
|
3866
|
+
onAgree: (documents: EnrichedLegalDocument | EnrichedLegalDocument[]) => void;
|
|
3867
|
+
handleLogout: () => void;
|
|
3868
|
+
onlyOptionalDocuments?: boolean;
|
|
3869
|
+
};
|
|
3870
|
+
type LegalDocumentsModalContentsTypes = 'legal-documents';
|
|
3871
|
+
declare const LegalDocumentsModal: ({
|
|
3872
|
+
isOpen,
|
|
3873
|
+
onAgree,
|
|
3874
|
+
handleLogout,
|
|
3875
|
+
onlyOptionalDocuments
|
|
3876
|
+
}: Props$1) => react_jsx_runtime0.JSX.Element;
|
|
3877
|
+
//#endregion
|
|
3878
|
+
//#region src/components/LegalDocumentsModal/Components/LegalDocumentItem.d.ts
|
|
3879
|
+
type Props = {
|
|
3880
|
+
document: EnrichedLegalDocument;
|
|
3881
|
+
register: UseFormRegister<any>;
|
|
3882
|
+
isText?: boolean;
|
|
3883
|
+
};
|
|
3884
|
+
declare const LegalDocumentItem: ({
|
|
3885
|
+
document,
|
|
3886
|
+
register,
|
|
3887
|
+
isText
|
|
3888
|
+
}: Props) => react_jsx_runtime0.JSX.Element;
|
|
3889
|
+
//#endregion
|
|
3890
|
+
//#region src/providers/ModalProvider.d.ts
|
|
3891
|
+
type AccountModalOptions = {
|
|
3892
|
+
isolatedView?: boolean;
|
|
3893
|
+
};
|
|
3894
|
+
type ModalContextType = {
|
|
3895
|
+
openConnectModal: () => void;
|
|
3896
|
+
closeConnectModal: () => void;
|
|
3897
|
+
isConnectModalOpen: boolean;
|
|
3898
|
+
openAccountModal: (content?: AccountModalContentTypes, options?: AccountModalOptions) => void;
|
|
3899
|
+
closeAccountModal: () => void;
|
|
3900
|
+
isAccountModalOpen: boolean;
|
|
3901
|
+
accountModalContent: AccountModalContentTypes;
|
|
3902
|
+
setAccountModalContent: React.Dispatch<React.SetStateAction<AccountModalContentTypes>>;
|
|
3903
|
+
isolatedView: boolean;
|
|
3904
|
+
openTransactionModal: () => void;
|
|
3905
|
+
closeTransactionModal: () => void;
|
|
3906
|
+
isTransactionModalOpen: boolean;
|
|
3907
|
+
openTransactionToast: () => void;
|
|
3908
|
+
closeTransactionToast: () => void;
|
|
3909
|
+
isTransactionToastOpen: boolean;
|
|
3910
|
+
openUpgradeSmartAccountModal: (style?: UpgradeSmartAccountModalStyle) => void;
|
|
3911
|
+
closeUpgradeSmartAccountModal: () => void;
|
|
3912
|
+
isUpgradeSmartAccountModalOpen: boolean;
|
|
3913
|
+
};
|
|
3914
|
+
declare const useModal: () => ModalContextType;
|
|
3915
|
+
declare const ModalProvider: ({
|
|
3916
|
+
children
|
|
3917
|
+
}: {
|
|
3918
|
+
children: ReactNode;
|
|
3919
|
+
}) => react_jsx_runtime0.JSX.Element;
|
|
3920
|
+
//#endregion
|
|
3921
|
+
//#region src/config/index.d.ts
|
|
3922
|
+
type AppConfig = {
|
|
3923
|
+
ipfsFetchingService: string;
|
|
3924
|
+
ipfsPinningService: string;
|
|
3925
|
+
vthoContractAddress: string;
|
|
3926
|
+
b3trContractAddress: string;
|
|
3927
|
+
vot3ContractAddress: string;
|
|
3928
|
+
b3trGovernorAddress: string;
|
|
3929
|
+
timelockContractAddress: string;
|
|
3930
|
+
xAllocationPoolContractAddress: string;
|
|
3931
|
+
xAllocationVotingContractAddress: string;
|
|
3932
|
+
emissionsContractAddress: string;
|
|
3933
|
+
voterRewardsContractAddress: string;
|
|
3934
|
+
galaxyMemberContractAddress: string;
|
|
3935
|
+
treasuryContractAddress: string;
|
|
3936
|
+
x2EarnAppsContractAddress: string;
|
|
3937
|
+
x2EarnCreatorContractAddress: string;
|
|
3938
|
+
x2EarnRewardsPoolContractAddress: string;
|
|
3939
|
+
nodeManagementContractAddress: string;
|
|
3940
|
+
veBetterPassportContractAddress: string;
|
|
3941
|
+
veDelegate: string;
|
|
3942
|
+
veDelegateVotes: string;
|
|
3943
|
+
veDelegateTokenContractAddress: string;
|
|
3944
|
+
oracleContractAddress: string;
|
|
3945
|
+
accountFactoryAddress: string;
|
|
3946
|
+
cleanifyCampaignsContractAddress: string;
|
|
3947
|
+
cleanifyChallengesContractAddress: string;
|
|
3948
|
+
veWorldSubdomainClaimerContractAddress: string;
|
|
3949
|
+
vetDomainsContractAddress: string;
|
|
3950
|
+
vetDomainsPublicResolverAddress: string;
|
|
3951
|
+
vetDomainsReverseRegistrarAddress: string;
|
|
3952
|
+
vnsResolverAddress: string;
|
|
3953
|
+
gloDollarContractAddress: string;
|
|
3954
|
+
vetDomainAvatarUrl: string;
|
|
3955
|
+
nodeUrl: string;
|
|
3956
|
+
indexerUrl: string;
|
|
3957
|
+
b3trIndexerUrl: string;
|
|
3958
|
+
graphQlIndexerUrl: string;
|
|
3959
|
+
network: Network;
|
|
3960
|
+
explorerUrl: string;
|
|
3961
|
+
};
|
|
3962
|
+
declare const getConfig: (env: NETWORK_TYPE) => AppConfig;
|
|
3963
|
+
//#endregion
|
|
3964
|
+
export { AssetsContentProps as $, getCustomTokenInfoQueryKey as $a, useChooseNameModal as $i, useGetNodeUrl as $n, EmbeddedWalletContent as $o, getPicassoImage as $r, formatGasCost as $s, getSmartAccount as $t, ModalBackButton as A, getXAppMetadata as Aa, useAccountModalOptions as Ai, delegateAuthorized as An, getAvatarQueryKey as Ao, validate as Ar, VechainKitThemeProvider as As, useBuildTransaction as At, AccountModal as B, XApp as Ba, FAQModalProvider as Bi, LocalStorageKey as Bn, useClaimVetDomain as Bo, xNodeToGMstartingLevel as Br, useVeChainKitConfig as Bs, getChainId as Bt, AddressDisplayCard as C, useIpfsImageList as Ca, VePassportUserStatus as Cc, useLoginWithVeChain as Ci, useAccountBalance as Cn, getResolverAddressQueryKey as Co, isValidUrl as Cr, ConnectionButton as Cs, useMfaEnrollment as Ct, StickyHeaderContainer as D, getXAppsSharesQueryKey as Da, useSignMessage as Di, useGasEstimation as Dn, getTextRecords as Do, isValid as Dr, LegalDocumentsProvider as Ds, txReceiptQueryKey as Dt, StickyFooterContainer as E, useIpfsMetadata as Ea, useSignTypedData as Ei, UseGasEstimationParams as En, useUpdateTextRecord as Eo, isInvalid as Er, ConnectModalContentsTypes as Es, useThor as Et, QuickActionsSection as F, getRoundXAppsQueryKey as Fa, useLoginModalContent as Fi, useGenericDelegator as Fn, getDomainsOfAddressQueryKey as Fo, NodeStrengthLevelToImage as Fr, LegalDocument as Fs, UseSendTransactionReturnValue as Ft, LanguageSettingsContent as G, useGetVot3Balance as Ga, useExploreEcosystemModal as Gi, useBuildClauses as Gn, useVechainDomain as Go, validateIpfsUri as Gr, CostLevel as Gs, useUpgradeSmartAccount as Gt, TermsAndPrivacyContent as H, getIsPersonQueryKey as Ha, NotificationsModalProvider as Hi, BuildClausesParams as Hn, getEnsRecordExistsQueryKey as Ho, resolveMediaTypeFromMimeType as Hr, LegalDocumentAgreement as Hs, useGetChainId as Ht, BalanceSection as I, useRoundXApps as Ia, ReceiveModalProvider as Ii, useCrossAppConnectionCache as In, useGetDomainsOfAddress as Io, XNodeStrengthLevelToName as Ir, LegalDocumentOptions as Is, useSendTransaction as It, ChangeCurrencyContentProps as J, getTokenUsdPrice as Ja, SwapTokenModalProvider as Ji, decodeEventLog$1 as Jn, fetchPrivyAppInfo as Jo, isValidAddress as Jr, EstimationResponse as Js, useUpgradeRequiredForAccount as Jt, GeneralSettingsContent as K, PRICE_FEED_IDS as Ka, AccessAndSecurityModalProvider as Ki, GetEventsKeyParams as Kn, fetchPrivyStatus as Ko, compareAddresses as Kr, DepositAccount as Ks, getUpgradeRequiredForAccount as Kt, AccountSelector as L, useRefreshMetadata as La, useReceiveModal as Li, EcosystemShortcut as Ln, getIsDomainProtectedQueryKey as Lo, allNodeStrengthLevelToName as Lr, VeChainKitContext as Ls, GetEventsProps as Lt, DomainRequiredAlert as M, useWalletMetadata as Ma, useProfileModal as Mi, estimateGas as Mn, Domain as Mo, TIME as Mr, PrivyWalletProvider as Ms, useTransferVET as Mt, ExchangeWarningAlert as N, UseWalletReturnType as Na, UpgradeSmartAccountModalProvider as Ni, getDepositAccount as Nn, DomainsResponse as No, EconomicNodeStrengthLevelToName as Nr, PrivyWalletProviderContextType as Ns, buildERC20Clauses as Nt, VersionFooter as O, useXAppsShares as Oa, useNotificationAlerts as Oi, useGasTokenSelection as On, getTextRecordsQueryKey as Oo, normalize as Or, useLegalDocuments as Os, useTxReceipt as Ot, FeatureAnnouncementCard as P, useWallet as Pa, useUpgradeSmartAccountModal as Pi, signVip191Transaction as Pn, getDomainsOfAddress as Po, MinXNodeLevel as Pr, usePrivyWalletProvider as Ps, useTransferERC20 as Pt, AssetsContent as Q, useGetErc20Balance as Qa, ChooseNameModalProvider as Qi, useIsPWA as Qn, DisconnectConfirmContentProps as Qo, formatTokenBalance as Qr, calculateTotalCost as Qs, SmartAccountReturnType as Qt, ActionButton as R, useRefreshBalances as Ra, AccountCustomizationModalProvider as Ri, useEcosystemShortcuts as Rn, useIsDomainProtected as Ro, buildQueryString as Rr, VeChainKitProvider as Rs, getAllEventLogs as Rt, ModalFAQButton as S, useIpfsImage as Sa, TransactionStatusErrorType as Sc, useAppHubApps as Si, getAccountBalanceQueryKey as Sn, useGetAvatarOfAddress as So, executeMultipleClausesCall as Sr, EmailLoginButton as Ss, useDAppKitWalletModal as St, BaseModal as T, getIpfsMetadataQueryKey as Ta, useLoginWithPasskey as Ti, useEstimateAllTokens as Tn, buildClauses as To, compare as Tr, ConnectModal as Ts, useSetWalletRecovery as Tt, GasTokenSettingsContent as U, useIsPerson as Ua, useNotificationsModal as Ui, buildBatchAuthorizationTypedData as Un, useEnsRecordExists as Uo, toIPFSURL as Ur, LegalDocumentSource as Us, currentBlockQueryKey as Ut, AccountModalContentTypes as V, useMostVotedAppsInRound as Va, useFAQModal as Vi, useLocalStorage as Vn, useClaimVeWorldSubdomain as Vo, convertUriToUrl as Vr, EnrichedLegalDocument as Vs, getChainIdQueryKey as Vt, AppearanceSettingsContent as W, getVot3BalanceQueryKey as Wa, ExploreEcosystemModalProvider as Wi, buildSingleAuthorizationTypedData as Wn, getVechainDomainQueryKey as Wo, uploadBlobToIPFS as Wr, LegalDocumentType as Ws, useCurrentBlock as Wt, ManageCustomTokenContent as X, useGetTokenUsdPrice as Xa, SendTokenModalProvider as Xi, useEvents as Xn, useFetchAppInfo as Xo, regexPattern as Xr, TransactionCost as Xs, getUpgradeRequiredQueryKey as Xt, BridgeContent as Y, getTokenUsdPriceQueryKey as Ya, useSwapTokenModal as Yi, getEventsKey as Yn, getPrivyAppInfoQueryKey as Yo, leftPadWithZeros as Yr, Rate as Ys, getUpgradeRequired as Yt, ManageCustomTokenContentProps as Z, getErc20BalanceQueryKey as Za, useSendTokenModal as Zi, useScrollToTop as Zn, DisconnectConfirmContent as Zo, randomTransactionUser as Zr, VthoPerGasAtSpeed as Zs, useUpgradeRequired as Zt, ModalNotificationButton as _, useIpfsMetadatas as _a, PrivyAppInfo as _c, getGenericDelegatorUrl as _i, useCurrentAccountImplementationVersion as _n, useUnsetDomain as _o, MultipleClausesCallParameters as _r, PasskeyLoginButton as _s, SelectTokenContent as _t, useModal as a, useTransactionModal as aa, TransactionSpeed as ac, DEFAULT_PRIVY_ECOSYSTEM_APPS as ai, getIsDeployedQueryKey as an, getB3trBalanceQueryKey as ao, useMultipleClausesCall as ar, TransactionModalContent as as, CustomizationSummaryContentProps as at, AccountAvatar as b, getIpfsImage as ba, TokenBalance as bc, fetchAppHubApps as bi, useAccountImplementationAddress as bn, useGetAvatarLegacy as bo, buildCallClauses as br, EcosystemButton as bs, ThorClient$1 as bt, LegalDocumentsModal as c, ConnectModalProvider as ca, CURRENCY as cc, SUPPORTED_GAS_TOKENS as ci, getHasV1SmartAccountQueryKey as cn, getCurrentAllocationsRoundIdQueryKey as co, getLocalStorageItem as cr, TransactionModalProps as cs, FAQContent as ct, UpgradeSmartAccountModalContentsTypes as d, useSwapTransaction as da, CrossAppConnectionCache as dc, TogglePassportCheck as di, useGetAccountVersion as dn, TokenWithValue as do, isBrowser as dr, WalletButtonProps as ds, ChooseNameSearchContent as dt, WalletModalProvider as ea, GasTokenEstimate as ec, humanAddress as ei, getSmartAccountQueryKey as en, getTokenInfo as eo, useFeatureAnnouncement as er, SettingsContent as es, UpgradeSmartAccountContent as et, UpgradeSmartAccountModalStyle as f, useSingleImageUpload as fa, ENSRecords as fc, VECHAIN_KIT_COOKIES_CONFIG as fi, getAccountAddress as fn, useTokensWithValues as fo, isOnline as fr, WalletDisplayVariant as fs, ChooseNameSearchContentProps as ft, GasFeeSummary as g, useUploadImages as ga, NFTMediaType as gc, getENV as gi, getCurrentAccountImplementationVersionQueryKey as gn, useTokenBalances as go, setLocalStorageItem as gr, DappKitButton as gs, ReceiveTokenContent as gt, GasFeeTokenSelector as h, imageCompressionOptions as ha, ExecuteWithAuthorizationSignData as hc, VECHAIN_PRIVY_APP_ID as hi, getCurrentAccountImplementationVersion as hn, WalletTokenBalance as ho, safeWindowOpen as hr, VeChainWithPrivyLoginButton as hs, SwapTokenContent as ht, ModalProvider as i, TransactionModalProvider as ia, GasTokenType as ic, DEFAULT_GAS_TOKEN_PREFERENCES as ii, getIsDeployed as in, useGetCustomTokenBalances as io, useCallClause as ir, TransactionToast as is, CustomizationSummaryContent as it, CrossAppConnectionSecurityCard as j, useXAppMetadata as ja, ProfileModalProvider as ji, estimateAndBuildTxBody as jn, useGetAvatar as jo, isRejectionError as jr, useVechainKitThemeConfig as js, buildVETClauses as jt, AddressDisplay as k, XAppMetadata as ka, useNotifications as ki, decodeRawTx as kn, useGetTextRecords as ko, removePrefix as kr, ColorModeSync as ks, BuildTransactionProps as kt, LegalDocumentsModalContentsTypes as l, useConnectModal as la, CURRENCY_SYMBOLS as lc, TOKEN_LOGOS as li, useHasV1SmartAccount as ln, useCurrentAllocationsRoundId as lo, getWindowOrigin as lr, SocialIcons as ls, ChooseNameSummaryContent as lt, LoginLoadingModal as m, compressImages as ma, ExecuteBatchWithAuthorizationSignData as mc, VECHAIN_KIT_TERMS_CONFIG as mi, useGetAccountAddress as mn, useTokenPrices as mo, safeQuerySelector as mr, LoginWithGithubButton as ms, ChooseNameContentProps as mt, getConfig as n, TransactionToastProvider as na, GasTokenPreferences as nc, humanNumber as ni, useRefreshSmartAccountQueries as nn, TokenWithBalance as no, getCallClauseQueryKey as nr, AccessAndSecurityContent as ns, ProfileContent as nt, DAppKitWalletButton as o, AccountModalProvider as oa, ENS_TEXT_RECORDS as oc, ENV as oi, useIsSmartAccountDeployed as on, useGetB3trBalance as oo, copyToClipboard as or, ShareButtons as os, AccountCustomizationContentProps as ot, EcosystemModal as p, UploadedImage as pa, EnhancedClause as pc, VECHAIN_KIT_STORAGE_KEYS as pi, getAccountAddressQueryKey as pn, ExchangeRates as po, removeLocalStorageItem as pr, ConnectPopover as ps, ChooseNameContent as pt, ChangeCurrencyContent as q, SupportedToken as qa, useAccessAndSecurityModal as qi, UseEventsParams as qn, useFetchPrivyStatus as qo, compareListOfAddresses as qr, EstimatedGas as qs, getUpgradeRequiredForAccountQueryKey as qt, AccountModalOptions as r, useTransactionToast as ra, GasTokenSelection as rc, isZero as ri, useRefreshFactoryQueries as rn, getCustomTokenBalanceQueryKey as ro, getCallClauseQueryKeyWithArgs as rr, AccountMainContent as rs, ProfileContentProps as rt, LegalDocumentItem as s, useAccountModal as sa, TextRecords as sc, PrivyEcosystemApp as si, getHasV1SmartAccount as sn, useCustomTokens as so, getDocumentTitle as sr, TransactionModal as ss, CustomizationContent as st, AppConfig as t, useWalletModal as ta, GasTokenInfo as tc, humanDomain as ti, useSmartAccount as tn, useGetCustomTokenInfo as to, useCurrency as tr, SettingsContentProps as ts, UpgradeSmartAccountContentProps as tt, UpgradeSmartAccountModal as u, useSwapQuotes as ua, ConnectionSource as uc, TOKEN_LOGO_COMPONENTS as ui, getAccountVersionQueryKey as un, useTotalBalance as uo, hasNavigator as ur, WalletButton as us, ChooseNameSummaryContentProps as ut, TransactionButtonAndStatus as v, IpfsImage as va, PrivyLoginMethod as vc, notFoundImage as vi, getAccountImplementationAddress as vn, getAvatarLegacy as vo, MultipleClausesCallReturnType as vr, LoginWithGoogleButton as vs, SendTokenSummaryContent as vt, AssetButton as w, getIpfsMetadata as wa, Wallet as wc, useLoginWithOAuth as wi, UseEstimateAllTokensParams as wn, useGetResolverAddress as wo, addPrefix as wr, MainContent as ws, usePrivy as wt, ScrollToTopWrapper as x, getIpfsImageQueryKey as xa, TransactionStatus as xc, getAppHubAppsQueryKey as xi, getAccountBalance as xn, getAvatarOfAddressQueryKey as xo, executeCallClause as xr, VeChainLoginButton as xs, useDAppKitWallet as xt, TransactionButtonAndStatusProps as y, MAX_IMAGE_SIZE as ya, SmartAccount as yc, AppHubApp as yi, getAccountImplementationAddressQueryKey as yn, getAvatarLegacyQueryKey as yo, ViewFunctionResult as yr, PrivyButton as ys, SendTokenContent as yt, AccountDetailsButton as z, MostVotedAppsInRoundReturnType as za, useAccountCustomizationModal as zi, useSyncableLocalStorage as zn, buildVetDomainClauses as zo, gmNfts as zr, VechainKitProviderProps as zs, getEventLogs as zt };
|
|
3965
|
+
//# sourceMappingURL=index-ur27qfX4.d.cts.map
|