@imtbl/sdk 0.6.0-alpha → 0.7.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,486 +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 IDMintStruct = {
258
- to: PromiseOrValue<string>;
259
- tokenIds: PromiseOrValue<BigNumberish>[];
260
- };
261
- type IDMintStructOutput = [string, BigNumber[]] & {
262
- to: string;
263
- tokenIds: BigNumber[];
264
- };
265
- type TransferRequestStruct = {
266
- from: PromiseOrValue<string>;
267
- tos: PromiseOrValue<string>[];
268
- tokenIds: PromiseOrValue<BigNumberish>[];
269
- };
270
- type TransferRequestStructOutput = [string, string[], BigNumber[]] & {
271
- from: string;
272
- tos: string[];
273
- tokenIds: BigNumber[];
274
- };
275
- }
276
-
277
- type IDMint = ImmutableERC721Base.IDMintStruct;
278
- type TransferRequest = ImmutableERC721Base.TransferRequestStruct;
279
- declare class ERC721PermissionedMintable {
280
- private readonly contract;
281
- constructor(contractAddress: string);
282
- /**
283
- * Read functions
284
- */
285
- /**
286
- * @returns the DEFAULT_ADMIN_ROLE as a string.
287
- */
288
- DEFAULT_ADMIN_ROLE(provider: Provider, overrides?: CallOverrides): Promise<string>;
289
- /**
290
- * @returns the MINTER_ROLE as a string.
291
- */
292
- MINTER_ROLE(provider: Provider, overrides?: CallOverrides): Promise<string>;
293
- /**
294
- * @returns the balance of an address as a BigNumber.
295
- */
296
- balanceOf(provider: Provider, owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
297
- /**
298
- * @returns the baseURI as a string.
299
- */
300
- baseURI(provider: Provider, overrides?: CallOverrides): Promise<string>;
301
- /**
302
- * @returns the contractURI as a string.
303
- */
304
- contractURI(provider: Provider, overrides?: CallOverrides): Promise<string>;
305
- /**
306
- * @returns admin addresses as an array of strings.
307
- */
308
- getAdmins(provider: Provider, overrides?: CallOverrides): Promise<string[]>;
309
- /**
310
- * @returns the approved address for a token ID, or zero if no address set.
311
- */
312
- getApproved(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
313
- /**
314
- * @returns the role admin address.
315
- */
316
- getRoleAdmin(provider: Provider, role: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
317
- /**
318
- * @returns the role member address at a particular index.
319
- */
320
- getRoleMember(provider: Provider, role: PromiseOrValue<BytesLike>, index: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
321
- /**
322
- * @returns the role member count as a BigNumber.
323
- */
324
- getRoleMemberCount(provider: Provider, role: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
325
- /**
326
- * @returns a boolean for whether an account has a particular role.
327
- */
328
- hasRole(provider: Provider, role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
329
- /**
330
- * @returns a booolean that tells whether an operator is approved by a given owner.
331
- */
332
- isApprovedForAll(provider: Provider, owner: PromiseOrValue<string>, operator: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
333
- /**
334
- * @returns the name of the contract as a string.
335
- */
336
- name(provider: Provider, overrides?: CallOverrides): Promise<string>;
337
- /**
338
- * @returns the owner address of a particular tokenId.
339
- */
340
- ownerOf(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
341
- /**
342
- * @returns the royalty allowlist as a string.
343
- */
344
- royaltyAllowlist(provider: Provider, overrides?: CallOverrides): Promise<string>;
345
- /**
346
- * @returns the royalty information for a particular tokenId.
347
- */
348
- royaltyInfo(provider: Provider, _tokenId: PromiseOrValue<BigNumberish>, _salePrice: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string, BigNumber]>;
349
- /**
350
- * @returns the symbol of the contract as a string.
351
- */
352
- symbol(provider: Provider, overrides?: CallOverrides): Promise<string>;
353
- /**
354
- * @returns the Uniform Resource Identifier (URI) for tokenId token.
355
- */
356
- tokenURI(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
357
- /**
358
- * @returns returns the total amount of tokens stored by the contract.
359
- */
360
- totalSupply(provider: Provider, overrides?: CallOverrides): Promise<BigNumber>;
361
- /**
362
- * Write functions
363
- */
364
- /**
365
- * @returns a populated transaction for the approve contract function
366
- */
367
- populateApprove(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
368
- from?: PromiseOrValue<string>;
369
- }): Promise<PopulatedTransaction>;
370
- /**
371
- * @returns a populated transaction for the burn contract function
372
- */
373
- populateBurn(tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
374
- from?: PromiseOrValue<string>;
375
- }): Promise<PopulatedTransaction>;
376
- /**
377
- * @returns a populated transaction for the batch burn contract function
378
- */
379
- populateBurnBatch(tokenIds: PromiseOrValue<BigNumberish>[], overrides?: Overrides & {
380
- from?: PromiseOrValue<string>;
381
- }): Promise<PopulatedTransaction>;
382
- /**
383
- * @returns a populated transaction for the grantMinterRole contract function
384
- */
385
- populateGrantMinterRole(user: PromiseOrValue<string>, overrides?: Overrides & {
386
- from?: PromiseOrValue<string>;
387
- }): Promise<PopulatedTransaction>;
388
- /**
389
- * @returns a populated transaction for the grantRole contract function
390
- */
391
- populateGrantRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
392
- from?: PromiseOrValue<string>;
393
- }): Promise<PopulatedTransaction>;
394
- /**
395
- * @returns a populated transaction for the mint contract function
396
- */
397
- populateMint(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
398
- from?: PromiseOrValue<string>;
399
- }): Promise<PopulatedTransaction>;
400
- /**
401
- * @returns a populated transaction for the batch mint contract function
402
- */
403
- populateSafeMintBatch(mints: IDMint[], overrides?: Overrides & {
404
- from?: PromiseOrValue<string>;
405
- }): Promise<PopulatedTransaction>;
406
- /**
407
- * @returns a populated transaction for the renounceRole contract function
408
- */
409
- populateRenounceRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
410
- from?: PromiseOrValue<string>;
411
- }): Promise<PopulatedTransaction>;
412
- /**
413
- * @returns a populated transaction for the revokeMinterRole contract function
414
- */
415
- populateRevokeMinterRole(user: PromiseOrValue<string>, overrides?: Overrides & {
416
- from?: PromiseOrValue<string>;
417
- }): Promise<PopulatedTransaction>;
418
- /**
419
- * @returns a populated transaction for the revokeRole contract function
420
- */
421
- populateRevokeRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
422
- from?: PromiseOrValue<string>;
423
- }): Promise<PopulatedTransaction>;
424
- /**
425
- * @returns a populated transaction for the batch save transfer from function
426
- */
427
- populateSafeTransferFromBatch(transfers: TransferRequest, overrides?: Overrides & {
428
- from?: PromiseOrValue<string>;
429
- }): Promise<PopulatedTransaction>;
430
- /**
431
- * @returns a populated transaction for the safeTransferFrom(address,address,uint256) contract function
432
- */
433
- 'populateSafeTransferFrom(address,address,uint256)'(from: PromiseOrValue<string>, to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
434
- from?: PromiseOrValue<string>;
435
- }): Promise<PopulatedTransaction>;
436
- /**
437
- * @returns a populated transaction for the safeTransferFrom(address,address,uint256,bytes) contract function
438
- */
439
- 'populateSafeTransferFrom(address,address,uint256,bytes)'(from: PromiseOrValue<string>, to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
440
- from?: PromiseOrValue<string>;
441
- }): Promise<PopulatedTransaction>;
442
- /**
443
- * @returns a populated transaction for the setApprovalForAll contract function
444
- */
445
- populateSetApprovalForAll(operator: PromiseOrValue<string>, approved: PromiseOrValue<boolean>, overrides?: Overrides & {
446
- from?: PromiseOrValue<string>;
447
- }): Promise<PopulatedTransaction>;
448
- /**
449
- * @returns a populated transaction for the setBaseURI contract function
450
- */
451
- populateSetBaseURI(baseURI_: PromiseOrValue<string>, overrides?: Overrides & {
452
- from?: PromiseOrValue<string>;
453
- }): Promise<PopulatedTransaction>;
454
- /**
455
- * @returns a populated transaction for the setContractURI contract function
456
- */
457
- populateSetContractURI(_contractURI: PromiseOrValue<string>, overrides?: Overrides & {
458
- from?: PromiseOrValue<string>;
459
- }): Promise<PopulatedTransaction>;
460
- /**
461
- * @returns a populated transaction for the setDefaultRoyaltyReceiver contract function
462
- */
463
- populateSetDefaultRoyaltyReceiver(receiver: PromiseOrValue<string>, feeNumerator: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
464
- from?: PromiseOrValue<string>;
465
- }): Promise<PopulatedTransaction>;
466
- /**
467
- * @returns a populated transaction for the setNFTRoyaltyReceiver contract function
468
- */
469
- populateSetNFTRoyaltyReceiver(tokenId: PromiseOrValue<BigNumberish>, receiver: PromiseOrValue<string>, feeNumerator: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
470
- from?: PromiseOrValue<string>;
471
- }): Promise<PopulatedTransaction>;
472
- /**
473
- * @returns a populated transaction for the setNFTRoyaltyReceiverBatch contract function
474
- */
475
- populateSetNFTRoyaltyReceiverBatch(tokenIds: PromiseOrValue<BigNumberish>[], receiver: PromiseOrValue<string>, feeNumerator: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
476
- from?: PromiseOrValue<string>;
477
- }): Promise<PopulatedTransaction>;
478
- /**
479
- * @returns a populated transaction for the setRoyaltyAllowlistRegistry contract function
480
- */
481
- populateSetRoyaltyAllowlistRegistry(_royaltyAllowlist: PromiseOrValue<string>, overrides?: Overrides & {
482
- from?: PromiseOrValue<string>;
483
- }): Promise<PopulatedTransaction>;
484
- }
485
-
486
- export { ERC721PermissionedMintable };