@imtbl/sdk 1.19.2-alpha → 1.19.2-alpha.2
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.
- package/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/{BridgeWidget-24521d11.js → BridgeWidget-e20aae24.js} +1 -1
- package/dist/browser/checkout/{HorizontalMenu-actual-6612c0c3.js → HorizontalMenu-actual-575774d2.js} +1 -1
- package/dist/browser/checkout/{OnRampWidget-d264f707.js → OnRampWidget-66f6516f.js} +1 -1
- package/dist/browser/checkout/SaleWidget-661a9733.js +2 -0
- package/dist/browser/checkout/{SpendingCapHero-0db6d7ed.js → SpendingCapHero-ef4695ef.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-2c06420c.js → SwapWidget-6f35a346.js} +1 -1
- package/dist/browser/checkout/{TopUpView-d9658bbd.js → TopUpView-4c41c2ba.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-43fb112d.js → WalletWidget-a098915f.js} +1 -1
- package/dist/browser/checkout/{auto-track-a398bcd2.js → auto-track-2347c952.js} +1 -1
- package/dist/browser/checkout/{balance-124a9c3c.js → balance-8eece366.js} +1 -1
- package/dist/browser/checkout/{index-384fe7dd.js → index-291e03a6.js} +1 -1
- package/dist/browser/checkout/{index-e22be227.js → index-36e30a03.js} +1 -1
- package/dist/browser/checkout/index-454df514.js +1 -0
- package/dist/browser/checkout/{index-6e2b798d.js → index-670cc439.js} +1 -1
- package/dist/browser/checkout/{index-dcf79a29.js → index-68b39d4d.js} +1 -1
- package/dist/browser/checkout/{index-5327f330.js → index-9a484e52.js} +1 -1
- package/dist/browser/checkout/{index-bc84abbd.js → index-a55bea1a.js} +1 -1
- package/dist/browser/checkout/{index-80d8482d.js → index-c9bcb679.js} +2 -2
- package/dist/browser/checkout/{index.umd-4fe7c784.js → index.umd-d7a104a3.js} +1 -1
- package/dist/browser/checkout/{retry-21d3107e.js → retry-90e79a4a.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +4 -4
- package/dist/checkout.d.ts +213 -573
- package/dist/checkout.js +4 -4
- package/dist/config.js +1 -1
- package/dist/index.browser.js +13 -13
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +51 -61
- package/dist/index.d.ts +1158 -1712
- package/dist/index.js +52 -62
- package/dist/orderbook.js +1 -1
- package/dist/passport.d.ts +478 -838
- package/dist/passport.js +4 -4
- package/dist/x.d.ts +103 -657
- package/dist/x.js +47 -58
- package/package.json +1 -1
- package/dist/browser/checkout/SaleWidget-82dbc082.js +0 -2
- package/dist/browser/checkout/index-9ed7d230.js +0 -1
package/dist/passport.d.ts
CHANGED
|
@@ -20,814 +20,6 @@ declare class PassportError extends Error {
|
|
|
20
20
|
constructor(message: string, type: PassportErrorType);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
declare type Bytes = ArrayLike<number>;
|
|
24
|
-
declare type BytesLike = Bytes | string;
|
|
25
|
-
interface Hexable {
|
|
26
|
-
toHexString(): string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
|
|
30
|
-
declare class BigNumber implements Hexable {
|
|
31
|
-
readonly _hex: string;
|
|
32
|
-
readonly _isBigNumber: boolean;
|
|
33
|
-
constructor(constructorGuard: any, hex: string);
|
|
34
|
-
fromTwos(value: number): BigNumber;
|
|
35
|
-
toTwos(value: number): BigNumber;
|
|
36
|
-
abs(): BigNumber;
|
|
37
|
-
add(other: BigNumberish): BigNumber;
|
|
38
|
-
sub(other: BigNumberish): BigNumber;
|
|
39
|
-
div(other: BigNumberish): BigNumber;
|
|
40
|
-
mul(other: BigNumberish): BigNumber;
|
|
41
|
-
mod(other: BigNumberish): BigNumber;
|
|
42
|
-
pow(other: BigNumberish): BigNumber;
|
|
43
|
-
and(other: BigNumberish): BigNumber;
|
|
44
|
-
or(other: BigNumberish): BigNumber;
|
|
45
|
-
xor(other: BigNumberish): BigNumber;
|
|
46
|
-
mask(value: number): BigNumber;
|
|
47
|
-
shl(value: number): BigNumber;
|
|
48
|
-
shr(value: number): BigNumber;
|
|
49
|
-
eq(other: BigNumberish): boolean;
|
|
50
|
-
lt(other: BigNumberish): boolean;
|
|
51
|
-
lte(other: BigNumberish): boolean;
|
|
52
|
-
gt(other: BigNumberish): boolean;
|
|
53
|
-
gte(other: BigNumberish): boolean;
|
|
54
|
-
isNegative(): boolean;
|
|
55
|
-
isZero(): boolean;
|
|
56
|
-
toNumber(): number;
|
|
57
|
-
toBigInt(): bigint;
|
|
58
|
-
toString(): string;
|
|
59
|
-
toHexString(): string;
|
|
60
|
-
toJSON(key?: string): any;
|
|
61
|
-
static from(value: any): BigNumber;
|
|
62
|
-
static isBigNumber(value: any): value is BigNumber;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
declare type Deferrable<T> = {
|
|
66
|
-
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
67
|
-
};
|
|
68
|
-
declare class Description<T = any> {
|
|
69
|
-
constructor(info: {
|
|
70
|
-
[K in keyof T]: T[K];
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
declare type Network = {
|
|
75
|
-
name: string;
|
|
76
|
-
chainId: number;
|
|
77
|
-
ensAddress?: string;
|
|
78
|
-
_defaultProvider?: (providers: any, options?: any) => any;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
declare type AccessList = Array<{
|
|
82
|
-
address: string;
|
|
83
|
-
storageKeys: Array<string>;
|
|
84
|
-
}>;
|
|
85
|
-
declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
86
|
-
interface Transaction {
|
|
87
|
-
hash?: string;
|
|
88
|
-
to?: string;
|
|
89
|
-
from?: string;
|
|
90
|
-
nonce: number;
|
|
91
|
-
gasLimit: BigNumber;
|
|
92
|
-
gasPrice?: BigNumber;
|
|
93
|
-
data: string;
|
|
94
|
-
value: BigNumber;
|
|
95
|
-
chainId: number;
|
|
96
|
-
r?: string;
|
|
97
|
-
s?: string;
|
|
98
|
-
v?: number;
|
|
99
|
-
type?: number | null;
|
|
100
|
-
accessList?: AccessList;
|
|
101
|
-
maxPriorityFeePerGas?: BigNumber;
|
|
102
|
-
maxFeePerGas?: BigNumber;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
interface OnceBlockable {
|
|
106
|
-
once(eventName: "block", handler: () => void): void;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
declare type TransactionRequest = {
|
|
110
|
-
to?: string;
|
|
111
|
-
from?: string;
|
|
112
|
-
nonce?: BigNumberish;
|
|
113
|
-
gasLimit?: BigNumberish;
|
|
114
|
-
gasPrice?: BigNumberish;
|
|
115
|
-
data?: BytesLike;
|
|
116
|
-
value?: BigNumberish;
|
|
117
|
-
chainId?: number;
|
|
118
|
-
type?: number;
|
|
119
|
-
accessList?: AccessListish;
|
|
120
|
-
maxPriorityFeePerGas?: BigNumberish;
|
|
121
|
-
maxFeePerGas?: BigNumberish;
|
|
122
|
-
customData?: Record<string, any>;
|
|
123
|
-
ccipReadEnabled?: boolean;
|
|
124
|
-
};
|
|
125
|
-
interface TransactionResponse extends Transaction {
|
|
126
|
-
hash: string;
|
|
127
|
-
blockNumber?: number;
|
|
128
|
-
blockHash?: string;
|
|
129
|
-
timestamp?: number;
|
|
130
|
-
confirmations: number;
|
|
131
|
-
from: string;
|
|
132
|
-
raw?: string;
|
|
133
|
-
wait: (confirmations?: number) => Promise<TransactionReceipt>;
|
|
134
|
-
}
|
|
135
|
-
declare type BlockTag = string | number;
|
|
136
|
-
interface _Block {
|
|
137
|
-
hash: string;
|
|
138
|
-
parentHash: string;
|
|
139
|
-
number: number;
|
|
140
|
-
timestamp: number;
|
|
141
|
-
nonce: string;
|
|
142
|
-
difficulty: number;
|
|
143
|
-
_difficulty: BigNumber;
|
|
144
|
-
gasLimit: BigNumber;
|
|
145
|
-
gasUsed: BigNumber;
|
|
146
|
-
miner: string;
|
|
147
|
-
extraData: string;
|
|
148
|
-
baseFeePerGas?: null | BigNumber;
|
|
149
|
-
}
|
|
150
|
-
interface Block extends _Block {
|
|
151
|
-
transactions: Array<string>;
|
|
152
|
-
}
|
|
153
|
-
interface BlockWithTransactions extends _Block {
|
|
154
|
-
transactions: Array<TransactionResponse>;
|
|
155
|
-
}
|
|
156
|
-
interface Log {
|
|
157
|
-
blockNumber: number;
|
|
158
|
-
blockHash: string;
|
|
159
|
-
transactionIndex: number;
|
|
160
|
-
removed: boolean;
|
|
161
|
-
address: string;
|
|
162
|
-
data: string;
|
|
163
|
-
topics: Array<string>;
|
|
164
|
-
transactionHash: string;
|
|
165
|
-
logIndex: number;
|
|
166
|
-
}
|
|
167
|
-
interface TransactionReceipt {
|
|
168
|
-
to: string;
|
|
169
|
-
from: string;
|
|
170
|
-
contractAddress: string;
|
|
171
|
-
transactionIndex: number;
|
|
172
|
-
root?: string;
|
|
173
|
-
gasUsed: BigNumber;
|
|
174
|
-
logsBloom: string;
|
|
175
|
-
blockHash: string;
|
|
176
|
-
transactionHash: string;
|
|
177
|
-
logs: Array<Log>;
|
|
178
|
-
blockNumber: number;
|
|
179
|
-
confirmations: number;
|
|
180
|
-
cumulativeGasUsed: BigNumber;
|
|
181
|
-
effectiveGasPrice: BigNumber;
|
|
182
|
-
byzantium: boolean;
|
|
183
|
-
type: number;
|
|
184
|
-
status?: number;
|
|
185
|
-
}
|
|
186
|
-
interface FeeData$1 {
|
|
187
|
-
lastBaseFeePerGas: null | BigNumber;
|
|
188
|
-
maxFeePerGas: null | BigNumber;
|
|
189
|
-
maxPriorityFeePerGas: null | BigNumber;
|
|
190
|
-
gasPrice: null | BigNumber;
|
|
191
|
-
}
|
|
192
|
-
interface EventFilter {
|
|
193
|
-
address?: string;
|
|
194
|
-
topics?: Array<string | Array<string> | null>;
|
|
195
|
-
}
|
|
196
|
-
interface Filter extends EventFilter {
|
|
197
|
-
fromBlock?: BlockTag;
|
|
198
|
-
toBlock?: BlockTag;
|
|
199
|
-
}
|
|
200
|
-
declare abstract class ForkEvent extends Description {
|
|
201
|
-
readonly expiry: number;
|
|
202
|
-
readonly _isForkEvent?: boolean;
|
|
203
|
-
static isForkEvent(value: any): value is ForkEvent;
|
|
204
|
-
}
|
|
205
|
-
declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
|
|
206
|
-
declare type Listener = (...args: Array<any>) => void;
|
|
207
|
-
declare abstract class Provider$1 implements OnceBlockable {
|
|
208
|
-
abstract getNetwork(): Promise<Network>;
|
|
209
|
-
abstract getBlockNumber(): Promise<number>;
|
|
210
|
-
abstract getGasPrice(): Promise<BigNumber>;
|
|
211
|
-
getFeeData(): Promise<FeeData$1>;
|
|
212
|
-
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
213
|
-
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
214
|
-
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
215
|
-
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
216
|
-
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
217
|
-
abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
218
|
-
abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
219
|
-
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
220
|
-
abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
221
|
-
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
222
|
-
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
223
|
-
abstract getLogs(filter: Filter): Promise<Array<Log>>;
|
|
224
|
-
abstract resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
225
|
-
abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
226
|
-
abstract on(eventName: EventType, listener: Listener): Provider$1;
|
|
227
|
-
abstract once(eventName: EventType, listener: Listener): Provider$1;
|
|
228
|
-
abstract emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
229
|
-
abstract listenerCount(eventName?: EventType): number;
|
|
230
|
-
abstract listeners(eventName?: EventType): Array<Listener>;
|
|
231
|
-
abstract off(eventName: EventType, listener?: Listener): Provider$1;
|
|
232
|
-
abstract removeAllListeners(eventName?: EventType): Provider$1;
|
|
233
|
-
addListener(eventName: EventType, listener: Listener): Provider$1;
|
|
234
|
-
removeListener(eventName: EventType, listener: Listener): Provider$1;
|
|
235
|
-
abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
236
|
-
readonly _isProvider: boolean;
|
|
237
|
-
constructor();
|
|
238
|
-
static isProvider(value: any): value is Provider$1;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
declare abstract class Signer {
|
|
242
|
-
readonly provider?: Provider$1;
|
|
243
|
-
abstract getAddress(): Promise<string>;
|
|
244
|
-
abstract signMessage(message: Bytes | string): Promise<string>;
|
|
245
|
-
abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
246
|
-
abstract connect(provider: Provider$1): Signer;
|
|
247
|
-
readonly _isSigner: boolean;
|
|
248
|
-
constructor();
|
|
249
|
-
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
250
|
-
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
|
251
|
-
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
252
|
-
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
|
|
253
|
-
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
254
|
-
getChainId(): Promise<number>;
|
|
255
|
-
getGasPrice(): Promise<BigNumber>;
|
|
256
|
-
getFeeData(): Promise<FeeData$1>;
|
|
257
|
-
resolveName(name: string): Promise<string>;
|
|
258
|
-
checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
|
|
259
|
-
populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
|
|
260
|
-
_checkProvider(operation?: string): void;
|
|
261
|
-
static isSigner(value: any): value is Signer;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* An ERC20 token
|
|
266
|
-
*/
|
|
267
|
-
interface ERC20Token$1 {
|
|
268
|
-
type: 'ERC20';
|
|
269
|
-
tokenAddress: string;
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* An ERC721 token
|
|
273
|
-
*/
|
|
274
|
-
interface ERC721Token {
|
|
275
|
-
type: 'ERC721';
|
|
276
|
-
tokenId: string;
|
|
277
|
-
tokenAddress: string;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* An ETH token
|
|
281
|
-
*/
|
|
282
|
-
interface ETHToken$1 {
|
|
283
|
-
type: 'ETH';
|
|
284
|
-
}
|
|
285
|
-
/**
|
|
286
|
-
* An amount of ETH token of unit Wei
|
|
287
|
-
*/
|
|
288
|
-
interface ETHAmount$1 extends ETHToken$1 {
|
|
289
|
-
/**
|
|
290
|
-
* An amount in unit Wei
|
|
291
|
-
*/
|
|
292
|
-
amount: string;
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* The token details and amount of ERC20 token units
|
|
296
|
-
*/
|
|
297
|
-
interface ERC20Amount$1 extends ERC20Token$1 {
|
|
298
|
-
/**
|
|
299
|
-
* An amount in units for the given ERC20 token
|
|
300
|
-
*/
|
|
301
|
-
amount: string;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Union type that represents all token types
|
|
305
|
-
*/
|
|
306
|
-
declare type AnyToken = ETHToken$1 | ERC721Token | ERC20Token$1;
|
|
307
|
-
/**
|
|
308
|
-
* Union type that represents all token type amounts
|
|
309
|
-
*/
|
|
310
|
-
declare type TokenAmount = ETHAmount$1 | ERC20Amount$1 | ERC721Token;
|
|
311
|
-
/**
|
|
312
|
-
* Union type that represents exchange token type amounts
|
|
313
|
-
*/
|
|
314
|
-
declare type ExchangeTokenAmount$1 = ETHAmount$1 | ERC20Amount$1;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Immutable X API
|
|
318
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
319
|
-
*
|
|
320
|
-
* The version of the OpenAPI document: 3.0
|
|
321
|
-
* Contact: support@immutable.com
|
|
322
|
-
*
|
|
323
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
324
|
-
* https://openapi-generator.tech
|
|
325
|
-
* Do not edit the class manually.
|
|
326
|
-
*/
|
|
327
|
-
/**
|
|
328
|
-
*
|
|
329
|
-
* @export
|
|
330
|
-
* @interface CancelOrderResponse
|
|
331
|
-
*/
|
|
332
|
-
interface CancelOrderResponse$1 {
|
|
333
|
-
/**
|
|
334
|
-
* ID of the cancelled order
|
|
335
|
-
* @type {number}
|
|
336
|
-
* @memberof CancelOrderResponse
|
|
337
|
-
*/
|
|
338
|
-
'order_id': number;
|
|
339
|
-
/**
|
|
340
|
-
* New status of the order
|
|
341
|
-
* @type {string}
|
|
342
|
-
* @memberof CancelOrderResponse
|
|
343
|
-
*/
|
|
344
|
-
'status': string;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Immutable X API
|
|
349
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
350
|
-
*
|
|
351
|
-
* The version of the OpenAPI document: 3.0
|
|
352
|
-
* Contact: support@immutable.com
|
|
353
|
-
*
|
|
354
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
355
|
-
* https://openapi-generator.tech
|
|
356
|
-
* Do not edit the class manually.
|
|
357
|
-
*/
|
|
358
|
-
/**
|
|
359
|
-
*
|
|
360
|
-
* @export
|
|
361
|
-
* @interface FeeEntry
|
|
362
|
-
*/
|
|
363
|
-
interface FeeEntry$1 {
|
|
364
|
-
/**
|
|
365
|
-
*
|
|
366
|
-
* @type {string}
|
|
367
|
-
* @memberof FeeEntry
|
|
368
|
-
*/
|
|
369
|
-
'address'?: string;
|
|
370
|
-
/**
|
|
371
|
-
*
|
|
372
|
-
* @type {number}
|
|
373
|
-
* @memberof FeeEntry
|
|
374
|
-
*/
|
|
375
|
-
'fee_percentage'?: number;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Immutable X API
|
|
380
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
381
|
-
*
|
|
382
|
-
* The version of the OpenAPI document: 3.0
|
|
383
|
-
* Contact: support@immutable.com
|
|
384
|
-
*
|
|
385
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
386
|
-
* https://openapi-generator.tech
|
|
387
|
-
* Do not edit the class manually.
|
|
388
|
-
*/
|
|
389
|
-
/**
|
|
390
|
-
*
|
|
391
|
-
* @export
|
|
392
|
-
* @interface CreateOrderResponse
|
|
393
|
-
*/
|
|
394
|
-
interface CreateOrderResponse$1 {
|
|
395
|
-
/**
|
|
396
|
-
* ID of the created order
|
|
397
|
-
* @type {number}
|
|
398
|
-
* @memberof CreateOrderResponse
|
|
399
|
-
*/
|
|
400
|
-
'order_id': number;
|
|
401
|
-
/**
|
|
402
|
-
* Request ID as a reference for an asynchronous order creation request
|
|
403
|
-
* @type {string}
|
|
404
|
-
* @memberof CreateOrderResponse
|
|
405
|
-
*/
|
|
406
|
-
'request_id'?: string;
|
|
407
|
-
/**
|
|
408
|
-
* Status of the created order
|
|
409
|
-
* @type {string}
|
|
410
|
-
* @memberof CreateOrderResponse
|
|
411
|
-
*/
|
|
412
|
-
'status': string;
|
|
413
|
-
/**
|
|
414
|
-
* Timestamp of the created order
|
|
415
|
-
* @type {number}
|
|
416
|
-
* @memberof CreateOrderResponse
|
|
417
|
-
*/
|
|
418
|
-
'time': number;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Immutable X API
|
|
423
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
424
|
-
*
|
|
425
|
-
* The version of the OpenAPI document: 3.0
|
|
426
|
-
* Contact: support@immutable.com
|
|
427
|
-
*
|
|
428
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
429
|
-
* https://openapi-generator.tech
|
|
430
|
-
* Do not edit the class manually.
|
|
431
|
-
*/
|
|
432
|
-
/**
|
|
433
|
-
*
|
|
434
|
-
* @export
|
|
435
|
-
* @interface CreateTradeResponse
|
|
436
|
-
*/
|
|
437
|
-
interface CreateTradeResponse$1 {
|
|
438
|
-
/**
|
|
439
|
-
* Request ID as a reference for an asynchronous trade creation request
|
|
440
|
-
* @type {string}
|
|
441
|
-
* @memberof CreateTradeResponse
|
|
442
|
-
*/
|
|
443
|
-
'request_id'?: string;
|
|
444
|
-
/**
|
|
445
|
-
* Current status of trade
|
|
446
|
-
* @type {string}
|
|
447
|
-
* @memberof CreateTradeResponse
|
|
448
|
-
*/
|
|
449
|
-
'status': string;
|
|
450
|
-
/**
|
|
451
|
-
* ID of trade within Immutable X
|
|
452
|
-
* @type {number}
|
|
453
|
-
* @memberof CreateTradeResponse
|
|
454
|
-
*/
|
|
455
|
-
'trade_id': number;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Immutable X API
|
|
460
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
461
|
-
*
|
|
462
|
-
* The version of the OpenAPI document: 3.0
|
|
463
|
-
* Contact: support@immutable.com
|
|
464
|
-
*
|
|
465
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
466
|
-
* https://openapi-generator.tech
|
|
467
|
-
* Do not edit the class manually.
|
|
468
|
-
*/
|
|
469
|
-
/**
|
|
470
|
-
*
|
|
471
|
-
* @export
|
|
472
|
-
* @interface CreateTransferResponse
|
|
473
|
-
*/
|
|
474
|
-
interface CreateTransferResponse {
|
|
475
|
-
/**
|
|
476
|
-
* List of transfer IDs
|
|
477
|
-
* @type {Array<number>}
|
|
478
|
-
* @memberof CreateTransferResponse
|
|
479
|
-
*/
|
|
480
|
-
'transfer_ids': Array<number>;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Immutable X API
|
|
485
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
486
|
-
*
|
|
487
|
-
* The version of the OpenAPI document: 3.0
|
|
488
|
-
* Contact: support@immutable.com
|
|
489
|
-
*
|
|
490
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
491
|
-
* https://openapi-generator.tech
|
|
492
|
-
* Do not edit the class manually.
|
|
493
|
-
*/
|
|
494
|
-
/**
|
|
495
|
-
*
|
|
496
|
-
* @export
|
|
497
|
-
* @interface CreateTransferResponseV1
|
|
498
|
-
*/
|
|
499
|
-
interface CreateTransferResponseV1$2 {
|
|
500
|
-
/**
|
|
501
|
-
* [deprecated] Sent signature
|
|
502
|
-
* @type {string}
|
|
503
|
-
* @memberof CreateTransferResponseV1
|
|
504
|
-
*/
|
|
505
|
-
'sent_signature': string;
|
|
506
|
-
/**
|
|
507
|
-
* [deprecated] The status of transfer
|
|
508
|
-
* @type {string}
|
|
509
|
-
* @memberof CreateTransferResponseV1
|
|
510
|
-
*/
|
|
511
|
-
'status': string;
|
|
512
|
-
/**
|
|
513
|
-
* [deprecated] Time of the transfer
|
|
514
|
-
* @type {number}
|
|
515
|
-
* @memberof CreateTransferResponseV1
|
|
516
|
-
*/
|
|
517
|
-
'time': number;
|
|
518
|
-
/**
|
|
519
|
-
* ID of the transfer
|
|
520
|
-
* @type {number}
|
|
521
|
-
* @memberof CreateTransferResponseV1
|
|
522
|
-
*/
|
|
523
|
-
'transfer_id': number;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Immutable X API
|
|
528
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
529
|
-
*
|
|
530
|
-
* The version of the OpenAPI document: 3.0
|
|
531
|
-
* Contact: support@immutable.com
|
|
532
|
-
*
|
|
533
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
534
|
-
* https://openapi-generator.tech
|
|
535
|
-
* Do not edit the class manually.
|
|
536
|
-
*/
|
|
537
|
-
/**
|
|
538
|
-
*
|
|
539
|
-
* @export
|
|
540
|
-
* @interface CreateWithdrawalResponse
|
|
541
|
-
*/
|
|
542
|
-
interface CreateWithdrawalResponse$1 {
|
|
543
|
-
/**
|
|
544
|
-
* Status of the withdrawal
|
|
545
|
-
* @type {string}
|
|
546
|
-
* @memberof CreateWithdrawalResponse
|
|
547
|
-
*/
|
|
548
|
-
'status': string;
|
|
549
|
-
/**
|
|
550
|
-
* Time of the withdrawal
|
|
551
|
-
* @type {number}
|
|
552
|
-
* @memberof CreateWithdrawalResponse
|
|
553
|
-
*/
|
|
554
|
-
'time': number;
|
|
555
|
-
/**
|
|
556
|
-
* ID of the withdrawal
|
|
557
|
-
* @type {number}
|
|
558
|
-
* @memberof CreateWithdrawalResponse
|
|
559
|
-
*/
|
|
560
|
-
'withdrawal_id': number;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
/**
|
|
564
|
-
* Immutable X API
|
|
565
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
566
|
-
*
|
|
567
|
-
* The version of the OpenAPI document: 3.0
|
|
568
|
-
* Contact: support@immutable.com
|
|
569
|
-
*
|
|
570
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
571
|
-
* https://openapi-generator.tech
|
|
572
|
-
* Do not edit the class manually.
|
|
573
|
-
*/
|
|
574
|
-
/**
|
|
575
|
-
*
|
|
576
|
-
* @export
|
|
577
|
-
* @interface GetSignableCancelOrderRequest
|
|
578
|
-
*/
|
|
579
|
-
interface GetSignableCancelOrderRequest$1 {
|
|
580
|
-
/**
|
|
581
|
-
* ID of the order to be cancelled
|
|
582
|
-
* @type {number}
|
|
583
|
-
* @memberof GetSignableCancelOrderRequest
|
|
584
|
-
*/
|
|
585
|
-
'order_id': number;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Immutable X API
|
|
590
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
591
|
-
*
|
|
592
|
-
* The version of the OpenAPI document: 3.0
|
|
593
|
-
* Contact: support@immutable.com
|
|
594
|
-
*
|
|
595
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
596
|
-
* https://openapi-generator.tech
|
|
597
|
-
* Do not edit the class manually.
|
|
598
|
-
*/
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
*
|
|
602
|
-
* @export
|
|
603
|
-
* @interface GetSignableTradeRequest
|
|
604
|
-
*/
|
|
605
|
-
interface GetSignableTradeRequest$1 {
|
|
606
|
-
/**
|
|
607
|
-
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
608
|
-
* @type {number}
|
|
609
|
-
* @memberof GetSignableTradeRequest
|
|
610
|
-
*/
|
|
611
|
-
'expiration_timestamp'?: number;
|
|
612
|
-
/**
|
|
613
|
-
* Inclusion of either maker or taker fees
|
|
614
|
-
* @type {Array<FeeEntry>}
|
|
615
|
-
* @memberof GetSignableTradeRequest
|
|
616
|
-
*/
|
|
617
|
-
'fees'?: Array<FeeEntry$1>;
|
|
618
|
-
/**
|
|
619
|
-
* The ID of the maker order involved
|
|
620
|
-
* @type {number}
|
|
621
|
-
* @memberof GetSignableTradeRequest
|
|
622
|
-
*/
|
|
623
|
-
'order_id': number;
|
|
624
|
-
/**
|
|
625
|
-
* Ethereum address of the submitting user
|
|
626
|
-
* @type {string}
|
|
627
|
-
* @memberof GetSignableTradeRequest
|
|
628
|
-
*/
|
|
629
|
-
'user': string;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* Immutable X API
|
|
634
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
635
|
-
*
|
|
636
|
-
* The version of the OpenAPI document: 3.0
|
|
637
|
-
* Contact: support@immutable.com
|
|
638
|
-
*
|
|
639
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
640
|
-
* https://openapi-generator.tech
|
|
641
|
-
* Do not edit the class manually.
|
|
642
|
-
*/
|
|
643
|
-
/**
|
|
644
|
-
*
|
|
645
|
-
* @export
|
|
646
|
-
* @interface RegisterUserResponse
|
|
647
|
-
*/
|
|
648
|
-
interface RegisterUserResponse$1 {
|
|
649
|
-
/**
|
|
650
|
-
* Immutable signature authorising registration
|
|
651
|
-
* @type {string}
|
|
652
|
-
* @memberof RegisterUserResponse
|
|
653
|
-
*/
|
|
654
|
-
'tx_hash': string;
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* Parameter required to create an Order
|
|
659
|
-
*/
|
|
660
|
-
interface UnsignedOrderRequest {
|
|
661
|
-
/**
|
|
662
|
-
* The amount of tokens that will be bought for this order
|
|
663
|
-
*/
|
|
664
|
-
buy: TokenAmount;
|
|
665
|
-
/**
|
|
666
|
-
* The amount of tokens that will be sold for this order
|
|
667
|
-
*/
|
|
668
|
-
sell: TokenAmount;
|
|
669
|
-
/**
|
|
670
|
-
* ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
|
|
671
|
-
*/
|
|
672
|
-
expiration_timestamp?: number;
|
|
673
|
-
/**
|
|
674
|
-
* Inclusion of either maker or taker fees
|
|
675
|
-
*/
|
|
676
|
-
fees?: Array<FeeEntry$1>;
|
|
677
|
-
}
|
|
678
|
-
/**
|
|
679
|
-
* Parameter required to create a Transfer
|
|
680
|
-
*/
|
|
681
|
-
declare type UnsignedTransferRequest = TokenAmount & {
|
|
682
|
-
/**
|
|
683
|
-
* Ethereum address of the receiving user
|
|
684
|
-
*/
|
|
685
|
-
receiver: string;
|
|
686
|
-
};
|
|
687
|
-
/**
|
|
688
|
-
* Parameter required to create a Transfer
|
|
689
|
-
*/
|
|
690
|
-
declare type UnsignedExchangeTransferRequest$1 = ExchangeTokenAmount$1 & {
|
|
691
|
-
/**
|
|
692
|
-
* Ethereum address of the receiving user
|
|
693
|
-
*/
|
|
694
|
-
receiver: string;
|
|
695
|
-
/**
|
|
696
|
-
* Exchange transaction ID
|
|
697
|
-
*/
|
|
698
|
-
transactionID: string;
|
|
699
|
-
};
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* Parameter required to create a batchNftTransfer
|
|
703
|
-
*/
|
|
704
|
-
interface NftTransferDetails {
|
|
705
|
-
/**
|
|
706
|
-
* Ethereum address of the receiving user
|
|
707
|
-
*/
|
|
708
|
-
receiver: string;
|
|
709
|
-
/**
|
|
710
|
-
* The token ID
|
|
711
|
-
*/
|
|
712
|
-
tokenId: string;
|
|
713
|
-
/**
|
|
714
|
-
* The token contract address
|
|
715
|
-
*/
|
|
716
|
-
tokenAddress: string;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
interface IMXProvider {
|
|
720
|
-
/**
|
|
721
|
-
* Get the Signer address
|
|
722
|
-
*
|
|
723
|
-
* @return {Promise<string>} Returns a promise that resolves with the signer's address
|
|
724
|
-
*/
|
|
725
|
-
getAddress(): Promise<string>;
|
|
726
|
-
/**
|
|
727
|
-
* Register a User to Immutable X if they are not already registered
|
|
728
|
-
*
|
|
729
|
-
* @return {Promise<RegisterUserResponse>} Returns a promise that resolves with the user registration response
|
|
730
|
-
*/
|
|
731
|
-
registerOffchain(): Promise<RegisterUserResponse$1>;
|
|
732
|
-
/**
|
|
733
|
-
* Checks if a User is registered off-chain
|
|
734
|
-
*
|
|
735
|
-
* @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered with IMX, false otherwise
|
|
736
|
-
*/
|
|
737
|
-
isRegisteredOffchain(): Promise<boolean>;
|
|
738
|
-
/**
|
|
739
|
-
* Checks if a User is registered on-chain
|
|
740
|
-
*
|
|
741
|
-
* @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered, false otherwise
|
|
742
|
-
*/
|
|
743
|
-
isRegisteredOnchain(): Promise<boolean>;
|
|
744
|
-
/**
|
|
745
|
-
* Create an Order
|
|
746
|
-
*
|
|
747
|
-
* @param {UnsignedOrderRequest} request The unsigned order request to create an order
|
|
748
|
-
* @return {Promise<CreateOrderResponse>} Returns a promise that resolves with the created Order
|
|
749
|
-
*/
|
|
750
|
-
createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse$1>;
|
|
751
|
-
/**
|
|
752
|
-
* Cancel an Order
|
|
753
|
-
*
|
|
754
|
-
* @param {GetSignableCancelOrderRequest} request The signable cancel order request
|
|
755
|
-
* @return {Promise<CancelOrderResponse>} Returns a promise that resolves with the cancelled Order
|
|
756
|
-
*/
|
|
757
|
-
cancelOrder(request: GetSignableCancelOrderRequest$1): Promise<CancelOrderResponse$1>;
|
|
758
|
-
/**
|
|
759
|
-
* Create a Trade
|
|
760
|
-
*
|
|
761
|
-
* @param {GetSignableTradeRequest} request The signable trade request
|
|
762
|
-
* @return {Promise<CreateTradeResponse>} Returns a promise that resolves with the created Trade
|
|
763
|
-
*/
|
|
764
|
-
createTrade(request: GetSignableTradeRequest$1): Promise<CreateTradeResponse$1>;
|
|
765
|
-
/**
|
|
766
|
-
* Create a new Transfer request
|
|
767
|
-
*
|
|
768
|
-
* @param {UnsignedTransferRequest} request The unsigned transfer request
|
|
769
|
-
* @return {Promise<CreateTransferResponseV1>} Returns a promise that resolves with the created Transfer
|
|
770
|
-
*/
|
|
771
|
-
transfer(request: UnsignedTransferRequest): Promise<CreateTransferResponseV1$2>;
|
|
772
|
-
/**
|
|
773
|
-
* Create a batch of NFT transfer requests
|
|
774
|
-
*
|
|
775
|
-
* @param {Array<NftTransferDetails>} request An array of NFT transfer details
|
|
776
|
-
* @return {Promise<CreateTransferResponse>} Resolves a promise that resolves with the list of Transfer IDs
|
|
777
|
-
*/
|
|
778
|
-
batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
|
|
779
|
-
/**
|
|
780
|
-
* Create a new Exchange transaction
|
|
781
|
-
*
|
|
782
|
-
* @param {UnsignedExchangeTransferRequest} request The unsigned exchange transfer request
|
|
783
|
-
* @return {Promise<CreateTransferResponseV1>} Returns a promise that resolves with the created Exchange Transaction
|
|
784
|
-
*/
|
|
785
|
-
exchangeTransfer(request: UnsignedExchangeTransferRequest$1): Promise<CreateTransferResponseV1$2>;
|
|
786
|
-
/**
|
|
787
|
-
* Deposit either ETH, ERC20 or ERC721 tokens
|
|
788
|
-
*
|
|
789
|
-
* @param {TokenAmount} request The token type amount in its corresponding unit
|
|
790
|
-
* @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
|
|
791
|
-
*/
|
|
792
|
-
deposit(deposit: TokenAmount): Promise<TransactionResponse>;
|
|
793
|
-
/**
|
|
794
|
-
* Create a Withdrawal
|
|
795
|
-
*
|
|
796
|
-
* @param {TokenAmount} request The token type amount in its corresponding unit
|
|
797
|
-
* @return {Promise<CreateWithdrawalResponse>} Returns a promise that resolves with the created Withdrawal
|
|
798
|
-
*/
|
|
799
|
-
prepareWithdrawal(request: TokenAmount): Promise<CreateWithdrawalResponse$1>;
|
|
800
|
-
/**
|
|
801
|
-
* Completes a Withdrawal
|
|
802
|
-
*
|
|
803
|
-
* @param {string} starkPublicKey The stark public key
|
|
804
|
-
* @param {AnyToken} token The token to withdraw
|
|
805
|
-
* @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
|
|
806
|
-
*/
|
|
807
|
-
completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
declare enum Environment {
|
|
811
|
-
PRODUCTION = "production",
|
|
812
|
-
SANDBOX = "sandbox"
|
|
813
|
-
}
|
|
814
|
-
declare class ImmutableConfiguration {
|
|
815
|
-
readonly environment: Environment;
|
|
816
|
-
readonly rateLimitingKey?: string;
|
|
817
|
-
readonly apiKey?: string;
|
|
818
|
-
readonly publishableKey?: string;
|
|
819
|
-
constructor(options: {
|
|
820
|
-
environment: Environment;
|
|
821
|
-
rateLimitingKey?: string;
|
|
822
|
-
apiKey?: string;
|
|
823
|
-
publishableKey?: string;
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
interface ModuleConfiguration<T> {
|
|
827
|
-
baseConfig: ImmutableConfiguration;
|
|
828
|
-
overrides?: T;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
23
|
// TypeScript Version: 4.7
|
|
832
24
|
type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
|
|
833
25
|
|
|
@@ -2213,7 +1405,7 @@ interface Token {
|
|
|
2213
1405
|
* @export
|
|
2214
1406
|
* @interface FeeData
|
|
2215
1407
|
*/
|
|
2216
|
-
interface FeeData {
|
|
1408
|
+
interface FeeData$1 {
|
|
2217
1409
|
/**
|
|
2218
1410
|
* Address of ERC721/ERC20 contract
|
|
2219
1411
|
* @type {string}
|
|
@@ -2245,7 +1437,7 @@ interface FeeData {
|
|
|
2245
1437
|
* Fee token data details
|
|
2246
1438
|
* @export
|
|
2247
1439
|
*/
|
|
2248
|
-
type FeeTokenData = FeeData;
|
|
1440
|
+
type FeeTokenData = FeeData$1;
|
|
2249
1441
|
|
|
2250
1442
|
/**
|
|
2251
1443
|
* Immutable X API
|
|
@@ -4329,7 +3521,7 @@ interface FeeInfo {
|
|
|
4329
3521
|
* @export
|
|
4330
3522
|
* @interface CreateTradeResponse
|
|
4331
3523
|
*/
|
|
4332
|
-
interface CreateTradeResponse {
|
|
3524
|
+
interface CreateTradeResponse$1 {
|
|
4333
3525
|
/**
|
|
4334
3526
|
* Request ID as a reference for an asynchronous trade creation request
|
|
4335
3527
|
* @type {string}
|
|
@@ -4522,6 +3714,31 @@ interface CreateTransferRequestV1 {
|
|
|
4522
3714
|
'stark_signature': string;
|
|
4523
3715
|
}
|
|
4524
3716
|
|
|
3717
|
+
/**
|
|
3718
|
+
* Immutable X API
|
|
3719
|
+
* Immutable X API
|
|
3720
|
+
*
|
|
3721
|
+
* The version of the OpenAPI document: 3.0.0
|
|
3722
|
+
* Contact: support@immutable.com
|
|
3723
|
+
*
|
|
3724
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
3725
|
+
* https://openapi-generator.tech
|
|
3726
|
+
* Do not edit the class manually.
|
|
3727
|
+
*/
|
|
3728
|
+
/**
|
|
3729
|
+
*
|
|
3730
|
+
* @export
|
|
3731
|
+
* @interface CreateTransferResponse
|
|
3732
|
+
*/
|
|
3733
|
+
interface CreateTransferResponse {
|
|
3734
|
+
/**
|
|
3735
|
+
* List of transfer IDs
|
|
3736
|
+
* @type {Array<number>}
|
|
3737
|
+
* @memberof CreateTransferResponse
|
|
3738
|
+
*/
|
|
3739
|
+
'transfer_ids': Array<number>;
|
|
3740
|
+
}
|
|
3741
|
+
|
|
4525
3742
|
/**
|
|
4526
3743
|
* Immutable X API
|
|
4527
3744
|
* Immutable X API
|
|
@@ -5826,7 +5043,7 @@ interface Project {
|
|
|
5826
5043
|
* @export
|
|
5827
5044
|
* @interface GetSignableCancelOrderRequest
|
|
5828
5045
|
*/
|
|
5829
|
-
interface GetSignableCancelOrderRequest {
|
|
5046
|
+
interface GetSignableCancelOrderRequest$1 {
|
|
5830
5047
|
/**
|
|
5831
5048
|
* ID of the order to be cancelled
|
|
5832
5049
|
* @type {number}
|
|
@@ -6384,7 +5601,7 @@ interface GetSignableRegistrationResponse {
|
|
|
6384
5601
|
* @export
|
|
6385
5602
|
* @interface GetSignableTradeRequest
|
|
6386
5603
|
*/
|
|
6387
|
-
interface GetSignableTradeRequest {
|
|
5604
|
+
interface GetSignableTradeRequest$1 {
|
|
6388
5605
|
/**
|
|
6389
5606
|
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
6390
5607
|
* @type {number}
|
|
@@ -11757,7 +10974,7 @@ interface OrdersApiGetSignableCancelOrderV3Request {
|
|
|
11757
10974
|
* @type {GetSignableCancelOrderRequest}
|
|
11758
10975
|
* @memberof OrdersApiGetSignableCancelOrderV3
|
|
11759
10976
|
*/
|
|
11760
|
-
readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest;
|
|
10977
|
+
readonly getSignableCancelOrderRequest: GetSignableCancelOrderRequest$1;
|
|
11761
10978
|
}
|
|
11762
10979
|
/**
|
|
11763
10980
|
* Request parameters for getSignableOrder operation in OrdersApi.
|
|
@@ -12347,7 +11564,7 @@ interface TradesApiGetSignableTradeRequest {
|
|
|
12347
11564
|
* @type {GetSignableTradeRequest}
|
|
12348
11565
|
* @memberof TradesApiGetSignableTrade
|
|
12349
11566
|
*/
|
|
12350
|
-
readonly getSignableTradeRequest: GetSignableTradeRequest;
|
|
11567
|
+
readonly getSignableTradeRequest: GetSignableTradeRequest$1;
|
|
12351
11568
|
}
|
|
12352
11569
|
/**
|
|
12353
11570
|
* Request parameters for getTradeV3 operation in TradesApi.
|
|
@@ -12450,7 +11667,7 @@ declare class TradesApi$1 extends BaseAPI {
|
|
|
12450
11667
|
* @throws {RequiredError}
|
|
12451
11668
|
* @memberof TradesApi
|
|
12452
11669
|
*/
|
|
12453
|
-
createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTradeResponse, any>>;
|
|
11670
|
+
createTradeV3(requestParameters: TradesApiCreateTradeV3Request, options?: AxiosRequestConfig): Promise<AxiosResponse<CreateTradeResponse$1, any>>;
|
|
12454
11671
|
/**
|
|
12455
11672
|
* Generate a signable trade message (V3)
|
|
12456
11673
|
* @summary Generate a signable trade message (V3)
|
|
@@ -13200,33 +12417,295 @@ declare class ImxApiClients {
|
|
|
13200
12417
|
withdrawalsApi: WithdrawalsApi$1;
|
|
13201
12418
|
constructor(config: ImmutableAPIConfiguration);
|
|
13202
12419
|
}
|
|
13203
|
-
|
|
13204
|
-
declare
|
|
12420
|
+
|
|
12421
|
+
declare enum Environment {
|
|
12422
|
+
PRODUCTION = "production",
|
|
12423
|
+
SANDBOX = "sandbox"
|
|
12424
|
+
}
|
|
12425
|
+
declare class ImmutableConfiguration {
|
|
12426
|
+
readonly environment: Environment;
|
|
12427
|
+
readonly rateLimitingKey?: string;
|
|
12428
|
+
readonly apiKey?: string;
|
|
12429
|
+
readonly publishableKey?: string;
|
|
12430
|
+
constructor(options: {
|
|
12431
|
+
environment: Environment;
|
|
12432
|
+
rateLimitingKey?: string;
|
|
12433
|
+
apiKey?: string;
|
|
12434
|
+
publishableKey?: string;
|
|
12435
|
+
});
|
|
12436
|
+
}
|
|
12437
|
+
interface ModuleConfiguration<T> {
|
|
12438
|
+
baseConfig: ImmutableConfiguration;
|
|
12439
|
+
overrides?: T;
|
|
12440
|
+
}
|
|
12441
|
+
|
|
12442
|
+
declare class ApiConfiguration extends Configuration {
|
|
12443
|
+
}
|
|
12444
|
+
interface EthConfiguration {
|
|
12445
|
+
coreContractAddress: string;
|
|
12446
|
+
registrationContractAddress: string;
|
|
12447
|
+
chainID: number;
|
|
12448
|
+
}
|
|
12449
|
+
interface ImmutableXConfiguration {
|
|
12450
|
+
/**
|
|
12451
|
+
* The configuration for the API client
|
|
12452
|
+
*/
|
|
12453
|
+
apiConfiguration: ApiConfiguration;
|
|
12454
|
+
/**
|
|
12455
|
+
* The configuration for the Ethereum network
|
|
12456
|
+
*/
|
|
12457
|
+
ethConfiguration: EthConfiguration;
|
|
12458
|
+
}
|
|
12459
|
+
interface ImxOverrides {
|
|
12460
|
+
immutableXConfig: ImmutableXConfiguration;
|
|
12461
|
+
}
|
|
12462
|
+
interface ImxModuleConfiguration extends ModuleConfiguration<ImxOverrides> {
|
|
12463
|
+
}
|
|
12464
|
+
declare class ImxConfiguration {
|
|
12465
|
+
readonly immutableXConfig: ImmutableXConfiguration;
|
|
12466
|
+
readonly baseConfig: ImmutableConfiguration;
|
|
12467
|
+
constructor({ baseConfig, overrides }: ImxModuleConfiguration);
|
|
12468
|
+
}
|
|
12469
|
+
|
|
12470
|
+
declare type Bytes = ArrayLike<number>;
|
|
12471
|
+
declare type BytesLike = Bytes | string;
|
|
12472
|
+
interface Hexable {
|
|
12473
|
+
toHexString(): string;
|
|
12474
|
+
}
|
|
12475
|
+
|
|
12476
|
+
declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
|
|
12477
|
+
declare class BigNumber implements Hexable {
|
|
12478
|
+
readonly _hex: string;
|
|
12479
|
+
readonly _isBigNumber: boolean;
|
|
12480
|
+
constructor(constructorGuard: any, hex: string);
|
|
12481
|
+
fromTwos(value: number): BigNumber;
|
|
12482
|
+
toTwos(value: number): BigNumber;
|
|
12483
|
+
abs(): BigNumber;
|
|
12484
|
+
add(other: BigNumberish): BigNumber;
|
|
12485
|
+
sub(other: BigNumberish): BigNumber;
|
|
12486
|
+
div(other: BigNumberish): BigNumber;
|
|
12487
|
+
mul(other: BigNumberish): BigNumber;
|
|
12488
|
+
mod(other: BigNumberish): BigNumber;
|
|
12489
|
+
pow(other: BigNumberish): BigNumber;
|
|
12490
|
+
and(other: BigNumberish): BigNumber;
|
|
12491
|
+
or(other: BigNumberish): BigNumber;
|
|
12492
|
+
xor(other: BigNumberish): BigNumber;
|
|
12493
|
+
mask(value: number): BigNumber;
|
|
12494
|
+
shl(value: number): BigNumber;
|
|
12495
|
+
shr(value: number): BigNumber;
|
|
12496
|
+
eq(other: BigNumberish): boolean;
|
|
12497
|
+
lt(other: BigNumberish): boolean;
|
|
12498
|
+
lte(other: BigNumberish): boolean;
|
|
12499
|
+
gt(other: BigNumberish): boolean;
|
|
12500
|
+
gte(other: BigNumberish): boolean;
|
|
12501
|
+
isNegative(): boolean;
|
|
12502
|
+
isZero(): boolean;
|
|
12503
|
+
toNumber(): number;
|
|
12504
|
+
toBigInt(): bigint;
|
|
12505
|
+
toString(): string;
|
|
12506
|
+
toHexString(): string;
|
|
12507
|
+
toJSON(key?: string): any;
|
|
12508
|
+
static from(value: any): BigNumber;
|
|
12509
|
+
static isBigNumber(value: any): value is BigNumber;
|
|
12510
|
+
}
|
|
12511
|
+
|
|
12512
|
+
declare type Network = {
|
|
12513
|
+
name: string;
|
|
12514
|
+
chainId: number;
|
|
12515
|
+
ensAddress?: string;
|
|
12516
|
+
_defaultProvider?: (providers: any, options?: any) => any;
|
|
12517
|
+
};
|
|
12518
|
+
|
|
12519
|
+
declare type Deferrable<T> = {
|
|
12520
|
+
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
12521
|
+
};
|
|
12522
|
+
declare class Description<T = any> {
|
|
12523
|
+
constructor(info: {
|
|
12524
|
+
[K in keyof T]: T[K];
|
|
12525
|
+
});
|
|
12526
|
+
}
|
|
12527
|
+
|
|
12528
|
+
declare type AccessList = Array<{
|
|
12529
|
+
address: string;
|
|
12530
|
+
storageKeys: Array<string>;
|
|
12531
|
+
}>;
|
|
12532
|
+
declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
12533
|
+
interface Transaction {
|
|
12534
|
+
hash?: string;
|
|
12535
|
+
to?: string;
|
|
12536
|
+
from?: string;
|
|
12537
|
+
nonce: number;
|
|
12538
|
+
gasLimit: BigNumber;
|
|
12539
|
+
gasPrice?: BigNumber;
|
|
12540
|
+
data: string;
|
|
12541
|
+
value: BigNumber;
|
|
12542
|
+
chainId: number;
|
|
12543
|
+
r?: string;
|
|
12544
|
+
s?: string;
|
|
12545
|
+
v?: number;
|
|
12546
|
+
type?: number | null;
|
|
12547
|
+
accessList?: AccessList;
|
|
12548
|
+
maxPriorityFeePerGas?: BigNumber;
|
|
12549
|
+
maxFeePerGas?: BigNumber;
|
|
12550
|
+
}
|
|
12551
|
+
|
|
12552
|
+
interface OnceBlockable {
|
|
12553
|
+
once(eventName: "block", handler: () => void): void;
|
|
12554
|
+
}
|
|
12555
|
+
|
|
12556
|
+
declare type TransactionRequest = {
|
|
12557
|
+
to?: string;
|
|
12558
|
+
from?: string;
|
|
12559
|
+
nonce?: BigNumberish;
|
|
12560
|
+
gasLimit?: BigNumberish;
|
|
12561
|
+
gasPrice?: BigNumberish;
|
|
12562
|
+
data?: BytesLike;
|
|
12563
|
+
value?: BigNumberish;
|
|
12564
|
+
chainId?: number;
|
|
12565
|
+
type?: number;
|
|
12566
|
+
accessList?: AccessListish;
|
|
12567
|
+
maxPriorityFeePerGas?: BigNumberish;
|
|
12568
|
+
maxFeePerGas?: BigNumberish;
|
|
12569
|
+
customData?: Record<string, any>;
|
|
12570
|
+
ccipReadEnabled?: boolean;
|
|
12571
|
+
};
|
|
12572
|
+
interface TransactionResponse extends Transaction {
|
|
12573
|
+
hash: string;
|
|
12574
|
+
blockNumber?: number;
|
|
12575
|
+
blockHash?: string;
|
|
12576
|
+
timestamp?: number;
|
|
12577
|
+
confirmations: number;
|
|
12578
|
+
from: string;
|
|
12579
|
+
raw?: string;
|
|
12580
|
+
wait: (confirmations?: number) => Promise<TransactionReceipt>;
|
|
12581
|
+
}
|
|
12582
|
+
declare type BlockTag = string | number;
|
|
12583
|
+
interface _Block {
|
|
12584
|
+
hash: string;
|
|
12585
|
+
parentHash: string;
|
|
12586
|
+
number: number;
|
|
12587
|
+
timestamp: number;
|
|
12588
|
+
nonce: string;
|
|
12589
|
+
difficulty: number;
|
|
12590
|
+
_difficulty: BigNumber;
|
|
12591
|
+
gasLimit: BigNumber;
|
|
12592
|
+
gasUsed: BigNumber;
|
|
12593
|
+
miner: string;
|
|
12594
|
+
extraData: string;
|
|
12595
|
+
baseFeePerGas?: null | BigNumber;
|
|
12596
|
+
}
|
|
12597
|
+
interface Block extends _Block {
|
|
12598
|
+
transactions: Array<string>;
|
|
12599
|
+
}
|
|
12600
|
+
interface BlockWithTransactions extends _Block {
|
|
12601
|
+
transactions: Array<TransactionResponse>;
|
|
12602
|
+
}
|
|
12603
|
+
interface Log {
|
|
12604
|
+
blockNumber: number;
|
|
12605
|
+
blockHash: string;
|
|
12606
|
+
transactionIndex: number;
|
|
12607
|
+
removed: boolean;
|
|
12608
|
+
address: string;
|
|
12609
|
+
data: string;
|
|
12610
|
+
topics: Array<string>;
|
|
12611
|
+
transactionHash: string;
|
|
12612
|
+
logIndex: number;
|
|
12613
|
+
}
|
|
12614
|
+
interface TransactionReceipt {
|
|
12615
|
+
to: string;
|
|
12616
|
+
from: string;
|
|
12617
|
+
contractAddress: string;
|
|
12618
|
+
transactionIndex: number;
|
|
12619
|
+
root?: string;
|
|
12620
|
+
gasUsed: BigNumber;
|
|
12621
|
+
logsBloom: string;
|
|
12622
|
+
blockHash: string;
|
|
12623
|
+
transactionHash: string;
|
|
12624
|
+
logs: Array<Log>;
|
|
12625
|
+
blockNumber: number;
|
|
12626
|
+
confirmations: number;
|
|
12627
|
+
cumulativeGasUsed: BigNumber;
|
|
12628
|
+
effectiveGasPrice: BigNumber;
|
|
12629
|
+
byzantium: boolean;
|
|
12630
|
+
type: number;
|
|
12631
|
+
status?: number;
|
|
13205
12632
|
}
|
|
13206
|
-
interface
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
12633
|
+
interface FeeData {
|
|
12634
|
+
lastBaseFeePerGas: null | BigNumber;
|
|
12635
|
+
maxFeePerGas: null | BigNumber;
|
|
12636
|
+
maxPriorityFeePerGas: null | BigNumber;
|
|
12637
|
+
gasPrice: null | BigNumber;
|
|
13210
12638
|
}
|
|
13211
|
-
interface
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
*/
|
|
13215
|
-
apiConfiguration: ApiConfiguration;
|
|
13216
|
-
/**
|
|
13217
|
-
* The configuration for the Ethereum network
|
|
13218
|
-
*/
|
|
13219
|
-
ethConfiguration: EthConfiguration;
|
|
12639
|
+
interface EventFilter {
|
|
12640
|
+
address?: string;
|
|
12641
|
+
topics?: Array<string | Array<string> | null>;
|
|
13220
12642
|
}
|
|
13221
|
-
interface
|
|
13222
|
-
|
|
12643
|
+
interface Filter extends EventFilter {
|
|
12644
|
+
fromBlock?: BlockTag;
|
|
12645
|
+
toBlock?: BlockTag;
|
|
13223
12646
|
}
|
|
13224
|
-
|
|
12647
|
+
declare abstract class ForkEvent extends Description {
|
|
12648
|
+
readonly expiry: number;
|
|
12649
|
+
readonly _isForkEvent?: boolean;
|
|
12650
|
+
static isForkEvent(value: any): value is ForkEvent;
|
|
13225
12651
|
}
|
|
13226
|
-
declare
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
12652
|
+
declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
|
|
12653
|
+
declare type Listener = (...args: Array<any>) => void;
|
|
12654
|
+
declare abstract class Provider$1 implements OnceBlockable {
|
|
12655
|
+
abstract getNetwork(): Promise<Network>;
|
|
12656
|
+
abstract getBlockNumber(): Promise<number>;
|
|
12657
|
+
abstract getGasPrice(): Promise<BigNumber>;
|
|
12658
|
+
getFeeData(): Promise<FeeData>;
|
|
12659
|
+
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
12660
|
+
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
12661
|
+
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
12662
|
+
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
12663
|
+
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
12664
|
+
abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
12665
|
+
abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
12666
|
+
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
12667
|
+
abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
12668
|
+
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
12669
|
+
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
12670
|
+
abstract getLogs(filter: Filter): Promise<Array<Log>>;
|
|
12671
|
+
abstract resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
12672
|
+
abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
12673
|
+
abstract on(eventName: EventType, listener: Listener): Provider$1;
|
|
12674
|
+
abstract once(eventName: EventType, listener: Listener): Provider$1;
|
|
12675
|
+
abstract emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
12676
|
+
abstract listenerCount(eventName?: EventType): number;
|
|
12677
|
+
abstract listeners(eventName?: EventType): Array<Listener>;
|
|
12678
|
+
abstract off(eventName: EventType, listener?: Listener): Provider$1;
|
|
12679
|
+
abstract removeAllListeners(eventName?: EventType): Provider$1;
|
|
12680
|
+
addListener(eventName: EventType, listener: Listener): Provider$1;
|
|
12681
|
+
removeListener(eventName: EventType, listener: Listener): Provider$1;
|
|
12682
|
+
abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
12683
|
+
readonly _isProvider: boolean;
|
|
12684
|
+
constructor();
|
|
12685
|
+
static isProvider(value: any): value is Provider$1;
|
|
12686
|
+
}
|
|
12687
|
+
|
|
12688
|
+
declare abstract class Signer {
|
|
12689
|
+
readonly provider?: Provider$1;
|
|
12690
|
+
abstract getAddress(): Promise<string>;
|
|
12691
|
+
abstract signMessage(message: Bytes | string): Promise<string>;
|
|
12692
|
+
abstract signTransaction(transaction: Deferrable<TransactionRequest>): Promise<string>;
|
|
12693
|
+
abstract connect(provider: Provider$1): Signer;
|
|
12694
|
+
readonly _isSigner: boolean;
|
|
12695
|
+
constructor();
|
|
12696
|
+
getBalance(blockTag?: BlockTag): Promise<BigNumber>;
|
|
12697
|
+
getTransactionCount(blockTag?: BlockTag): Promise<number>;
|
|
12698
|
+
estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
12699
|
+
call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag): Promise<string>;
|
|
12700
|
+
sendTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionResponse>;
|
|
12701
|
+
getChainId(): Promise<number>;
|
|
12702
|
+
getGasPrice(): Promise<BigNumber>;
|
|
12703
|
+
getFeeData(): Promise<FeeData>;
|
|
12704
|
+
resolveName(name: string): Promise<string>;
|
|
12705
|
+
checkTransaction(transaction: Deferrable<TransactionRequest>): Deferrable<TransactionRequest>;
|
|
12706
|
+
populateTransaction(transaction: Deferrable<TransactionRequest>): Promise<TransactionRequest>;
|
|
12707
|
+
_checkProvider(operation?: string): void;
|
|
12708
|
+
static isSigner(value: any): value is Signer;
|
|
13230
12709
|
}
|
|
13231
12710
|
|
|
13232
12711
|
/**
|
|
@@ -13267,6 +12746,14 @@ interface ERC20Token {
|
|
|
13267
12746
|
type: 'ERC20';
|
|
13268
12747
|
tokenAddress: string;
|
|
13269
12748
|
}
|
|
12749
|
+
/**
|
|
12750
|
+
* An ERC721 token
|
|
12751
|
+
*/
|
|
12752
|
+
interface ERC721Token {
|
|
12753
|
+
type: 'ERC721';
|
|
12754
|
+
tokenId: string;
|
|
12755
|
+
tokenAddress: string;
|
|
12756
|
+
}
|
|
13270
12757
|
/**
|
|
13271
12758
|
* An ETH token
|
|
13272
12759
|
*/
|
|
@@ -13291,11 +12778,49 @@ interface ERC20Amount extends ERC20Token {
|
|
|
13291
12778
|
*/
|
|
13292
12779
|
amount: string;
|
|
13293
12780
|
}
|
|
12781
|
+
/**
|
|
12782
|
+
* Union type that represents all token types
|
|
12783
|
+
*/
|
|
12784
|
+
type AnyToken = ETHToken | ERC721Token | ERC20Token;
|
|
12785
|
+
/**
|
|
12786
|
+
* Union type that represents all token type amounts
|
|
12787
|
+
*/
|
|
12788
|
+
type TokenAmount = ETHAmount | ERC20Amount | ERC721Token;
|
|
13294
12789
|
/**
|
|
13295
12790
|
* Union type that represents exchange token type amounts
|
|
13296
12791
|
*/
|
|
13297
12792
|
type ExchangeTokenAmount = ETHAmount | ERC20Amount;
|
|
13298
12793
|
|
|
12794
|
+
/**
|
|
12795
|
+
* Parameter required to create an Order
|
|
12796
|
+
*/
|
|
12797
|
+
interface UnsignedOrderRequest {
|
|
12798
|
+
/**
|
|
12799
|
+
* The amount of tokens that will be bought for this order
|
|
12800
|
+
*/
|
|
12801
|
+
buy: TokenAmount;
|
|
12802
|
+
/**
|
|
12803
|
+
* The amount of tokens that will be sold for this order
|
|
12804
|
+
*/
|
|
12805
|
+
sell: TokenAmount;
|
|
12806
|
+
/**
|
|
12807
|
+
* ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
|
|
12808
|
+
*/
|
|
12809
|
+
expiration_timestamp?: number;
|
|
12810
|
+
/**
|
|
12811
|
+
* Inclusion of either maker or taker fees
|
|
12812
|
+
*/
|
|
12813
|
+
fees?: Array<FeeEntry>;
|
|
12814
|
+
}
|
|
12815
|
+
/**
|
|
12816
|
+
* Parameter required to create a Transfer
|
|
12817
|
+
*/
|
|
12818
|
+
type UnsignedTransferRequest = TokenAmount & {
|
|
12819
|
+
/**
|
|
12820
|
+
* Ethereum address of the receiving user
|
|
12821
|
+
*/
|
|
12822
|
+
receiver: string;
|
|
12823
|
+
};
|
|
13299
12824
|
/**
|
|
13300
12825
|
* Parameter required to Mint tokens
|
|
13301
12826
|
*/
|
|
@@ -13314,6 +12839,24 @@ type UnsignedExchangeTransferRequest = ExchangeTokenAmount & {
|
|
|
13314
12839
|
transactionID: string;
|
|
13315
12840
|
};
|
|
13316
12841
|
|
|
12842
|
+
/**
|
|
12843
|
+
* Parameter required to create a batchNftTransfer
|
|
12844
|
+
*/
|
|
12845
|
+
interface NftTransferDetails {
|
|
12846
|
+
/**
|
|
12847
|
+
* Ethereum address of the receiving user
|
|
12848
|
+
*/
|
|
12849
|
+
receiver: string;
|
|
12850
|
+
/**
|
|
12851
|
+
* The token ID
|
|
12852
|
+
*/
|
|
12853
|
+
tokenId: string;
|
|
12854
|
+
/**
|
|
12855
|
+
* The token contract address
|
|
12856
|
+
*/
|
|
12857
|
+
tokenAddress: string;
|
|
12858
|
+
}
|
|
12859
|
+
|
|
13317
12860
|
/**
|
|
13318
12861
|
* Need to specifically export the classes and interfaces from the generated
|
|
13319
12862
|
* clients imx object for rollup to bundle them correctly.
|
|
@@ -13394,6 +12937,8 @@ interface CreatePrimarySaleNotFoundBody extends CreatePrimarySaleNotFoundBody$1
|
|
|
13394
12937
|
}
|
|
13395
12938
|
interface CreatePrimarySaleUnauthorizedBody extends CreatePrimarySaleUnauthorizedBody$1 {
|
|
13396
12939
|
}
|
|
12940
|
+
interface CreateTradeResponse extends CreateTradeResponse$1 {
|
|
12941
|
+
}
|
|
13397
12942
|
interface CreateTransferResponseV1 extends CreateTransferResponseV1$1 {
|
|
13398
12943
|
}
|
|
13399
12944
|
interface DepositsApiGetDepositRequest extends DepositsApiGetDepositRequest$1 {
|
|
@@ -13406,6 +12951,10 @@ interface ExchangesApiGetExchangeRequest extends ExchangesApiGetExchangeRequest$
|
|
|
13406
12951
|
}
|
|
13407
12952
|
interface ExchangesApiGetExchangesRequest extends ExchangesApiGetExchangesRequest$1 {
|
|
13408
12953
|
}
|
|
12954
|
+
interface GetSignableCancelOrderRequest extends GetSignableCancelOrderRequest$1 {
|
|
12955
|
+
}
|
|
12956
|
+
interface GetSignableTradeRequest extends GetSignableTradeRequest$1 {
|
|
12957
|
+
}
|
|
13409
12958
|
interface MetadataApiGetMetadataSchemaRequest extends MetadataApiGetMetadataSchemaRequest$1 {
|
|
13410
12959
|
}
|
|
13411
12960
|
interface MetadataSchemaRequest extends MetadataSchemaRequest$1 {
|
|
@@ -13843,6 +13392,97 @@ declare class IMXClient {
|
|
|
13843
13392
|
rejectPrimarySale(ethSigner: Signer, primarySaleId: number): Promise<RejectPrimarySaleBadRequestBody | RejectPrimarySaleForbiddenBody | RejectPrimarySaleNotFoundBody | RejectPrimarySaleOKBody | RejectPrimarySaleUnauthorizedBody>;
|
|
13844
13393
|
}
|
|
13845
13394
|
|
|
13395
|
+
interface IMXProvider {
|
|
13396
|
+
/**
|
|
13397
|
+
* Get the Signer address
|
|
13398
|
+
*
|
|
13399
|
+
* @return {Promise<string>} Returns a promise that resolves with the signer's address
|
|
13400
|
+
*/
|
|
13401
|
+
getAddress(): Promise<string>;
|
|
13402
|
+
/**
|
|
13403
|
+
* Register a User to Immutable X if they are not already registered
|
|
13404
|
+
*
|
|
13405
|
+
* @return {Promise<imx.RegisterUserResponse>} Returns a promise that resolves with the user registration response
|
|
13406
|
+
*/
|
|
13407
|
+
registerOffchain(): Promise<RegisterUserResponse>;
|
|
13408
|
+
/**
|
|
13409
|
+
* Checks if a User is registered off-chain
|
|
13410
|
+
*
|
|
13411
|
+
* @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered with IMX, false otherwise
|
|
13412
|
+
*/
|
|
13413
|
+
isRegisteredOffchain(): Promise<boolean>;
|
|
13414
|
+
/**
|
|
13415
|
+
* Checks if a User is registered on-chain
|
|
13416
|
+
*
|
|
13417
|
+
* @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered, false otherwise
|
|
13418
|
+
*/
|
|
13419
|
+
isRegisteredOnchain(): Promise<boolean>;
|
|
13420
|
+
/**
|
|
13421
|
+
* Create an Order
|
|
13422
|
+
*
|
|
13423
|
+
* @param {UnsignedOrderRequest} request The unsigned order request to create an order
|
|
13424
|
+
* @return {Promise<CreateOrderResponse>} Returns a promise that resolves with the created Order
|
|
13425
|
+
*/
|
|
13426
|
+
createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse>;
|
|
13427
|
+
/**
|
|
13428
|
+
* Cancel an Order
|
|
13429
|
+
*
|
|
13430
|
+
* @param {GetSignableCancelOrderRequest} request The signable cancel order request
|
|
13431
|
+
* @return {Promise<CancelOrderResponse>} Returns a promise that resolves with the cancelled Order
|
|
13432
|
+
*/
|
|
13433
|
+
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse>;
|
|
13434
|
+
/**
|
|
13435
|
+
* Create a Trade
|
|
13436
|
+
*
|
|
13437
|
+
* @param {GetSignableTradeRequest} request The signable trade request
|
|
13438
|
+
* @return {Promise<CreateTradeResponse>} Returns a promise that resolves with the created Trade
|
|
13439
|
+
*/
|
|
13440
|
+
createTrade(request: GetSignableTradeRequest): Promise<CreateTradeResponse>;
|
|
13441
|
+
/**
|
|
13442
|
+
* Create a new Transfer request
|
|
13443
|
+
*
|
|
13444
|
+
* @param {UnsignedTransferRequest} request The unsigned transfer request
|
|
13445
|
+
* @return {Promise<imx.CreateTransferResponseV1>} Returns a promise that resolves with the created Transfer
|
|
13446
|
+
*/
|
|
13447
|
+
transfer(request: UnsignedTransferRequest): Promise<CreateTransferResponseV1$1>;
|
|
13448
|
+
/**
|
|
13449
|
+
* Create a batch of NFT transfer requests
|
|
13450
|
+
*
|
|
13451
|
+
* @param {Array<NftTransferDetails>} request An array of NFT transfer details
|
|
13452
|
+
* @return {Promise<CreateTransferResponse>} Resolves a promise that resolves with the list of Transfer IDs
|
|
13453
|
+
*/
|
|
13454
|
+
batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
|
|
13455
|
+
/**
|
|
13456
|
+
* Create a new Exchange transaction
|
|
13457
|
+
*
|
|
13458
|
+
* @param {UnsignedExchangeTransferRequest} request The unsigned exchange transfer request
|
|
13459
|
+
* @return {Promise<imx.CreateTransferResponseV1>} Returns a promise that resolves with the created Exchange Transaction
|
|
13460
|
+
*/
|
|
13461
|
+
exchangeTransfer(request: UnsignedExchangeTransferRequest): Promise<CreateTransferResponseV1$1>;
|
|
13462
|
+
/**
|
|
13463
|
+
* Deposit either ETH, ERC20 or ERC721 tokens
|
|
13464
|
+
*
|
|
13465
|
+
* @param {TokenAmount} request The token type amount in its corresponding unit
|
|
13466
|
+
* @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
|
|
13467
|
+
*/
|
|
13468
|
+
deposit(deposit: TokenAmount): Promise<TransactionResponse>;
|
|
13469
|
+
/**
|
|
13470
|
+
* Create a Withdrawal
|
|
13471
|
+
*
|
|
13472
|
+
* @param {TokenAmount} request The token type amount in its corresponding unit
|
|
13473
|
+
* @return {Promise<CreateWithdrawalResponse>} Returns a promise that resolves with the created Withdrawal
|
|
13474
|
+
*/
|
|
13475
|
+
prepareWithdrawal(request: TokenAmount): Promise<CreateWithdrawalResponse>;
|
|
13476
|
+
/**
|
|
13477
|
+
* Completes a Withdrawal
|
|
13478
|
+
*
|
|
13479
|
+
* @param {string} starkPublicKey The stark public key
|
|
13480
|
+
* @param {AnyToken} token The token to withdraw
|
|
13481
|
+
* @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
|
|
13482
|
+
*/
|
|
13483
|
+
completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
|
|
13484
|
+
}
|
|
13485
|
+
|
|
13846
13486
|
type UserProfile = {
|
|
13847
13487
|
email?: string;
|
|
13848
13488
|
nickname?: string;
|