@imtbl/sdk 0.0.1-alpha.3 → 0.1.0-alpha

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,3 +1,244 @@
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$1 {
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$1>;
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
+ declare abstract class Signer {
220
+ readonly provider?: Provider;
221
+ abstract getAddress(): Promise<string>;
222
+ abstract signMessage(message: Bytes | string): Promise<string>;
223
+ abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
224
+ abstract connect(provider: Provider): Signer;
225
+ readonly _isSigner: boolean;
226
+ constructor();
227
+ getBalance(blockTag?: BlockTag): Promise<BigNumber>;
228
+ getTransactionCount(blockTag?: BlockTag): Promise<number>;
229
+ estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
230
+ call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
231
+ sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
232
+ getChainId(): Promise<number>;
233
+ getGasPrice(): Promise<BigNumber>;
234
+ getFeeData(): Promise<FeeData$1>;
235
+ resolveName(name: string): Promise<string>;
236
+ checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
237
+ populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
238
+ _checkProvider(operation?: string): void;
239
+ static isSigner(value: any): value is Signer;
240
+ }
241
+
1
242
  // TypeScript Version: 3.0
2
243
 
3
244
  type AxiosRequestHeaders = Record<string, string | number | boolean>;
@@ -177,6 +418,79 @@ interface AxiosInstance extends Axios {
177
418
  (url: string, config?: AxiosRequestConfig): AxiosPromise;
178
419
  }
179
420
 
421
+ /**
422
+ * Generates a deterministic Stark private key from the provided signer.
423
+ * @returns the private key as a hex string
424
+ */
425
+ declare function generateLegacyStarkPrivateKey(signer: Signer): Promise<string>;
426
+
427
+ /**
428
+ * An abstraction of a Stark account, which can be used to sign messages and transactions on StarkEx to execute state changing operations
429
+ */
430
+ interface StarkSigner {
431
+ /**
432
+ * Signs the prefixed-message
433
+ * @params message - this must be a UTF8-message
434
+ * @example "0x1234"
435
+ * @returns the signed prefixed-message
436
+ */
437
+ signMessage(message: string): Promise<string>;
438
+ /**
439
+ * Get the Signer address
440
+ * @returns the Signer's checksum address
441
+ */
442
+ getAddress(): string | Promise<string>;
443
+ }
444
+ /**
445
+ * A pair of Signers
446
+ */
447
+ interface WalletConnection {
448
+ /**
449
+ * The L1 signer
450
+ */
451
+ ethSigner: Signer;
452
+ /**
453
+ * The L2 signer
454
+ */
455
+ starkSigner: StarkSigner;
456
+ }
457
+
458
+ /**
459
+ * An ERC20 token
460
+ */
461
+ interface ERC20Token {
462
+ type: 'ERC20';
463
+ tokenAddress: string;
464
+ }
465
+ /**
466
+ * An ETH token
467
+ */
468
+ interface ETHToken {
469
+ type: 'ETH';
470
+ }
471
+ /**
472
+ * An amount of ETH token of unit Wei
473
+ */
474
+ interface ETHAmount extends ETHToken {
475
+ /**
476
+ * An amount in unit Wei
477
+ */
478
+ amount: string;
479
+ }
480
+ /**
481
+ * The token details and amount of ERC20 token units
482
+ */
483
+ interface ERC20Amount extends ERC20Token {
484
+ /**
485
+ * An amount in units for the given ERC20 token
486
+ */
487
+ amount: string;
488
+ }
489
+ /**
490
+ * Union type that represents exchange token type amounts
491
+ */
492
+ declare type ExchangeTokenAmount = ETHAmount | ERC20Amount;
493
+
180
494
  /**
181
495
  * Immutable X API
182
496
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -9573,6 +9887,30 @@ declare class WithdrawalsApi extends BaseAPI {
9573
9887
  */
9574
9888
  listWithdrawals(requestParameters?: WithdrawalsApiListWithdrawalsRequest, options?: AxiosRequestConfig): Promise<AxiosResponse<ListWithdrawalsResponse, any>>;
9575
9889
  }
9890
+ /**
9891
+ * Parameter required to Mint tokens
9892
+ */
9893
+ declare type UnsignedMintRequest = Omit<MintRequest, 'auth_signature'>;
9894
+ /**
9895
+ * Parameter required to create a Transfer
9896
+ */
9897
+ declare type UnsignedExchangeTransferRequest = ExchangeTokenAmount & {
9898
+ /**
9899
+ * Ethereum address of the receiving user
9900
+ */
9901
+ receiver: string;
9902
+ /**
9903
+ * Exchange transaction ID
9904
+ */
9905
+ transactionID: string;
9906
+ };
9907
+
9908
+ /**
9909
+ * Creates a new Stark Signer
9910
+ * @params starkPrivateKey - the private key as a hex string
9911
+ * @returns a StarkSigner
9912
+ */
9913
+ declare function createStarkSigner(starkPrivateKey: string): StarkSigner;
9576
9914
 
9577
9915
  /**
9578
9916
  * The configuration for the Ethereum network
@@ -9613,18 +9951,14 @@ interface ModuleConfiguration<T> {
9613
9951
  overrides?: T;
9614
9952
  }
9615
9953
 
9616
- interface StarkExOverrides {
9954
+ interface ImxOverrides {
9617
9955
  immutableXConfig: ImmutableXConfiguration;
9618
9956
  }
9619
- interface StarkExModuleConfiguration extends ModuleConfiguration<StarkExOverrides> {
9620
- }
9621
- declare class StarkExConfiguration {
9622
- readonly immutableXConfig: ImmutableXConfiguration;
9623
- readonly baseConfig: ImmutableConfiguration;
9624
- constructor({ baseConfig, overrides }: StarkExModuleConfiguration);
9957
+ interface ImxModuleConfiguration extends ModuleConfiguration<ImxOverrides> {
9625
9958
  }
9626
9959
 
9627
- declare const StarkExAPIFactory: (config: StarkExConfiguration) => {
9960
+ declare class ImmutableXClient {
9961
+ private immutableX;
9628
9962
  depositsApi: DepositsApi;
9629
9963
  mintsApi: MintsApi;
9630
9964
  ordersApi: OrdersApi;
@@ -9641,6 +9975,332 @@ declare const StarkExAPIFactory: (config: StarkExConfiguration) => {
9641
9975
  metadataApi: MetadataApi;
9642
9976
  metadataRefreshesApi: MetadataRefreshesApi;
9643
9977
  projectsApi: ProjectsApi;
9644
- };
9978
+ constructor(config: ImxModuleConfiguration);
9979
+ /**
9980
+ * Get details of a Deposit with the given ID
9981
+ * @param request - the request object containing the parameters to be provided in the API request
9982
+ * @returns a promise that resolves with the requested Deposit
9983
+ * @throws {@link index.IMXError}
9984
+ */
9985
+ getDeposit(request: DepositsApiGetDepositRequest): Promise<Deposit>;
9986
+ /**
9987
+ * Get a list of Deposits
9988
+ * @param request - optional request object containing the parameters to be provided in the API request
9989
+ * @returns a promise that resolves with the requested list of Deposits
9990
+ * @throws {@link index.IMXError}
9991
+ */
9992
+ listDeposits(request?: DepositsApiListDepositsRequest): Promise<ListDepositsResponse>;
9993
+ /**
9994
+ * Get Stark keys for a registered User
9995
+ * @param ethAddress - the eth address of the User
9996
+ * @returns a promise that resolves with the requested User
9997
+ * @throws {@link index.IMXError}
9998
+ */
9999
+ getUser(ethAddress: string): Promise<GetUsersApiResponse>;
10000
+ /**
10001
+ * Get details of an Asset
10002
+ * @param request - the request object containing the parameters to be provided in the API request
10003
+ * @returns a promise that resolves with the requested Asset
10004
+ * @throws {@link index.IMXError}
10005
+ */
10006
+ getAsset(request: AssetsApiGetAssetRequest): Promise<Asset>;
10007
+ /**
10008
+ * Get a list of Assets
10009
+ * @param request - optional request object containing the parameters to be provided in the API request
10010
+ * @returns a promise that resolves with the requested list of Assets
10011
+ * @throws {@link index.IMXError}
10012
+ */
10013
+ listAssets(request?: AssetsApiListAssetsRequest): Promise<ListAssetsResponse>;
10014
+ /**
10015
+ * Create a Collection
10016
+ * @param ethSigner - the L1 signer
10017
+ * @param request - the request object to be provided in the API request
10018
+ * @returns a promise that resolves with the created Collection
10019
+ * @throws {@link index.IMXError}
10020
+ */
10021
+ createCollection(ethSigner: Signer, request: CreateCollectionRequest): Promise<Collection>;
10022
+ /**
10023
+ * Get details of a Collection at the given address
10024
+ * @param request - the request object containing the parameters to be provided in the API request
10025
+ * @returns a promise that resolves with the requested Collection
10026
+ * @throws {@link index.IMXError}
10027
+ */
10028
+ getCollection(request: CollectionsApiGetCollectionRequest): Promise<Collection>;
10029
+ /**
10030
+ * Get a list of Collection filters
10031
+ * @param request - the request object containing the parameters to be provided in the API request
10032
+ * @returns a promise that resolves with the requested list of Collection Filters
10033
+ * @throws {@link index.IMXError}
10034
+ */
10035
+ listCollectionFilters(request: CollectionsApiListCollectionFiltersRequest): Promise<CollectionFilter>;
10036
+ /**
10037
+ * Get a list of Collections
10038
+ * @param request - optional request object containing the parameters to be provided in the API request
10039
+ * @returns a promise that resolves with the requested list of Collections
10040
+ * @throws {@link index.IMXError}
10041
+ */
10042
+ listCollections(request?: CollectionsApiListCollectionsRequest): Promise<ListCollectionsResponse>;
10043
+ /**
10044
+ * Update a Collection
10045
+ * @param ethSigner - the L1 signer
10046
+ * @param collectionAddress - the Collection contract address
10047
+ * @param request - the request object containing the parameters to be provided in the API request
10048
+ * @returns a promise that resolves with the updated Collection
10049
+ * @throws {@link index.IMXError}
10050
+ */
10051
+ updateCollection(ethSigner: Signer, collectionAddress: string, request: UpdateCollectionRequest): Promise<Collection>;
10052
+ /**
10053
+ * Add metadata schema to Collection
10054
+ * @param ethSigner - the L1 signer
10055
+ * @param collectionAddress - the Collection contract address
10056
+ * @param request - the request object containing the parameters to be provided in the API request
10057
+ * @returns a promise that resolves with the SuccessResponse if successful
10058
+ * @throws {@link index.IMXError}
10059
+ */
10060
+ addMetadataSchemaToCollection(ethSigner: Signer, collectionAddress: string, request: AddMetadataSchemaToCollectionRequest): Promise<SuccessResponse>;
10061
+ /**
10062
+ * Get Metadata schema
10063
+ * @param request - the request object containing the parameters to be provided in the API request
10064
+ * @returns a promise that resolves with the requested Metadata schema
10065
+ * @throws {@link index.IMXError}
10066
+ */
10067
+ getMetadataSchema(request: MetadataApiGetMetadataSchemaRequest): Promise<MetadataSchemaProperty[]>;
10068
+ /**
10069
+ * Update metadata schema by name
10070
+ * @param ethSigner - the L1 signer
10071
+ * @param collectionAddress - the Collection contract address
10072
+ * @param name - the Metadata schema name
10073
+ * @param request - the request object containing the parameters to be provided in the API request
10074
+ * @returns a promise that resolves with the SuccessResponse if successful
10075
+ * @throws {@link index.IMXError}
10076
+ */
10077
+ updateMetadataSchemaByName(ethSigner: Signer, collectionAddress: string, name: string, request: MetadataSchemaRequest): Promise<SuccessResponse>;
10078
+ /**
10079
+ * Get a list of metadata refreshes
10080
+ * @param ethSigner - the L1 signer
10081
+ * @param collectionAddress - the Collection contract address
10082
+ * @param pageSize - the page size of the result
10083
+ * @param cursor - the cursor
10084
+ * @returns a promise that resolves with the requested metadata refreshes
10085
+ * @throws {@link index.IMXError}
10086
+ */
10087
+ listMetadataRefreshes(ethSigner: Signer, collectionAddress?: string, pageSize?: number, cursor?: string): Promise<GetMetadataRefreshes>;
10088
+ /**
10089
+ * Get a list of metadata refresh errors
10090
+ * @param ethSigner - the L1 signer
10091
+ * @param refreshId - the metadata refresh ID
10092
+ * @param pageSize - the page size of the result
10093
+ * @param cursor - the cursor
10094
+ * @returns a promise that resolves with the requested metadata refresh errors
10095
+ * @throws {@link index.IMXError}
10096
+ */
10097
+ getMetadataRefreshErrors(ethSigner: Signer, refreshId: string, pageSize?: number, cursor?: string): Promise<GetMetadataRefreshErrorsResponse>;
10098
+ /**
10099
+ * Get a list of metadata refresh results
10100
+ * @param ethSigner - the L1 signer
10101
+ * @param refreshId - the metadata refresh ID
10102
+ * @returns a promise that resolves with the requested metadata refresh results
10103
+ * @throws {@link index.IMXError}
10104
+ */
10105
+ getMetadataRefreshResults(ethSigner: Signer, refreshId: string): Promise<GetMetadataRefreshResponse>;
10106
+ /**
10107
+ * Request a metadata refresh
10108
+ * @param ethSigner - the L1 signer
10109
+ * @param request the request object containing the parameters to be provided in the API request
10110
+ * @returns a promise that resolves with the requested metadata refresh
10111
+ * @throws {@link index.IMXError}
10112
+ */
10113
+ createMetadataRefresh(ethSigner: Signer, request: CreateMetadataRefreshRequest): Promise<CreateMetadataRefreshResponse>;
10114
+ /**
10115
+ * Create a Project
10116
+ * @param ethSigner - the L1 signer
10117
+ * @param request - the request object containing the parameters to be provided in the API request
10118
+ * @returns a promise that resolves with the created Project
10119
+ * @throws {@link index.IMXError}
10120
+ */
10121
+ createProject(ethSigner: Signer, request: CreateProjectRequest): Promise<CreateProjectResponse>;
10122
+ /**
10123
+ * Get a Project
10124
+ * @param ethSigner - the L1 signer
10125
+ * @param id - the Project ID
10126
+ * @returns a promise that resolves with the requested Project
10127
+ * @throws {@link index.IMXError}
10128
+ */
10129
+ getProject(ethSigner: Signer, id: string): Promise<Project>;
10130
+ /**
10131
+ * Get Projects owned by the given User
10132
+ * @param ethSigner - the L1 signer
10133
+ * @param pageSize - the page size of the result
10134
+ * @param cursor - the cursor
10135
+ * @param orderBy - the property to sort by
10136
+ * @param direction - direction to sort (asc/desc)
10137
+ * @returns a promise that resolves with the requested Projects
10138
+ * @throws {@link index.IMXError}
10139
+ */
10140
+ getProjects(ethSigner: Signer, pageSize?: number, cursor?: string, orderBy?: string, direction?: string): Promise<GetProjectsResponse>;
10141
+ /**
10142
+ * Get the token Balances of the User
10143
+ * @param request - the request object containing the parameters to be provided in the API request
10144
+ * @returns a promise that resolves with the requested Balance
10145
+ * @throws {@link index.IMXError}
10146
+ */
10147
+ getBalance(request: BalancesApiGetBalanceRequest): Promise<Balance>;
10148
+ /**
10149
+ * Get a list of Balances for given User
10150
+ * @param request the request object containing the parameters to be provided in the API request
10151
+ * @returns a promise that resolves with the requested list of Balances
10152
+ * @throws {@link index.IMXError}
10153
+ */
10154
+ listBalances(request: BalancesApiListBalancesRequest): Promise<ListBalancesResponse>;
10155
+ /**
10156
+ * Get details of a Mint with the given ID
10157
+ * @param request the request object containing the parameters to be provided in the API request
10158
+ * @returns a promise that resolves with the requested Mint
10159
+ * @throws {@link index.IMXError}
10160
+ */
10161
+ getMint(request: MintsApiGetMintRequest): Promise<Mint[]>;
10162
+ /**
10163
+ * Get a list of Mints
10164
+ * @param request optional request object containing the parameters to be provided in the API request
10165
+ * @returns a promise that resolves with the requested list of Mints
10166
+ * @throws {@link index.IMXError}
10167
+ */
10168
+ listMints(request?: MintsApiListMintsRequest): Promise<ListMintsResponse>;
10169
+ /**
10170
+ * Mint tokens in a batch with fees
10171
+ * @param ethSigner - the L1 signer
10172
+ * @param request - the request object to be provided in the API request
10173
+ * @returns a promise that resolves with the minted tokens
10174
+ * @throws {@link index.IMXError}
10175
+ */
10176
+ mint(ethSigner: Signer, request: UnsignedMintRequest): Promise<MintTokensResponse>;
10177
+ /**
10178
+ * Get a list of Withdrawals
10179
+ * @param request - optional request object containing the parameters to be provided in the API request
10180
+ * @returns a promise that resolves with the requested list of Withdrawals
10181
+ * @throws {@link index.IMXError}
10182
+ */
10183
+ listWithdrawals(request?: WithdrawalsApiListWithdrawalsRequest): Promise<ListWithdrawalsResponse>;
10184
+ /**
10185
+ * Get details of Withdrawal with the given ID
10186
+ * @param request - the request object containing the parameters to be provided in the API request
10187
+ * @returns a promise that resolves with the requested Withdrawal
10188
+ * @throws {@link index.IMXError}
10189
+ */
10190
+ getWithdrawal(request: WithdrawalsApiGetWithdrawalRequest): Promise<Withdrawal>;
10191
+ /**
10192
+ * Get details of an Order with the given ID
10193
+ * @param request - the request object containing the parameters to be provided in the API request
10194
+ * @returns a promise that resolves with the requested Order
10195
+ * @throws {@link index.IMXError}
10196
+ */
10197
+ getOrder(request: OrdersApiGetOrderRequest): Promise<Order>;
10198
+ /**
10199
+ * Get a list of Orders
10200
+ * @param request - optional request object containing the parameters to be provided in the API request
10201
+ * @returns a promise that resolves with the requested list of Orders
10202
+ * @throws {@link index.IMXError}
10203
+ */
10204
+ listOrders(request?: OrdersApiListOrdersRequest): Promise<ListOrdersResponse>;
10205
+ /**
10206
+ * Get details of a Trade with the given ID
10207
+ * @param request - the request object containing the parameters to be provided in the API request
10208
+ * @returns a promise that resolves with the requested Trade
10209
+ * @throws {@link index.IMXError}
10210
+ */
10211
+ getTrade(request: TradesApiGetTradeRequest): Promise<Trade>;
10212
+ /**
10213
+ * Get a list of Trades
10214
+ * @param request - optional request object containing the parameters to be provided in the API request
10215
+ * @returns a promise that resolves with the requested list of Trades
10216
+ * @throws {@link index.IMXError}
10217
+ */
10218
+ listTrades(request?: TradesApiListTradesRequest): Promise<ListTradesResponse>;
10219
+ /**
10220
+ * Get details of a Token
10221
+ * @param request - the request object containing the parameters to be provided in the API request
10222
+ * @returns a promise that resolves with the requested Token
10223
+ * @throws {@link index.IMXError}
10224
+ */
10225
+ getToken(request: TokensApiGetTokenRequest): Promise<TokenDetails>;
10226
+ /**
10227
+ * Get a list of Tokens
10228
+ * @param request - optional request object containing the parameters to be provided in the API request
10229
+ * @returns a promise that resolves with the requested list of Tokens
10230
+ * @throws {@link index.IMXError}
10231
+ */
10232
+ listTokens(request?: TokensApiListTokensRequest): Promise<ListTokensResponse>;
10233
+ /**
10234
+ * Get details of a Transfer with the given ID
10235
+ * @param request - the request object containing the parameters to be provided in the API request
10236
+ * @returns a promise that resolves with the requested Transfer
10237
+ * @throws {@link index.IMXError}
10238
+ */
10239
+ getTransfer(request: TransfersApiGetTransferRequest): Promise<Transfer>;
10240
+ /**
10241
+ * Get a list of Transfers
10242
+ * @param request - optional request object containing the parameters to be provided in the API request
10243
+ * @returns a promise that resolves with the requested list of Transfers
10244
+ * @throws {@link index.IMXError}
10245
+ */
10246
+ listTransfers(request?: TransfersApiListTransfersRequest): Promise<ListTransfersResponse>;
10247
+ /**
10248
+ * Create a new Exchange transaction
10249
+ * @param request - the request object to be provided in the API request
10250
+ * @returns a promise that resolves with the created Exchange Transaction
10251
+ * @throws {@link index.IMXError}
10252
+ */
10253
+ createExchange(request: ExchangesApiCreateExchangeRequest): Promise<ExchangeCreateExchangeAndURLResponse>;
10254
+ /**
10255
+ * Get an Exchange transaction
10256
+ * @param request - the request object to be provided in the API request
10257
+ * @returns a promise that resolves with the Exchange Transaction
10258
+ * @throws {@link index.IMXError}
10259
+ */
10260
+ getExchange(request: ExchangesApiGetExchangeRequest): Promise<Exchange>;
10261
+ /**
10262
+ * Get Exchange transactions
10263
+ * @param request - the request object to be provided in the API request
10264
+ * @returns a promise that resolves with Exchange Transactions
10265
+ * @throws {@link index.IMXError}
10266
+ */
10267
+ getExchanges(request: ExchangesApiGetExchangesRequest): Promise<GetTransactionsResponse>;
10268
+ /**
10269
+ * Create a new Transfer request
10270
+ * @param walletConnection - the pair of Eth/Stark signers
10271
+ * @param request - the request object to be provided in the API request
10272
+ * @returns a promise that resolves with the created Exchange Transfer
10273
+ * @throws {@link index.IMXError}
10274
+ */
10275
+ exchangeTransfer(walletConnection: WalletConnection, request: UnsignedExchangeTransferRequest): Promise<CreateTransferResponseV1>;
10276
+ /**
10277
+ * Create a new nft primary transaction
10278
+ * @param request - the request object to be provided in the API request
10279
+ * @returns a promise that resolves with the created nft primary Transaction
10280
+ * @throws {@link index.IMXError}
10281
+ */
10282
+ createNftPrimary(request: NftCheckoutPrimaryApiCreateNftPrimaryRequest): Promise<NftprimarytransactionCreateResponse>;
10283
+ /**
10284
+ * Get nft primary supported currencies and their limits
10285
+ * @param request - the request object to be provided in the API request
10286
+ * @returns a promise that resolves with nft primary Currencies
10287
+ * @throws {@link index.IMXError}
10288
+ */
10289
+ getCurrenciesNFTCheckoutPrimary(request: NftCheckoutPrimaryApiGetCurrenciesNFTCheckoutPrimaryRequest): Promise<CurrencyWithLimits>;
10290
+ /**
10291
+ * Get nft primary transaction by transaction id
10292
+ * @param request - the request object to be provided in the API request
10293
+ * @returns a promise that resolves with nft primary transaction
10294
+ * @throws {@link index.IMXError}
10295
+ */
10296
+ getNftPrimaryTransaction(request: NftCheckoutPrimaryApiGetNftPrimaryTransactionRequest): Promise<NftprimarytransactionGetResponse>;
10297
+ /**
10298
+ * Get list of nft primary transactions
10299
+ * @param request - the request object to be provided in the API request
10300
+ * @returns a promise that resolves with nft primary transaction
10301
+ * @throws {@link index.IMXError}
10302
+ */
10303
+ getNftPrimaryTransactions(request: NftCheckoutPrimaryApiGetNftPrimaryTransactionsRequest): Promise<NftprimarytransactionListTransactionsResponse>;
10304
+ }
9645
10305
 
9646
- export { StarkExAPIFactory, StarkExConfiguration, StarkExOverrides };
10306
+ export { ImmutableXClient, ImxModuleConfiguration as ImxClientModuleConfiguration, WalletConnection as ImxClientWalletConnection, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey };