@imtbl/sdk 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,521 +0,0 @@
1
- declare type Bytes = ArrayLike<number>;
2
- declare type BytesLike = Bytes | string;
3
- interface Hexable {
4
- toHexString(): string;
5
- }
6
-
7
- declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
8
- declare class BigNumber implements Hexable {
9
- readonly _hex: string;
10
- readonly _isBigNumber: boolean;
11
- constructor(constructorGuard: any, hex: string);
12
- fromTwos(value: number): BigNumber;
13
- toTwos(value: number): BigNumber;
14
- abs(): BigNumber;
15
- add(other: BigNumberish): BigNumber;
16
- sub(other: BigNumberish): BigNumber;
17
- div(other: BigNumberish): BigNumber;
18
- mul(other: BigNumberish): BigNumber;
19
- mod(other: BigNumberish): BigNumber;
20
- pow(other: BigNumberish): BigNumber;
21
- and(other: BigNumberish): BigNumber;
22
- or(other: BigNumberish): BigNumber;
23
- xor(other: BigNumberish): BigNumber;
24
- mask(value: number): BigNumber;
25
- shl(value: number): BigNumber;
26
- shr(value: number): BigNumber;
27
- eq(other: BigNumberish): boolean;
28
- lt(other: BigNumberish): boolean;
29
- lte(other: BigNumberish): boolean;
30
- gt(other: BigNumberish): boolean;
31
- gte(other: BigNumberish): boolean;
32
- isNegative(): boolean;
33
- isZero(): boolean;
34
- toNumber(): number;
35
- toBigInt(): bigint;
36
- toString(): string;
37
- toHexString(): string;
38
- toJSON(key?: string): any;
39
- static from(value: any): BigNumber;
40
- static isBigNumber(value: any): value is BigNumber;
41
- }
42
-
43
- declare type Deferrable<T> = {
44
- [K in keyof T]: T[K] | Promise<T[K]>;
45
- };
46
- declare class Description<T = any> {
47
- constructor(info: {
48
- [K in keyof T]: T[K];
49
- });
50
- }
51
-
52
- declare type Network = {
53
- name: string;
54
- chainId: number;
55
- ensAddress?: string;
56
- _defaultProvider?: (providers: any, options?: any) => any;
57
- };
58
-
59
- declare type AccessList = Array<{
60
- address: string;
61
- storageKeys: Array<string>;
62
- }>;
63
- declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
64
- interface Transaction {
65
- hash?: string;
66
- to?: string;
67
- from?: string;
68
- nonce: number;
69
- gasLimit: BigNumber;
70
- gasPrice?: BigNumber;
71
- data: string;
72
- value: BigNumber;
73
- chainId: number;
74
- r?: string;
75
- s?: string;
76
- v?: number;
77
- type?: number | null;
78
- accessList?: AccessList;
79
- maxPriorityFeePerGas?: BigNumber;
80
- maxFeePerGas?: BigNumber;
81
- }
82
-
83
- interface OnceBlockable {
84
- once(eventName: "block", handler: () => void): void;
85
- }
86
-
87
- declare type TransactionRequest = {
88
- to?: string;
89
- from?: string;
90
- nonce?: BigNumberish;
91
- gasLimit?: BigNumberish;
92
- gasPrice?: BigNumberish;
93
- data?: BytesLike;
94
- value?: BigNumberish;
95
- chainId?: number;
96
- type?: number;
97
- accessList?: AccessListish;
98
- maxPriorityFeePerGas?: BigNumberish;
99
- maxFeePerGas?: BigNumberish;
100
- customData?: Record<string, any>;
101
- ccipReadEnabled?: boolean;
102
- };
103
- interface TransactionResponse extends Transaction {
104
- hash: string;
105
- blockNumber?: number;
106
- blockHash?: string;
107
- timestamp?: number;
108
- confirmations: number;
109
- from: string;
110
- raw?: string;
111
- wait: (confirmations?: number) => Promise<TransactionReceipt>;
112
- }
113
- declare type BlockTag = string | number;
114
- interface _Block {
115
- hash: string;
116
- parentHash: string;
117
- number: number;
118
- timestamp: number;
119
- nonce: string;
120
- difficulty: number;
121
- _difficulty: BigNumber;
122
- gasLimit: BigNumber;
123
- gasUsed: BigNumber;
124
- miner: string;
125
- extraData: string;
126
- baseFeePerGas?: null | BigNumber;
127
- }
128
- interface Block extends _Block {
129
- transactions: Array<string>;
130
- }
131
- interface BlockWithTransactions extends _Block {
132
- transactions: Array<TransactionResponse>;
133
- }
134
- interface Log {
135
- blockNumber: number;
136
- blockHash: string;
137
- transactionIndex: number;
138
- removed: boolean;
139
- address: string;
140
- data: string;
141
- topics: Array<string>;
142
- transactionHash: string;
143
- logIndex: number;
144
- }
145
- interface TransactionReceipt {
146
- to: string;
147
- from: string;
148
- contractAddress: string;
149
- transactionIndex: number;
150
- root?: string;
151
- gasUsed: BigNumber;
152
- logsBloom: string;
153
- blockHash: string;
154
- transactionHash: string;
155
- logs: Array<Log>;
156
- blockNumber: number;
157
- confirmations: number;
158
- cumulativeGasUsed: BigNumber;
159
- effectiveGasPrice: BigNumber;
160
- byzantium: boolean;
161
- type: number;
162
- status?: number;
163
- }
164
- interface FeeData {
165
- lastBaseFeePerGas: null | BigNumber;
166
- maxFeePerGas: null | BigNumber;
167
- maxPriorityFeePerGas: null | BigNumber;
168
- gasPrice: null | BigNumber;
169
- }
170
- interface EventFilter {
171
- address?: string;
172
- topics?: Array<string | Array<string> | null>;
173
- }
174
- interface Filter extends EventFilter {
175
- fromBlock?: BlockTag;
176
- toBlock?: BlockTag;
177
- }
178
- declare abstract class ForkEvent extends Description {
179
- readonly expiry: number;
180
- readonly _isForkEvent?: boolean;
181
- static isForkEvent(value: any): value is ForkEvent;
182
- }
183
- declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
184
- declare type Listener = (...args: Array<any>) => void;
185
- declare abstract class Provider implements OnceBlockable {
186
- abstract getNetwork(): Promise<Network>;
187
- abstract getBlockNumber(): Promise<number>;
188
- abstract getGasPrice(): Promise<BigNumber>;
189
- getFeeData(): Promise<FeeData>;
190
- abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
191
- abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
192
- abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
193
- abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
194
- abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
195
- abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
196
- abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
197
- abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
198
- abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
199
- abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
200
- abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
201
- abstract getLogs(filter: Filter): Promise<Array<Log>>;
202
- abstract resolveName(name: string | Promise<string>): Promise<null | string>;
203
- abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
204
- abstract on(eventName: EventType, listener: Listener): Provider;
205
- abstract once(eventName: EventType, listener: Listener): Provider;
206
- abstract emit(eventName: EventType, ...args: Array<any>): boolean;
207
- abstract listenerCount(eventName?: EventType): number;
208
- abstract listeners(eventName?: EventType): Array<Listener>;
209
- abstract off(eventName: EventType, listener?: Listener): Provider;
210
- abstract removeAllListeners(eventName?: EventType): Provider;
211
- addListener(eventName: EventType, listener: Listener): Provider;
212
- removeListener(eventName: EventType, listener: Listener): Provider;
213
- abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
214
- readonly _isProvider: boolean;
215
- constructor();
216
- static isProvider(value: any): value is Provider;
217
- }
218
-
219
- interface Overrides {
220
- gasLimit?: BigNumberish | Promise<BigNumberish>;
221
- gasPrice?: BigNumberish | Promise<BigNumberish>;
222
- maxFeePerGas?: BigNumberish | Promise<BigNumberish>;
223
- maxPriorityFeePerGas?: BigNumberish | Promise<BigNumberish>;
224
- nonce?: BigNumberish | Promise<BigNumberish>;
225
- type?: number;
226
- accessList?: AccessListish;
227
- customData?: Record<string, any>;
228
- ccipReadEnabled?: boolean;
229
- }
230
- interface PayableOverrides extends Overrides {
231
- value?: BigNumberish | Promise<BigNumberish>;
232
- }
233
- interface CallOverrides extends PayableOverrides {
234
- blockTag?: BlockTag | Promise<BlockTag>;
235
- from?: string | Promise<string>;
236
- }
237
- interface PopulatedTransaction {
238
- to?: string;
239
- from?: string;
240
- nonce?: number;
241
- gasLimit?: BigNumber;
242
- gasPrice?: BigNumber;
243
- data?: string;
244
- value?: BigNumber;
245
- chainId?: number;
246
- type?: number;
247
- accessList?: AccessList;
248
- maxFeePerGas?: BigNumber;
249
- maxPriorityFeePerGas?: BigNumber;
250
- customData?: Record<string, any>;
251
- ccipReadEnabled?: boolean;
252
- }
253
-
254
- type PromiseOrValue<T> = T | Promise<T>;
255
-
256
- declare namespace ImmutableERC721Base {
257
- type IDBurnStruct = {
258
- owner: PromiseOrValue<string>;
259
- tokenIds: PromiseOrValue<BigNumberish>[];
260
- };
261
- type IDBurnStructOutput = [string, BigNumber[]] & {
262
- owner: string;
263
- tokenIds: BigNumber[];
264
- };
265
- type IDMintStruct = {
266
- to: PromiseOrValue<string>;
267
- tokenIds: PromiseOrValue<BigNumberish>[];
268
- };
269
- type IDMintStructOutput = [string, BigNumber[]] & {
270
- to: string;
271
- tokenIds: BigNumber[];
272
- };
273
- type TransferRequestStruct = {
274
- from: PromiseOrValue<string>;
275
- tos: PromiseOrValue<string>[];
276
- tokenIds: PromiseOrValue<BigNumberish>[];
277
- };
278
- type TransferRequestStructOutput = [string, string[], BigNumber[]] & {
279
- from: string;
280
- tos: string[];
281
- tokenIds: BigNumber[];
282
- };
283
- }
284
-
285
- type IDMint = ImmutableERC721Base.IDMintStruct;
286
- type TransferRequest = ImmutableERC721Base.TransferRequestStruct;
287
- type IDBurn = ImmutableERC721Base.IDBurnStruct;
288
- declare class ERC721MintByID {
289
- private readonly contract;
290
- constructor(contractAddress: string);
291
- /**
292
- * Read functions
293
- */
294
- /**
295
- * @returns the DEFAULT_ADMIN_ROLE as a string.
296
- */
297
- DEFAULT_ADMIN_ROLE(provider: Provider, overrides?: CallOverrides): Promise<string>;
298
- /**
299
- * @returns the MINTER_ROLE as a string.
300
- */
301
- MINTER_ROLE(provider: Provider, overrides?: CallOverrides): Promise<string>;
302
- /**
303
- * @returns the balance of an address as a BigNumber.
304
- */
305
- balanceOf(provider: Provider, owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
306
- /**
307
- * @returns the baseURI as a string.
308
- */
309
- baseURI(provider: Provider, overrides?: CallOverrides): Promise<string>;
310
- /**
311
- * @returns the contractURI as a string.
312
- */
313
- contractURI(provider: Provider, overrides?: CallOverrides): Promise<string>;
314
- /**
315
- * @returns admin addresses as an array of strings.
316
- */
317
- getAdmins(provider: Provider, overrides?: CallOverrides): Promise<string[]>;
318
- /**
319
- * @returns the approved address for a token ID, or zero if no address set.
320
- */
321
- getApproved(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
322
- /**
323
- * @returns the role admin address.
324
- */
325
- getRoleAdmin(provider: Provider, role: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
326
- /**
327
- * @returns the role member address at a particular index.
328
- */
329
- getRoleMember(provider: Provider, role: PromiseOrValue<BytesLike>, index: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
330
- /**
331
- * @returns the role member count as a BigNumber.
332
- */
333
- getRoleMemberCount(provider: Provider, role: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
334
- /**
335
- * @returns a boolean for whether an account has a particular role.
336
- */
337
- hasRole(provider: Provider, role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
338
- /**
339
- * @returns a booolean that tells whether an operator is approved by a given owner.
340
- */
341
- isApprovedForAll(provider: Provider, owner: PromiseOrValue<string>, operator: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
342
- /**
343
- * @returns the name of the contract as a string.
344
- */
345
- name(provider: Provider, overrides?: CallOverrides): Promise<string>;
346
- /**
347
- * @returns the owner address of a particular tokenId.
348
- */
349
- ownerOf(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
350
- /**
351
- * Returns the current nonce of a given token ID.
352
- * @param tokenId The ID of the token for which to retrieve the nonce.
353
- * @return Current nonce of the given token.
354
- */
355
- nonces(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
356
- /**
357
- * @returns the operator allowlist as a string.
358
- */
359
- operatorAllowlist(provider: Provider, overrides?: CallOverrides): Promise<string>;
360
- /**
361
- * @returns the royalty information for a particular tokenId.
362
- */
363
- royaltyInfo(provider: Provider, _tokenId: PromiseOrValue<BigNumberish>, _salePrice: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string, BigNumber]>;
364
- /**
365
- * @returns the symbol of the contract as a string.
366
- */
367
- symbol(provider: Provider, overrides?: CallOverrides): Promise<string>;
368
- /**
369
- * @returns the Uniform Resource Identifier (URI) for tokenId token.
370
- */
371
- tokenURI(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
372
- /**
373
- * @returns returns the total amount of tokens stored by the contract.
374
- */
375
- totalSupply(provider: Provider, overrides?: CallOverrides): Promise<BigNumber>;
376
- /**
377
- * Write functions
378
- */
379
- /**
380
- * @returns a populated transaction for the approve contract function
381
- */
382
- populateApprove(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
383
- from?: PromiseOrValue<string>;
384
- }): Promise<PopulatedTransaction>;
385
- /**
386
- * Function to approve by way of owner signature
387
- * @param spender the address to approve
388
- * @param tokenId the index of the NFT to approve the spender on
389
- * @param deadline a timestamp expiry for the permit
390
- * @param sig a traditional or EIP-2098 signature
391
- */
392
- populatePermit(spender: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, deadline: PromiseOrValue<BigNumberish>, sig: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<PopulatedTransaction>;
393
- /**
394
- * @returns a populated transaction for the burn contract function
395
- */
396
- populateBurn(tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
397
- from?: PromiseOrValue<string>;
398
- }): Promise<PopulatedTransaction>;
399
- /**
400
- * @returns a populated transaction for the batch burn contract function
401
- */
402
- populateBurnBatch(tokenIds: PromiseOrValue<BigNumberish>[], overrides?: Overrides & {
403
- from?: PromiseOrValue<string>;
404
- }): Promise<PopulatedTransaction>;
405
- /**
406
- * @returns a populated transaction for the grantMinterRole contract function
407
- */
408
- populateGrantMinterRole(user: PromiseOrValue<string>, overrides?: Overrides & {
409
- from?: PromiseOrValue<string>;
410
- }): Promise<PopulatedTransaction>;
411
- /**
412
- * @returns a populated transaction for the grantRole contract function
413
- */
414
- populateGrantRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
415
- from?: PromiseOrValue<string>;
416
- }): Promise<PopulatedTransaction>;
417
- /**
418
- * @returns a populated transaction for the mint contract function
419
- */
420
- populateMint(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
421
- from?: PromiseOrValue<string>;
422
- }): Promise<PopulatedTransaction>;
423
- /**
424
- * @returns a populated transaction for the batch mint contract function
425
- */
426
- populateSafeMintBatch(mints: IDMint[], overrides?: Overrides & {
427
- from?: PromiseOrValue<string>;
428
- }): Promise<PopulatedTransaction>;
429
- /**
430
- * @returns a populated transaction for the safe burn contract function
431
- */
432
- populateSafeBurn(owner: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
433
- from?: PromiseOrValue<string>;
434
- }): Promise<PopulatedTransaction>;
435
- /**
436
- * @returns a populated transaction for the safe burn batch contract function
437
- */
438
- populateSafeBurnBatch(burns: IDBurn[], overrides?: Overrides & {
439
- from?: PromiseOrValue<string>;
440
- }): Promise<PopulatedTransaction>;
441
- /**
442
- * @returns a populated transaction for the renounceRole contract function
443
- */
444
- populateRenounceRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
445
- from?: PromiseOrValue<string>;
446
- }): Promise<PopulatedTransaction>;
447
- /**
448
- * @returns a populated transaction for the revokeMinterRole contract function
449
- */
450
- populateRevokeMinterRole(user: PromiseOrValue<string>, overrides?: Overrides & {
451
- from?: PromiseOrValue<string>;
452
- }): Promise<PopulatedTransaction>;
453
- /**
454
- * @returns a populated transaction for the revokeRole contract function
455
- */
456
- populateRevokeRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
457
- from?: PromiseOrValue<string>;
458
- }): Promise<PopulatedTransaction>;
459
- /**
460
- * @returns a populated transaction for the batch save transfer from function
461
- */
462
- populateSafeTransferFromBatch(transfers: TransferRequest, overrides?: Overrides & {
463
- from?: PromiseOrValue<string>;
464
- }): Promise<PopulatedTransaction>;
465
- /**
466
- * @returns a populated transaction for the safeTransferFrom(address,address,uint256) contract function
467
- */
468
- 'populateSafeTransferFrom(address,address,uint256)'(from: PromiseOrValue<string>, to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
469
- from?: PromiseOrValue<string>;
470
- }): Promise<PopulatedTransaction>;
471
- /**
472
- * @returns a populated transaction for the safeTransferFrom(address,address,uint256,bytes) contract function
473
- */
474
- 'populateSafeTransferFrom(address,address,uint256,bytes)'(from: PromiseOrValue<string>, to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
475
- from?: PromiseOrValue<string>;
476
- }): Promise<PopulatedTransaction>;
477
- /**
478
- * @returns a populated transaction for the setApprovalForAll contract function
479
- */
480
- populateSetApprovalForAll(operator: PromiseOrValue<string>, approved: PromiseOrValue<boolean>, overrides?: Overrides & {
481
- from?: PromiseOrValue<string>;
482
- }): Promise<PopulatedTransaction>;
483
- /**
484
- * @returns a populated transaction for the setBaseURI contract function
485
- */
486
- populateSetBaseURI(baseURI_: PromiseOrValue<string>, overrides?: Overrides & {
487
- from?: PromiseOrValue<string>;
488
- }): Promise<PopulatedTransaction>;
489
- /**
490
- * @returns a populated transaction for the setContractURI contract function
491
- */
492
- populateSetContractURI(_contractURI: PromiseOrValue<string>, overrides?: Overrides & {
493
- from?: PromiseOrValue<string>;
494
- }): Promise<PopulatedTransaction>;
495
- /**
496
- * @returns a populated transaction for the setDefaultRoyaltyReceiver contract function
497
- */
498
- populateSetDefaultRoyaltyReceiver(receiver: PromiseOrValue<string>, feeNumerator: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
499
- from?: PromiseOrValue<string>;
500
- }): Promise<PopulatedTransaction>;
501
- /**
502
- * @returns a populated transaction for the setNFTRoyaltyReceiver contract function
503
- */
504
- populateSetNFTRoyaltyReceiver(tokenId: PromiseOrValue<BigNumberish>, receiver: PromiseOrValue<string>, feeNumerator: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
505
- from?: PromiseOrValue<string>;
506
- }): Promise<PopulatedTransaction>;
507
- /**
508
- * @returns a populated transaction for the setNFTRoyaltyReceiverBatch contract function
509
- */
510
- populateSetNFTRoyaltyReceiverBatch(tokenIds: PromiseOrValue<BigNumberish>[], receiver: PromiseOrValue<string>, feeNumerator: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
511
- from?: PromiseOrValue<string>;
512
- }): Promise<PopulatedTransaction>;
513
- /**
514
- * @returns a populated transaction for the setOperatorAllowlistRegistry contract function
515
- */
516
- populateSetOperatorAllowlistRegistry(_operatorAllowlist: PromiseOrValue<string>, overrides?: Overrides & {
517
- from?: PromiseOrValue<string>;
518
- }): Promise<PopulatedTransaction>;
519
- }
520
-
521
- export { ERC721MintByID };