@imtbl/sdk 1.43.3 → 1.43.4

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.
Files changed (53) hide show
  1. package/dist/Passport.d-011d5035.d.ts +224 -0
  2. package/dist/blockchain-data.d-1634b683.d.ts +3406 -0
  3. package/dist/blockchain_data-d989298c.js +1 -0
  4. package/dist/blockchain_data.d-d538f8d4.d.ts +4543 -0
  5. package/dist/blockchain_data.d.ts +3 -7950
  6. package/dist/blockchain_data.js +1 -6058
  7. package/dist/browser/checkout/sdk.js +4 -4
  8. package/dist/checkout-68675dd1.js +16 -0
  9. package/dist/checkout.d-ae9ca847.d.ts +3392 -0
  10. package/dist/checkout.d.ts +7 -16882
  11. package/dist/checkout.js +1 -37189
  12. package/dist/config-53a9a4ca.js +1 -0
  13. package/dist/config.d-65420620.d.ts +18 -0
  14. package/dist/config.d.ts +1 -30
  15. package/dist/config.js +1 -394
  16. package/dist/event-types.d-42520276.d.ts +332 -0
  17. package/dist/imxProvider.d-cac9e315.d.ts +12538 -0
  18. package/dist/index-14aad537.js +1 -0
  19. package/dist/index-3951cdf0.js +1 -0
  20. package/dist/index-3f40d7f6.js +1 -0
  21. package/dist/index-58a79c29.js +1 -0
  22. package/dist/index-96599707.js +1 -0
  23. package/dist/index-e7002486.js +1 -0
  24. package/dist/index.browser.js +4 -4
  25. package/dist/index.cjs +7 -7
  26. package/dist/index.d-c4a4c17d.d.ts +277 -0
  27. package/dist/index.d-f0845744.d.ts +30 -0
  28. package/dist/index.d-f1471830.d.ts +376 -0
  29. package/dist/index.d.ts +18 -32627
  30. package/dist/index.js +1 -64124
  31. package/dist/json-rpc-provider.d-5c038bd9.d.ts +249 -0
  32. package/dist/minting_backend-04aef147.js +1 -0
  33. package/dist/minting_backend.d-4754ffee.d.ts +104 -0
  34. package/dist/minting_backend.d.ts +5 -3535
  35. package/dist/minting_backend.js +1 -6756
  36. package/dist/orderbook-e71036df.js +1 -0
  37. package/dist/orderbook.d-77162c6c.d.ts +1257 -0
  38. package/dist/orderbook.d.ts +5 -1713
  39. package/dist/orderbook.js +1 -2479
  40. package/dist/passport-0f45e532.js +1 -0
  41. package/dist/passport.d-d3f44798.d.ts +67 -0
  42. package/dist/passport.d.ts +6 -13703
  43. package/dist/passport.js +1 -23137
  44. package/dist/transfer.d-87728423.d.ts +898 -0
  45. package/dist/webhook-a16541bb.js +1 -0
  46. package/dist/webhook.d-4c3cb340.d.ts +75 -0
  47. package/dist/webhook.d.ts +4 -1265
  48. package/dist/webhook.js +1 -488
  49. package/dist/x-a5b39578.js +1 -0
  50. package/dist/x.d-1b51f0c3.d.ts +4879 -0
  51. package/dist/x.d.ts +6 -18663
  52. package/dist/x.js +1 -19242
  53. package/package.json +1 -1
@@ -1,1713 +1,5 @@
1
- /// <reference types="node" />
2
- declare enum Environment {
3
- PRODUCTION = "production",
4
- SANDBOX = "sandbox"
5
- }
6
- declare class ImmutableConfiguration {
7
- readonly environment: Environment;
8
- readonly rateLimitingKey?: string;
9
- readonly apiKey?: string;
10
- readonly publishableKey?: string;
11
- constructor(options: {
12
- environment: Environment;
13
- rateLimitingKey?: string;
14
- apiKey?: string;
15
- publishableKey?: string;
16
- });
17
- }
18
- interface ModuleConfiguration<T> {
19
- baseConfig: ImmutableConfiguration;
20
- overrides?: T;
21
- }
22
-
23
- declare type Bytes = ArrayLike<number>;
24
- declare type BytesLike = Bytes | string;
25
- interface Hexable {
26
- toHexString(): string;
27
- }
28
-
29
- declare type BigNumberish$1 = BigNumber | Bytes | bigint | string | number;
30
- declare class BigNumber implements Hexable {
31
- readonly _hex: string;
32
- readonly _isBigNumber: boolean;
33
- constructor(constructorGuard: any, hex: string);
34
- fromTwos(value: number): BigNumber;
35
- toTwos(value: number): BigNumber;
36
- abs(): BigNumber;
37
- add(other: BigNumberish$1): BigNumber;
38
- sub(other: BigNumberish$1): BigNumber;
39
- div(other: BigNumberish$1): BigNumber;
40
- mul(other: BigNumberish$1): BigNumber;
41
- mod(other: BigNumberish$1): BigNumber;
42
- pow(other: BigNumberish$1): BigNumber;
43
- and(other: BigNumberish$1): BigNumber;
44
- or(other: BigNumberish$1): BigNumber;
45
- xor(other: BigNumberish$1): BigNumber;
46
- mask(value: number): BigNumber;
47
- shl(value: number): BigNumber;
48
- shr(value: number): BigNumber;
49
- eq(other: BigNumberish$1): boolean;
50
- lt(other: BigNumberish$1): boolean;
51
- lte(other: BigNumberish$1): boolean;
52
- gt(other: BigNumberish$1): boolean;
53
- gte(other: BigNumberish$1): boolean;
54
- isNegative(): boolean;
55
- isZero(): boolean;
56
- toNumber(): number;
57
- toBigInt(): bigint;
58
- toString(): string;
59
- toHexString(): string;
60
- toJSON(key?: string): any;
61
- static from(value: any): BigNumber;
62
- static isBigNumber(value: any): value is BigNumber;
63
- }
64
-
65
- declare type Deferrable<T> = {
66
- [K in keyof T]: T[K] | Promise<T[K]>;
67
- };
68
- declare class Description<T = any> {
69
- constructor(info: {
70
- [K in keyof T]: T[K];
71
- });
72
- }
73
-
74
- declare type Network = {
75
- name: string;
76
- chainId: number;
77
- ensAddress?: string;
78
- _defaultProvider?: (providers: any, options?: any) => any;
79
- };
80
- declare type Networkish = Network | string | number;
81
-
82
- declare type AccessList = Array<{
83
- address: string;
84
- storageKeys: Array<string>;
85
- }>;
86
- declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
87
- interface Transaction {
88
- hash?: string;
89
- to?: string;
90
- from?: string;
91
- nonce: number;
92
- gasLimit: BigNumber;
93
- gasPrice?: BigNumber;
94
- data: string;
95
- value: BigNumber;
96
- chainId: number;
97
- r?: string;
98
- s?: string;
99
- v?: number;
100
- type?: number | null;
101
- accessList?: AccessList;
102
- maxPriorityFeePerGas?: BigNumber;
103
- maxFeePerGas?: BigNumber;
104
- }
105
-
106
- declare type ConnectionInfo = {
107
- url: string;
108
- headers?: {
109
- [key: string]: string | number;
110
- };
111
- user?: string;
112
- password?: string;
113
- allowInsecureAuthentication?: boolean;
114
- allowGzip?: boolean;
115
- throttleLimit?: number;
116
- throttleSlotInterval?: number;
117
- throttleCallback?: (attempt: number, url: string) => Promise<boolean>;
118
- skipFetchSetup?: boolean;
119
- fetchOptions?: Record<string, string>;
120
- errorPassThrough?: boolean;
121
- timeout?: number;
122
- };
123
- interface OnceBlockable {
124
- once(eventName: "block", handler: () => void): void;
125
- }
126
-
127
- declare type TransactionRequest = {
128
- to?: string;
129
- from?: string;
130
- nonce?: BigNumberish$1;
131
- gasLimit?: BigNumberish$1;
132
- gasPrice?: BigNumberish$1;
133
- data?: BytesLike;
134
- value?: BigNumberish$1;
135
- chainId?: number;
136
- type?: number;
137
- accessList?: AccessListish;
138
- maxPriorityFeePerGas?: BigNumberish$1;
139
- maxFeePerGas?: BigNumberish$1;
140
- customData?: Record<string, any>;
141
- ccipReadEnabled?: boolean;
142
- };
143
- interface TransactionResponse extends Transaction {
144
- hash: string;
145
- blockNumber?: number;
146
- blockHash?: string;
147
- timestamp?: number;
148
- confirmations: number;
149
- from: string;
150
- raw?: string;
151
- wait: (confirmations?: number) => Promise<TransactionReceipt>;
152
- }
153
- declare type BlockTag = string | number;
154
- interface _Block {
155
- hash: string;
156
- parentHash: string;
157
- number: number;
158
- timestamp: number;
159
- nonce: string;
160
- difficulty: number;
161
- _difficulty: BigNumber;
162
- gasLimit: BigNumber;
163
- gasUsed: BigNumber;
164
- miner: string;
165
- extraData: string;
166
- baseFeePerGas?: null | BigNumber;
167
- }
168
- interface Block extends _Block {
169
- transactions: Array<string>;
170
- }
171
- interface BlockWithTransactions extends _Block {
172
- transactions: Array<TransactionResponse>;
173
- }
174
- interface Log {
175
- blockNumber: number;
176
- blockHash: string;
177
- transactionIndex: number;
178
- removed: boolean;
179
- address: string;
180
- data: string;
181
- topics: Array<string>;
182
- transactionHash: string;
183
- logIndex: number;
184
- }
185
- interface TransactionReceipt {
186
- to: string;
187
- from: string;
188
- contractAddress: string;
189
- transactionIndex: number;
190
- root?: string;
191
- gasUsed: BigNumber;
192
- logsBloom: string;
193
- blockHash: string;
194
- transactionHash: string;
195
- logs: Array<Log>;
196
- blockNumber: number;
197
- confirmations: number;
198
- cumulativeGasUsed: BigNumber;
199
- effectiveGasPrice: BigNumber;
200
- byzantium: boolean;
201
- type: number;
202
- status?: number;
203
- }
204
- interface FeeData {
205
- lastBaseFeePerGas: null | BigNumber;
206
- maxFeePerGas: null | BigNumber;
207
- maxPriorityFeePerGas: null | BigNumber;
208
- gasPrice: null | BigNumber;
209
- }
210
- interface EventFilter {
211
- address?: string;
212
- topics?: Array<string | Array<string> | null>;
213
- }
214
- interface Filter extends EventFilter {
215
- fromBlock?: BlockTag;
216
- toBlock?: BlockTag;
217
- }
218
- interface FilterByBlockHash extends EventFilter {
219
- blockHash?: string;
220
- }
221
- declare abstract class ForkEvent extends Description {
222
- readonly expiry: number;
223
- readonly _isForkEvent?: boolean;
224
- static isForkEvent(value: any): value is ForkEvent;
225
- }
226
- declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
227
- declare type Listener = (...args: Array<any>) => void;
228
- declare abstract class Provider implements OnceBlockable {
229
- abstract getNetwork(): Promise<Network>;
230
- abstract getBlockNumber(): Promise<number>;
231
- abstract getGasPrice(): Promise<BigNumber>;
232
- getFeeData(): Promise<FeeData>;
233
- abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
234
- abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
235
- abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
236
- abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish$1 | Promise<BigNumberish$1>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
237
- abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
238
- abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
239
- abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
240
- abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
241
- abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
242
- abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
243
- abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
244
- abstract getLogs(filter: Filter): Promise<Array<Log>>;
245
- abstract resolveName(name: string | Promise<string>): Promise<null | string>;
246
- abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
247
- abstract on(eventName: EventType, listener: Listener): Provider;
248
- abstract once(eventName: EventType, listener: Listener): Provider;
249
- abstract emit(eventName: EventType, ...args: Array<any>): boolean;
250
- abstract listenerCount(eventName?: EventType): number;
251
- abstract listeners(eventName?: EventType): Array<Listener>;
252
- abstract off(eventName: EventType, listener?: Listener): Provider;
253
- abstract removeAllListeners(eventName?: EventType): Provider;
254
- addListener(eventName: EventType, listener: Listener): Provider;
255
- removeListener(eventName: EventType, listener: Listener): Provider;
256
- abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
257
- readonly _isProvider: boolean;
258
- constructor();
259
- static isProvider(value: any): value is Provider;
260
- }
261
-
262
- interface TypedDataDomain {
263
- name?: string;
264
- version?: string;
265
- chainId?: BigNumberish$1;
266
- verifyingContract?: string;
267
- salt?: BytesLike;
268
- }
269
- interface TypedDataField {
270
- name: string;
271
- type: string;
272
- }
273
- interface TypedDataSigner {
274
- _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
275
- }
276
- declare abstract class Signer {
277
- readonly provider?: Provider;
278
- abstract getAddress(): Promise<string>;
279
- abstract signMessage(message: Bytes | string): Promise<string>;
280
- abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
281
- abstract connect(provider: Provider): Signer;
282
- readonly _isSigner: boolean;
283
- constructor();
284
- getBalance(blockTag?: BlockTag): Promise<BigNumber>;
285
- getTransactionCount(blockTag?: BlockTag): Promise<number>;
286
- estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
287
- call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
288
- sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
289
- getChainId(): Promise<number>;
290
- getGasPrice(): Promise<BigNumber>;
291
- getFeeData(): Promise<FeeData>;
292
- resolveName(name: string): Promise<string>;
293
- checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
294
- populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
295
- _checkProvider(operation?: string): void;
296
- static isSigner(value: any): value is Signer;
297
- }
298
-
299
- interface PopulatedTransaction {
300
- to?: string;
301
- from?: string;
302
- nonce?: number;
303
- gasLimit?: BigNumber;
304
- gasPrice?: BigNumber;
305
- data?: string;
306
- value?: BigNumber;
307
- chainId?: number;
308
- type?: number;
309
- accessList?: AccessList;
310
- maxFeePerGas?: BigNumber;
311
- maxPriorityFeePerGas?: BigNumber;
312
- customData?: Record<string, any>;
313
- ccipReadEnabled?: boolean;
314
- }
315
-
316
- declare type FormatFunc = (value: any) => any;
317
- declare type FormatFuncs = {
318
- [key: string]: FormatFunc;
319
- };
320
- declare type Formats = {
321
- transaction: FormatFuncs;
322
- transactionRequest: FormatFuncs;
323
- receipt: FormatFuncs;
324
- receiptLog: FormatFuncs;
325
- block: FormatFuncs;
326
- blockWithTransactions: FormatFuncs;
327
- filter: FormatFuncs;
328
- filterLog: FormatFuncs;
329
- };
330
- declare class Formatter {
331
- readonly formats: Formats;
332
- constructor();
333
- getDefaultFormats(): Formats;
334
- accessList(accessList: Array<any>): AccessList;
335
- number(number: any): number;
336
- type(number: any): number;
337
- bigNumber(value: any): BigNumber;
338
- boolean(value: any): boolean;
339
- hex(value: any, strict?: boolean): string;
340
- data(value: any, strict?: boolean): string;
341
- address(value: any): string;
342
- callAddress(value: any): string;
343
- contractAddress(value: any): string;
344
- blockTag(blockTag: any): string;
345
- hash(value: any, strict?: boolean): string;
346
- difficulty(value: any): number;
347
- uint256(value: any): string;
348
- _block(value: any, format: any): Block;
349
- block(value: any): Block;
350
- blockWithTransactions(value: any): Block;
351
- transactionRequest(value: any): any;
352
- transactionResponse(transaction: any): TransactionResponse;
353
- transaction(value: any): any;
354
- receiptLog(value: any): any;
355
- receipt(value: any): TransactionReceipt;
356
- topics(value: any): any;
357
- filter(value: any): any;
358
- filterLog(value: any): any;
359
- static check(format: {
360
- [name: string]: FormatFunc;
361
- }, object: any): any;
362
- static allowNull(format: FormatFunc, nullValue?: any): FormatFunc;
363
- static allowFalsish(format: FormatFunc, replaceValue: any): FormatFunc;
364
- static arrayOf(format: FormatFunc): FormatFunc;
365
- }
366
-
367
- declare class Event {
368
- readonly listener: Listener;
369
- readonly once: boolean;
370
- readonly tag: string;
371
- _lastBlockNumber: number;
372
- _inflight: boolean;
373
- constructor(tag: string, listener: Listener, once: boolean);
374
- get event(): EventType;
375
- get type(): string;
376
- get hash(): string;
377
- get filter(): Filter;
378
- pollable(): boolean;
379
- }
380
- interface EnsResolver {
381
- readonly name: string;
382
- readonly address: string;
383
- getAddress(coinType?: 60): Promise<null | string>;
384
- getContentHash(): Promise<null | string>;
385
- getText(key: string): Promise<null | string>;
386
- }
387
- interface EnsProvider {
388
- resolveName(name: string): Promise<null | string>;
389
- lookupAddress(address: string): Promise<null | string>;
390
- getResolver(name: string): Promise<null | EnsResolver>;
391
- }
392
- interface Avatar {
393
- url: string;
394
- linkage: Array<{
395
- type: string;
396
- content: string;
397
- }>;
398
- }
399
- declare class Resolver$1 implements EnsResolver {
400
- readonly provider: BaseProvider;
401
- readonly name: string;
402
- readonly address: string;
403
- readonly _resolvedAddress: null | string;
404
- _supportsEip2544: null | Promise<boolean>;
405
- constructor(provider: BaseProvider, address: string, name: string, resolvedAddress?: string);
406
- supportsWildcard(): Promise<boolean>;
407
- _fetch(selector: string, parameters?: string): Promise<null | string>;
408
- _fetchBytes(selector: string, parameters?: string): Promise<null | string>;
409
- _getAddress(coinType: number, hexBytes: string): string;
410
- getAddress(coinType?: number): Promise<string>;
411
- getAvatar(): Promise<null | Avatar>;
412
- getContentHash(): Promise<string>;
413
- getText(key: string): Promise<string>;
414
- }
415
- declare class BaseProvider extends Provider implements EnsProvider {
416
- _networkPromise: Promise<Network>;
417
- _network: Network;
418
- _events: Array<Event>;
419
- formatter: Formatter;
420
- _emitted: {
421
- [eventName: string]: number | "pending";
422
- };
423
- _pollingInterval: number;
424
- _poller: NodeJS.Timer;
425
- _bootstrapPoll: NodeJS.Timer;
426
- _lastBlockNumber: number;
427
- _maxFilterBlockRange: number;
428
- _fastBlockNumber: number;
429
- _fastBlockNumberPromise: Promise<number>;
430
- _fastQueryDate: number;
431
- _maxInternalBlockNumber: number;
432
- _internalBlockNumber: Promise<{
433
- blockNumber: number;
434
- reqTime: number;
435
- respTime: number;
436
- }>;
437
- readonly anyNetwork: boolean;
438
- disableCcipRead: boolean;
439
- /**
440
- * ready
441
- *
442
- * A Promise<Network> that resolves only once the provider is ready.
443
- *
444
- * Sub-classes that call the super with a network without a chainId
445
- * MUST set this. Standard named networks have a known chainId.
446
- *
447
- */
448
- constructor(network: Networkish | Promise<Network>);
449
- _ready(): Promise<Network>;
450
- get ready(): Promise<Network>;
451
- static getFormatter(): Formatter;
452
- static getNetwork(network: Networkish): Network;
453
- ccipReadFetch(tx: Transaction, calldata: string, urls: Array<string>): Promise<null | string>;
454
- _getInternalBlockNumber(maxAge: number): Promise<number>;
455
- poll(): Promise<void>;
456
- resetEventsBlock(blockNumber: number): void;
457
- get network(): Network;
458
- detectNetwork(): Promise<Network>;
459
- getNetwork(): Promise<Network>;
460
- get blockNumber(): number;
461
- get polling(): boolean;
462
- set polling(value: boolean);
463
- get pollingInterval(): number;
464
- set pollingInterval(value: number);
465
- _getFastBlockNumber(): Promise<number>;
466
- _setFastBlockNumber(blockNumber: number): void;
467
- waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
468
- _waitForTransaction(transactionHash: string, confirmations: number, timeout: number, replaceable: {
469
- data: string;
470
- from: string;
471
- nonce: number;
472
- to: string;
473
- value: BigNumber;
474
- startBlock: number;
475
- }): Promise<TransactionReceipt>;
476
- getBlockNumber(): Promise<number>;
477
- getGasPrice(): Promise<BigNumber>;
478
- getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
479
- getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
480
- getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
481
- getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish$1 | Promise<BigNumberish$1>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
482
- _wrapTransaction(tx: Transaction, hash?: string, startBlock?: number): TransactionResponse;
483
- sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
484
- _getTransactionRequest(transaction: Deferrable<TransactionRequest>): Promise<Transaction>;
485
- _getFilter(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Filter | FilterByBlockHash>;
486
- _call(transaction: TransactionRequest, blockTag: BlockTag, attempt: number): Promise<string>;
487
- call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
488
- estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
489
- _getAddress(addressOrName: string | Promise<string>): Promise<string>;
490
- _getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>, includeTransactions?: boolean): Promise<Block | BlockWithTransactions>;
491
- getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
492
- getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
493
- getTransaction(transactionHash: string | Promise<string>): Promise<TransactionResponse>;
494
- getTransactionReceipt(transactionHash: string | Promise<string>): Promise<TransactionReceipt>;
495
- getLogs(filter: Filter | FilterByBlockHash | Promise<Filter | FilterByBlockHash>): Promise<Array<Log>>;
496
- getEtherPrice(): Promise<number>;
497
- _getBlockTag(blockTag: BlockTag | Promise<BlockTag>): Promise<BlockTag>;
498
- getResolver(name: string): Promise<null | Resolver$1>;
499
- _getResolver(name: string, operation?: string): Promise<string>;
500
- resolveName(name: string | Promise<string>): Promise<null | string>;
501
- lookupAddress(address: string | Promise<string>): Promise<null | string>;
502
- getAvatar(nameOrAddress: string): Promise<null | string>;
503
- perform(method: string, params: any): Promise<any>;
504
- _startEvent(event: Event): void;
505
- _stopEvent(event: Event): void;
506
- _addEventListener(eventName: EventType, listener: Listener, once: boolean): this;
507
- on(eventName: EventType, listener: Listener): this;
508
- once(eventName: EventType, listener: Listener): this;
509
- emit(eventName: EventType, ...args: Array<any>): boolean;
510
- listenerCount(eventName?: EventType): number;
511
- listeners(eventName?: EventType): Array<Listener>;
512
- off(eventName: EventType, listener?: Listener): this;
513
- removeAllListeners(eventName?: EventType): this;
514
- }
515
-
516
- declare class JsonRpcSigner extends Signer implements TypedDataSigner {
517
- readonly provider: JsonRpcProvider;
518
- _index: number;
519
- _address: string;
520
- constructor(constructorGuard: any, provider: JsonRpcProvider, addressOrIndex?: string | number);
521
- connect(provider: Provider): JsonRpcSigner;
522
- connectUnchecked(): JsonRpcSigner;
523
- getAddress(): Promise<string>;
524
- sendUncheckedTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
525
- signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
526
- sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
527
- signMessage(message: Bytes | string): Promise<string>;
528
- _legacySignMessage(message: Bytes | string): Promise<string>;
529
- _signTypedData(domain: TypedDataDomain, types: Record<string, Array<TypedDataField>>, value: Record<string, any>): Promise<string>;
530
- unlock(password: string): Promise<boolean>;
531
- }
532
- declare class UncheckedJsonRpcSigner extends JsonRpcSigner {
533
- sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
534
- }
535
- declare class JsonRpcProvider extends BaseProvider {
536
- readonly connection: ConnectionInfo;
537
- _pendingFilter: Promise<number>;
538
- _nextId: number;
539
- _eventLoopCache: Record<string, Promise<any>>;
540
- get _cache(): Record<string, Promise<any>>;
541
- constructor(url?: ConnectionInfo | string, network?: Networkish);
542
- static defaultUrl(): string;
543
- detectNetwork(): Promise<Network>;
544
- _uncachedDetectNetwork(): Promise<Network>;
545
- getSigner(addressOrIndex?: string | number): JsonRpcSigner;
546
- getUncheckedSigner(addressOrIndex?: string | number): UncheckedJsonRpcSigner;
547
- listAccounts(): Promise<Array<string>>;
548
- send(method: string, params: Array<any>): Promise<any>;
549
- prepareRequest(method: string, params: any): [string, Array<any>];
550
- perform(method: string, params: any): Promise<any>;
551
- _startEvent(event: Event): void;
552
- _startPending(): void;
553
- _stopEvent(event: Event): void;
554
- static hexlifyTransaction(transaction: TransactionRequest, allowExtra?: {
555
- [key: string]: boolean;
556
- }): {
557
- [key: string]: string | AccessList;
558
- };
559
- }
560
-
561
- interface OrderbookOverrides {
562
- jsonRpcProviderUrl?: string;
563
- seaportContractAddress?: string;
564
- zoneContractAddress?: string;
565
- chainName?: string;
566
- apiEndpoint?: string;
567
- }
568
- interface OrderbookModuleConfiguration {
569
- seaportContractAddress: string;
570
- zoneContractAddress: string;
571
- apiEndpoint: string;
572
- chainName: string;
573
- provider: JsonRpcProvider;
574
- }
575
-
576
- type ApiRequestOptions = {
577
- readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
578
- readonly url: string;
579
- readonly path?: Record<string, any>;
580
- readonly cookies?: Record<string, any>;
581
- readonly headers?: Record<string, any>;
582
- readonly query?: Record<string, any>;
583
- readonly formData?: Record<string, any>;
584
- readonly body?: any;
585
- readonly mediaType?: string;
586
- readonly responseHeader?: string;
587
- readonly errors?: Record<number, string>;
588
- };
589
-
590
- interface OnCancel {
591
- readonly isResolved: boolean;
592
- readonly isRejected: boolean;
593
- readonly isCancelled: boolean;
594
- (cancelHandler: () => void): void;
595
- }
596
- declare class CancelablePromise<T> implements Promise<T> {
597
- readonly [Symbol.toStringTag]: string;
598
- private _isResolved;
599
- private _isRejected;
600
- private _isCancelled;
601
- private readonly _cancelHandlers;
602
- private readonly _promise;
603
- private _resolve?;
604
- private _reject?;
605
- constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
606
- then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
607
- catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
608
- finally(onFinally?: (() => void) | null): Promise<T>;
609
- cancel(): void;
610
- get isCancelled(): boolean;
611
- }
612
-
613
- type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
614
- type Headers = Record<string, string>;
615
- type OpenAPIConfig = {
616
- BASE: string;
617
- VERSION: string;
618
- WITH_CREDENTIALS: boolean;
619
- CREDENTIALS: 'include' | 'omit' | 'same-origin';
620
- TOKEN?: string | Resolver<string>;
621
- USERNAME?: string | Resolver<string>;
622
- PASSWORD?: string | Resolver<string>;
623
- HEADERS?: Headers | Resolver<Headers>;
624
- ENCODE_PATH?: (path: string) => string;
625
- };
626
-
627
- declare abstract class BaseHttpRequest {
628
- readonly config: OpenAPIConfig;
629
- constructor(config: OpenAPIConfig);
630
- abstract request<T>(options: ApiRequestOptions): CancelablePromise<T>;
631
- }
632
-
633
- type CancelOrdersRequestBody = {
634
- /**
635
- * Address of the user initiating the cancel request
636
- */
637
- account_address: string;
638
- /**
639
- * List of order ids proposed for cancellation
640
- */
641
- orders: Array<string>;
642
- /**
643
- * Signature generated by the user for the specific cancellation request
644
- */
645
- signature: string;
646
- };
647
-
648
- type FailedOrderCancellation = {
649
- /**
650
- * ID of the order which failed to be cancelled
651
- */
652
- order: string;
653
- /**
654
- * Reason code indicating why the order failed to be cancelled
655
- */
656
- reason_code: FailedOrderCancellation.reason_code;
657
- };
658
- declare namespace FailedOrderCancellation {
659
- /**
660
- * Reason code indicating why the order failed to be cancelled
661
- */
662
- enum reason_code {
663
- FILLED = "FILLED"
664
- }
665
- }
666
-
667
- type CancelOrdersResultData = {
668
- /**
669
- * Orders which were successfully cancelled
670
- */
671
- successful_cancellations: Array<string>;
672
- /**
673
- * Orders which are marked for cancellation but the cancellation cannot be guaranteed
674
- */
675
- pending_cancellations: Array<string>;
676
- /**
677
- * Orders which failed to be cancelled
678
- */
679
- failed_cancellations: Array<FailedOrderCancellation>;
680
- };
681
-
682
- type CancelOrdersResult = {
683
- result: CancelOrdersResultData;
684
- };
685
-
686
- /**
687
- * The name of chain
688
- */
689
- type ChainName = string;
690
-
691
- type Fee$1 = {
692
- /**
693
- * Fee payable to recipient upon settlement
694
- */
695
- amount: string;
696
- /**
697
- * Fee type
698
- */
699
- type: Fee$1.type;
700
- /**
701
- * Wallet address of fee recipient
702
- */
703
- recipient_address: string;
704
- };
705
- declare namespace Fee$1 {
706
- /**
707
- * Fee type
708
- */
709
- enum type {
710
- ROYALTY = "ROYALTY",
711
- MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
712
- TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
713
- PROTOCOL = "PROTOCOL"
714
- }
715
- }
716
-
717
- type ERC1155Item$1 = {
718
- /**
719
- * Token type user is offering, which in this case is ERC1155
720
- */
721
- type: 'ERC1155';
722
- /**
723
- * Address of ERC1155 token
724
- */
725
- contract_address: string;
726
- /**
727
- * ID of ERC1155 token
728
- */
729
- token_id: string;
730
- /**
731
- * A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
732
- */
733
- amount: string;
734
- };
735
-
736
- type ERC20Item$1 = {
737
- /**
738
- * Token type user is offering, which in this case is ERC20
739
- */
740
- type: 'ERC20';
741
- /**
742
- * Address of ERC20 token
743
- */
744
- contract_address: string;
745
- /**
746
- * A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
747
- */
748
- amount: string;
749
- };
750
-
751
- type ERC721Item$1 = {
752
- /**
753
- * Token type user is offering, which in this case is ERC721
754
- */
755
- type: 'ERC721';
756
- /**
757
- * Address of ERC721 token
758
- */
759
- contract_address: string;
760
- /**
761
- * ID of ERC721 token
762
- */
763
- token_id: string;
764
- };
765
-
766
- type NativeItem$1 = {
767
- /**
768
- * Token type user is offering, which in this case is the native IMX token
769
- */
770
- type: 'NATIVE';
771
- /**
772
- * A string representing the price at which the user is willing to sell the token. This value is provided in the smallest unit of the token (e.g., wei for Ethereum).
773
- */
774
- amount: string;
775
- };
776
-
777
- type Item = (NativeItem$1 | ERC20Item$1 | ERC721Item$1 | ERC1155Item$1);
778
-
779
- type ProtocolData = {
780
- /**
781
- * Seaport order type. Orders containing ERC721 tokens will need to pass in the order type as FULL_RESTRICTED while orders with ERC1155 tokens will need to pass in the order_type as PARTIAL_RESTRICTED
782
- */
783
- order_type: ProtocolData.order_type;
784
- /**
785
- * big.Int or uint256 string for order counter
786
- */
787
- counter: string;
788
- /**
789
- * Immutable zone address
790
- */
791
- zone_address: string;
792
- /**
793
- * Immutable Seaport contract address
794
- */
795
- seaport_address: string;
796
- /**
797
- * Immutable Seaport contract version
798
- */
799
- seaport_version: string;
800
- };
801
- declare namespace ProtocolData {
802
- /**
803
- * Seaport order type. Orders containing ERC721 tokens will need to pass in the order type as FULL_RESTRICTED while orders with ERC1155 tokens will need to pass in the order_type as PARTIAL_RESTRICTED
804
- */
805
- enum order_type {
806
- FULL_RESTRICTED = "FULL_RESTRICTED",
807
- PARTIAL_RESTRICTED = "PARTIAL_RESTRICTED"
808
- }
809
- }
810
-
811
- type CreateListingRequestBody = {
812
- account_address: string;
813
- order_hash: string;
814
- /**
815
- * Buy item for listing should either be NATIVE or ERC20 item
816
- */
817
- buy: Array<Item>;
818
- /**
819
- * Buy fees should only include maker marketplace fees and should be no more than two entries as more entires will incur more gas. It is best practice to have this as few as possible.
820
- */
821
- fees: Array<Fee$1>;
822
- /**
823
- * Time after which the Order is considered expired
824
- */
825
- end_at: string;
826
- protocol_data: ProtocolData;
827
- /**
828
- * A random value added to the create Order request
829
- */
830
- salt: string;
831
- /**
832
- * Sell item for listing should be an ERC721 item
833
- */
834
- sell: Array<Item>;
835
- /**
836
- * Digital signature generated by the user for the specific Order
837
- */
838
- signature: string;
839
- /**
840
- * Time after which Order is considered active
841
- */
842
- start_at: string;
843
- };
844
-
845
- /**
846
- * The chain details
847
- */
848
- type Chain = {
849
- /**
850
- * The id of chain
851
- */
852
- id: string;
853
- /**
854
- * The name of chain
855
- */
856
- name: string;
857
- };
858
-
859
- /**
860
- * The ratio of the order that has been filled, an order that has been fully filled will have the same numerator and denominator values.
861
- */
862
- type FillStatus = {
863
- /**
864
- * The numerator of the fill status
865
- */
866
- numerator: string;
867
- /**
868
- * The denominator of the fill status
869
- */
870
- denominator: string;
871
- };
872
-
873
- type ActiveOrderStatus = {
874
- /**
875
- * The order status that indicates an order can be fulfilled.
876
- */
877
- name: 'ACTIVE';
878
- };
879
-
880
- type CancelledOrderStatus = {
881
- /**
882
- * The order status indicating a order is has been cancelled or about to be cancelled.
883
- */
884
- name: 'CANCELLED';
885
- /**
886
- * Whether the cancellation of the order is pending
887
- */
888
- pending: boolean;
889
- /**
890
- * Whether the cancellation was done on-chain or off-chain or as a result of an underfunded account
891
- */
892
- cancellation_type: CancelledOrderStatus.cancellation_type;
893
- };
894
- declare namespace CancelledOrderStatus {
895
- /**
896
- * Whether the cancellation was done on-chain or off-chain or as a result of an underfunded account
897
- */
898
- enum cancellation_type {
899
- ON_CHAIN = "ON_CHAIN",
900
- OFF_CHAIN = "OFF_CHAIN",
901
- UNDERFUNDED = "UNDERFUNDED"
902
- }
903
- }
904
-
905
- type ExpiredOrderStatus = {
906
- /**
907
- * A terminal order status indicating that an order cannot be fulfilled due to expiry.
908
- */
909
- name: 'EXPIRED';
910
- };
911
-
912
- type FilledOrderStatus = {
913
- /**
914
- * A terminal order status indicating that an order has been fulfilled.
915
- */
916
- name: 'FILLED';
917
- };
918
-
919
- type InactiveOrderStatus = {
920
- /**
921
- * The order status that indicates an order cannot be fulfilled.
922
- */
923
- name: 'INACTIVE';
924
- /**
925
- * Whether the order offerer has sufficient approvals
926
- */
927
- sufficient_approvals: boolean;
928
- /**
929
- * Whether the order offerer still has sufficient balance to complete the order
930
- */
931
- sufficient_balances: boolean;
932
- };
933
-
934
- type PendingOrderStatus = {
935
- /**
936
- * The order status that indicates the order is yet to be active due to various reasons.
937
- */
938
- name: 'PENDING';
939
- /**
940
- * Whether the order has been evaluated after its creation
941
- */
942
- evaluated: boolean;
943
- /**
944
- * Whether the order has reached its specified start time
945
- */
946
- started: boolean;
947
- };
948
-
949
- /**
950
- * The Order status
951
- */
952
- type OrderStatus = (CancelledOrderStatus | PendingOrderStatus | ActiveOrderStatus | InactiveOrderStatus | FilledOrderStatus | ExpiredOrderStatus);
953
-
954
- type Order$1 = {
955
- account_address: string;
956
- buy: Array<Item>;
957
- fees: Array<Fee$1>;
958
- chain: Chain;
959
- /**
960
- * Time the Order is created
961
- */
962
- created_at: string;
963
- /**
964
- * Time after which the Order is considered expired
965
- */
966
- end_at: string;
967
- /**
968
- * Global Order identifier
969
- */
970
- id: string;
971
- order_hash: string;
972
- protocol_data: ProtocolData;
973
- /**
974
- * A random value added to the create Order request
975
- */
976
- salt: string;
977
- sell: Array<Item>;
978
- /**
979
- * Digital signature generated by the user for the specific Order
980
- */
981
- signature: string;
982
- /**
983
- * Time after which Order is considered active
984
- */
985
- start_at: string;
986
- status: OrderStatus;
987
- /**
988
- * Order type
989
- */
990
- type: Order$1.type;
991
- /**
992
- * Time the Order is last updated
993
- */
994
- updated_at: string;
995
- fill_status: FillStatus;
996
- };
997
- declare namespace Order$1 {
998
- /**
999
- * Order type
1000
- */
1001
- enum type {
1002
- LISTING = "LISTING"
1003
- }
1004
- }
1005
-
1006
- type FulfillableOrder = {
1007
- extra_data: string;
1008
- order: Order$1;
1009
- };
1010
-
1011
- type FulfillmentDataRequest = {
1012
- order_id: string;
1013
- /**
1014
- * Address of the intended account fulfilling the order
1015
- */
1016
- taker_address: string;
1017
- fees: Array<Fee$1>;
1018
- };
1019
-
1020
- type ListingResult$1 = {
1021
- result: Order$1;
1022
- };
1023
-
1024
- /**
1025
- * Pagination properties
1026
- */
1027
- type Page$1 = {
1028
- /**
1029
- * First item as an encoded string
1030
- */
1031
- previous_cursor: string | null;
1032
- /**
1033
- * Last item as an encoded string
1034
- */
1035
- next_cursor: string | null;
1036
- };
1037
-
1038
- type ListListingsResult$1 = {
1039
- page: Page$1;
1040
- result: Array<Order$1>;
1041
- };
1042
-
1043
- /**
1044
- * The metadata related to the transaction in which the activity occurred
1045
- */
1046
- type TradeBlockchainMetadata = {
1047
- /**
1048
- * The transaction hash of the trade
1049
- */
1050
- transaction_hash: string;
1051
- /**
1052
- * EVM block number (uint64 as string)
1053
- */
1054
- block_number: string;
1055
- /**
1056
- * Transaction index in a block (uint32 as string)
1057
- */
1058
- transaction_index: string;
1059
- /**
1060
- * The log index of the fulfillment event in a block (uint32 as string)
1061
- */
1062
- log_index: string;
1063
- };
1064
-
1065
- type Trade$1 = {
1066
- buy: Array<Item>;
1067
- buyer_address: string;
1068
- buyer_fees: Array<Fee$1>;
1069
- chain: Chain;
1070
- order_id: string;
1071
- blockchain_metadata: TradeBlockchainMetadata;
1072
- /**
1073
- * Time the on-chain trade event is indexed by the order book system
1074
- */
1075
- indexed_at: string;
1076
- /**
1077
- * Global Trade identifier
1078
- */
1079
- id: string;
1080
- sell: Array<Item>;
1081
- seller_address: string;
1082
- maker_address: string;
1083
- taker_address: string;
1084
- };
1085
-
1086
- type ListTradeResult = {
1087
- page: Page$1;
1088
- result: Array<Trade$1>;
1089
- };
1090
-
1091
- /**
1092
- * The Order status
1093
- */
1094
- declare enum OrderStatusName {
1095
- PENDING = "PENDING",
1096
- ACTIVE = "ACTIVE",
1097
- INACTIVE = "INACTIVE",
1098
- FILLED = "FILLED",
1099
- EXPIRED = "EXPIRED",
1100
- CANCELLED = "CANCELLED"
1101
- }
1102
-
1103
- /**
1104
- * Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1105
- */
1106
- type PageCursor = string;
1107
-
1108
- /**
1109
- * Maximum number of items to return
1110
- */
1111
- type PageSize = number;
1112
-
1113
- type TradeResult$1 = {
1114
- result: Trade$1;
1115
- };
1116
-
1117
- type UnfulfillableOrder$1 = {
1118
- /**
1119
- * OrderID for the requested but unfulfillable order
1120
- */
1121
- order_id: string;
1122
- /**
1123
- * Nullable string containing error reason if the signing is unsuccessful for the order
1124
- */
1125
- reason: string;
1126
- };
1127
-
1128
- declare class OrdersService {
1129
- readonly httpRequest: BaseHttpRequest;
1130
- constructor(httpRequest: BaseHttpRequest);
1131
- /**
1132
- * Cancel one or more orders
1133
- * Cancel one or more orders
1134
- * @returns CancelOrdersResult Orders cancellation response.
1135
- * @throws ApiError
1136
- */
1137
- cancelOrders({ chainName, requestBody, }: {
1138
- chainName: ChainName;
1139
- requestBody: CancelOrdersRequestBody;
1140
- }): CancelablePromise<CancelOrdersResult>;
1141
- /**
1142
- * List all listings
1143
- * List all listings
1144
- * @returns ListListingsResult OK response.
1145
- * @throws ApiError
1146
- */
1147
- listListings({ chainName, status, sellItemContractAddress, buyItemType, buyItemContractAddress, accountAddress, sellItemMetadataId, sellItemTokenId, fromUpdatedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
1148
- chainName: ChainName;
1149
- /**
1150
- * Order status to filter by
1151
- */
1152
- status?: OrderStatusName;
1153
- /**
1154
- * Sell item contract address to filter by
1155
- */
1156
- sellItemContractAddress?: string;
1157
- /**
1158
- * Buy item type to filter by
1159
- */
1160
- buyItemType?: 'NATIVE' | 'ERC20';
1161
- /**
1162
- * Buy item contract address to filter by
1163
- */
1164
- buyItemContractAddress?: string;
1165
- /**
1166
- * The account address of the user who created the listing
1167
- */
1168
- accountAddress?: string;
1169
- /**
1170
- * The metadata_id of the sell item
1171
- */
1172
- sellItemMetadataId?: string;
1173
- /**
1174
- * Sell item token identifier to filter by
1175
- */
1176
- sellItemTokenId?: string;
1177
- /**
1178
- * From updated at including given date
1179
- */
1180
- fromUpdatedAt?: string;
1181
- /**
1182
- * Maximum number of orders to return per page
1183
- */
1184
- pageSize?: PageSize;
1185
- /**
1186
- * Order field to sort by. `buy_item_amount` sorts by per token price, for example if 5 ERC-1155s are on sale for 10eth, it’s sorted as 2eth for `buy_item_amount`.
1187
- */
1188
- sortBy?: 'created_at' | 'updated_at' | 'buy_item_amount';
1189
- /**
1190
- * Ascending or descending direction for sort
1191
- */
1192
- sortDirection?: 'asc' | 'desc';
1193
- /**
1194
- * Page cursor to retrieve previous or next page. Use the value returned in the response.
1195
- */
1196
- pageCursor?: PageCursor;
1197
- }): CancelablePromise<ListListingsResult$1>;
1198
- /**
1199
- * Create a listing
1200
- * Create a listing
1201
- * @returns ListingResult Created response.
1202
- * @throws ApiError
1203
- */
1204
- createListing({ chainName, requestBody, }: {
1205
- chainName: ChainName;
1206
- requestBody: CreateListingRequestBody;
1207
- }): CancelablePromise<ListingResult$1>;
1208
- /**
1209
- * Get a single listing by ID
1210
- * Get a single listing by ID
1211
- * @returns ListingResult OK response.
1212
- * @throws ApiError
1213
- */
1214
- getListing({ chainName, listingId, }: {
1215
- chainName: ChainName;
1216
- /**
1217
- * Global Order identifier
1218
- */
1219
- listingId: string;
1220
- }): CancelablePromise<ListingResult$1>;
1221
- /**
1222
- * Retrieve fulfillment data for orders
1223
- * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1224
- * @returns any Successful response
1225
- * @throws ApiError
1226
- */
1227
- fulfillmentData({ chainName, requestBody, }: {
1228
- chainName: ChainName;
1229
- requestBody: Array<FulfillmentDataRequest>;
1230
- }): CancelablePromise<{
1231
- result: {
1232
- fulfillable_orders: Array<FulfillableOrder>;
1233
- unfulfillable_orders: Array<UnfulfillableOrder$1>;
1234
- };
1235
- }>;
1236
- /**
1237
- * List all trades
1238
- * List all trades
1239
- * @returns ListTradeResult OK response.
1240
- * @throws ApiError
1241
- */
1242
- listTrades({ chainName, accountAddress, sellItemContractAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
1243
- chainName: ChainName;
1244
- accountAddress?: string;
1245
- sellItemContractAddress?: string;
1246
- /**
1247
- * From indexed at including given date
1248
- */
1249
- fromIndexedAt?: string;
1250
- /**
1251
- * Maximum number of trades to return per page
1252
- */
1253
- pageSize?: PageSize;
1254
- /**
1255
- * Trade field to sort by
1256
- */
1257
- sortBy?: 'indexed_at';
1258
- /**
1259
- * Ascending or descending direction for sort
1260
- */
1261
- sortDirection?: 'asc' | 'desc';
1262
- /**
1263
- * Page cursor to retrieve previous or next page. Use the value returned in the response.
1264
- */
1265
- pageCursor?: PageCursor;
1266
- }): CancelablePromise<ListTradeResult>;
1267
- /**
1268
- * Get a single trade by ID
1269
- * Get a single trade by ID
1270
- * @returns TradeResult OK response.
1271
- * @throws ApiError
1272
- */
1273
- getTrade({ chainName, tradeId, }: {
1274
- chainName: ChainName;
1275
- /**
1276
- * Global Trade identifier
1277
- */
1278
- tradeId: string;
1279
- }): CancelablePromise<TradeResult$1>;
1280
- }
1281
-
1282
- /**
1283
- * Any type that can be used where a numeric value is needed.
1284
- */
1285
- type Numeric = number | bigint;
1286
- /**
1287
- * Any type that can be used where a big number is needed.
1288
- */
1289
- type BigNumberish = string | Numeric;
1290
-
1291
- declare enum OrderType {
1292
- FULL_OPEN = 0,// No partial fills, anyone can execute
1293
- PARTIAL_OPEN = 1,// Partial fills supported, anyone can execute
1294
- FULL_RESTRICTED = 2,// No partial fills, only offerer or zone can execute
1295
- PARTIAL_RESTRICTED = 3
1296
- }
1297
- declare enum ItemType {
1298
- NATIVE = 0,
1299
- ERC20 = 1,
1300
- ERC721 = 2,
1301
- ERC1155 = 3,
1302
- ERC721_WITH_CRITERIA = 4,
1303
- ERC1155_WITH_CRITERIA = 5
1304
- }
1305
-
1306
- type OfferItem = {
1307
- itemType: ItemType;
1308
- token: string;
1309
- identifierOrCriteria: string;
1310
- startAmount: string;
1311
- endAmount: string;
1312
- };
1313
- type ConsiderationItem = {
1314
- itemType: ItemType;
1315
- token: string;
1316
- identifierOrCriteria: string;
1317
- startAmount: string;
1318
- endAmount: string;
1319
- recipient: string;
1320
- };
1321
- type OrderParameters = {
1322
- offerer: string;
1323
- zone: string;
1324
- orderType: OrderType;
1325
- startTime: BigNumberish;
1326
- endTime: BigNumberish;
1327
- zoneHash: string;
1328
- salt: string;
1329
- offer: OfferItem[];
1330
- consideration: ConsiderationItem[];
1331
- totalOriginalConsiderationItems: BigNumberish;
1332
- conduitKey: string;
1333
- };
1334
- type OrderComponents = OrderParameters & {
1335
- counter: BigNumberish;
1336
- };
1337
-
1338
- interface ERC1155Item {
1339
- type: 'ERC1155';
1340
- contractAddress: string;
1341
- tokenId: string;
1342
- amount: string;
1343
- }
1344
- interface ERC721Item {
1345
- type: 'ERC721';
1346
- contractAddress: string;
1347
- tokenId: string;
1348
- }
1349
- interface ERC20Item {
1350
- type: 'ERC20';
1351
- contractAddress: string;
1352
- amount: string;
1353
- }
1354
- interface NativeItem {
1355
- type: 'NATIVE';
1356
- amount: string;
1357
- }
1358
- interface RoyaltyInfo {
1359
- recipient: string;
1360
- amountRequired: string;
1361
- }
1362
- interface PrepareListingParams {
1363
- makerAddress: string;
1364
- sell: ERC721Item | ERC1155Item;
1365
- buy: ERC20Item | NativeItem;
1366
- orderExpiry?: Date;
1367
- }
1368
- interface PrepareListingResponse {
1369
- actions: Action[];
1370
- orderComponents: OrderComponents;
1371
- orderHash: string;
1372
- }
1373
- interface PrepareBulkListingsParams {
1374
- makerAddress: string;
1375
- listingParams: {
1376
- sell: ERC721Item | ERC1155Item;
1377
- buy: ERC20Item | NativeItem;
1378
- makerFees: FeeValue[];
1379
- orderExpiry?: Date;
1380
- }[];
1381
- }
1382
- interface PrepareBulkListingsResponse {
1383
- actions: Action[];
1384
- completeListings: (signature: string) => Promise<BulkListingsResult>;
1385
- }
1386
- interface PrepareBulkSeaportOrders {
1387
- actions: Action[];
1388
- preparedListings: {
1389
- orderComponents: OrderComponents;
1390
- orderHash: string;
1391
- }[];
1392
- }
1393
- interface PrepareCancelOrdersResponse {
1394
- signableAction: SignableAction;
1395
- }
1396
- interface CreateListingParams {
1397
- orderComponents: OrderComponents;
1398
- orderHash: string;
1399
- orderSignature: string;
1400
- makerFees: FeeValue[];
1401
- }
1402
- type ListListingsParams = Omit<Parameters<typeof OrdersService.prototype.listListings>[0], 'chainName'>;
1403
- type ListTradesParams = Omit<Parameters<typeof OrdersService.prototype.listTrades>[0], 'chainName'>;
1404
- declare enum FeeType {
1405
- MAKER_ECOSYSTEM = "MAKER_ECOSYSTEM",
1406
- TAKER_ECOSYSTEM = "TAKER_ECOSYSTEM",
1407
- PROTOCOL = "PROTOCOL",
1408
- ROYALTY = "ROYALTY"
1409
- }
1410
- interface FeeValue {
1411
- recipientAddress: string;
1412
- amount: string;
1413
- }
1414
- interface Fee extends FeeValue {
1415
- type: FeeType;
1416
- }
1417
- declare enum TransactionPurpose {
1418
- APPROVAL = "APPROVAL",
1419
- FULFILL_ORDER = "FULFILL_ORDER",
1420
- CANCEL = "CANCEL"
1421
- }
1422
- declare enum SignablePurpose {
1423
- CREATE_LISTING = "CREATE_LISTING",
1424
- OFF_CHAIN_CANCELLATION = "OFF_CHAIN_CANCELLATION"
1425
- }
1426
- declare enum ActionType {
1427
- TRANSACTION = "TRANSACTION",
1428
- SIGNABLE = "SIGNABLE"
1429
- }
1430
- type TransactionBuilder = () => Promise<PopulatedTransaction>;
1431
- interface TransactionAction {
1432
- type: ActionType.TRANSACTION;
1433
- purpose: TransactionPurpose;
1434
- buildTransaction: TransactionBuilder;
1435
- }
1436
- interface SignableAction {
1437
- type: ActionType.SIGNABLE;
1438
- purpose: SignablePurpose;
1439
- message: {
1440
- domain: TypedDataDomain;
1441
- types: Record<string, TypedDataField[]>;
1442
- value: Record<string, any>;
1443
- };
1444
- }
1445
- type Action = TransactionAction | SignableAction;
1446
- interface FulfillmentListing {
1447
- listingId: string;
1448
- takerFees: Array<FeeValue>;
1449
- amountToFill?: string;
1450
- }
1451
- type FulfillBulkOrdersResponse = FulfillBulkOrdersInsufficientBalanceResponse | FulfillBulkOrdersSufficientBalanceResponse;
1452
- interface FulfillBulkOrdersSufficientBalanceResponse {
1453
- sufficientBalance: true;
1454
- actions: Action[];
1455
- expiration: string;
1456
- fulfillableOrders: Order[];
1457
- unfulfillableOrders: UnfulfillableOrder[];
1458
- }
1459
- interface FulfillBulkOrdersInsufficientBalanceResponse {
1460
- sufficientBalance: false;
1461
- fulfillableOrders: Order[];
1462
- unfulfillableOrders: UnfulfillableOrder[];
1463
- }
1464
- interface UnfulfillableOrder {
1465
- orderId: string;
1466
- reason: string;
1467
- }
1468
- interface FulfillOrderResponse {
1469
- actions: Action[];
1470
- /**
1471
- * User MUST submit the fulfillment transaction before the expiration
1472
- * Submitting after the expiration will result in a on chain revert
1473
- */
1474
- expiration: string;
1475
- order: Order;
1476
- }
1477
- interface CancelOrdersOnChainResponse {
1478
- cancellationAction: TransactionAction;
1479
- }
1480
- interface Order {
1481
- id: string;
1482
- type: 'LISTING';
1483
- accountAddress: string;
1484
- buy: (ERC20Item | NativeItem)[];
1485
- sell: (ERC721Item | ERC1155Item)[];
1486
- fees: Fee[];
1487
- chain: {
1488
- id: string;
1489
- name: string;
1490
- };
1491
- createdAt: string;
1492
- updatedAt: string;
1493
- fillStatus: {
1494
- numerator: string;
1495
- denominator: string;
1496
- };
1497
- /**
1498
- * Time after which the Order is considered active
1499
- */
1500
- startAt: string;
1501
- /**
1502
- * Time after which the Order is expired
1503
- */
1504
- endAt: string;
1505
- orderHash: string;
1506
- protocolData: {
1507
- orderType: 'FULL_RESTRICTED' | 'PARTIAL_RESTRICTED';
1508
- zoneAddress: string;
1509
- counter: string;
1510
- seaportAddress: string;
1511
- seaportVersion: string;
1512
- };
1513
- salt: string;
1514
- signature: string;
1515
- status: OrderStatus;
1516
- }
1517
- interface ListingResult {
1518
- result: Order;
1519
- }
1520
- interface BulkListingsResult {
1521
- result: {
1522
- success: boolean;
1523
- orderHash: string;
1524
- order?: Order;
1525
- }[];
1526
- }
1527
- interface ListListingsResult {
1528
- page: Page;
1529
- result: Order[];
1530
- }
1531
- interface Page {
1532
- /**
1533
- * First item as an encoded string
1534
- */
1535
- previousCursor: string | null;
1536
- /**
1537
- * Last item as an encoded string
1538
- */
1539
- nextCursor: string | null;
1540
- }
1541
- interface Trade {
1542
- id: string;
1543
- orderId: string;
1544
- chain: {
1545
- id: string;
1546
- name: string;
1547
- };
1548
- buy: (ERC20Item | NativeItem)[];
1549
- sell: (ERC721Item | ERC1155Item)[];
1550
- buyerFees: Fee[];
1551
- sellerAddress: string;
1552
- buyerAddress: string;
1553
- makerAddress: string;
1554
- takerAddress: string;
1555
- /**
1556
- * Time the on-chain event was indexed by the Immutable order book service
1557
- */
1558
- indexedAt: string;
1559
- blockchainMetadata: {
1560
- /**
1561
- * The transaction hash of the trade
1562
- */
1563
- transactionHash: string;
1564
- /**
1565
- * EVM block number (uint64 as string)
1566
- */
1567
- blockNumber: string;
1568
- /**
1569
- * Transaction index in a block (uint32 as string)
1570
- */
1571
- transactionIndex: string;
1572
- /**
1573
- * The log index of the fulfillment event in a block (uint32 as string)
1574
- */
1575
- logIndex: string;
1576
- };
1577
- }
1578
- interface TradeResult {
1579
- result: Trade;
1580
- }
1581
- interface ListTradesResult {
1582
- page: Page;
1583
- result: Trade[];
1584
- }
1585
-
1586
- /**
1587
- * zkEVM orderbook SDK
1588
- * @constructor
1589
- * @param {OrderbookModuleConfiguration} config - Configuration for Immutable services.
1590
- */
1591
- declare class Orderbook {
1592
- private apiClient;
1593
- private seaport;
1594
- private orderbookConfig;
1595
- constructor(config: ModuleConfiguration<OrderbookOverrides>);
1596
- /**
1597
- * Return the configuration for the orderbook module.
1598
- * @return {OrderbookModuleConfiguration} The configuration for the orderbook module.
1599
- */
1600
- config(): OrderbookModuleConfiguration;
1601
- /**
1602
- * Get an order by ID
1603
- * @param {string} listingId - The listingId to find.
1604
- * @return {ListingResult} The returned order result.
1605
- */
1606
- getListing(listingId: string): Promise<ListingResult>;
1607
- /**
1608
- * Get a trade by ID
1609
- * @param {string} tradeId - The tradeId to find.
1610
- * @return {TradeResult} The returned order result.
1611
- */
1612
- getTrade(tradeId: string): Promise<TradeResult>;
1613
- /**
1614
- * List orders. This method is used to get a list of orders filtered by conditions specified
1615
- * in the params object.
1616
- * @param {ListListingsParams} listOrderParams - Filtering, ordering and page parameters.
1617
- * @return {ListListingsResult} The paged orders.
1618
- */
1619
- listListings(listOrderParams: ListListingsParams): Promise<ListListingsResult>;
1620
- /**
1621
- * List trades. This method is used to get a list of trades filtered by conditions specified
1622
- * in the params object
1623
- * @param {ListTradesParams} listTradesParams - Filtering, ordering and page parameters.
1624
- * @return {ListTradesResult} The paged trades.
1625
- */
1626
- listTrades(listTradesParams: ListTradesParams): Promise<ListTradesResult>;
1627
- /**
1628
- * Get required transactions and messages for signing to facilitate creating bulk listings.
1629
- * Once the transactions are submitted and the message signed, call the completeListings method
1630
- * provided in the return type with the signature. This method supports up to 20 listing creations
1631
- * at a time. It can also be used for individual listings to simplify integration code paths.
1632
- * @param {PrepareBulkListingsParams} prepareBulkListingsParams - Details about the listings
1633
- * to be created.
1634
- * @return {PrepareBulkListingsResponse} PrepareListingResponse includes
1635
- * any unsigned approval transactions, the typed bulk order message for signing and
1636
- * the createListings method that can be called with the signature to create the listings.
1637
- */
1638
- prepareBulkListings({ makerAddress, listingParams, }: PrepareBulkListingsParams): Promise<PrepareBulkListingsResponse>;
1639
- /**
1640
- * Get required transactions and messages for signing prior to creating a listing
1641
- * through the createListing method
1642
- * @param {PrepareListingParams} prepareListingParams - Details about the listing to be created.
1643
- * @return {PrepareListingResponse} PrepareListingResponse includes
1644
- * the unsigned approval transaction, the typed order message for signing and
1645
- * the order components that can be submitted to `createListing` with a signature.
1646
- */
1647
- prepareListing({ makerAddress, sell, buy, orderExpiry, }: PrepareListingParams): Promise<PrepareListingResponse>;
1648
- /**
1649
- * Create an order
1650
- * @param {CreateListingParams} createListingParams - create an order with the given params.
1651
- * @return {ListingResult} The result of the order created in the Immutable services.
1652
- */
1653
- createListing(createListingParams: CreateListingParams): Promise<ListingResult>;
1654
- /**
1655
- * Get unsigned transactions that can be submitted to fulfil an open order. If the approval
1656
- * transaction exists it must be signed and submitted to the chain before the fulfilment
1657
- * transaction can be submitted or it will be reverted.
1658
- * @param {string} listingId - The listingId to fulfil.
1659
- * @param {string} takerAddress - The address of the account fulfilling the order.
1660
- * @param {FeeValue[]} takerFees - Taker ecosystem fees to be paid.
1661
- * @param {string} amountToFill - Amount of the order to fill, defaults to sell item amount.
1662
- * Only applies to ERC1155 orders
1663
- * @return {FulfillOrderResponse} Approval and fulfilment transactions.
1664
- */
1665
- fulfillOrder(listingId: string, takerAddress: string, takerFees: FeeValue[], amountToFill?: string): Promise<FulfillOrderResponse>;
1666
- /**
1667
- * Get unsigned transactions that can be submitted to fulfil multiple open orders. If approval
1668
- * transactions exist, they must be signed and submitted to the chain before the fulfilment
1669
- * transaction can be submitted or it will be reverted.
1670
- * @param {Array<FulfillmentListing>} listings - The details of the listings to fulfil, amounts
1671
- * to fill and taker ecosystem fees to be paid.
1672
- * @param {string} takerAddress - The address of the account fulfilling the order.
1673
- * @return {FulfillBulkOrdersResponse} Approval and fulfilment transactions.
1674
- */
1675
- fulfillBulkOrders(listings: Array<FulfillmentListing>, takerAddress: string): Promise<FulfillBulkOrdersResponse>;
1676
- /**
1677
- * Cancelling orders is a gasless alternative to on-chain cancellation exposed with
1678
- * `cancelOrdersOnChain`. For the orderbook to authenticate the cancellation, the creator
1679
- * of the orders must sign an EIP712 message containing the orderIds
1680
- * @param {string} orderIds - The orderIds to attempt to cancel.
1681
- * @return {PrepareCancelOrdersResponse} The signable action to cancel the orders.
1682
- */
1683
- prepareOrderCancellations(orderIds: string[]): Promise<PrepareCancelOrdersResponse>;
1684
- /**
1685
- * Cancelling orders is a gasless alternative to on-chain cancellation exposed with
1686
- * `cancelOrdersOnChain`. Orders cancelled this way cannot be fulfilled and will be removed
1687
- * from the orderbook. If there is pending fulfillment data outstanding for the order, its
1688
- * cancellation will be pending until the fulfillment window has passed.
1689
- * `prepareOffchainOrderCancellations` can be used to get the signable action that is signed
1690
- * to get the signature required for this call.
1691
- * @param {string[]} orderIds - The orderIds to attempt to cancel.
1692
- * @param {string} accountAddress - The address of the account cancelling the orders.
1693
- * @param {string} accountAddress - The address of the account cancelling the orders.
1694
- * @return {CancelOrdersResult} The result of the off-chain cancellation request
1695
- */
1696
- cancelOrders(orderIds: string[], accountAddress: string, signature: string): Promise<CancelOrdersResult>;
1697
- /**
1698
- * Get an unsigned order cancellation transaction. Orders can only be cancelled by
1699
- * the account that created them. All of the orders must be from the same seaport contract.
1700
- * If trying to cancel orders from multiple seaport contracts, group the orderIds by seaport
1701
- * contract and call this method for each group.
1702
- * @param {string[]} orderIds - The orderIds to cancel.
1703
- * @param {string} accountAddress - The address of the account cancelling the order.
1704
- * @return {CancelOrdersOnChainResponse} The unsigned cancel order action
1705
- */
1706
- cancelOrdersOnChain(orderIds: string[], accountAddress: string): Promise<CancelOrdersOnChainResponse>;
1707
- }
1708
-
1709
- declare const constants: {
1710
- estimatedFulfillmentGasGwei: number;
1711
- };
1712
-
1713
- export { Action, ActionType, BulkListingsResult, CancelOrdersOnChainResponse, CreateListingParams, ERC1155Item, ERC20Item, ERC721Item, Fee, FeeType, FeeValue, FulfillBulkOrdersInsufficientBalanceResponse, FulfillBulkOrdersResponse, FulfillBulkOrdersSufficientBalanceResponse, FulfillOrderResponse, FulfillmentListing, ListListingsParams, ListListingsResult, ListTradesParams, ListTradesResult, ListingResult, NativeItem, Order, OrderStatusName, Orderbook, OrderbookModuleConfiguration, OrderbookOverrides, Page, PrepareBulkListingsParams, PrepareBulkListingsResponse, PrepareBulkSeaportOrders, PrepareCancelOrdersResponse, PrepareListingParams, PrepareListingResponse, RoyaltyInfo, SignableAction, SignablePurpose, Trade, TradeResult, TransactionAction, TransactionBuilder, TransactionPurpose, UnfulfillableOrder, constants };
1
+ export { r as Action, A as ActionType, B as BulkListingsResult, x as CancelOrdersOnChainResponse, C as CreateListingParams, E as ERC1155Item, e as ERC20Item, d as ERC721Item, m as Fee, F as FeeType, l as FeeValue, v as FulfillBulkOrdersInsufficientBalanceResponse, t as FulfillBulkOrdersResponse, u as FulfillBulkOrdersSufficientBalanceResponse, w as FulfillOrderResponse, s as FulfillmentListing, L as ListListingsParams, D as ListListingsResult, k as ListTradesParams, J as ListTradesResult, z as ListingResult, N as NativeItem, y as Order, K as OrderStatusName, O as Orderbook, a as OrderbookModuleConfiguration, b as OrderbookOverrides, G as Page, g as PrepareBulkListingsParams, h as PrepareBulkListingsResponse, i as PrepareBulkSeaportOrders, j as PrepareCancelOrdersResponse, P as PrepareListingParams, f as PrepareListingResponse, R as RoyaltyInfo, q as SignableAction, S as SignablePurpose, H as Trade, I as TradeResult, p as TransactionAction, n as TransactionBuilder, T as TransactionPurpose, U as UnfulfillableOrder, c as constants } from './orderbook.d-77162c6c.js';
2
+ import './index.d-f0845744.js';
3
+ import './json-rpc-provider.d-5c038bd9.js';
4
+ import './index.d-c4a4c17d.js';
5
+ import './index.d-f1471830.js';