@imtbl/sdk 0.1.6-alpha → 0.1.7-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/checkout.js +2 -0
- package/dist/checkout_sdk.d.ts +61 -61
- package/dist/checkout_sdk.js +272 -164
- package/dist/checkout_widgets.d.ts +1011 -879
- package/dist/checkout_widgets.js +46 -45
- package/dist/immutablex_client.js +2 -2
- package/dist/index.cjs +2256 -319
- package/dist/index.d.ts +1666 -346
- package/dist/index.js +2256 -322
- package/dist/orderbook.d.ts +57 -0
- package/dist/orderbook.js +1833 -0
- package/dist/passport.d.ts +1154 -1
- package/dist/passport.js +18 -13
- package/dist/provider.d.ts +0 -1
- package/dist/provider.js +80 -76
- package/package.json +15 -2
|
@@ -1,587 +1,5 @@
|
|
|
1
1
|
/// <reference path="global.d.ts" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
declare type Bytes = ArrayLike<number>;
|
|
4
|
-
declare type BytesLike = Bytes | string;
|
|
5
|
-
interface Hexable {
|
|
6
|
-
toHexString(): string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
|
|
10
|
-
declare class BigNumber implements Hexable {
|
|
11
|
-
readonly _hex: string;
|
|
12
|
-
readonly _isBigNumber: boolean;
|
|
13
|
-
constructor(constructorGuard: any, hex: string);
|
|
14
|
-
fromTwos(value: number): BigNumber;
|
|
15
|
-
toTwos(value: number): BigNumber;
|
|
16
|
-
abs(): BigNumber;
|
|
17
|
-
add(other: BigNumberish): BigNumber;
|
|
18
|
-
sub(other: BigNumberish): BigNumber;
|
|
19
|
-
div(other: BigNumberish): BigNumber;
|
|
20
|
-
mul(other: BigNumberish): BigNumber;
|
|
21
|
-
mod(other: BigNumberish): BigNumber;
|
|
22
|
-
pow(other: BigNumberish): BigNumber;
|
|
23
|
-
and(other: BigNumberish): BigNumber;
|
|
24
|
-
or(other: BigNumberish): BigNumber;
|
|
25
|
-
xor(other: BigNumberish): BigNumber;
|
|
26
|
-
mask(value: number): BigNumber;
|
|
27
|
-
shl(value: number): BigNumber;
|
|
28
|
-
shr(value: number): BigNumber;
|
|
29
|
-
eq(other: BigNumberish): boolean;
|
|
30
|
-
lt(other: BigNumberish): boolean;
|
|
31
|
-
lte(other: BigNumberish): boolean;
|
|
32
|
-
gt(other: BigNumberish): boolean;
|
|
33
|
-
gte(other: BigNumberish): boolean;
|
|
34
|
-
isNegative(): boolean;
|
|
35
|
-
isZero(): boolean;
|
|
36
|
-
toNumber(): number;
|
|
37
|
-
toBigInt(): bigint;
|
|
38
|
-
toString(): string;
|
|
39
|
-
toHexString(): string;
|
|
40
|
-
toJSON(key?: string): any;
|
|
41
|
-
static from(value: any): BigNumber;
|
|
42
|
-
static isBigNumber(value: any): value is BigNumber;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
declare type Network$1 = {
|
|
46
|
-
name: string;
|
|
47
|
-
chainId: number;
|
|
48
|
-
ensAddress?: string;
|
|
49
|
-
_defaultProvider?: (providers: any, options?: any) => any;
|
|
50
|
-
};
|
|
51
|
-
declare type Networkish = Network$1 | string | number;
|
|
52
|
-
|
|
53
|
-
declare type Deferrable<T> = {
|
|
54
|
-
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
55
|
-
};
|
|
56
|
-
declare class Description<T = any> {
|
|
57
|
-
constructor(info: {
|
|
58
|
-
[K in keyof T]: T[K];
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
declare type AccessList = Array<{
|
|
63
|
-
address: string;
|
|
64
|
-
storageKeys: Array<string>;
|
|
65
|
-
}>;
|
|
66
|
-
declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
67
|
-
interface Transaction {
|
|
68
|
-
hash?: string;
|
|
69
|
-
to?: string;
|
|
70
|
-
from?: string;
|
|
71
|
-
nonce: number;
|
|
72
|
-
gasLimit: BigNumber;
|
|
73
|
-
gasPrice?: BigNumber;
|
|
74
|
-
data: string;
|
|
75
|
-
value: BigNumber;
|
|
76
|
-
chainId: number;
|
|
77
|
-
r?: string;
|
|
78
|
-
s?: string;
|
|
79
|
-
v?: number;
|
|
80
|
-
type?: number | null;
|
|
81
|
-
accessList?: AccessList;
|
|
82
|
-
maxPriorityFeePerGas?: BigNumber;
|
|
83
|
-
maxFeePerGas?: BigNumber;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
declare type ConnectionInfo = {
|
|
87
|
-
url: string;
|
|
88
|
-
headers?: {
|
|
89
|
-
[key: string]: string | number;
|
|
90
|
-
};
|
|
91
|
-
user?: string;
|
|
92
|
-
password?: string;
|
|
93
|
-
allowInsecureAuthentication?: boolean;
|
|
94
|
-
allowGzip?: boolean;
|
|
95
|
-
throttleLimit?: number;
|
|
96
|
-
throttleSlotInterval?: number;
|
|
97
|
-
throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
|
|
98
|
-
skipFetchSetup?: boolean;
|
|
99
|
-
fetchOptions?: Record<string, string>;
|
|
100
|
-
errorPassThrough?: boolean;
|
|
101
|
-
timeout?: number;
|
|
102
|
-
};
|
|
103
|
-
interface OnceBlockable {
|
|
104
|
-
once(eventName: "block", handler: () => void): void;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
declare type TransactionRequest = {
|
|
108
|
-
to?: string;
|
|
109
|
-
from?: string;
|
|
110
|
-
nonce?: BigNumberish;
|
|
111
|
-
gasLimit?: BigNumberish;
|
|
112
|
-
gasPrice?: BigNumberish;
|
|
113
|
-
data?: BytesLike;
|
|
114
|
-
value?: BigNumberish;
|
|
115
|
-
chainId?: number;
|
|
116
|
-
type?: number;
|
|
117
|
-
accessList?: AccessListish;
|
|
118
|
-
maxPriorityFeePerGas?: BigNumberish;
|
|
119
|
-
maxFeePerGas?: BigNumberish;
|
|
120
|
-
customData?: Record<string, any>;
|
|
121
|
-
ccipReadEnabled?: boolean;
|
|
122
|
-
};
|
|
123
|
-
interface TransactionResponse extends Transaction {
|
|
124
|
-
hash: string;
|
|
125
|
-
blockNumber?: number;
|
|
126
|
-
blockHash?: string;
|
|
127
|
-
timestamp?: number;
|
|
128
|
-
confirmations: number;
|
|
129
|
-
from: string;
|
|
130
|
-
raw?: string;
|
|
131
|
-
wait: (confirmations?: number) => Promise<TransactionReceipt>;
|
|
132
|
-
}
|
|
133
|
-
declare type BlockTag = string | number;
|
|
134
|
-
interface _Block {
|
|
135
|
-
hash: string;
|
|
136
|
-
parentHash: string;
|
|
137
|
-
number: number;
|
|
138
|
-
timestamp: number;
|
|
139
|
-
nonce: string;
|
|
140
|
-
difficulty: number;
|
|
141
|
-
_difficulty: BigNumber;
|
|
142
|
-
gasLimit: BigNumber;
|
|
143
|
-
gasUsed: BigNumber;
|
|
144
|
-
miner: string;
|
|
145
|
-
extraData: string;
|
|
146
|
-
baseFeePerGas?: null | BigNumber;
|
|
147
|
-
}
|
|
148
|
-
interface Block extends _Block {
|
|
149
|
-
transactions: Array<string>;
|
|
150
|
-
}
|
|
151
|
-
interface BlockWithTransactions extends _Block {
|
|
152
|
-
transactions: Array<TransactionResponse>;
|
|
153
|
-
}
|
|
154
|
-
interface Log {
|
|
155
|
-
blockNumber: number;
|
|
156
|
-
blockHash: string;
|
|
157
|
-
transactionIndex: number;
|
|
158
|
-
removed: boolean;
|
|
159
|
-
address: string;
|
|
160
|
-
data: string;
|
|
161
|
-
topics: Array<string>;
|
|
162
|
-
transactionHash: string;
|
|
163
|
-
logIndex: number;
|
|
164
|
-
}
|
|
165
|
-
interface TransactionReceipt {
|
|
166
|
-
to: string;
|
|
167
|
-
from: string;
|
|
168
|
-
contractAddress: string;
|
|
169
|
-
transactionIndex: number;
|
|
170
|
-
root?: string;
|
|
171
|
-
gasUsed: BigNumber;
|
|
172
|
-
logsBloom: string;
|
|
173
|
-
blockHash: string;
|
|
174
|
-
transactionHash: string;
|
|
175
|
-
logs: Array<Log>;
|
|
176
|
-
blockNumber: number;
|
|
177
|
-
confirmations: number;
|
|
178
|
-
cumulativeGasUsed: BigNumber;
|
|
179
|
-
effectiveGasPrice: BigNumber;
|
|
180
|
-
byzantium: boolean;
|
|
181
|
-
type: number;
|
|
182
|
-
status?: number;
|
|
183
|
-
}
|
|
184
|
-
interface FeeData {
|
|
185
|
-
lastBaseFeePerGas: null | BigNumber;
|
|
186
|
-
maxFeePerGas: null | BigNumber;
|
|
187
|
-
maxPriorityFeePerGas: null | BigNumber;
|
|
188
|
-
gasPrice: null | BigNumber;
|
|
189
|
-
}
|
|
190
|
-
interface EventFilter {
|
|
191
|
-
address?: string;
|
|
192
|
-
topics?: Array<string | Array<string> | null>;
|
|
193
|
-
}
|
|
194
|
-
interface Filter extends EventFilter {
|
|
195
|
-
fromBlock?: BlockTag;
|
|
196
|
-
toBlock?: BlockTag;
|
|
197
|
-
}
|
|
198
|
-
interface FilterByBlockHash extends EventFilter {
|
|
199
|
-
blockHash?: string;
|
|
200
|
-
}
|
|
201
|
-
declare abstract class ForkEvent extends Description {
|
|
202
|
-
readonly expiry: number;
|
|
203
|
-
readonly _isForkEvent?: boolean;
|
|
204
|
-
static isForkEvent(value: any): value is ForkEvent;
|
|
205
|
-
}
|
|
206
|
-
declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
|
|
207
|
-
declare type Listener = (...args: Array<any>) => void;
|
|
208
|
-
declare abstract class Provider implements OnceBlockable {
|
|
209
|
-
abstract getNetwork(): Promise<Network$1>;
|
|
210
|
-
abstract getBlockNumber(): Promise<number>;
|
|
211
|
-
abstract getGasPrice(): Promise<BigNumber>;
|
|
212
|
-
getFeeData(): Promise<FeeData>;
|
|
213
|
-
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
214
|
-
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
215
|
-
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
216
|
-
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
217
|
-
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
218
|
-
abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
219
|
-
abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
220
|
-
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
221
|
-
abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
222
|
-
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
223
|
-
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
224
|
-
abstract getLogs(filter: Filter): Promise<Array<Log>>;
|
|
225
|
-
abstract resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
226
|
-
abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
227
|
-
abstract on(eventName: EventType, listener: Listener): Provider;
|
|
228
|
-
abstract once(eventName: EventType, listener: Listener): Provider;
|
|
229
|
-
abstract emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
230
|
-
abstract listenerCount(eventName?: EventType): number;
|
|
231
|
-
abstract listeners(eventName?: EventType): Array<Listener>;
|
|
232
|
-
abstract off(eventName: EventType, listener?: Listener): Provider;
|
|
233
|
-
abstract removeAllListeners(eventName?: EventType): Provider;
|
|
234
|
-
addListener(eventName: EventType, listener: Listener): Provider;
|
|
235
|
-
removeListener(eventName: EventType, listener: Listener): Provider;
|
|
236
|
-
abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
237
|
-
readonly _isProvider: boolean;
|
|
238
|
-
constructor();
|
|
239
|
-
static isProvider(value: any): value is Provider;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
declare type FormatFunc = (value: any) => any;
|
|
243
|
-
declare type FormatFuncs = {
|
|
244
|
-
[key: string]: FormatFunc;
|
|
245
|
-
};
|
|
246
|
-
declare type Formats = {
|
|
247
|
-
transaction: FormatFuncs;
|
|
248
|
-
transactionRequest: FormatFuncs;
|
|
249
|
-
receipt: FormatFuncs;
|
|
250
|
-
receiptLog: FormatFuncs;
|
|
251
|
-
block: FormatFuncs;
|
|
252
|
-
blockWithTransactions: FormatFuncs;
|
|
253
|
-
filter: FormatFuncs;
|
|
254
|
-
filterLog: FormatFuncs;
|
|
255
|
-
};
|
|
256
|
-
declare class Formatter {
|
|
257
|
-
readonly formats: Formats;
|
|
258
|
-
constructor();
|
|
259
|
-
getDefaultFormats(): Formats;
|
|
260
|
-
accessList(accessList: Array<any>): AccessList;
|
|
261
|
-
number(number: any): number;
|
|
262
|
-
type(number: any): number;
|
|
263
|
-
bigNumber(value: any): BigNumber;
|
|
264
|
-
boolean(value: any): boolean;
|
|
265
|
-
hex(value: any, strict?: boolean): string;
|
|
266
|
-
data(value: any, strict?: boolean): string;
|
|
267
|
-
address(value: any): string;
|
|
268
|
-
callAddress(value: any): string;
|
|
269
|
-
contractAddress(value: any): string;
|
|
270
|
-
blockTag(blockTag: any): string;
|
|
271
|
-
hash(value: any, strict?: boolean): string;
|
|
272
|
-
difficulty(value: any): number;
|
|
273
|
-
uint256(value: any): string;
|
|
274
|
-
_block(value: any, format: any): Block;
|
|
275
|
-
block(value: any): Block;
|
|
276
|
-
blockWithTransactions(value: any): Block;
|
|
277
|
-
transactionRequest(value: any): any;
|
|
278
|
-
transactionResponse(transaction: any): TransactionResponse;
|
|
279
|
-
transaction(value: any): any;
|
|
280
|
-
receiptLog(value: any): any;
|
|
281
|
-
receipt(value: any): TransactionReceipt;
|
|
282
|
-
topics(value: any): any;
|
|
283
|
-
filter(value: any): any;
|
|
284
|
-
filterLog(value: any): any;
|
|
285
|
-
static check(format: {
|
|
286
|
-
[name: string]: FormatFunc;
|
|
287
|
-
}, object: any): any;
|
|
288
|
-
static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
|
|
289
|
-
static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
|
|
290
|
-
static arrayOf(format: FormatFunc): FormatFunc;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
declare class Event$1 {
|
|
294
|
-
readonly listener: Listener;
|
|
295
|
-
readonly once: boolean;
|
|
296
|
-
readonly tag: string;
|
|
297
|
-
_lastBlockNumber: number;
|
|
298
|
-
_inflight: boolean;
|
|
299
|
-
constructor(tag: string, listener: Listener, once: boolean);
|
|
300
|
-
get event(): EventType;
|
|
301
|
-
get type(): string;
|
|
302
|
-
get hash(): string;
|
|
303
|
-
get filter(): Filter;
|
|
304
|
-
pollable(): boolean;
|
|
305
|
-
}
|
|
306
|
-
interface EnsResolver {
|
|
307
|
-
readonly name: string;
|
|
308
|
-
readonly address: string;
|
|
309
|
-
getAddress(coinType?: 60): Promise<null | string>;
|
|
310
|
-
getContentHash(): Promise<null | string>;
|
|
311
|
-
getText(key: string): Promise<null | string>;
|
|
312
|
-
}
|
|
313
|
-
interface EnsProvider {
|
|
314
|
-
resolveName(name: string): Promise<null | string>;
|
|
315
|
-
lookupAddress(address: string): Promise<null | string>;
|
|
316
|
-
getResolver(name: string): Promise<null | EnsResolver>;
|
|
317
|
-
}
|
|
318
|
-
interface Avatar {
|
|
319
|
-
url: string;
|
|
320
|
-
linkage: Array<{
|
|
321
|
-
type: string;
|
|
322
|
-
content: string;
|
|
323
|
-
}>;
|
|
324
|
-
}
|
|
325
|
-
declare class Resolver implements EnsResolver {
|
|
326
|
-
readonly provider: BaseProvider;
|
|
327
|
-
readonly name: string;
|
|
328
|
-
readonly address: string;
|
|
329
|
-
readonly _resolvedAddress: null | string;
|
|
330
|
-
_supportsEip2544: null | Promise<boolean>;
|
|
331
|
-
constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
|
|
332
|
-
supportsWildcard(): Promise<boolean>;
|
|
333
|
-
_fetch(selector: string, parameters?: string): Promise<null | string>;
|
|
334
|
-
_fetchBytes(selector: string, parameters?: string): Promise<null | string>;
|
|
335
|
-
_getAddress(coinType: number, hexBytes: string): string;
|
|
336
|
-
getAddress(coinType?: number): Promise<string>;
|
|
337
|
-
getAvatar(): Promise<null | Avatar>;
|
|
338
|
-
getContentHash(): Promise<string>;
|
|
339
|
-
getText(key: string): Promise<string>;
|
|
340
|
-
}
|
|
341
|
-
declare class BaseProvider extends Provider implements EnsProvider {
|
|
342
|
-
_networkPromise: Promise<Network$1>;
|
|
343
|
-
_network: Network$1;
|
|
344
|
-
_events: Array<Event$1>;
|
|
345
|
-
formatter: Formatter;
|
|
346
|
-
_emitted: {
|
|
347
|
-
[eventName: string]: number | "pending";
|
|
348
|
-
};
|
|
349
|
-
_pollingInterval: number;
|
|
350
|
-
_poller: NodeJS.Timer;
|
|
351
|
-
_bootstrapPoll: NodeJS.Timer;
|
|
352
|
-
_lastBlockNumber: number;
|
|
353
|
-
_maxFilterBlockRange: number;
|
|
354
|
-
_fastBlockNumber: number;
|
|
355
|
-
_fastBlockNumberPromise: Promise<number>;
|
|
356
|
-
_fastQueryDate: number;
|
|
357
|
-
_maxInternalBlockNumber: number;
|
|
358
|
-
_internalBlockNumber: Promise<{
|
|
359
|
-
blockNumber: number;
|
|
360
|
-
reqTime: number;
|
|
361
|
-
respTime: number;
|
|
362
|
-
}>;
|
|
363
|
-
readonly anyNetwork: boolean;
|
|
364
|
-
disableCcipRead: boolean;
|
|
365
|
-
/**
|
|
366
|
-
* ready
|
|
367
|
-
*
|
|
368
|
-
* A Promise<Network> that resolves only once the provider is ready.
|
|
369
|
-
*
|
|
370
|
-
* Sub-classes that call the super with a network without a chainId
|
|
371
|
-
* MUST set this. Standard named networks have a known chainId.
|
|
372
|
-
*
|
|
373
|
-
*/
|
|
374
|
-
constructor(network: Networkish | Promise<Network$1>);
|
|
375
|
-
_ready(): Promise<Network$1>;
|
|
376
|
-
get ready(): Promise<Network$1>;
|
|
377
|
-
static getFormatter(): Formatter;
|
|
378
|
-
static getNetwork(network: Networkish): Network$1;
|
|
379
|
-
ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
|
|
380
|
-
_getInternalBlockNumber(maxAge: number): Promise<number>;
|
|
381
|
-
poll(): Promise<void>;
|
|
382
|
-
resetEventsBlock(blockNumber: number): void;
|
|
383
|
-
get network(): Network$1;
|
|
384
|
-
detectNetwork(): Promise<Network$1>;
|
|
385
|
-
getNetwork(): Promise<Network$1>;
|
|
386
|
-
get blockNumber(): number;
|
|
387
|
-
get polling(): boolean;
|
|
388
|
-
set polling(value: boolean);
|
|
389
|
-
get pollingInterval(): number;
|
|
390
|
-
set pollingInterval(value: number);
|
|
391
|
-
_getFastBlockNumber(): Promise<number>;
|
|
392
|
-
_setFastBlockNumber(blockNumber: number): void;
|
|
393
|
-
waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
394
|
-
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
395
|
-
data: string;
|
|
396
|
-
from: string;
|
|
397
|
-
nonce: number;
|
|
398
|
-
to: string;
|
|
399
|
-
value: BigNumber;
|
|
400
|
-
startBlock: number;
|
|
401
|
-
}): Promise<TransactionReceipt>;
|
|
402
|
-
getBlockNumber(): Promise<number>;
|
|
403
|
-
getGasPrice(): Promise<BigNumber>;
|
|
404
|
-
getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
405
|
-
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
406
|
-
getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
407
|
-
getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
408
|
-
_wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
|
|
409
|
-
sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
410
|
-
_getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
|
|
411
|
-
_getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
|
|
412
|
-
_call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
|
|
413
|
-
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
414
|
-
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
415
|
-
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
416
|
-
_getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
|
|
417
|
-
getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
418
|
-
getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
419
|
-
getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
|
|
420
|
-
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
|
|
421
|
-
getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
|
|
422
|
-
getEtherPrice(): Promise<number>;
|
|
423
|
-
_getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
|
|
424
|
-
getResolver(name: string): Promise<null | Resolver>;
|
|
425
|
-
_getResolver(name: string, operation?: string): Promise<string>;
|
|
426
|
-
resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
427
|
-
lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
428
|
-
getAvatar(nameOrAddress: string): Promise<null | string>;
|
|
429
|
-
perform(method: string, params: any): Promise<any>;
|
|
430
|
-
_startEvent(event: Event$1): void;
|
|
431
|
-
_stopEvent(event: Event$1): void;
|
|
432
|
-
_addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
|
|
433
|
-
on(eventName: EventType, listener: Listener): this;
|
|
434
|
-
once(eventName: EventType, listener: Listener): this;
|
|
435
|
-
emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
436
|
-
listenerCount(eventName?: EventType): number;
|
|
437
|
-
listeners(eventName?: EventType): Array<Listener>;
|
|
438
|
-
off(eventName: EventType, listener?: Listener): this;
|
|
439
|
-
removeAllListeners(eventName?: EventType): this;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
interface TypedDataDomain {
|
|
443
|
-
name?: string;
|
|
444
|
-
version?: string;
|
|
445
|
-
chainId?: BigNumberish;
|
|
446
|
-
verifyingContract?: string;
|
|
447
|
-
salt?: BytesLike;
|
|
448
|
-
}
|
|
449
|
-
interface TypedDataField {
|
|
450
|
-
name: string;
|
|
451
|
-
type: string;
|
|
452
|
-
}
|
|
453
|
-
interface TypedDataSigner {
|
|
454
|
-
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
455
|
-
}
|
|
456
|
-
declare abstract class Signer {
|
|
457
|
-
readonly provider?: Provider;
|
|
458
|
-
abstract getAddress(): Promise<string>;
|
|
459
|
-
abstract signMessage(message: Bytes | string): Promise<string>;
|
|
460
|
-
abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
461
|
-
abstract connect(provider: Provider): Signer;
|
|
462
|
-
readonly _isSigner: boolean;
|
|
463
|
-
constructor();
|
|
464
|
-
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
465
|
-
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
|
466
|
-
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
467
|
-
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
|
|
468
|
-
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
469
|
-
getChainId(): Promise<number>;
|
|
470
|
-
getGasPrice(): Promise<BigNumber>;
|
|
471
|
-
getFeeData(): Promise<FeeData>;
|
|
472
|
-
resolveName(name: string): Promise<string>;
|
|
473
|
-
checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
|
|
474
|
-
populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
|
|
475
|
-
_checkProvider(operation?: string): void;
|
|
476
|
-
static isSigner(value: any): value is Signer;
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
declare class JsonRpcSigner extends Signer implements TypedDataSigner {
|
|
480
|
-
readonly provider: JsonRpcProvider;
|
|
481
|
-
_index: number;
|
|
482
|
-
_address: string;
|
|
483
|
-
constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
|
|
484
|
-
connect(provider: Provider): JsonRpcSigner;
|
|
485
|
-
connectUnchecked(): JsonRpcSigner;
|
|
486
|
-
getAddress(): Promise<string>;
|
|
487
|
-
sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
488
|
-
signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
489
|
-
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
490
|
-
signMessage(message: Bytes | string): Promise<string>;
|
|
491
|
-
_legacySignMessage(message: Bytes | string): Promise<string>;
|
|
492
|
-
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
493
|
-
unlock(password: string): Promise<boolean>;
|
|
494
|
-
}
|
|
495
|
-
declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
|
|
496
|
-
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
497
|
-
}
|
|
498
|
-
declare class JsonRpcProvider extends BaseProvider {
|
|
499
|
-
readonly connection: ConnectionInfo;
|
|
500
|
-
_pendingFilter: Promise<number>;
|
|
501
|
-
_nextId: number;
|
|
502
|
-
_eventLoopCache: Record<string, Promise<any>>;
|
|
503
|
-
get _cache(): Record<string, Promise<any>>;
|
|
504
|
-
constructor(url?: ConnectionInfo | string, network?: Networkish);
|
|
505
|
-
static defaultUrl(): string;
|
|
506
|
-
detectNetwork(): Promise<Network$1>;
|
|
507
|
-
_uncachedDetectNetwork(): Promise<Network$1>;
|
|
508
|
-
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
|
|
509
|
-
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
|
|
510
|
-
listAccounts(): Promise<Array<string>>;
|
|
511
|
-
send(method: string, params: Array<any>): Promise<any>;
|
|
512
|
-
prepareRequest(method: string, params: any): [string, Array<any>];
|
|
513
|
-
perform(method: string, params: any): Promise<any>;
|
|
514
|
-
_startEvent(event: Event$1): void;
|
|
515
|
-
_startPending(): void;
|
|
516
|
-
_stopEvent(event: Event$1): void;
|
|
517
|
-
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
|
|
518
|
-
[key: string]: boolean;
|
|
519
|
-
}): {
|
|
520
|
-
[key: string]: string | AccessList;
|
|
521
|
-
};
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
declare type ExternalProvider = {
|
|
525
|
-
isMetaMask?: boolean;
|
|
526
|
-
isStatus?: boolean;
|
|
527
|
-
host?: string;
|
|
528
|
-
path?: string;
|
|
529
|
-
sendAsync?: (request: {
|
|
530
|
-
method: string;
|
|
531
|
-
params?: Array<any>;
|
|
532
|
-
}, callback: (error: any, response: any) => void) => void;
|
|
533
|
-
send?: (request: {
|
|
534
|
-
method: string;
|
|
535
|
-
params?: Array<any>;
|
|
536
|
-
}, callback: (error: any, response: any) => void) => void;
|
|
537
|
-
request?: (request: {
|
|
538
|
-
method: string;
|
|
539
|
-
params?: Array<any>;
|
|
540
|
-
}) => Promise<any>;
|
|
541
|
-
};
|
|
542
|
-
declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
|
|
543
|
-
declare class Web3Provider extends JsonRpcProvider {
|
|
544
|
-
readonly provider: ExternalProvider;
|
|
545
|
-
readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
|
|
546
|
-
constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
|
|
547
|
-
send(method: string, params: Array<any>): Promise<any>;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Interface representing token information.
|
|
552
|
-
* @property {string} name - The token name.
|
|
553
|
-
* @property {string} symbol - The token symbol.
|
|
554
|
-
* @property {number} decimals - The token decimals.
|
|
555
|
-
* @property {string} [address] - The token contract address.
|
|
556
|
-
* @property {string} [icon] - The token icon URL/data:image.
|
|
557
|
-
*/
|
|
558
|
-
interface TokenInfo {
|
|
559
|
-
name: string;
|
|
560
|
-
symbol: string;
|
|
561
|
-
decimals: number;
|
|
562
|
-
address?: string;
|
|
563
|
-
icon?: string;
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Interface representing the information of a network.
|
|
567
|
-
* @property {string} name - The name of the network.
|
|
568
|
-
* @property {number} chainId - The ID of the network.
|
|
569
|
-
* @property {TokenInfo} nativeCurrency - The info of the network's native currency.
|
|
570
|
-
* @property {boolean} isSupported - Flag indicating if the network is supported by the application.
|
|
571
|
-
*/
|
|
572
|
-
interface NetworkInfo {
|
|
573
|
-
name: string;
|
|
574
|
-
chainId: number;
|
|
575
|
-
nativeCurrency: TokenInfo;
|
|
576
|
-
isSupported: boolean;
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Enum representing the list of default supported providers.
|
|
580
|
-
*/
|
|
581
|
-
declare enum ConnectionProviders {
|
|
582
|
-
METAMASK = "metamask"
|
|
583
|
-
}
|
|
584
|
-
|
|
585
3
|
interface StandardLonghandProperties<TLength = (string & {}) | 0, TTime = string & {}> {
|
|
586
4
|
/**
|
|
587
5
|
* The **`accent-color`** CSS property sets the accent color for user-interface controls generated by some elements.
|
|
@@ -11604,6 +11022,9 @@ interface Interaction {
|
|
|
11604
11022
|
}
|
|
11605
11023
|
|
|
11606
11024
|
// NOTE: Users of the `experimental` builds of React should add a reference
|
|
11025
|
+
// to 'react/experimental' in their project. See experimental.d.ts's top comment
|
|
11026
|
+
// for reference and documentation on how exactly to do it.
|
|
11027
|
+
|
|
11607
11028
|
|
|
11608
11029
|
|
|
11609
11030
|
type NativeAnimationEvent = AnimationEvent;
|
|
@@ -11801,7 +11222,23 @@ declare namespace React {
|
|
|
11801
11222
|
*/
|
|
11802
11223
|
interface ReactNodeArray extends ReadonlyArray<ReactNode> {}
|
|
11803
11224
|
type ReactFragment = Iterable<ReactNode>;
|
|
11804
|
-
|
|
11225
|
+
|
|
11226
|
+
/**
|
|
11227
|
+
* For internal usage only.
|
|
11228
|
+
* Different release channels declare additional types of ReactNode this particular release channel accepts.
|
|
11229
|
+
* App or library types should never augment this interface.
|
|
11230
|
+
*/
|
|
11231
|
+
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES {}
|
|
11232
|
+
type ReactNode =
|
|
11233
|
+
| ReactElement
|
|
11234
|
+
| string
|
|
11235
|
+
| number
|
|
11236
|
+
| ReactFragment
|
|
11237
|
+
| ReactPortal
|
|
11238
|
+
| boolean
|
|
11239
|
+
| null
|
|
11240
|
+
| undefined
|
|
11241
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_REACT_NODES];
|
|
11805
11242
|
|
|
11806
11243
|
//
|
|
11807
11244
|
// Top Level API
|
|
@@ -12945,6 +12382,9 @@ declare namespace React {
|
|
|
12945
12382
|
interface SVGProps<T> extends SVGAttributes<T>, ClassAttributes<T> {
|
|
12946
12383
|
}
|
|
12947
12384
|
|
|
12385
|
+
interface SVGLineElementAttributes<T> extends SVGProps<T> {}
|
|
12386
|
+
interface SVGTextElementAttributes<T> extends SVGProps<T> {}
|
|
12387
|
+
|
|
12948
12388
|
interface DOMAttributes<T> {
|
|
12949
12389
|
children?: ReactNode | undefined;
|
|
12950
12390
|
dangerouslySetInnerHTML?: {
|
|
@@ -13493,11 +12933,21 @@ declare namespace React {
|
|
|
13493
12933
|
is?: string | undefined;
|
|
13494
12934
|
}
|
|
13495
12935
|
|
|
12936
|
+
/**
|
|
12937
|
+
* For internal usage only.
|
|
12938
|
+
* Different release channels declare additional types of ReactNode this particular release channel accepts.
|
|
12939
|
+
* App or library types should never augment this interface.
|
|
12940
|
+
*/
|
|
12941
|
+
interface DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS {}
|
|
12942
|
+
|
|
13496
12943
|
interface AllHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
13497
12944
|
// Standard HTML Attributes
|
|
13498
12945
|
accept?: string | undefined;
|
|
13499
12946
|
acceptCharset?: string | undefined;
|
|
13500
|
-
action?:
|
|
12947
|
+
action?:
|
|
12948
|
+
| string
|
|
12949
|
+
| undefined
|
|
12950
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
|
13501
12951
|
allowFullScreen?: boolean | undefined;
|
|
13502
12952
|
allowTransparency?: boolean | undefined;
|
|
13503
12953
|
alt?: string | undefined;
|
|
@@ -13526,7 +12976,10 @@ declare namespace React {
|
|
|
13526
12976
|
download?: any;
|
|
13527
12977
|
encType?: string | undefined;
|
|
13528
12978
|
form?: string | undefined;
|
|
13529
|
-
formAction?:
|
|
12979
|
+
formAction?:
|
|
12980
|
+
| string
|
|
12981
|
+
| undefined
|
|
12982
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
|
13530
12983
|
formEncType?: string | undefined;
|
|
13531
12984
|
formMethod?: string | undefined;
|
|
13532
12985
|
formNoValidate?: boolean | undefined;
|
|
@@ -13654,7 +13107,10 @@ declare namespace React {
|
|
|
13654
13107
|
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
13655
13108
|
disabled?: boolean | undefined;
|
|
13656
13109
|
form?: string | undefined;
|
|
13657
|
-
formAction?:
|
|
13110
|
+
formAction?:
|
|
13111
|
+
| string
|
|
13112
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS]
|
|
13113
|
+
| undefined;
|
|
13658
13114
|
formEncType?: string | undefined;
|
|
13659
13115
|
formMethod?: string | undefined;
|
|
13660
13116
|
formNoValidate?: boolean | undefined;
|
|
@@ -13713,7 +13169,10 @@ declare namespace React {
|
|
|
13713
13169
|
|
|
13714
13170
|
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
13715
13171
|
acceptCharset?: string | undefined;
|
|
13716
|
-
action?:
|
|
13172
|
+
action?:
|
|
13173
|
+
| string
|
|
13174
|
+
| undefined
|
|
13175
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS];
|
|
13717
13176
|
autoComplete?: string | undefined;
|
|
13718
13177
|
encType?: string | undefined;
|
|
13719
13178
|
method?: string | undefined;
|
|
@@ -13803,7 +13262,10 @@ declare namespace React {
|
|
|
13803
13262
|
disabled?: boolean | undefined;
|
|
13804
13263
|
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
|
|
13805
13264
|
form?: string | undefined;
|
|
13806
|
-
formAction?:
|
|
13265
|
+
formAction?:
|
|
13266
|
+
| string
|
|
13267
|
+
| DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS]
|
|
13268
|
+
| undefined;
|
|
13807
13269
|
formEncType?: string | undefined;
|
|
13808
13270
|
formMethod?: string | undefined;
|
|
13809
13271
|
formNoValidate?: boolean | undefined;
|
|
@@ -14624,271 +14086,900 @@ declare namespace React {
|
|
|
14624
14086
|
pageY: number;
|
|
14625
14087
|
}
|
|
14626
14088
|
|
|
14627
|
-
interface TouchList {
|
|
14628
|
-
[index: number]: Touch;
|
|
14629
|
-
length: number;
|
|
14630
|
-
item(index: number): Touch;
|
|
14631
|
-
identifiedTouch(identifier: number): Touch;
|
|
14632
|
-
}
|
|
14089
|
+
interface TouchList {
|
|
14090
|
+
[index: number]: Touch;
|
|
14091
|
+
length: number;
|
|
14092
|
+
item(index: number): Touch;
|
|
14093
|
+
identifiedTouch(identifier: number): Touch;
|
|
14094
|
+
}
|
|
14095
|
+
|
|
14096
|
+
//
|
|
14097
|
+
// Error Interfaces
|
|
14098
|
+
// ----------------------------------------------------------------------
|
|
14099
|
+
interface ErrorInfo {
|
|
14100
|
+
/**
|
|
14101
|
+
* Captures which component contained the exception, and its ancestors.
|
|
14102
|
+
*/
|
|
14103
|
+
componentStack: string;
|
|
14104
|
+
}
|
|
14105
|
+
|
|
14106
|
+
namespace JSX {
|
|
14107
|
+
interface Element extends GlobalJSXElement {}
|
|
14108
|
+
interface ElementClass extends GlobalJSXElementClass {}
|
|
14109
|
+
interface ElementAttributesProperty extends GlobalJSXElementAttributesProperty {}
|
|
14110
|
+
interface ElementChildrenAttribute extends GlobalJSXElementChildrenAttribute {}
|
|
14111
|
+
|
|
14112
|
+
type LibraryManagedAttributes<C, P> = GlobalJSXLibraryManagedAttributes<C, P>;
|
|
14113
|
+
|
|
14114
|
+
interface IntrinsicAttributes extends GlobalJSXIntrinsicAttributes {}
|
|
14115
|
+
interface IntrinsicClassAttributes<T> extends GlobalJSXIntrinsicClassAttributes<T> {}
|
|
14116
|
+
interface IntrinsicElements extends GlobalJSXIntrinsicElements {}
|
|
14117
|
+
}
|
|
14118
|
+
}
|
|
14119
|
+
|
|
14120
|
+
// naked 'any' type in a conditional type will short circuit and union both the then/else branches
|
|
14121
|
+
// so boolean is only resolved for T = any
|
|
14122
|
+
type IsExactlyAny<T> = boolean extends (T extends never ? true : false) ? true : false;
|
|
14123
|
+
|
|
14124
|
+
type ExactlyAnyPropertyKeys<T> = { [K in keyof T]: IsExactlyAny<T[K]> extends true ? K : never }[keyof T];
|
|
14125
|
+
type NotExactlyAnyPropertyKeys<T> = Exclude<keyof T, ExactlyAnyPropertyKeys<T>>;
|
|
14126
|
+
|
|
14127
|
+
// Try to resolve ill-defined props like for JS users: props can be any, or sometimes objects with properties of type any
|
|
14128
|
+
type MergePropTypes<P, T> =
|
|
14129
|
+
// Distribute over P in case it is a union type
|
|
14130
|
+
P extends any
|
|
14131
|
+
// If props is type any, use propTypes definitions
|
|
14132
|
+
? IsExactlyAny<P> extends true ? T :
|
|
14133
|
+
// If declared props have indexed properties, ignore inferred props entirely as keyof gets widened
|
|
14134
|
+
string extends keyof P ? P :
|
|
14135
|
+
// Prefer declared types which are not exactly any
|
|
14136
|
+
& Pick<P, NotExactlyAnyPropertyKeys<P>>
|
|
14137
|
+
// For props which are exactly any, use the type inferred from propTypes if present
|
|
14138
|
+
& Pick<T, Exclude<keyof T, NotExactlyAnyPropertyKeys<P>>>
|
|
14139
|
+
// Keep leftover props not specified in propTypes
|
|
14140
|
+
& Pick<P, Exclude<keyof P, keyof T>>
|
|
14141
|
+
: never;
|
|
14142
|
+
|
|
14143
|
+
type InexactPartial<T> = { [K in keyof T]?: T[K] | undefined };
|
|
14144
|
+
|
|
14145
|
+
// Any prop that has a default prop becomes optional, but its type is unchanged
|
|
14146
|
+
// Undeclared default props are augmented into the resulting allowable attributes
|
|
14147
|
+
// If declared props have indexed properties, ignore default props entirely as keyof gets widened
|
|
14148
|
+
// Wrap in an outer-level conditional type to allow distribution over props that are unions
|
|
14149
|
+
type Defaultize<P, D> = P extends any
|
|
14150
|
+
? string extends keyof P ? P :
|
|
14151
|
+
& Pick<P, Exclude<keyof P, keyof D>>
|
|
14152
|
+
& InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
|
|
14153
|
+
& InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
|
|
14154
|
+
: never;
|
|
14155
|
+
|
|
14156
|
+
type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps: infer D; }
|
|
14157
|
+
? Defaultize<MergePropTypes<P, InferProps<T>>, D>
|
|
14158
|
+
: C extends { propTypes: infer T; }
|
|
14159
|
+
? MergePropTypes<P, InferProps<T>>
|
|
14160
|
+
: C extends { defaultProps: infer D; }
|
|
14161
|
+
? Defaultize<P, D>
|
|
14162
|
+
: P;
|
|
14163
|
+
|
|
14164
|
+
declare global {
|
|
14165
|
+
/**
|
|
14166
|
+
* @deprecated Use `React.JSX` instead of the global `JSX` namespace.
|
|
14167
|
+
*/
|
|
14168
|
+
namespace JSX {
|
|
14169
|
+
interface Element extends React.ReactElement<any, any> { }
|
|
14170
|
+
interface ElementClass extends React.Component<any> {
|
|
14171
|
+
render(): React.ReactNode;
|
|
14172
|
+
}
|
|
14173
|
+
interface ElementAttributesProperty { props: {}; }
|
|
14174
|
+
interface ElementChildrenAttribute { children: {}; }
|
|
14175
|
+
|
|
14176
|
+
// We can't recurse forever because `type` can't be self-referential;
|
|
14177
|
+
// let's assume it's reasonable to do a single React.lazy() around a single React.memo() / vice-versa
|
|
14178
|
+
type LibraryManagedAttributes<C, P> = C extends React.MemoExoticComponent<infer T> | React.LazyExoticComponent<infer T>
|
|
14179
|
+
? T extends React.MemoExoticComponent<infer U> | React.LazyExoticComponent<infer U>
|
|
14180
|
+
? ReactManagedAttributes<U, P>
|
|
14181
|
+
: ReactManagedAttributes<T, P>
|
|
14182
|
+
: ReactManagedAttributes<C, P>;
|
|
14183
|
+
|
|
14184
|
+
interface IntrinsicAttributes extends React.Attributes { }
|
|
14185
|
+
interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { }
|
|
14186
|
+
|
|
14187
|
+
interface IntrinsicElements {
|
|
14188
|
+
// HTML
|
|
14189
|
+
a: React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
14190
|
+
abbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14191
|
+
address: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14192
|
+
area: React.DetailedHTMLProps<React.AreaHTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
|
|
14193
|
+
article: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14194
|
+
aside: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14195
|
+
audio: React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
|
|
14196
|
+
b: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14197
|
+
base: React.DetailedHTMLProps<React.BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
|
|
14198
|
+
bdi: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14199
|
+
bdo: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14200
|
+
big: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14201
|
+
blockquote: React.DetailedHTMLProps<React.BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
|
|
14202
|
+
body: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
|
|
14203
|
+
br: React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
|
|
14204
|
+
button: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
14205
|
+
canvas: React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
|
|
14206
|
+
caption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14207
|
+
center: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14208
|
+
cite: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14209
|
+
code: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14210
|
+
col: React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
|
|
14211
|
+
colgroup: React.DetailedHTMLProps<React.ColgroupHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
|
|
14212
|
+
data: React.DetailedHTMLProps<React.DataHTMLAttributes<HTMLDataElement>, HTMLDataElement>;
|
|
14213
|
+
datalist: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
|
|
14214
|
+
dd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14215
|
+
del: React.DetailedHTMLProps<React.DelHTMLAttributes<HTMLModElement>, HTMLModElement>;
|
|
14216
|
+
details: React.DetailedHTMLProps<React.DetailsHTMLAttributes<HTMLDetailsElement>, HTMLDetailsElement>;
|
|
14217
|
+
dfn: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14218
|
+
dialog: React.DetailedHTMLProps<React.DialogHTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
|
|
14219
|
+
div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
14220
|
+
dl: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
|
|
14221
|
+
dt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14222
|
+
em: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14223
|
+
embed: React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
|
|
14224
|
+
fieldset: React.DetailedHTMLProps<React.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
|
|
14225
|
+
figcaption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14226
|
+
figure: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14227
|
+
footer: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14228
|
+
form: React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
|
|
14229
|
+
h1: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
14230
|
+
h2: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
14231
|
+
h3: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
14232
|
+
h4: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
14233
|
+
h5: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
14234
|
+
h6: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
|
|
14235
|
+
head: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>;
|
|
14236
|
+
header: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14237
|
+
hgroup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14238
|
+
hr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
|
|
14239
|
+
html: React.DetailedHTMLProps<React.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
|
|
14240
|
+
i: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14241
|
+
iframe: React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
|
|
14242
|
+
img: React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
14243
|
+
input: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
14244
|
+
ins: React.DetailedHTMLProps<React.InsHTMLAttributes<HTMLModElement>, HTMLModElement>;
|
|
14245
|
+
kbd: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14246
|
+
keygen: React.DetailedHTMLProps<React.KeygenHTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14247
|
+
label: React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
14248
|
+
legend: React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
|
|
14249
|
+
li: React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
|
|
14250
|
+
link: React.DetailedHTMLProps<React.LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
|
|
14251
|
+
main: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14252
|
+
map: React.DetailedHTMLProps<React.MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>;
|
|
14253
|
+
mark: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14254
|
+
menu: React.DetailedHTMLProps<React.MenuHTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14255
|
+
menuitem: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14256
|
+
meta: React.DetailedHTMLProps<React.MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
|
|
14257
|
+
meter: React.DetailedHTMLProps<React.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>;
|
|
14258
|
+
nav: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14259
|
+
noindex: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14260
|
+
noscript: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14261
|
+
object: React.DetailedHTMLProps<React.ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
|
|
14262
|
+
ol: React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>;
|
|
14263
|
+
optgroup: React.DetailedHTMLProps<React.OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
|
|
14264
|
+
option: React.DetailedHTMLProps<React.OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
|
|
14265
|
+
output: React.DetailedHTMLProps<React.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>;
|
|
14266
|
+
p: React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
|
|
14267
|
+
param: React.DetailedHTMLProps<React.ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>;
|
|
14268
|
+
picture: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14269
|
+
pre: React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
|
|
14270
|
+
progress: React.DetailedHTMLProps<React.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
|
|
14271
|
+
q: React.DetailedHTMLProps<React.QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
|
|
14272
|
+
rp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14273
|
+
rt: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14274
|
+
ruby: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14275
|
+
s: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14276
|
+
samp: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14277
|
+
slot: React.DetailedHTMLProps<React.SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
|
|
14278
|
+
script: React.DetailedHTMLProps<React.ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
|
|
14279
|
+
section: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14280
|
+
select: React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
|
|
14281
|
+
small: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14282
|
+
source: React.DetailedHTMLProps<React.SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
|
|
14283
|
+
span: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
14284
|
+
strong: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14285
|
+
style: React.DetailedHTMLProps<React.StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
|
|
14286
|
+
sub: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14287
|
+
summary: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14288
|
+
sup: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14289
|
+
table: React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>;
|
|
14290
|
+
template: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
|
|
14291
|
+
tbody: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
|
|
14292
|
+
td: React.DetailedHTMLProps<React.TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
|
|
14293
|
+
textarea: React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
|
|
14294
|
+
tfoot: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
|
|
14295
|
+
th: React.DetailedHTMLProps<React.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
|
|
14296
|
+
thead: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
|
|
14297
|
+
time: React.DetailedHTMLProps<React.TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>;
|
|
14298
|
+
title: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
|
|
14299
|
+
tr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
|
|
14300
|
+
track: React.DetailedHTMLProps<React.TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
|
|
14301
|
+
u: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14302
|
+
ul: React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
|
|
14303
|
+
"var": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14304
|
+
video: React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
|
|
14305
|
+
wbr: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
14306
|
+
webview: React.DetailedHTMLProps<React.WebViewHTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;
|
|
14307
|
+
|
|
14308
|
+
// SVG
|
|
14309
|
+
svg: React.SVGProps<SVGSVGElement>;
|
|
14633
14310
|
|
|
14634
|
-
|
|
14635
|
-
|
|
14636
|
-
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
|
|
14640
|
-
|
|
14641
|
-
|
|
14311
|
+
animate: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateElement but is not in TypeScript's lib.dom.d.ts for now.
|
|
14312
|
+
animateMotion: React.SVGProps<SVGElement>;
|
|
14313
|
+
animateTransform: React.SVGProps<SVGElement>; // TODO: It is SVGAnimateTransformElement but is not in TypeScript's lib.dom.d.ts for now.
|
|
14314
|
+
circle: React.SVGProps<SVGCircleElement>;
|
|
14315
|
+
clipPath: React.SVGProps<SVGClipPathElement>;
|
|
14316
|
+
defs: React.SVGProps<SVGDefsElement>;
|
|
14317
|
+
desc: React.SVGProps<SVGDescElement>;
|
|
14318
|
+
ellipse: React.SVGProps<SVGEllipseElement>;
|
|
14319
|
+
feBlend: React.SVGProps<SVGFEBlendElement>;
|
|
14320
|
+
feColorMatrix: React.SVGProps<SVGFEColorMatrixElement>;
|
|
14321
|
+
feComponentTransfer: React.SVGProps<SVGFEComponentTransferElement>;
|
|
14322
|
+
feComposite: React.SVGProps<SVGFECompositeElement>;
|
|
14323
|
+
feConvolveMatrix: React.SVGProps<SVGFEConvolveMatrixElement>;
|
|
14324
|
+
feDiffuseLighting: React.SVGProps<SVGFEDiffuseLightingElement>;
|
|
14325
|
+
feDisplacementMap: React.SVGProps<SVGFEDisplacementMapElement>;
|
|
14326
|
+
feDistantLight: React.SVGProps<SVGFEDistantLightElement>;
|
|
14327
|
+
feDropShadow: React.SVGProps<SVGFEDropShadowElement>;
|
|
14328
|
+
feFlood: React.SVGProps<SVGFEFloodElement>;
|
|
14329
|
+
feFuncA: React.SVGProps<SVGFEFuncAElement>;
|
|
14330
|
+
feFuncB: React.SVGProps<SVGFEFuncBElement>;
|
|
14331
|
+
feFuncG: React.SVGProps<SVGFEFuncGElement>;
|
|
14332
|
+
feFuncR: React.SVGProps<SVGFEFuncRElement>;
|
|
14333
|
+
feGaussianBlur: React.SVGProps<SVGFEGaussianBlurElement>;
|
|
14334
|
+
feImage: React.SVGProps<SVGFEImageElement>;
|
|
14335
|
+
feMerge: React.SVGProps<SVGFEMergeElement>;
|
|
14336
|
+
feMergeNode: React.SVGProps<SVGFEMergeNodeElement>;
|
|
14337
|
+
feMorphology: React.SVGProps<SVGFEMorphologyElement>;
|
|
14338
|
+
feOffset: React.SVGProps<SVGFEOffsetElement>;
|
|
14339
|
+
fePointLight: React.SVGProps<SVGFEPointLightElement>;
|
|
14340
|
+
feSpecularLighting: React.SVGProps<SVGFESpecularLightingElement>;
|
|
14341
|
+
feSpotLight: React.SVGProps<SVGFESpotLightElement>;
|
|
14342
|
+
feTile: React.SVGProps<SVGFETileElement>;
|
|
14343
|
+
feTurbulence: React.SVGProps<SVGFETurbulenceElement>;
|
|
14344
|
+
filter: React.SVGProps<SVGFilterElement>;
|
|
14345
|
+
foreignObject: React.SVGProps<SVGForeignObjectElement>;
|
|
14346
|
+
g: React.SVGProps<SVGGElement>;
|
|
14347
|
+
image: React.SVGProps<SVGImageElement>;
|
|
14348
|
+
line: React.SVGLineElementAttributes<SVGLineElement>;
|
|
14349
|
+
linearGradient: React.SVGProps<SVGLinearGradientElement>;
|
|
14350
|
+
marker: React.SVGProps<SVGMarkerElement>;
|
|
14351
|
+
mask: React.SVGProps<SVGMaskElement>;
|
|
14352
|
+
metadata: React.SVGProps<SVGMetadataElement>;
|
|
14353
|
+
mpath: React.SVGProps<SVGElement>;
|
|
14354
|
+
path: React.SVGProps<SVGPathElement>;
|
|
14355
|
+
pattern: React.SVGProps<SVGPatternElement>;
|
|
14356
|
+
polygon: React.SVGProps<SVGPolygonElement>;
|
|
14357
|
+
polyline: React.SVGProps<SVGPolylineElement>;
|
|
14358
|
+
radialGradient: React.SVGProps<SVGRadialGradientElement>;
|
|
14359
|
+
rect: React.SVGProps<SVGRectElement>;
|
|
14360
|
+
stop: React.SVGProps<SVGStopElement>;
|
|
14361
|
+
switch: React.SVGProps<SVGSwitchElement>;
|
|
14362
|
+
symbol: React.SVGProps<SVGSymbolElement>;
|
|
14363
|
+
text: React.SVGTextElementAttributes<SVGTextElement>;
|
|
14364
|
+
textPath: React.SVGProps<SVGTextPathElement>;
|
|
14365
|
+
tspan: React.SVGProps<SVGTSpanElement>;
|
|
14366
|
+
use: React.SVGProps<SVGUseElement>;
|
|
14367
|
+
view: React.SVGProps<SVGViewElement>;
|
|
14368
|
+
}
|
|
14642
14369
|
}
|
|
14643
14370
|
}
|
|
14644
14371
|
|
|
14645
|
-
//
|
|
14646
|
-
// so
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
|
|
14372
|
+
// React.JSX needs to point to global.JSX to keep global module augmentations intact.
|
|
14373
|
+
// But we can't access global.JSX so we need to create these aliases instead.
|
|
14374
|
+
// Once the global JSX namespace will be removed we replace React.JSX with the contents of global.JSX
|
|
14375
|
+
interface GlobalJSXElement extends JSX.Element {}
|
|
14376
|
+
interface GlobalJSXElementClass extends JSX.ElementClass {}
|
|
14377
|
+
interface GlobalJSXElementAttributesProperty extends JSX.ElementAttributesProperty {}
|
|
14378
|
+
interface GlobalJSXElementChildrenAttribute extends JSX.ElementChildrenAttribute {}
|
|
14379
|
+
|
|
14380
|
+
type GlobalJSXLibraryManagedAttributes<C, P> = JSX.LibraryManagedAttributes<C, P>;
|
|
14381
|
+
|
|
14382
|
+
interface GlobalJSXIntrinsicAttributes extends JSX.IntrinsicAttributes {}
|
|
14383
|
+
interface GlobalJSXIntrinsicClassAttributes<T> extends JSX.IntrinsicClassAttributes<T> {}
|
|
14384
|
+
|
|
14385
|
+
interface GlobalJSXIntrinsicElements extends JSX.IntrinsicElements {}
|
|
14386
|
+
|
|
14387
|
+
declare namespace JSX$1 {
|
|
14388
|
+
interface Element extends undefined.Element {}
|
|
14389
|
+
interface ElementClass extends undefined.ElementClass {}
|
|
14390
|
+
interface ElementAttributesProperty extends undefined.ElementAttributesProperty {}
|
|
14391
|
+
interface ElementChildrenAttribute extends undefined.ElementChildrenAttribute {}
|
|
14392
|
+
type LibraryManagedAttributes<C, P> = undefined.LibraryManagedAttributes<C, P>;
|
|
14393
|
+
interface IntrinsicAttributes extends undefined.IntrinsicAttributes {}
|
|
14394
|
+
interface IntrinsicClassAttributes<T> extends undefined.IntrinsicClassAttributes<T> {}
|
|
14395
|
+
interface IntrinsicElements extends undefined.IntrinsicElements {}
|
|
14396
|
+
}
|
|
14651
14397
|
|
|
14652
|
-
|
|
14653
|
-
type
|
|
14654
|
-
|
|
14655
|
-
|
|
14656
|
-
|
|
14657
|
-
? IsExactlyAny<P> extends true ? T :
|
|
14658
|
-
// If declared props have indexed properties, ignore inferred props entirely as keyof gets widened
|
|
14659
|
-
string extends keyof P ? P :
|
|
14660
|
-
// Prefer declared types which are not exactly any
|
|
14661
|
-
& Pick<P, NotExactlyAnyPropertyKeys<P>>
|
|
14662
|
-
// For props which are exactly any, use the type inferred from propTypes if present
|
|
14663
|
-
& Pick<T, Exclude<keyof T, NotExactlyAnyPropertyKeys<P>>>
|
|
14664
|
-
// Keep leftover props not specified in propTypes
|
|
14665
|
-
& Pick<P, Exclude<keyof P, keyof T>>
|
|
14666
|
-
: never;
|
|
14398
|
+
declare type Bytes = ArrayLike<number>;
|
|
14399
|
+
declare type BytesLike = Bytes | string;
|
|
14400
|
+
interface Hexable {
|
|
14401
|
+
toHexString(): string;
|
|
14402
|
+
}
|
|
14667
14403
|
|
|
14668
|
-
type
|
|
14404
|
+
declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
|
|
14405
|
+
declare class BigNumber implements Hexable {
|
|
14406
|
+
readonly _hex: string;
|
|
14407
|
+
readonly _isBigNumber: boolean;
|
|
14408
|
+
constructor(constructorGuard: any, hex: string);
|
|
14409
|
+
fromTwos(value: number): BigNumber;
|
|
14410
|
+
toTwos(value: number): BigNumber;
|
|
14411
|
+
abs(): BigNumber;
|
|
14412
|
+
add(other: BigNumberish): BigNumber;
|
|
14413
|
+
sub(other: BigNumberish): BigNumber;
|
|
14414
|
+
div(other: BigNumberish): BigNumber;
|
|
14415
|
+
mul(other: BigNumberish): BigNumber;
|
|
14416
|
+
mod(other: BigNumberish): BigNumber;
|
|
14417
|
+
pow(other: BigNumberish): BigNumber;
|
|
14418
|
+
and(other: BigNumberish): BigNumber;
|
|
14419
|
+
or(other: BigNumberish): BigNumber;
|
|
14420
|
+
xor(other: BigNumberish): BigNumber;
|
|
14421
|
+
mask(value: number): BigNumber;
|
|
14422
|
+
shl(value: number): BigNumber;
|
|
14423
|
+
shr(value: number): BigNumber;
|
|
14424
|
+
eq(other: BigNumberish): boolean;
|
|
14425
|
+
lt(other: BigNumberish): boolean;
|
|
14426
|
+
lte(other: BigNumberish): boolean;
|
|
14427
|
+
gt(other: BigNumberish): boolean;
|
|
14428
|
+
gte(other: BigNumberish): boolean;
|
|
14429
|
+
isNegative(): boolean;
|
|
14430
|
+
isZero(): boolean;
|
|
14431
|
+
toNumber(): number;
|
|
14432
|
+
toBigInt(): bigint;
|
|
14433
|
+
toString(): string;
|
|
14434
|
+
toHexString(): string;
|
|
14435
|
+
toJSON(key?: string): any;
|
|
14436
|
+
static from(value: any): BigNumber;
|
|
14437
|
+
static isBigNumber(value: any): value is BigNumber;
|
|
14438
|
+
}
|
|
14669
14439
|
|
|
14670
|
-
|
|
14671
|
-
|
|
14672
|
-
|
|
14673
|
-
|
|
14674
|
-
|
|
14675
|
-
|
|
14676
|
-
|
|
14677
|
-
& InexactPartial<Pick<P, Extract<keyof P, keyof D>>>
|
|
14678
|
-
& InexactPartial<Pick<D, Exclude<keyof D, keyof P>>>
|
|
14679
|
-
: never;
|
|
14440
|
+
declare type Network$1 = {
|
|
14441
|
+
name: string;
|
|
14442
|
+
chainId: number;
|
|
14443
|
+
ensAddress?: string;
|
|
14444
|
+
_defaultProvider?: (providers: any, options?: any) => any;
|
|
14445
|
+
};
|
|
14446
|
+
declare type Networkish = Network$1 | string | number;
|
|
14680
14447
|
|
|
14681
|
-
type
|
|
14682
|
-
|
|
14683
|
-
|
|
14684
|
-
|
|
14685
|
-
|
|
14686
|
-
|
|
14687
|
-
|
|
14448
|
+
declare type Deferrable<T> = {
|
|
14449
|
+
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
14450
|
+
};
|
|
14451
|
+
declare class Description<T = any> {
|
|
14452
|
+
constructor(info: {
|
|
14453
|
+
[K in keyof T]: T[K];
|
|
14454
|
+
});
|
|
14455
|
+
}
|
|
14688
14456
|
|
|
14689
|
-
declare
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
|
|
14693
|
-
|
|
14694
|
-
|
|
14695
|
-
|
|
14696
|
-
|
|
14457
|
+
declare type AccessList = Array<{
|
|
14458
|
+
address: string;
|
|
14459
|
+
storageKeys: Array<string>;
|
|
14460
|
+
}>;
|
|
14461
|
+
declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
14462
|
+
interface Transaction {
|
|
14463
|
+
hash?: string;
|
|
14464
|
+
to?: string;
|
|
14465
|
+
from?: string;
|
|
14466
|
+
nonce: number;
|
|
14467
|
+
gasLimit: BigNumber;
|
|
14468
|
+
gasPrice?: BigNumber;
|
|
14469
|
+
data: string;
|
|
14470
|
+
value: BigNumber;
|
|
14471
|
+
chainId: number;
|
|
14472
|
+
r?: string;
|
|
14473
|
+
s?: string;
|
|
14474
|
+
v?: number;
|
|
14475
|
+
type?: number | null;
|
|
14476
|
+
accessList?: AccessList;
|
|
14477
|
+
maxPriorityFeePerGas?: BigNumber;
|
|
14478
|
+
maxFeePerGas?: BigNumber;
|
|
14479
|
+
}
|
|
14697
14480
|
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14481
|
+
declare type ConnectionInfo = {
|
|
14482
|
+
url: string;
|
|
14483
|
+
headers?: {
|
|
14484
|
+
[key: string]: string | number;
|
|
14485
|
+
};
|
|
14486
|
+
user?: string;
|
|
14487
|
+
password?: string;
|
|
14488
|
+
allowInsecureAuthentication?: boolean;
|
|
14489
|
+
allowGzip?: boolean;
|
|
14490
|
+
throttleLimit?: number;
|
|
14491
|
+
throttleSlotInterval?: number;
|
|
14492
|
+
throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
|
|
14493
|
+
skipFetchSetup?: boolean;
|
|
14494
|
+
fetchOptions?: Record<string, string>;
|
|
14495
|
+
errorPassThrough?: boolean;
|
|
14496
|
+
timeout?: number;
|
|
14497
|
+
};
|
|
14498
|
+
interface OnceBlockable {
|
|
14499
|
+
once(eventName: "block", handler: () => void): void;
|
|
14500
|
+
}
|
|
14705
14501
|
|
|
14706
|
-
|
|
14707
|
-
|
|
14502
|
+
declare type TransactionRequest = {
|
|
14503
|
+
to?: string;
|
|
14504
|
+
from?: string;
|
|
14505
|
+
nonce?: BigNumberish;
|
|
14506
|
+
gasLimit?: BigNumberish;
|
|
14507
|
+
gasPrice?: BigNumberish;
|
|
14508
|
+
data?: BytesLike;
|
|
14509
|
+
value?: BigNumberish;
|
|
14510
|
+
chainId?: number;
|
|
14511
|
+
type?: number;
|
|
14512
|
+
accessList?: AccessListish;
|
|
14513
|
+
maxPriorityFeePerGas?: BigNumberish;
|
|
14514
|
+
maxFeePerGas?: BigNumberish;
|
|
14515
|
+
customData?: Record<string, any>;
|
|
14516
|
+
ccipReadEnabled?: boolean;
|
|
14517
|
+
};
|
|
14518
|
+
interface TransactionResponse extends Transaction {
|
|
14519
|
+
hash: string;
|
|
14520
|
+
blockNumber?: number;
|
|
14521
|
+
blockHash?: string;
|
|
14522
|
+
timestamp?: number;
|
|
14523
|
+
confirmations: number;
|
|
14524
|
+
from: string;
|
|
14525
|
+
raw?: string;
|
|
14526
|
+
wait: (confirmations?: number) => Promise<TransactionReceipt>;
|
|
14527
|
+
}
|
|
14528
|
+
declare type BlockTag = string | number;
|
|
14529
|
+
interface _Block {
|
|
14530
|
+
hash: string;
|
|
14531
|
+
parentHash: string;
|
|
14532
|
+
number: number;
|
|
14533
|
+
timestamp: number;
|
|
14534
|
+
nonce: string;
|
|
14535
|
+
difficulty: number;
|
|
14536
|
+
_difficulty: BigNumber;
|
|
14537
|
+
gasLimit: BigNumber;
|
|
14538
|
+
gasUsed: BigNumber;
|
|
14539
|
+
miner: string;
|
|
14540
|
+
extraData: string;
|
|
14541
|
+
baseFeePerGas?: null | BigNumber;
|
|
14542
|
+
}
|
|
14543
|
+
interface Block extends _Block {
|
|
14544
|
+
transactions: Array<string>;
|
|
14545
|
+
}
|
|
14546
|
+
interface BlockWithTransactions extends _Block {
|
|
14547
|
+
transactions: Array<TransactionResponse>;
|
|
14548
|
+
}
|
|
14549
|
+
interface Log {
|
|
14550
|
+
blockNumber: number;
|
|
14551
|
+
blockHash: string;
|
|
14552
|
+
transactionIndex: number;
|
|
14553
|
+
removed: boolean;
|
|
14554
|
+
address: string;
|
|
14555
|
+
data: string;
|
|
14556
|
+
topics: Array<string>;
|
|
14557
|
+
transactionHash: string;
|
|
14558
|
+
logIndex: number;
|
|
14559
|
+
}
|
|
14560
|
+
interface TransactionReceipt {
|
|
14561
|
+
to: string;
|
|
14562
|
+
from: string;
|
|
14563
|
+
contractAddress: string;
|
|
14564
|
+
transactionIndex: number;
|
|
14565
|
+
root?: string;
|
|
14566
|
+
gasUsed: BigNumber;
|
|
14567
|
+
logsBloom: string;
|
|
14568
|
+
blockHash: string;
|
|
14569
|
+
transactionHash: string;
|
|
14570
|
+
logs: Array<Log>;
|
|
14571
|
+
blockNumber: number;
|
|
14572
|
+
confirmations: number;
|
|
14573
|
+
cumulativeGasUsed: BigNumber;
|
|
14574
|
+
effectiveGasPrice: BigNumber;
|
|
14575
|
+
byzantium: boolean;
|
|
14576
|
+
type: number;
|
|
14577
|
+
status?: number;
|
|
14578
|
+
}
|
|
14579
|
+
interface FeeData {
|
|
14580
|
+
lastBaseFeePerGas: null | BigNumber;
|
|
14581
|
+
maxFeePerGas: null | BigNumber;
|
|
14582
|
+
maxPriorityFeePerGas: null | BigNumber;
|
|
14583
|
+
gasPrice: null | BigNumber;
|
|
14584
|
+
}
|
|
14585
|
+
interface EventFilter {
|
|
14586
|
+
address?: string;
|
|
14587
|
+
topics?: Array<string | Array<string> | null>;
|
|
14588
|
+
}
|
|
14589
|
+
interface Filter extends EventFilter {
|
|
14590
|
+
fromBlock?: BlockTag;
|
|
14591
|
+
toBlock?: BlockTag;
|
|
14592
|
+
}
|
|
14593
|
+
interface FilterByBlockHash extends EventFilter {
|
|
14594
|
+
blockHash?: string;
|
|
14595
|
+
}
|
|
14596
|
+
declare abstract class ForkEvent extends Description {
|
|
14597
|
+
readonly expiry: number;
|
|
14598
|
+
readonly _isForkEvent?: boolean;
|
|
14599
|
+
static isForkEvent(value: any): value is ForkEvent;
|
|
14600
|
+
}
|
|
14601
|
+
declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
|
|
14602
|
+
declare type Listener = (...args: Array<any>) => void;
|
|
14603
|
+
declare abstract class Provider implements OnceBlockable {
|
|
14604
|
+
abstract getNetwork(): Promise<Network$1>;
|
|
14605
|
+
abstract getBlockNumber(): Promise<number>;
|
|
14606
|
+
abstract getGasPrice(): Promise<BigNumber>;
|
|
14607
|
+
getFeeData(): Promise<FeeData>;
|
|
14608
|
+
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
14609
|
+
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
14610
|
+
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
14611
|
+
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
14612
|
+
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
14613
|
+
abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
14614
|
+
abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
14615
|
+
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
14616
|
+
abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
14617
|
+
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
14618
|
+
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
14619
|
+
abstract getLogs(filter: Filter): Promise<Array<Log>>;
|
|
14620
|
+
abstract resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
14621
|
+
abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
14622
|
+
abstract on(eventName: EventType, listener: Listener): Provider;
|
|
14623
|
+
abstract once(eventName: EventType, listener: Listener): Provider;
|
|
14624
|
+
abstract emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
14625
|
+
abstract listenerCount(eventName?: EventType): number;
|
|
14626
|
+
abstract listeners(eventName?: EventType): Array<Listener>;
|
|
14627
|
+
abstract off(eventName: EventType, listener?: Listener): Provider;
|
|
14628
|
+
abstract removeAllListeners(eventName?: EventType): Provider;
|
|
14629
|
+
addListener(eventName: EventType, listener: Listener): Provider;
|
|
14630
|
+
removeListener(eventName: EventType, listener: Listener): Provider;
|
|
14631
|
+
abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
14632
|
+
readonly _isProvider: boolean;
|
|
14633
|
+
constructor();
|
|
14634
|
+
static isProvider(value: any): value is Provider;
|
|
14635
|
+
}
|
|
14636
|
+
|
|
14637
|
+
declare type FormatFunc = (value: any) => any;
|
|
14638
|
+
declare type FormatFuncs = {
|
|
14639
|
+
[key: string]: FormatFunc;
|
|
14640
|
+
};
|
|
14641
|
+
declare type Formats = {
|
|
14642
|
+
transaction: FormatFuncs;
|
|
14643
|
+
transactionRequest: FormatFuncs;
|
|
14644
|
+
receipt: FormatFuncs;
|
|
14645
|
+
receiptLog: FormatFuncs;
|
|
14646
|
+
block: FormatFuncs;
|
|
14647
|
+
blockWithTransactions: FormatFuncs;
|
|
14648
|
+
filter: FormatFuncs;
|
|
14649
|
+
filterLog: FormatFuncs;
|
|
14650
|
+
};
|
|
14651
|
+
declare class Formatter {
|
|
14652
|
+
readonly formats: Formats;
|
|
14653
|
+
constructor();
|
|
14654
|
+
getDefaultFormats(): Formats;
|
|
14655
|
+
accessList(accessList: Array<any>): AccessList;
|
|
14656
|
+
number(number: any): number;
|
|
14657
|
+
type(number: any): number;
|
|
14658
|
+
bigNumber(value: any): BigNumber;
|
|
14659
|
+
boolean(value: any): boolean;
|
|
14660
|
+
hex(value: any, strict?: boolean): string;
|
|
14661
|
+
data(value: any, strict?: boolean): string;
|
|
14662
|
+
address(value: any): string;
|
|
14663
|
+
callAddress(value: any): string;
|
|
14664
|
+
contractAddress(value: any): string;
|
|
14665
|
+
blockTag(blockTag: any): string;
|
|
14666
|
+
hash(value: any, strict?: boolean): string;
|
|
14667
|
+
difficulty(value: any): number;
|
|
14668
|
+
uint256(value: any): string;
|
|
14669
|
+
_block(value: any, format: any): Block;
|
|
14670
|
+
block(value: any): Block;
|
|
14671
|
+
blockWithTransactions(value: any): Block;
|
|
14672
|
+
transactionRequest(value: any): any;
|
|
14673
|
+
transactionResponse(transaction: any): TransactionResponse;
|
|
14674
|
+
transaction(value: any): any;
|
|
14675
|
+
receiptLog(value: any): any;
|
|
14676
|
+
receipt(value: any): TransactionReceipt;
|
|
14677
|
+
topics(value: any): any;
|
|
14678
|
+
filter(value: any): any;
|
|
14679
|
+
filterLog(value: any): any;
|
|
14680
|
+
static check(format: {
|
|
14681
|
+
[name: string]: FormatFunc;
|
|
14682
|
+
}, object: any): any;
|
|
14683
|
+
static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
|
|
14684
|
+
static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
|
|
14685
|
+
static arrayOf(format: FormatFunc): FormatFunc;
|
|
14686
|
+
}
|
|
14708
14687
|
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
|
|
14746
|
-
|
|
14747
|
-
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14788
|
-
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
|
|
14794
|
-
|
|
14795
|
-
|
|
14796
|
-
|
|
14797
|
-
|
|
14798
|
-
|
|
14799
|
-
|
|
14800
|
-
|
|
14801
|
-
|
|
14802
|
-
|
|
14803
|
-
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
|
|
14809
|
-
|
|
14810
|
-
|
|
14811
|
-
|
|
14812
|
-
|
|
14813
|
-
|
|
14814
|
-
|
|
14815
|
-
|
|
14816
|
-
|
|
14817
|
-
|
|
14818
|
-
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
|
|
14825
|
-
|
|
14826
|
-
|
|
14827
|
-
|
|
14828
|
-
|
|
14688
|
+
declare class Event$1 {
|
|
14689
|
+
readonly listener: Listener;
|
|
14690
|
+
readonly once: boolean;
|
|
14691
|
+
readonly tag: string;
|
|
14692
|
+
_lastBlockNumber: number;
|
|
14693
|
+
_inflight: boolean;
|
|
14694
|
+
constructor(tag: string, listener: Listener, once: boolean);
|
|
14695
|
+
get event(): EventType;
|
|
14696
|
+
get type(): string;
|
|
14697
|
+
get hash(): string;
|
|
14698
|
+
get filter(): Filter;
|
|
14699
|
+
pollable(): boolean;
|
|
14700
|
+
}
|
|
14701
|
+
interface EnsResolver {
|
|
14702
|
+
readonly name: string;
|
|
14703
|
+
readonly address: string;
|
|
14704
|
+
getAddress(coinType?: 60): Promise<null | string>;
|
|
14705
|
+
getContentHash(): Promise<null | string>;
|
|
14706
|
+
getText(key: string): Promise<null | string>;
|
|
14707
|
+
}
|
|
14708
|
+
interface EnsProvider {
|
|
14709
|
+
resolveName(name: string): Promise<null | string>;
|
|
14710
|
+
lookupAddress(address: string): Promise<null | string>;
|
|
14711
|
+
getResolver(name: string): Promise<null | EnsResolver>;
|
|
14712
|
+
}
|
|
14713
|
+
interface Avatar {
|
|
14714
|
+
url: string;
|
|
14715
|
+
linkage: Array<{
|
|
14716
|
+
type: string;
|
|
14717
|
+
content: string;
|
|
14718
|
+
}>;
|
|
14719
|
+
}
|
|
14720
|
+
declare class Resolver implements EnsResolver {
|
|
14721
|
+
readonly provider: BaseProvider;
|
|
14722
|
+
readonly name: string;
|
|
14723
|
+
readonly address: string;
|
|
14724
|
+
readonly _resolvedAddress: null | string;
|
|
14725
|
+
_supportsEip2544: null | Promise<boolean>;
|
|
14726
|
+
constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
|
|
14727
|
+
supportsWildcard(): Promise<boolean>;
|
|
14728
|
+
_fetch(selector: string, parameters?: string): Promise<null | string>;
|
|
14729
|
+
_fetchBytes(selector: string, parameters?: string): Promise<null | string>;
|
|
14730
|
+
_getAddress(coinType: number, hexBytes: string): string;
|
|
14731
|
+
getAddress(coinType?: number): Promise<string>;
|
|
14732
|
+
getAvatar(): Promise<null | Avatar>;
|
|
14733
|
+
getContentHash(): Promise<string>;
|
|
14734
|
+
getText(key: string): Promise<string>;
|
|
14735
|
+
}
|
|
14736
|
+
declare class BaseProvider extends Provider implements EnsProvider {
|
|
14737
|
+
_networkPromise: Promise<Network$1>;
|
|
14738
|
+
_network: Network$1;
|
|
14739
|
+
_events: Array<Event$1>;
|
|
14740
|
+
formatter: Formatter;
|
|
14741
|
+
_emitted: {
|
|
14742
|
+
[eventName: string]: number | "pending";
|
|
14743
|
+
};
|
|
14744
|
+
_pollingInterval: number;
|
|
14745
|
+
_poller: NodeJS.Timer;
|
|
14746
|
+
_bootstrapPoll: NodeJS.Timer;
|
|
14747
|
+
_lastBlockNumber: number;
|
|
14748
|
+
_maxFilterBlockRange: number;
|
|
14749
|
+
_fastBlockNumber: number;
|
|
14750
|
+
_fastBlockNumberPromise: Promise<number>;
|
|
14751
|
+
_fastQueryDate: number;
|
|
14752
|
+
_maxInternalBlockNumber: number;
|
|
14753
|
+
_internalBlockNumber: Promise<{
|
|
14754
|
+
blockNumber: number;
|
|
14755
|
+
reqTime: number;
|
|
14756
|
+
respTime: number;
|
|
14757
|
+
}>;
|
|
14758
|
+
readonly anyNetwork: boolean;
|
|
14759
|
+
disableCcipRead: boolean;
|
|
14760
|
+
/**
|
|
14761
|
+
* ready
|
|
14762
|
+
*
|
|
14763
|
+
* A Promise<Network> that resolves only once the provider is ready.
|
|
14764
|
+
*
|
|
14765
|
+
* Sub-classes that call the super with a network without a chainId
|
|
14766
|
+
* MUST set this. Standard named networks have a known chainId.
|
|
14767
|
+
*
|
|
14768
|
+
*/
|
|
14769
|
+
constructor(network: Networkish | Promise<Network$1>);
|
|
14770
|
+
_ready(): Promise<Network$1>;
|
|
14771
|
+
get ready(): Promise<Network$1>;
|
|
14772
|
+
static getFormatter(): Formatter;
|
|
14773
|
+
static getNetwork(network: Networkish): Network$1;
|
|
14774
|
+
ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
|
|
14775
|
+
_getInternalBlockNumber(maxAge: number): Promise<number>;
|
|
14776
|
+
poll(): Promise<void>;
|
|
14777
|
+
resetEventsBlock(blockNumber: number): void;
|
|
14778
|
+
get network(): Network$1;
|
|
14779
|
+
detectNetwork(): Promise<Network$1>;
|
|
14780
|
+
getNetwork(): Promise<Network$1>;
|
|
14781
|
+
get blockNumber(): number;
|
|
14782
|
+
get polling(): boolean;
|
|
14783
|
+
set polling(value: boolean);
|
|
14784
|
+
get pollingInterval(): number;
|
|
14785
|
+
set pollingInterval(value: number);
|
|
14786
|
+
_getFastBlockNumber(): Promise<number>;
|
|
14787
|
+
_setFastBlockNumber(blockNumber: number): void;
|
|
14788
|
+
waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
14789
|
+
_waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
|
|
14790
|
+
data: string;
|
|
14791
|
+
from: string;
|
|
14792
|
+
nonce: number;
|
|
14793
|
+
to: string;
|
|
14794
|
+
value: BigNumber;
|
|
14795
|
+
startBlock: number;
|
|
14796
|
+
}): Promise<TransactionReceipt>;
|
|
14797
|
+
getBlockNumber(): Promise<number>;
|
|
14798
|
+
getGasPrice(): Promise<BigNumber>;
|
|
14799
|
+
getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
14800
|
+
getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
14801
|
+
getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
14802
|
+
getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
14803
|
+
_wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
|
|
14804
|
+
sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
14805
|
+
_getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
|
|
14806
|
+
_getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
|
|
14807
|
+
_call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
|
|
14808
|
+
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
14809
|
+
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
14810
|
+
_getAddress(addressOrName: string | Promise<string>): Promise<string>;
|
|
14811
|
+
_getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
|
|
14812
|
+
getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
14813
|
+
getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
14814
|
+
getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
|
|
14815
|
+
getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
|
|
14816
|
+
getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
|
|
14817
|
+
getEtherPrice(): Promise<number>;
|
|
14818
|
+
_getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
|
|
14819
|
+
getResolver(name: string): Promise<null | Resolver>;
|
|
14820
|
+
_getResolver(name: string, operation?: string): Promise<string>;
|
|
14821
|
+
resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
14822
|
+
lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
14823
|
+
getAvatar(nameOrAddress: string): Promise<null | string>;
|
|
14824
|
+
perform(method: string, params: any): Promise<any>;
|
|
14825
|
+
_startEvent(event: Event$1): void;
|
|
14826
|
+
_stopEvent(event: Event$1): void;
|
|
14827
|
+
_addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
|
|
14828
|
+
on(eventName: EventType, listener: Listener): this;
|
|
14829
|
+
once(eventName: EventType, listener: Listener): this;
|
|
14830
|
+
emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
14831
|
+
listenerCount(eventName?: EventType): number;
|
|
14832
|
+
listeners(eventName?: EventType): Array<Listener>;
|
|
14833
|
+
off(eventName: EventType, listener?: Listener): this;
|
|
14834
|
+
removeAllListeners(eventName?: EventType): this;
|
|
14835
|
+
}
|
|
14829
14836
|
|
|
14830
|
-
|
|
14831
|
-
|
|
14837
|
+
interface TypedDataDomain {
|
|
14838
|
+
name?: string;
|
|
14839
|
+
version?: string;
|
|
14840
|
+
chainId?: BigNumberish;
|
|
14841
|
+
verifyingContract?: string;
|
|
14842
|
+
salt?: BytesLike;
|
|
14843
|
+
}
|
|
14844
|
+
interface TypedDataField {
|
|
14845
|
+
name: string;
|
|
14846
|
+
type: string;
|
|
14847
|
+
}
|
|
14848
|
+
interface TypedDataSigner {
|
|
14849
|
+
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
14850
|
+
}
|
|
14851
|
+
declare abstract class Signer {
|
|
14852
|
+
readonly provider?: Provider;
|
|
14853
|
+
abstract getAddress(): Promise<string>;
|
|
14854
|
+
abstract signMessage(message: Bytes | string): Promise<string>;
|
|
14855
|
+
abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
14856
|
+
abstract connect(provider: Provider): Signer;
|
|
14857
|
+
readonly _isSigner: boolean;
|
|
14858
|
+
constructor();
|
|
14859
|
+
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
14860
|
+
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
|
14861
|
+
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
14862
|
+
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
|
|
14863
|
+
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
14864
|
+
getChainId(): Promise<number>;
|
|
14865
|
+
getGasPrice(): Promise<BigNumber>;
|
|
14866
|
+
getFeeData(): Promise<FeeData>;
|
|
14867
|
+
resolveName(name: string): Promise<string>;
|
|
14868
|
+
checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
|
|
14869
|
+
populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
|
|
14870
|
+
_checkProvider(operation?: string): void;
|
|
14871
|
+
static isSigner(value: any): value is Signer;
|
|
14872
|
+
}
|
|
14832
14873
|
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14837
|
-
|
|
14838
|
-
|
|
14839
|
-
|
|
14840
|
-
|
|
14841
|
-
|
|
14842
|
-
|
|
14843
|
-
|
|
14844
|
-
|
|
14845
|
-
|
|
14846
|
-
|
|
14847
|
-
|
|
14848
|
-
|
|
14849
|
-
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
|
|
14868
|
-
|
|
14869
|
-
|
|
14870
|
-
|
|
14871
|
-
|
|
14872
|
-
|
|
14873
|
-
|
|
14874
|
-
|
|
14875
|
-
|
|
14876
|
-
|
|
14877
|
-
|
|
14878
|
-
|
|
14879
|
-
|
|
14880
|
-
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14874
|
+
declare class JsonRpcSigner extends Signer implements TypedDataSigner {
|
|
14875
|
+
readonly provider: JsonRpcProvider;
|
|
14876
|
+
_index: number;
|
|
14877
|
+
_address: string;
|
|
14878
|
+
constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
|
|
14879
|
+
connect(provider: Provider): JsonRpcSigner;
|
|
14880
|
+
connectUnchecked(): JsonRpcSigner;
|
|
14881
|
+
getAddress(): Promise<string>;
|
|
14882
|
+
sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
14883
|
+
signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
14884
|
+
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
14885
|
+
signMessage(message: Bytes | string): Promise<string>;
|
|
14886
|
+
_legacySignMessage(message: Bytes | string): Promise<string>;
|
|
14887
|
+
_signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
|
|
14888
|
+
unlock(password: string): Promise<boolean>;
|
|
14889
|
+
}
|
|
14890
|
+
declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
|
|
14891
|
+
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
14892
|
+
}
|
|
14893
|
+
declare class JsonRpcProvider extends BaseProvider {
|
|
14894
|
+
readonly connection: ConnectionInfo;
|
|
14895
|
+
_pendingFilter: Promise<number>;
|
|
14896
|
+
_nextId: number;
|
|
14897
|
+
_eventLoopCache: Record<string, Promise<any>>;
|
|
14898
|
+
get _cache(): Record<string, Promise<any>>;
|
|
14899
|
+
constructor(url?: ConnectionInfo | string, network?: Networkish);
|
|
14900
|
+
static defaultUrl(): string;
|
|
14901
|
+
detectNetwork(): Promise<Network$1>;
|
|
14902
|
+
_uncachedDetectNetwork(): Promise<Network$1>;
|
|
14903
|
+
getSigner(addressOrIndex?: string | number): JsonRpcSigner;
|
|
14904
|
+
getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
|
|
14905
|
+
listAccounts(): Promise<Array<string>>;
|
|
14906
|
+
send(method: string, params: Array<any>): Promise<any>;
|
|
14907
|
+
prepareRequest(method: string, params: any): [string, Array<any>];
|
|
14908
|
+
perform(method: string, params: any): Promise<any>;
|
|
14909
|
+
_startEvent(event: Event$1): void;
|
|
14910
|
+
_startPending(): void;
|
|
14911
|
+
_stopEvent(event: Event$1): void;
|
|
14912
|
+
static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
|
|
14913
|
+
[key: string]: boolean;
|
|
14914
|
+
}): {
|
|
14915
|
+
[key: string]: string | AccessList;
|
|
14916
|
+
};
|
|
14917
|
+
}
|
|
14918
|
+
|
|
14919
|
+
declare type ExternalProvider = {
|
|
14920
|
+
isMetaMask?: boolean;
|
|
14921
|
+
isStatus?: boolean;
|
|
14922
|
+
host?: string;
|
|
14923
|
+
path?: string;
|
|
14924
|
+
sendAsync?: (request: {
|
|
14925
|
+
method: string;
|
|
14926
|
+
params?: Array<any>;
|
|
14927
|
+
}, callback: (error: any, response: any) => void) => void;
|
|
14928
|
+
send?: (request: {
|
|
14929
|
+
method: string;
|
|
14930
|
+
params?: Array<any>;
|
|
14931
|
+
}, callback: (error: any, response: any) => void) => void;
|
|
14932
|
+
request?: (request: {
|
|
14933
|
+
method: string;
|
|
14934
|
+
params?: Array<any>;
|
|
14935
|
+
}) => Promise<any>;
|
|
14936
|
+
};
|
|
14937
|
+
declare type JsonRpcFetchFunc = (method: string, params?: Array<any>) => Promise<any>;
|
|
14938
|
+
declare class Web3Provider extends JsonRpcProvider {
|
|
14939
|
+
readonly provider: ExternalProvider;
|
|
14940
|
+
readonly jsonRpcFetchFunc: JsonRpcFetchFunc;
|
|
14941
|
+
constructor(provider: ExternalProvider | JsonRpcFetchFunc, network?: Networkish);
|
|
14942
|
+
send(method: string, params: Array<any>): Promise<any>;
|
|
14943
|
+
}
|
|
14944
|
+
|
|
14945
|
+
declare enum Environment {
|
|
14946
|
+
PRODUCTION = "production",
|
|
14947
|
+
SANDBOX = "sandbox"
|
|
14948
|
+
}
|
|
14949
|
+
|
|
14950
|
+
/**
|
|
14951
|
+
* Interface representing token information.
|
|
14952
|
+
* @property {string} name - The token name.
|
|
14953
|
+
* @property {string} symbol - The token symbol.
|
|
14954
|
+
* @property {number} decimals - The token decimals.
|
|
14955
|
+
* @property {string} [address] - The token contract address.
|
|
14956
|
+
* @property {string} [icon] - The token icon URL/data:image.
|
|
14957
|
+
*/
|
|
14958
|
+
interface TokenInfo {
|
|
14959
|
+
name: string;
|
|
14960
|
+
symbol: string;
|
|
14961
|
+
decimals: number;
|
|
14962
|
+
address?: string;
|
|
14963
|
+
icon?: string;
|
|
14964
|
+
}
|
|
14965
|
+
/**
|
|
14966
|
+
* Interface representing the information of a network.
|
|
14967
|
+
* @property {string} name - The name of the network.
|
|
14968
|
+
* @property {number} chainId - The ID of the network.
|
|
14969
|
+
* @property {TokenInfo} nativeCurrency - The info of the network's native currency.
|
|
14970
|
+
* @property {boolean} isSupported - Flag indicating if the network is supported by the application.
|
|
14971
|
+
*/
|
|
14972
|
+
interface NetworkInfo {
|
|
14973
|
+
name: string;
|
|
14974
|
+
chainId: number;
|
|
14975
|
+
nativeCurrency: TokenInfo;
|
|
14976
|
+
isSupported: boolean;
|
|
14977
|
+
}
|
|
14978
|
+
/**
|
|
14979
|
+
* Enum representing the list of default supported providers.
|
|
14980
|
+
*/
|
|
14981
|
+
declare enum ConnectionProviders {
|
|
14982
|
+
METAMASK = "metamask"
|
|
14892
14983
|
}
|
|
14893
14984
|
|
|
14894
14985
|
/**
|
|
@@ -14942,7 +15033,8 @@ declare enum WalletEventType {
|
|
|
14942
15033
|
ADD_COINS = "add-coins",
|
|
14943
15034
|
REQUEST_SWAP = "request-swap",
|
|
14944
15035
|
REQUEST_BRIDGE = "request-bridge",
|
|
14945
|
-
REQUEST_ONRAMP = "request-onramp"
|
|
15036
|
+
REQUEST_ONRAMP = "request-onramp",
|
|
15037
|
+
DISCONNECT_WALLET = "disconnect-wallet"
|
|
14946
15038
|
}
|
|
14947
15039
|
/**
|
|
14948
15040
|
* Type representing the data emitted by the network switch event.
|
|
@@ -14972,6 +15064,7 @@ type WalletRequestOnrampEvent = {
|
|
|
14972
15064
|
tokenAddress: string;
|
|
14973
15065
|
amount: string;
|
|
14974
15066
|
};
|
|
15067
|
+
type WalletDisconnectWalletEvent = {};
|
|
14975
15068
|
/**
|
|
14976
15069
|
* Represents an event object emitted by the Wallet Widget.
|
|
14977
15070
|
* @property {WalletEventType} type - The type of the event.
|
|
@@ -14995,7 +15088,8 @@ type SwapEvent<T> = {
|
|
|
14995
15088
|
*/
|
|
14996
15089
|
declare enum SwapEventType {
|
|
14997
15090
|
SUCCESS = "success",
|
|
14998
|
-
FAILURE = "failure"
|
|
15091
|
+
FAILURE = "failure",
|
|
15092
|
+
CLOSE_WIDGET = "close-widget"
|
|
14999
15093
|
}
|
|
15000
15094
|
/**
|
|
15001
15095
|
* Type representing a Swap Widget with type SUCCESS.
|
|
@@ -15097,38 +15191,62 @@ type OnRampEvent<T> = {
|
|
|
15097
15191
|
};
|
|
15098
15192
|
declare enum OnRampEventType {
|
|
15099
15193
|
}
|
|
15194
|
+
declare global {
|
|
15195
|
+
interface Window {
|
|
15196
|
+
ImtblCheckoutWidgetConfig: any;
|
|
15197
|
+
}
|
|
15198
|
+
namespace JSX {
|
|
15199
|
+
interface IntrinsicElements {
|
|
15200
|
+
'imtbl-connect': ImtblConnectProps;
|
|
15201
|
+
'imtbl-wallet': ImtblWalletProps;
|
|
15202
|
+
'imtbl-swap': ImtblSwapProps;
|
|
15203
|
+
'imtbl-bridge': ImtblBridgeProps;
|
|
15204
|
+
'imtbl-buy': ImtblBuyProps;
|
|
15205
|
+
'imtbl-example': ImtblExampleProps;
|
|
15206
|
+
'imtbl-transition-example': ImtblTransitionExampleProps;
|
|
15207
|
+
'imtbl-inner-widget-example': ImtblInnerWidgetExampleProps;
|
|
15208
|
+
'imtbl-outer-widget-example': ImtblOuterWidgetExampleProps;
|
|
15209
|
+
}
|
|
15210
|
+
}
|
|
15211
|
+
interface ImmutableWebComponent {
|
|
15212
|
+
setProvider: Function;
|
|
15213
|
+
setAttribute: Function;
|
|
15214
|
+
}
|
|
15215
|
+
}
|
|
15100
15216
|
/**
|
|
15101
15217
|
* Props for the Connect Widget component
|
|
15102
15218
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15103
15219
|
* @property {string} theme - The theme to use.
|
|
15220
|
+
* @property {string} environment - The environment configuration
|
|
15104
15221
|
*/
|
|
15105
15222
|
interface ImtblConnectProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15106
15223
|
providerPreference: string;
|
|
15107
|
-
|
|
15224
|
+
widgetConfig?: string;
|
|
15108
15225
|
}
|
|
15109
15226
|
/**
|
|
15110
15227
|
* Props for the Wallet Widget component
|
|
15111
15228
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15112
15229
|
* @property {string} theme - The theme to use.
|
|
15230
|
+
* @property {string} environment - The environment configuration
|
|
15113
15231
|
*/
|
|
15114
15232
|
interface ImtblWalletProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15115
15233
|
providerPreference: string;
|
|
15116
|
-
|
|
15117
|
-
|
|
15118
|
-
isBridgeEnabled?: string;
|
|
15119
|
-
theme: string;
|
|
15234
|
+
useConnectWidget?: string;
|
|
15235
|
+
widgetConfig?: string;
|
|
15120
15236
|
}
|
|
15121
15237
|
/**
|
|
15122
15238
|
* Props for the Swap Widget component
|
|
15123
15239
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15124
15240
|
* @property {string} theme - The theme to use.
|
|
15241
|
+
* @property {string} environment - The environment configuration
|
|
15125
15242
|
* @property {string} amount - The amount to swap.
|
|
15126
15243
|
* @property {string} fromContractAddress - The contract address of the source token.
|
|
15127
15244
|
* @property {string} toContractAddress - The contract address of the destination token.
|
|
15128
15245
|
*/
|
|
15129
15246
|
interface ImtblSwapProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15130
15247
|
providerPreference: string;
|
|
15131
|
-
|
|
15248
|
+
widgetConfig?: string;
|
|
15249
|
+
useConnectWidget?: string;
|
|
15132
15250
|
amount: string;
|
|
15133
15251
|
fromContractAddress: string;
|
|
15134
15252
|
toContractAddress: string;
|
|
@@ -15137,13 +15255,14 @@ interface ImtblSwapProps extends React.DetailedHTMLProps<React.HTMLAttributes<HT
|
|
|
15137
15255
|
* Props for the Bridge Widget component
|
|
15138
15256
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15139
15257
|
* @property {string} theme - The theme to use.
|
|
15258
|
+
* @property {string} environment - The environment configuration
|
|
15140
15259
|
* @property {string} fromContractAddress - The contract address of the source token.
|
|
15141
15260
|
* @property {string} fromNetwork - The network of the source token.
|
|
15142
15261
|
* @property {string} amount - The amount to bridge.
|
|
15143
15262
|
*/
|
|
15144
15263
|
interface ImtblBridgeProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15145
15264
|
providerPreference: string;
|
|
15146
|
-
|
|
15265
|
+
widgetConfig?: string;
|
|
15147
15266
|
fromContractAddress: string;
|
|
15148
15267
|
fromNetwork: string;
|
|
15149
15268
|
amount: string;
|
|
@@ -15152,57 +15271,69 @@ interface ImtblBridgeProps extends React.DetailedHTMLProps<React.HTMLAttributes<
|
|
|
15152
15271
|
* Props for the Example Widget component
|
|
15153
15272
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15154
15273
|
* @property {string} theme - The theme to use.
|
|
15274
|
+
* @property {string} environment - The environment configuration
|
|
15155
15275
|
* @experimental
|
|
15156
15276
|
*/
|
|
15157
15277
|
interface ImtblExampleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15158
15278
|
providerPreference: string;
|
|
15159
15279
|
theme: string;
|
|
15280
|
+
environment: string;
|
|
15160
15281
|
}
|
|
15161
15282
|
/**
|
|
15162
15283
|
* Props for the Buy Widget component
|
|
15163
15284
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15164
15285
|
* @property {string} theme - The theme to use.
|
|
15286
|
+
* @property {string} environment - The environment configuration
|
|
15165
15287
|
* @property {string} orderId - The id of the order to buy.
|
|
15166
15288
|
*/
|
|
15167
15289
|
interface ImtblBuyProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15168
15290
|
providerPreference: string;
|
|
15169
|
-
|
|
15291
|
+
widgetConfig?: string;
|
|
15170
15292
|
orderId: string;
|
|
15171
15293
|
}
|
|
15172
15294
|
/**
|
|
15173
15295
|
* Props for the TransitionExample Widget component
|
|
15174
15296
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15175
15297
|
* @property {string} theme - The theme to use.
|
|
15298
|
+
* @property {string} environment - The environment configuration
|
|
15176
15299
|
*/
|
|
15177
15300
|
interface ImtblTransitionExampleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15178
15301
|
providerPreference: string;
|
|
15179
15302
|
theme: string;
|
|
15303
|
+
environment: string;
|
|
15180
15304
|
}
|
|
15181
15305
|
/**
|
|
15182
15306
|
* Props for the InnerWidgetExample Widget component
|
|
15183
15307
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15184
15308
|
* @property {string} theme - The theme to use.
|
|
15309
|
+
* @property {string} environment - The environment configuration
|
|
15185
15310
|
*/
|
|
15186
15311
|
interface ImtblInnerWidgetExampleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15187
15312
|
providerPreference: string;
|
|
15188
15313
|
theme: string;
|
|
15314
|
+
environment: string;
|
|
15189
15315
|
}
|
|
15190
15316
|
/**
|
|
15191
15317
|
* Props for the OuterWidgetExample Widget component
|
|
15192
15318
|
* @property {string} providerPreference - The preferred wallet provider to connect to.
|
|
15193
15319
|
* @property {string} theme - The theme to use.
|
|
15320
|
+
* @property {string} environment - The environment configuration
|
|
15194
15321
|
*/
|
|
15195
15322
|
interface ImtblOuterWidgetExampleProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
|
|
15196
15323
|
providerPreference: string;
|
|
15197
15324
|
theme: string;
|
|
15325
|
+
environment: string;
|
|
15198
15326
|
}
|
|
15199
15327
|
/**
|
|
15200
15328
|
* Enum representing the networks supported by Checkout.
|
|
15201
15329
|
*/
|
|
15202
15330
|
declare enum Network {
|
|
15203
15331
|
ETHEREUM = "Ethereum",
|
|
15204
|
-
|
|
15205
|
-
|
|
15332
|
+
SEPOLIA = "Sepolia",
|
|
15333
|
+
IMTBL_ZKEVM_TESTNET = "Immutable zkEVM Testnet",
|
|
15334
|
+
IMTBL_ZKEVM_DEVNET = "Immutable zkEVM Devnet",
|
|
15335
|
+
POLYGON_ZKEVM_TESTNET = "Polygon zkEVM Testnet",
|
|
15336
|
+
POLYGON_ZKEVM = "Polygon zkEVM"
|
|
15206
15337
|
}
|
|
15207
15338
|
/**
|
|
15208
15339
|
* Enum representing the themes for the Checkout widgets.
|
|
@@ -15212,12 +15343,6 @@ declare enum WidgetTheme {
|
|
|
15212
15343
|
DARK = "dark",
|
|
15213
15344
|
CUSTOM = "custom"
|
|
15214
15345
|
}
|
|
15215
|
-
/**
|
|
15216
|
-
* Enum representing the default Web3 providers supported by the Checkout widgets.
|
|
15217
|
-
*/
|
|
15218
|
-
declare enum WidgetConnectionProviders {
|
|
15219
|
-
METAMASK = "metamask"
|
|
15220
|
-
}
|
|
15221
15346
|
/**
|
|
15222
15347
|
* Enum representing list of Checkout Widgets DOM tags.
|
|
15223
15348
|
*/
|
|
@@ -15231,20 +15356,29 @@ declare enum CheckoutWidgetTagNames {
|
|
|
15231
15356
|
}
|
|
15232
15357
|
/**
|
|
15233
15358
|
* Represents the configuration options for the Checkout Widgets.
|
|
15234
|
-
* @property {WidgetTheme} theme - The theme of the Checkout Widget
|
|
15359
|
+
* @property {WidgetTheme} theme - The theme of the Checkout Widget (default: "DARK")
|
|
15360
|
+
* @property {Environment} environment - The environment configuration (default: "SANDBOX")
|
|
15361
|
+
* @property {boolean} isOnRampEnabled - Enable on-ramp top-up method (default: "true")
|
|
15362
|
+
* @property {boolean} isSwapEnabled - Enable swap top-up method (default: "true")
|
|
15363
|
+
* @property {boolean} isBridgeEnabled - Enable bridge top-up method (default: "true")
|
|
15235
15364
|
*/
|
|
15236
15365
|
type CheckoutWidgetsConfig = {
|
|
15237
15366
|
theme?: WidgetTheme;
|
|
15367
|
+
environment?: Environment;
|
|
15368
|
+
isOnRampEnabled?: boolean;
|
|
15369
|
+
isSwapEnabled?: boolean;
|
|
15370
|
+
isBridgeEnabled?: boolean;
|
|
15238
15371
|
};
|
|
15239
15372
|
/**
|
|
15240
15373
|
* Interface representing the props for the Bridge Widget component.
|
|
15241
|
-
* @property {
|
|
15374
|
+
* @property {string} providerPreference - The preferred provider for the Bridge Widget
|
|
15375
|
+
* (default: "metamask").
|
|
15242
15376
|
* @property {string} fromContractAddress - The contract address to send tokens from.
|
|
15243
15377
|
* @property {string} amount - The amount of tokens to send.
|
|
15244
15378
|
* @property {Network} fromNetwork - The network to send tokens from.
|
|
15245
15379
|
*/
|
|
15246
15380
|
interface BridgeReactProps {
|
|
15247
|
-
providerPreference:
|
|
15381
|
+
providerPreference: string;
|
|
15248
15382
|
fromContractAddress?: string;
|
|
15249
15383
|
amount?: string;
|
|
15250
15384
|
fromNetwork?: Network;
|
|
@@ -15257,11 +15391,12 @@ interface BridgeReactProps {
|
|
|
15257
15391
|
declare function BridgeReact(props: BridgeReactProps): JSX.Element;
|
|
15258
15392
|
/**
|
|
15259
15393
|
* Interface representing the props for the Buy Widget component.
|
|
15260
|
-
* @property {
|
|
15394
|
+
* @property {string} providerPreference - The preferred provider for the Buy Widget
|
|
15395
|
+
* (default: "metamask").
|
|
15261
15396
|
* @property {string} orderId - The ID that identifies the open buy order associated to the assets to buy.
|
|
15262
15397
|
*/
|
|
15263
15398
|
interface BuyReactProps {
|
|
15264
|
-
providerPreference:
|
|
15399
|
+
providerPreference: string;
|
|
15265
15400
|
orderId: string;
|
|
15266
15401
|
}
|
|
15267
15402
|
/**
|
|
@@ -15272,10 +15407,11 @@ interface BuyReactProps {
|
|
|
15272
15407
|
declare function BuyReact(props: BuyReactProps): JSX.Element;
|
|
15273
15408
|
/**
|
|
15274
15409
|
* Interface representing the props for the Connect Widget component.
|
|
15275
|
-
* @property {
|
|
15410
|
+
* @property {string} providerPreference - The preferred provider for the Connect Widget
|
|
15411
|
+
* (default: "metamask").
|
|
15276
15412
|
*/
|
|
15277
15413
|
interface ConnectReactProps {
|
|
15278
|
-
providerPreference?:
|
|
15414
|
+
providerPreference?: string;
|
|
15279
15415
|
}
|
|
15280
15416
|
/**
|
|
15281
15417
|
* A React functional component that renders the Checkout Connect Widget.
|
|
@@ -15285,13 +15421,13 @@ interface ConnectReactProps {
|
|
|
15285
15421
|
declare function ConnectReact(props: ConnectReactProps): JSX.Element;
|
|
15286
15422
|
/**
|
|
15287
15423
|
* Interface representing the props for the Swap Widget component.
|
|
15288
|
-
* @property {
|
|
15424
|
+
* @property {string} providerPreference - The preferred provider for the Swap Widget (default: "metamask"}).
|
|
15289
15425
|
* @property {string} fromContractAddress - The contract address to swap tokens from.
|
|
15290
15426
|
* @property {string} amount - The amount of tokens to send.
|
|
15291
15427
|
* @property {Network} toContractAddress - The contract address to swap tokens to.
|
|
15292
15428
|
*/
|
|
15293
15429
|
interface SwapReactProps {
|
|
15294
|
-
providerPreference:
|
|
15430
|
+
providerPreference: string;
|
|
15295
15431
|
fromContractAddress?: string;
|
|
15296
15432
|
amount?: string;
|
|
15297
15433
|
toContractAddress?: string;
|
|
@@ -15304,35 +15440,31 @@ interface SwapReactProps {
|
|
|
15304
15440
|
declare function SwapReact(props: SwapReactProps): JSX.Element;
|
|
15305
15441
|
/**
|
|
15306
15442
|
* Interface representing the props for the Wallet Widget component.
|
|
15307
|
-
* @property {
|
|
15443
|
+
* @property {string} providerPreference - The preferred provider for the Wallet Widget
|
|
15444
|
+
* (default: "metamask").
|
|
15308
15445
|
*/
|
|
15309
15446
|
interface WalletReactProps {
|
|
15310
|
-
providerPreference?:
|
|
15311
|
-
|
|
15312
|
-
isSwapEnabled?: boolean;
|
|
15313
|
-
isBridgeEnabled?: boolean;
|
|
15447
|
+
providerPreference?: string;
|
|
15448
|
+
useConnectWidget?: boolean;
|
|
15314
15449
|
}
|
|
15315
15450
|
/**
|
|
15316
15451
|
* A React functional component that renders the Checkout Wallet Widget.
|
|
15317
15452
|
* @param {WalletReactProps} props - The props for the Wallet Widget component.
|
|
15318
15453
|
* @returns {JSX.Element} - The rendered Wallet Widget component.
|
|
15319
15454
|
*/
|
|
15320
|
-
declare function WalletReact(props: WalletReactProps): JSX.Element;
|
|
15455
|
+
declare function WalletReact(props: WalletReactProps): JSX$1.Element;
|
|
15321
15456
|
/**
|
|
15322
15457
|
* Interface representing the props for the Example Widget component.
|
|
15323
15458
|
* @experimental
|
|
15324
15459
|
*/
|
|
15325
|
-
interface ExampleReactProps {
|
|
15326
|
-
providerPreference:
|
|
15327
|
-
fromContractAddress?: string;
|
|
15328
|
-
amount?: string;
|
|
15329
|
-
fromNetwork?: Network;
|
|
15460
|
+
interface ExampleReactProps extends CheckoutWidgetsConfig {
|
|
15461
|
+
providerPreference: string;
|
|
15330
15462
|
}
|
|
15331
15463
|
/**
|
|
15332
15464
|
* A React functional component that renders the Checkout Example Widget.
|
|
15333
15465
|
* @experimental
|
|
15334
15466
|
*/
|
|
15335
|
-
declare function ExampleReact(props: ExampleReactProps): JSX.Element;
|
|
15467
|
+
declare function ExampleReact(props: ExampleReactProps): JSX$1.Element;
|
|
15336
15468
|
/**
|
|
15337
15469
|
* CheckoutWidgets allows to inject the Checkout Widgets into your application.
|
|
15338
15470
|
* @param {CheckoutWidgetsConfig|undefined} config - Checkout Widget global configurations.
|
|
@@ -15350,4 +15482,4 @@ declare function UpdateConfig(config: CheckoutWidgetsConfig): void;
|
|
|
15350
15482
|
*/
|
|
15351
15483
|
declare function SetProvider(tagName: CheckoutWidgetTagNames, provider: Web3Provider | null): void;
|
|
15352
15484
|
|
|
15353
|
-
export { BridgeEvent, BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, BuyClose, BuyEvent, BuyEventType, BuyFailed, BuyNotConnected, BuyReact, BuyReactProps, BuySuccess, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEvent, ConnectEventType, ConnectReact, ConnectReactProps, ConnectionFailed, ConnectionSuccess, ExampleReact, ExampleReactProps, IMTBLWidgetEvents, ImtblBridgeProps, ImtblBuyProps, ImtblConnectProps, ImtblExampleProps, ImtblInnerWidgetExampleProps, ImtblOuterWidgetExampleProps, ImtblSwapProps, ImtblTransitionExampleProps, ImtblWalletProps, Network, OnRampEvent, OnRampEventType, SetProvider, SwapEvent, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapSuccess, UpdateConfig, WalletAddCoinsEvent, WalletEvent, WalletEventType, WalletNetworkSwitchEvent, WalletReact, WalletReactProps, WalletRequestBridgeEvent, WalletRequestOnrampEvent, WalletRequestSwapEvent,
|
|
15485
|
+
export { BridgeEvent, BridgeEventType, BridgeFailed, BridgeReact, BridgeReactProps, BridgeSuccess, BuyClose, BuyEvent, BuyEventType, BuyFailed, BuyNotConnected, BuyReact, BuyReactProps, BuySuccess, CheckoutWidgetTagNames, CheckoutWidgets, CheckoutWidgetsConfig, ConnectEvent, ConnectEventType, ConnectReact, ConnectReactProps, ConnectionFailed, ConnectionSuccess, ExampleReact, ExampleReactProps, IMTBLWidgetEvents, ImtblBridgeProps, ImtblBuyProps, ImtblConnectProps, ImtblExampleProps, ImtblInnerWidgetExampleProps, ImtblOuterWidgetExampleProps, ImtblSwapProps, ImtblTransitionExampleProps, ImtblWalletProps, Network, OnRampEvent, OnRampEventType, SetProvider, SwapEvent, SwapEventType, SwapFailed, SwapReact, SwapReactProps, SwapSuccess, UpdateConfig, WalletAddCoinsEvent, WalletDisconnectWalletEvent, WalletEvent, WalletEventType, WalletNetworkSwitchEvent, WalletReact, WalletReactProps, WalletRequestBridgeEvent, WalletRequestOnrampEvent, WalletRequestSwapEvent, WidgetTheme };
|