@imtbl/sdk 0.2.3-alpha.1 → 0.2.3

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,435 +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 class ERC721PermissionedMintable {
257
- private readonly contract;
258
- constructor(contractAddress: string);
259
- /**
260
- * Read functions
261
- */
262
- /**
263
- * @returns the DEFAULT_ADMIN_ROLE as a string.
264
- */
265
- DEFAULT_ADMIN_ROLE(provider: Provider, overrides?: CallOverrides): Promise<string>;
266
- /**
267
- * @returns the MINTER_ROLE as a string.
268
- */
269
- MINTER_ROLE(provider: Provider, overrides?: CallOverrides): Promise<string>;
270
- /**
271
- * @returns the balance of an address as a BigNumber.
272
- */
273
- balanceOf(provider: Provider, owner: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
274
- /**
275
- * @returns the baseURI as a string.
276
- */
277
- baseURI(provider: Provider, overrides?: CallOverrides): Promise<string>;
278
- /**
279
- * @returns the contractURI as a string.
280
- */
281
- contractURI(provider: Provider, overrides?: CallOverrides): Promise<string>;
282
- /**
283
- * @returns admin addresses as an array of strings.
284
- */
285
- getAdmins(provider: Provider, overrides?: CallOverrides): Promise<string[]>;
286
- /**
287
- * @returns the approved address for a token ID, or zero if no address set.
288
- */
289
- getApproved(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
290
- /**
291
- * @returns the role admin address.
292
- */
293
- getRoleAdmin(provider: Provider, role: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<string>;
294
- /**
295
- * @returns the role member address at a particular index.
296
- */
297
- getRoleMember(provider: Provider, role: PromiseOrValue<BytesLike>, index: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
298
- /**
299
- * @returns the role member count as a BigNumber.
300
- */
301
- getRoleMemberCount(provider: Provider, role: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<BigNumber>;
302
- /**
303
- * @returns a boolean for whether an account has a particular role.
304
- */
305
- hasRole(provider: Provider, role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
306
- /**
307
- * @returns a booolean that tells whether an operator is approved by a given owner.
308
- */
309
- isApprovedForAll(provider: Provider, owner: PromiseOrValue<string>, operator: PromiseOrValue<string>, overrides?: CallOverrides): Promise<boolean>;
310
- /**
311
- * @returns the name of the contract as a string.
312
- */
313
- name(provider: Provider, overrides?: CallOverrides): Promise<string>;
314
- /**
315
- * @returns the owner address of a particular tokenId.
316
- */
317
- ownerOf(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
318
- /**
319
- * @returns the royalty allowlist as a string.
320
- */
321
- royaltyAllowlist(provider: Provider, overrides?: CallOverrides): Promise<string>;
322
- /**
323
- * @returns the royalty information for a particular tokenId.
324
- */
325
- royaltyInfo(provider: Provider, _tokenId: PromiseOrValue<BigNumberish>, _salePrice: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<[string, BigNumber]>;
326
- /**
327
- * @returns the symbol of the contract as a string.
328
- */
329
- symbol(provider: Provider, overrides?: CallOverrides): Promise<string>;
330
- /**
331
- * @returns a token ID at a given index of all the tokens stored by the contract.
332
- */
333
- tokenByIndex(provider: Provider, index: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
334
- /**
335
- * @returns a token ID owned by owner at a given index of its token list.
336
- */
337
- tokenOfOwnerByIndex(provider: Provider, owner: PromiseOrValue<string>, index: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<BigNumber>;
338
- /**
339
- * @returns the Uniform Resource Identifier (URI) for tokenId token.
340
- */
341
- tokenURI(provider: Provider, tokenId: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<string>;
342
- /**
343
- * @returns returns the total amount of tokens stored by the contract.
344
- */
345
- totalSupply(provider: Provider, overrides?: CallOverrides): Promise<BigNumber>;
346
- /**
347
- * Write functions
348
- */
349
- /**
350
- * @returns a populated transaction for the approve contract function
351
- */
352
- populateApprove(to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
353
- from?: PromiseOrValue<string>;
354
- }): Promise<PopulatedTransaction>;
355
- /**
356
- * @returns a populated transaction for the burn contract function
357
- */
358
- populateBurn(tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
359
- from?: PromiseOrValue<string>;
360
- }): Promise<PopulatedTransaction>;
361
- /**
362
- * @returns a populated transaction for the grantMinterRole contract function
363
- */
364
- populateGrantMinterRole(user: PromiseOrValue<string>, overrides?: Overrides & {
365
- from?: PromiseOrValue<string>;
366
- }): Promise<PopulatedTransaction>;
367
- /**
368
- * @returns a populated transaction for the grantRole contract function
369
- */
370
- populateGrantRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
371
- from?: PromiseOrValue<string>;
372
- }): Promise<PopulatedTransaction>;
373
- /**
374
- * @returns a populated transaction for the mint contract function
375
- */
376
- populateMint(to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
377
- from?: PromiseOrValue<string>;
378
- }): Promise<PopulatedTransaction>;
379
- /**
380
- * @returns a populated transaction for the renounceRole contract function
381
- */
382
- populateRenounceRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
383
- from?: PromiseOrValue<string>;
384
- }): Promise<PopulatedTransaction>;
385
- /**
386
- * @returns a populated transaction for the revokeMinterRole contract function
387
- */
388
- populateRevokeMinterRole(user: PromiseOrValue<string>, overrides?: Overrides & {
389
- from?: PromiseOrValue<string>;
390
- }): Promise<PopulatedTransaction>;
391
- /**
392
- * @returns a populated transaction for the revokeRole contract function
393
- */
394
- populateRevokeRole(role: PromiseOrValue<BytesLike>, account: PromiseOrValue<string>, overrides?: Overrides & {
395
- from?: PromiseOrValue<string>;
396
- }): Promise<PopulatedTransaction>;
397
- /**
398
- * @returns a populated transaction for the safeTransferFrom(address,address,uint256) contract function
399
- */
400
- 'populateSafeTransferFrom(address,address,uint256)'(from: PromiseOrValue<string>, to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
401
- from?: PromiseOrValue<string>;
402
- }): Promise<PopulatedTransaction>;
403
- /**
404
- * @returns a populated transaction for the safeTransferFrom(address,address,uint256,bytes) contract function
405
- */
406
- 'populateSafeTransferFrom(address,address,uint256,bytes)'(from: PromiseOrValue<string>, to: PromiseOrValue<string>, tokenId: PromiseOrValue<BigNumberish>, data: PromiseOrValue<BytesLike>, overrides?: Overrides & {
407
- from?: PromiseOrValue<string>;
408
- }): Promise<PopulatedTransaction>;
409
- /**
410
- * @returns a populated transaction for the setApprovalForAll contract function
411
- */
412
- populateSetApprovalForAll(operator: PromiseOrValue<string>, approved: PromiseOrValue<boolean>, overrides?: Overrides & {
413
- from?: PromiseOrValue<string>;
414
- }): Promise<PopulatedTransaction>;
415
- /**
416
- * @returns a populated transaction for the setBaseURI contract function
417
- */
418
- populateSetBaseURI(baseURI_: PromiseOrValue<string>, overrides?: Overrides & {
419
- from?: PromiseOrValue<string>;
420
- }): Promise<PopulatedTransaction>;
421
- /**
422
- * @returns a populated transaction for the setContractURI contract function
423
- */
424
- populateSetContractURI(_contractURI: PromiseOrValue<string>, overrides?: Overrides & {
425
- from?: PromiseOrValue<string>;
426
- }): Promise<PopulatedTransaction>;
427
- /**
428
- * @returns a populated transaction for the setRoyaltyAllowlistRegistry contract function
429
- */
430
- populateSetRoyaltyAllowlistRegistry(_royaltyAllowlist: PromiseOrValue<string>, overrides?: Overrides & {
431
- from?: PromiseOrValue<string>;
432
- }): Promise<PopulatedTransaction>;
433
- }
434
-
435
- export { ERC721PermissionedMintable };