@imtbl/sdk 0.44.4 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.js +1 -1
- package/dist/browser/checkout/sdk.js +5 -5
- package/dist/browser/checkout/widgets.js +53 -53
- package/dist/checkout.d.ts +2 -2
- package/dist/checkout.js +11 -8
- package/dist/index.browser.js +8 -8
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +2114 -2116
- package/dist/index.d.ts +209 -214
- package/dist/index.js +2116 -2117
- package/dist/passport.d.ts +2 -2
- package/dist/passport.js +4 -4
- package/dist/{immutablex_client.d.ts → x.d.ts} +155 -2
- package/dist/{provider.js → x.js} +522 -9
- package/package.json +10 -14
- package/dist/immutablex_client.js +0 -523
- package/dist/provider.d.ts +0 -979
package/dist/provider.d.ts
DELETED
|
@@ -1,979 +0,0 @@
|
|
|
1
|
-
declare type Bytes = ArrayLike<number>;
|
|
2
|
-
declare type BytesLike = Bytes | string;
|
|
3
|
-
interface Hexable {
|
|
4
|
-
toHexString(): string;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
declare type BigNumberish = BigNumber | Bytes | bigint | string | number;
|
|
8
|
-
declare class BigNumber implements Hexable {
|
|
9
|
-
readonly _hex: string;
|
|
10
|
-
readonly _isBigNumber: boolean;
|
|
11
|
-
constructor(constructorGuard: any, hex: string);
|
|
12
|
-
fromTwos(value: number): BigNumber;
|
|
13
|
-
toTwos(value: number): BigNumber;
|
|
14
|
-
abs(): BigNumber;
|
|
15
|
-
add(other: BigNumberish): BigNumber;
|
|
16
|
-
sub(other: BigNumberish): BigNumber;
|
|
17
|
-
div(other: BigNumberish): BigNumber;
|
|
18
|
-
mul(other: BigNumberish): BigNumber;
|
|
19
|
-
mod(other: BigNumberish): BigNumber;
|
|
20
|
-
pow(other: BigNumberish): BigNumber;
|
|
21
|
-
and(other: BigNumberish): BigNumber;
|
|
22
|
-
or(other: BigNumberish): BigNumber;
|
|
23
|
-
xor(other: BigNumberish): BigNumber;
|
|
24
|
-
mask(value: number): BigNumber;
|
|
25
|
-
shl(value: number): BigNumber;
|
|
26
|
-
shr(value: number): BigNumber;
|
|
27
|
-
eq(other: BigNumberish): boolean;
|
|
28
|
-
lt(other: BigNumberish): boolean;
|
|
29
|
-
lte(other: BigNumberish): boolean;
|
|
30
|
-
gt(other: BigNumberish): boolean;
|
|
31
|
-
gte(other: BigNumberish): boolean;
|
|
32
|
-
isNegative(): boolean;
|
|
33
|
-
isZero(): boolean;
|
|
34
|
-
toNumber(): number;
|
|
35
|
-
toBigInt(): bigint;
|
|
36
|
-
toString(): string;
|
|
37
|
-
toHexString(): string;
|
|
38
|
-
toJSON(key?: string): any;
|
|
39
|
-
static from(value: any): BigNumber;
|
|
40
|
-
static isBigNumber(value: any): value is BigNumber;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
declare type Deferrable<T> = {
|
|
44
|
-
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
45
|
-
};
|
|
46
|
-
declare class Description<T = any> {
|
|
47
|
-
constructor(info: {
|
|
48
|
-
[K in keyof T]: T[K];
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
declare type Network = {
|
|
53
|
-
name: string;
|
|
54
|
-
chainId: number;
|
|
55
|
-
ensAddress?: string;
|
|
56
|
-
_defaultProvider?: (providers: any, options?: any) => any;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
declare type AccessList = Array<{
|
|
60
|
-
address: string;
|
|
61
|
-
storageKeys: Array<string>;
|
|
62
|
-
}>;
|
|
63
|
-
declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
64
|
-
interface Transaction {
|
|
65
|
-
hash?: string;
|
|
66
|
-
to?: string;
|
|
67
|
-
from?: string;
|
|
68
|
-
nonce: number;
|
|
69
|
-
gasLimit: BigNumber;
|
|
70
|
-
gasPrice?: BigNumber;
|
|
71
|
-
data: string;
|
|
72
|
-
value: BigNumber;
|
|
73
|
-
chainId: number;
|
|
74
|
-
r?: string;
|
|
75
|
-
s?: string;
|
|
76
|
-
v?: number;
|
|
77
|
-
type?: number | null;
|
|
78
|
-
accessList?: AccessList;
|
|
79
|
-
maxPriorityFeePerGas?: BigNumber;
|
|
80
|
-
maxFeePerGas?: BigNumber;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
interface OnceBlockable {
|
|
84
|
-
once(eventName: "block", handler: () => void): void;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
declare type TransactionRequest = {
|
|
88
|
-
to?: string;
|
|
89
|
-
from?: string;
|
|
90
|
-
nonce?: BigNumberish;
|
|
91
|
-
gasLimit?: BigNumberish;
|
|
92
|
-
gasPrice?: BigNumberish;
|
|
93
|
-
data?: BytesLike;
|
|
94
|
-
value?: BigNumberish;
|
|
95
|
-
chainId?: number;
|
|
96
|
-
type?: number;
|
|
97
|
-
accessList?: AccessListish;
|
|
98
|
-
maxPriorityFeePerGas?: BigNumberish;
|
|
99
|
-
maxFeePerGas?: BigNumberish;
|
|
100
|
-
customData?: Record<string, any>;
|
|
101
|
-
ccipReadEnabled?: boolean;
|
|
102
|
-
};
|
|
103
|
-
interface TransactionResponse extends Transaction {
|
|
104
|
-
hash: string;
|
|
105
|
-
blockNumber?: number;
|
|
106
|
-
blockHash?: string;
|
|
107
|
-
timestamp?: number;
|
|
108
|
-
confirmations: number;
|
|
109
|
-
from: string;
|
|
110
|
-
raw?: string;
|
|
111
|
-
wait: (confirmations?: number) => Promise<TransactionReceipt>;
|
|
112
|
-
}
|
|
113
|
-
declare type BlockTag = string | number;
|
|
114
|
-
interface _Block {
|
|
115
|
-
hash: string;
|
|
116
|
-
parentHash: string;
|
|
117
|
-
number: number;
|
|
118
|
-
timestamp: number;
|
|
119
|
-
nonce: string;
|
|
120
|
-
difficulty: number;
|
|
121
|
-
_difficulty: BigNumber;
|
|
122
|
-
gasLimit: BigNumber;
|
|
123
|
-
gasUsed: BigNumber;
|
|
124
|
-
miner: string;
|
|
125
|
-
extraData: string;
|
|
126
|
-
baseFeePerGas?: null | BigNumber;
|
|
127
|
-
}
|
|
128
|
-
interface Block extends _Block {
|
|
129
|
-
transactions: Array<string>;
|
|
130
|
-
}
|
|
131
|
-
interface BlockWithTransactions extends _Block {
|
|
132
|
-
transactions: Array<TransactionResponse>;
|
|
133
|
-
}
|
|
134
|
-
interface Log {
|
|
135
|
-
blockNumber: number;
|
|
136
|
-
blockHash: string;
|
|
137
|
-
transactionIndex: number;
|
|
138
|
-
removed: boolean;
|
|
139
|
-
address: string;
|
|
140
|
-
data: string;
|
|
141
|
-
topics: Array<string>;
|
|
142
|
-
transactionHash: string;
|
|
143
|
-
logIndex: number;
|
|
144
|
-
}
|
|
145
|
-
interface TransactionReceipt {
|
|
146
|
-
to: string;
|
|
147
|
-
from: string;
|
|
148
|
-
contractAddress: string;
|
|
149
|
-
transactionIndex: number;
|
|
150
|
-
root?: string;
|
|
151
|
-
gasUsed: BigNumber;
|
|
152
|
-
logsBloom: string;
|
|
153
|
-
blockHash: string;
|
|
154
|
-
transactionHash: string;
|
|
155
|
-
logs: Array<Log>;
|
|
156
|
-
blockNumber: number;
|
|
157
|
-
confirmations: number;
|
|
158
|
-
cumulativeGasUsed: BigNumber;
|
|
159
|
-
effectiveGasPrice: BigNumber;
|
|
160
|
-
byzantium: boolean;
|
|
161
|
-
type: number;
|
|
162
|
-
status?: number;
|
|
163
|
-
}
|
|
164
|
-
interface FeeData {
|
|
165
|
-
lastBaseFeePerGas: null | BigNumber;
|
|
166
|
-
maxFeePerGas: null | BigNumber;
|
|
167
|
-
maxPriorityFeePerGas: null | BigNumber;
|
|
168
|
-
gasPrice: null | BigNumber;
|
|
169
|
-
}
|
|
170
|
-
interface EventFilter {
|
|
171
|
-
address?: string;
|
|
172
|
-
topics?: Array<string | Array<string> | null>;
|
|
173
|
-
}
|
|
174
|
-
interface Filter extends EventFilter {
|
|
175
|
-
fromBlock?: BlockTag;
|
|
176
|
-
toBlock?: BlockTag;
|
|
177
|
-
}
|
|
178
|
-
declare abstract class ForkEvent extends Description {
|
|
179
|
-
readonly expiry: number;
|
|
180
|
-
readonly _isForkEvent?: boolean;
|
|
181
|
-
static isForkEvent(value: any): value is ForkEvent;
|
|
182
|
-
}
|
|
183
|
-
declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
|
|
184
|
-
declare type Listener = (...args: Array<any>) => void;
|
|
185
|
-
declare abstract class Provider implements OnceBlockable {
|
|
186
|
-
abstract getNetwork(): Promise<Network>;
|
|
187
|
-
abstract getBlockNumber(): Promise<number>;
|
|
188
|
-
abstract getGasPrice(): Promise<BigNumber>;
|
|
189
|
-
getFeeData(): Promise<FeeData>;
|
|
190
|
-
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
191
|
-
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
192
|
-
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
193
|
-
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
194
|
-
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
195
|
-
abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
196
|
-
abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
197
|
-
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
198
|
-
abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
199
|
-
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
200
|
-
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
201
|
-
abstract getLogs(filter: Filter): Promise<Array<Log>>;
|
|
202
|
-
abstract resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
203
|
-
abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
204
|
-
abstract on(eventName: EventType, listener: Listener): Provider;
|
|
205
|
-
abstract once(eventName: EventType, listener: Listener): Provider;
|
|
206
|
-
abstract emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
207
|
-
abstract listenerCount(eventName?: EventType): number;
|
|
208
|
-
abstract listeners(eventName?: EventType): Array<Listener>;
|
|
209
|
-
abstract off(eventName: EventType, listener?: Listener): Provider;
|
|
210
|
-
abstract removeAllListeners(eventName?: EventType): Provider;
|
|
211
|
-
addListener(eventName: EventType, listener: Listener): Provider;
|
|
212
|
-
removeListener(eventName: EventType, listener: Listener): Provider;
|
|
213
|
-
abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
214
|
-
readonly _isProvider: boolean;
|
|
215
|
-
constructor();
|
|
216
|
-
static isProvider(value: any): value is Provider;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
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>;
|
|
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
|
-
|
|
242
|
-
/**
|
|
243
|
-
* An abstraction of a Stark account, which can be used to sign messages and transactions on StarkEx to execute state changing operations
|
|
244
|
-
*/
|
|
245
|
-
interface StarkSigner {
|
|
246
|
-
/**
|
|
247
|
-
* Signs the prefixed-message
|
|
248
|
-
* @params message - this must be a UTF8-message
|
|
249
|
-
* @example "0x1234"
|
|
250
|
-
* @returns the signed prefixed-message
|
|
251
|
-
*/
|
|
252
|
-
signMessage(message: string): Promise<string>;
|
|
253
|
-
/**
|
|
254
|
-
* Get the Signer address
|
|
255
|
-
* @returns the Signer's checksum address
|
|
256
|
-
*/
|
|
257
|
-
getAddress(): string | Promise<string>;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
/**
|
|
261
|
-
* An ERC20 token
|
|
262
|
-
*/
|
|
263
|
-
interface ERC20Token {
|
|
264
|
-
type: 'ERC20';
|
|
265
|
-
tokenAddress: string;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* An ERC721 token
|
|
269
|
-
*/
|
|
270
|
-
interface ERC721Token {
|
|
271
|
-
type: 'ERC721';
|
|
272
|
-
tokenId: string;
|
|
273
|
-
tokenAddress: string;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* An ETH token
|
|
277
|
-
*/
|
|
278
|
-
interface ETHToken {
|
|
279
|
-
type: 'ETH';
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* An amount of ETH token of unit Wei
|
|
283
|
-
*/
|
|
284
|
-
interface ETHAmount extends ETHToken {
|
|
285
|
-
/**
|
|
286
|
-
* An amount in unit Wei
|
|
287
|
-
*/
|
|
288
|
-
amount: string;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* The token details and amount of ERC20 token units
|
|
292
|
-
*/
|
|
293
|
-
interface ERC20Amount extends ERC20Token {
|
|
294
|
-
/**
|
|
295
|
-
* An amount in units for the given ERC20 token
|
|
296
|
-
*/
|
|
297
|
-
amount: string;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Union type that represents all token types
|
|
301
|
-
*/
|
|
302
|
-
declare type AnyToken = ETHToken | ERC721Token | ERC20Token;
|
|
303
|
-
/**
|
|
304
|
-
* Union type that represents all token type amounts
|
|
305
|
-
*/
|
|
306
|
-
declare type TokenAmount = ETHAmount | ERC20Amount | ERC721Token;
|
|
307
|
-
/**
|
|
308
|
-
* Union type that represents exchange token type amounts
|
|
309
|
-
*/
|
|
310
|
-
declare type ExchangeTokenAmount = ETHAmount | ERC20Amount;
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Immutable X API
|
|
314
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
315
|
-
*
|
|
316
|
-
* The version of the OpenAPI document: 3.0
|
|
317
|
-
* Contact: support@immutable.com
|
|
318
|
-
*
|
|
319
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
320
|
-
* https://openapi-generator.tech
|
|
321
|
-
* Do not edit the class manually.
|
|
322
|
-
*/
|
|
323
|
-
interface ConfigurationParameters {
|
|
324
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
325
|
-
username?: string;
|
|
326
|
-
password?: string;
|
|
327
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
328
|
-
basePath?: string;
|
|
329
|
-
baseOptions?: any;
|
|
330
|
-
formDataCtor?: new () => any;
|
|
331
|
-
}
|
|
332
|
-
declare class Configuration {
|
|
333
|
-
/**
|
|
334
|
-
* parameter for apiKey security
|
|
335
|
-
* @param name security name
|
|
336
|
-
* @memberof Configuration
|
|
337
|
-
*/
|
|
338
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
339
|
-
/**
|
|
340
|
-
* parameter for basic security
|
|
341
|
-
*
|
|
342
|
-
* @type {string}
|
|
343
|
-
* @memberof Configuration
|
|
344
|
-
*/
|
|
345
|
-
username?: string;
|
|
346
|
-
/**
|
|
347
|
-
* parameter for basic security
|
|
348
|
-
*
|
|
349
|
-
* @type {string}
|
|
350
|
-
* @memberof Configuration
|
|
351
|
-
*/
|
|
352
|
-
password?: string;
|
|
353
|
-
/**
|
|
354
|
-
* parameter for oauth2 security
|
|
355
|
-
* @param name security name
|
|
356
|
-
* @param scopes oauth2 scope
|
|
357
|
-
* @memberof Configuration
|
|
358
|
-
*/
|
|
359
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
360
|
-
/**
|
|
361
|
-
* override base path
|
|
362
|
-
*
|
|
363
|
-
* @type {string}
|
|
364
|
-
* @memberof Configuration
|
|
365
|
-
*/
|
|
366
|
-
basePath?: string;
|
|
367
|
-
/**
|
|
368
|
-
* base options for axios calls
|
|
369
|
-
*
|
|
370
|
-
* @type {any}
|
|
371
|
-
* @memberof Configuration
|
|
372
|
-
*/
|
|
373
|
-
baseOptions?: any;
|
|
374
|
-
/**
|
|
375
|
-
* The FormData constructor that will be used to create multipart form data
|
|
376
|
-
* requests. You can inject this here so that execution environments that
|
|
377
|
-
* do not support the FormData class can still run the generated client.
|
|
378
|
-
*
|
|
379
|
-
* @type {new () => FormData}
|
|
380
|
-
*/
|
|
381
|
-
formDataCtor?: new () => any;
|
|
382
|
-
constructor(param?: ConfigurationParameters);
|
|
383
|
-
/**
|
|
384
|
-
* Check if the given MIME is a JSON MIME.
|
|
385
|
-
* JSON MIME examples:
|
|
386
|
-
* application/json
|
|
387
|
-
* application/json; charset=UTF8
|
|
388
|
-
* APPLICATION/JSON
|
|
389
|
-
* application/vnd.company+json
|
|
390
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
391
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
392
|
-
*/
|
|
393
|
-
isJsonMime(mime: string): boolean;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Immutable X API
|
|
398
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
399
|
-
*
|
|
400
|
-
* The version of the OpenAPI document: 3.0
|
|
401
|
-
* Contact: support@immutable.com
|
|
402
|
-
*
|
|
403
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
404
|
-
* https://openapi-generator.tech
|
|
405
|
-
* Do not edit the class manually.
|
|
406
|
-
*/
|
|
407
|
-
/**
|
|
408
|
-
*
|
|
409
|
-
* @export
|
|
410
|
-
* @interface CancelOrderResponse
|
|
411
|
-
*/
|
|
412
|
-
interface CancelOrderResponse {
|
|
413
|
-
/**
|
|
414
|
-
* ID of the cancelled order
|
|
415
|
-
* @type {number}
|
|
416
|
-
* @memberof CancelOrderResponse
|
|
417
|
-
*/
|
|
418
|
-
'order_id': number;
|
|
419
|
-
/**
|
|
420
|
-
* New status of the order
|
|
421
|
-
* @type {string}
|
|
422
|
-
* @memberof CancelOrderResponse
|
|
423
|
-
*/
|
|
424
|
-
'status': string;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* Immutable X API
|
|
429
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
430
|
-
*
|
|
431
|
-
* The version of the OpenAPI document: 3.0
|
|
432
|
-
* Contact: support@immutable.com
|
|
433
|
-
*
|
|
434
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
435
|
-
* https://openapi-generator.tech
|
|
436
|
-
* Do not edit the class manually.
|
|
437
|
-
*/
|
|
438
|
-
/**
|
|
439
|
-
*
|
|
440
|
-
* @export
|
|
441
|
-
* @interface FeeEntry
|
|
442
|
-
*/
|
|
443
|
-
interface FeeEntry {
|
|
444
|
-
/**
|
|
445
|
-
*
|
|
446
|
-
* @type {string}
|
|
447
|
-
* @memberof FeeEntry
|
|
448
|
-
*/
|
|
449
|
-
'address'?: string;
|
|
450
|
-
/**
|
|
451
|
-
*
|
|
452
|
-
* @type {number}
|
|
453
|
-
* @memberof FeeEntry
|
|
454
|
-
*/
|
|
455
|
-
'fee_percentage'?: 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 CreateOrderResponse
|
|
473
|
-
*/
|
|
474
|
-
interface CreateOrderResponse {
|
|
475
|
-
/**
|
|
476
|
-
* ID of the created order
|
|
477
|
-
* @type {number}
|
|
478
|
-
* @memberof CreateOrderResponse
|
|
479
|
-
*/
|
|
480
|
-
'order_id': number;
|
|
481
|
-
/**
|
|
482
|
-
* Request ID as a reference for an asynchronous order creation request
|
|
483
|
-
* @type {string}
|
|
484
|
-
* @memberof CreateOrderResponse
|
|
485
|
-
*/
|
|
486
|
-
'request_id'?: string;
|
|
487
|
-
/**
|
|
488
|
-
* Status of the created order
|
|
489
|
-
* @type {string}
|
|
490
|
-
* @memberof CreateOrderResponse
|
|
491
|
-
*/
|
|
492
|
-
'status': string;
|
|
493
|
-
/**
|
|
494
|
-
* Timestamp of the created order
|
|
495
|
-
* @type {number}
|
|
496
|
-
* @memberof CreateOrderResponse
|
|
497
|
-
*/
|
|
498
|
-
'time': number;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Immutable X API
|
|
503
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
504
|
-
*
|
|
505
|
-
* The version of the OpenAPI document: 3.0
|
|
506
|
-
* Contact: support@immutable.com
|
|
507
|
-
*
|
|
508
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
509
|
-
* https://openapi-generator.tech
|
|
510
|
-
* Do not edit the class manually.
|
|
511
|
-
*/
|
|
512
|
-
/**
|
|
513
|
-
*
|
|
514
|
-
* @export
|
|
515
|
-
* @interface CreateTradeResponse
|
|
516
|
-
*/
|
|
517
|
-
interface CreateTradeResponse {
|
|
518
|
-
/**
|
|
519
|
-
* Request ID as a reference for an asynchronous trade creation request
|
|
520
|
-
* @type {string}
|
|
521
|
-
* @memberof CreateTradeResponse
|
|
522
|
-
*/
|
|
523
|
-
'request_id'?: string;
|
|
524
|
-
/**
|
|
525
|
-
* Current status of trade
|
|
526
|
-
* @type {string}
|
|
527
|
-
* @memberof CreateTradeResponse
|
|
528
|
-
*/
|
|
529
|
-
'status': string;
|
|
530
|
-
/**
|
|
531
|
-
* ID of trade within Immutable X
|
|
532
|
-
* @type {number}
|
|
533
|
-
* @memberof CreateTradeResponse
|
|
534
|
-
*/
|
|
535
|
-
'trade_id': number;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* Immutable X API
|
|
540
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
541
|
-
*
|
|
542
|
-
* The version of the OpenAPI document: 3.0
|
|
543
|
-
* Contact: support@immutable.com
|
|
544
|
-
*
|
|
545
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
546
|
-
* https://openapi-generator.tech
|
|
547
|
-
* Do not edit the class manually.
|
|
548
|
-
*/
|
|
549
|
-
/**
|
|
550
|
-
*
|
|
551
|
-
* @export
|
|
552
|
-
* @interface CreateTransferResponse
|
|
553
|
-
*/
|
|
554
|
-
interface CreateTransferResponse {
|
|
555
|
-
/**
|
|
556
|
-
* List of transfer IDs
|
|
557
|
-
* @type {Array<number>}
|
|
558
|
-
* @memberof CreateTransferResponse
|
|
559
|
-
*/
|
|
560
|
-
'transfer_ids': Array<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 CreateTransferResponseV1
|
|
578
|
-
*/
|
|
579
|
-
interface CreateTransferResponseV1 {
|
|
580
|
-
/**
|
|
581
|
-
* [deprecated] Sent signature
|
|
582
|
-
* @type {string}
|
|
583
|
-
* @memberof CreateTransferResponseV1
|
|
584
|
-
*/
|
|
585
|
-
'sent_signature': string;
|
|
586
|
-
/**
|
|
587
|
-
* [deprecated] The status of transfer
|
|
588
|
-
* @type {string}
|
|
589
|
-
* @memberof CreateTransferResponseV1
|
|
590
|
-
*/
|
|
591
|
-
'status': string;
|
|
592
|
-
/**
|
|
593
|
-
* [deprecated] Time of the transfer
|
|
594
|
-
* @type {number}
|
|
595
|
-
* @memberof CreateTransferResponseV1
|
|
596
|
-
*/
|
|
597
|
-
'time': number;
|
|
598
|
-
/**
|
|
599
|
-
* ID of the transfer
|
|
600
|
-
* @type {number}
|
|
601
|
-
* @memberof CreateTransferResponseV1
|
|
602
|
-
*/
|
|
603
|
-
'transfer_id': number;
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Immutable X API
|
|
608
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
609
|
-
*
|
|
610
|
-
* The version of the OpenAPI document: 3.0
|
|
611
|
-
* Contact: support@immutable.com
|
|
612
|
-
*
|
|
613
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
614
|
-
* https://openapi-generator.tech
|
|
615
|
-
* Do not edit the class manually.
|
|
616
|
-
*/
|
|
617
|
-
/**
|
|
618
|
-
*
|
|
619
|
-
* @export
|
|
620
|
-
* @interface CreateWithdrawalResponse
|
|
621
|
-
*/
|
|
622
|
-
interface CreateWithdrawalResponse {
|
|
623
|
-
/**
|
|
624
|
-
* Status of the withdrawal
|
|
625
|
-
* @type {string}
|
|
626
|
-
* @memberof CreateWithdrawalResponse
|
|
627
|
-
*/
|
|
628
|
-
'status': string;
|
|
629
|
-
/**
|
|
630
|
-
* Time of the withdrawal
|
|
631
|
-
* @type {number}
|
|
632
|
-
* @memberof CreateWithdrawalResponse
|
|
633
|
-
*/
|
|
634
|
-
'time': number;
|
|
635
|
-
/**
|
|
636
|
-
* ID of the withdrawal
|
|
637
|
-
* @type {number}
|
|
638
|
-
* @memberof CreateWithdrawalResponse
|
|
639
|
-
*/
|
|
640
|
-
'withdrawal_id': number;
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
* Immutable X API
|
|
645
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
646
|
-
*
|
|
647
|
-
* The version of the OpenAPI document: 3.0
|
|
648
|
-
* Contact: support@immutable.com
|
|
649
|
-
*
|
|
650
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
651
|
-
* https://openapi-generator.tech
|
|
652
|
-
* Do not edit the class manually.
|
|
653
|
-
*/
|
|
654
|
-
/**
|
|
655
|
-
*
|
|
656
|
-
* @export
|
|
657
|
-
* @interface GetSignableCancelOrderRequest
|
|
658
|
-
*/
|
|
659
|
-
interface GetSignableCancelOrderRequest {
|
|
660
|
-
/**
|
|
661
|
-
* ID of the order to be cancelled
|
|
662
|
-
* @type {number}
|
|
663
|
-
* @memberof GetSignableCancelOrderRequest
|
|
664
|
-
*/
|
|
665
|
-
'order_id': number;
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Immutable X API
|
|
670
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
671
|
-
*
|
|
672
|
-
* The version of the OpenAPI document: 3.0
|
|
673
|
-
* Contact: support@immutable.com
|
|
674
|
-
*
|
|
675
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
676
|
-
* https://openapi-generator.tech
|
|
677
|
-
* Do not edit the class manually.
|
|
678
|
-
*/
|
|
679
|
-
|
|
680
|
-
/**
|
|
681
|
-
*
|
|
682
|
-
* @export
|
|
683
|
-
* @interface GetSignableTradeRequest
|
|
684
|
-
*/
|
|
685
|
-
interface GetSignableTradeRequest {
|
|
686
|
-
/**
|
|
687
|
-
* ExpirationTimestamp in Unix time in hours. Note: will be rounded down to the nearest hour
|
|
688
|
-
* @type {number}
|
|
689
|
-
* @memberof GetSignableTradeRequest
|
|
690
|
-
*/
|
|
691
|
-
'expiration_timestamp'?: number;
|
|
692
|
-
/**
|
|
693
|
-
* Inclusion of either maker or taker fees
|
|
694
|
-
* @type {Array<FeeEntry>}
|
|
695
|
-
* @memberof GetSignableTradeRequest
|
|
696
|
-
*/
|
|
697
|
-
'fees'?: Array<FeeEntry>;
|
|
698
|
-
/**
|
|
699
|
-
* The ID of the maker order involved
|
|
700
|
-
* @type {number}
|
|
701
|
-
* @memberof GetSignableTradeRequest
|
|
702
|
-
*/
|
|
703
|
-
'order_id': number;
|
|
704
|
-
/**
|
|
705
|
-
* Ethereum address of the submitting user
|
|
706
|
-
* @type {string}
|
|
707
|
-
* @memberof GetSignableTradeRequest
|
|
708
|
-
*/
|
|
709
|
-
'user': string;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Immutable X API
|
|
714
|
-
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
715
|
-
*
|
|
716
|
-
* The version of the OpenAPI document: 3.0
|
|
717
|
-
* Contact: support@immutable.com
|
|
718
|
-
*
|
|
719
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
720
|
-
* https://openapi-generator.tech
|
|
721
|
-
* Do not edit the class manually.
|
|
722
|
-
*/
|
|
723
|
-
/**
|
|
724
|
-
*
|
|
725
|
-
* @export
|
|
726
|
-
* @interface RegisterUserResponse
|
|
727
|
-
*/
|
|
728
|
-
interface RegisterUserResponse {
|
|
729
|
-
/**
|
|
730
|
-
* Immutable signature authorising registration
|
|
731
|
-
* @type {string}
|
|
732
|
-
* @memberof RegisterUserResponse
|
|
733
|
-
*/
|
|
734
|
-
'tx_hash': string;
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
/**
|
|
738
|
-
* Parameter required to create an Order
|
|
739
|
-
*/
|
|
740
|
-
interface UnsignedOrderRequest {
|
|
741
|
-
/**
|
|
742
|
-
* The amount of tokens that will be bought for this order
|
|
743
|
-
*/
|
|
744
|
-
buy: TokenAmount;
|
|
745
|
-
/**
|
|
746
|
-
* The amount of tokens that will be sold for this order
|
|
747
|
-
*/
|
|
748
|
-
sell: TokenAmount;
|
|
749
|
-
/**
|
|
750
|
-
* ExpirationTimestamp in Unix time. Note: will be rounded down to the nearest hour
|
|
751
|
-
*/
|
|
752
|
-
expiration_timestamp?: number;
|
|
753
|
-
/**
|
|
754
|
-
* Inclusion of either maker or taker fees
|
|
755
|
-
*/
|
|
756
|
-
fees?: Array<FeeEntry>;
|
|
757
|
-
}
|
|
758
|
-
/**
|
|
759
|
-
* Parameter required to create a Transfer
|
|
760
|
-
*/
|
|
761
|
-
declare type UnsignedTransferRequest = TokenAmount & {
|
|
762
|
-
/**
|
|
763
|
-
* Ethereum address of the receiving user
|
|
764
|
-
*/
|
|
765
|
-
receiver: string;
|
|
766
|
-
};
|
|
767
|
-
/**
|
|
768
|
-
* Parameter required to create a Transfer
|
|
769
|
-
*/
|
|
770
|
-
declare type UnsignedExchangeTransferRequest = ExchangeTokenAmount & {
|
|
771
|
-
/**
|
|
772
|
-
* Ethereum address of the receiving user
|
|
773
|
-
*/
|
|
774
|
-
receiver: string;
|
|
775
|
-
/**
|
|
776
|
-
* Exchange transaction ID
|
|
777
|
-
*/
|
|
778
|
-
transactionID: string;
|
|
779
|
-
};
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* Parameter required to create a batchNftTransfer
|
|
783
|
-
*/
|
|
784
|
-
interface NftTransferDetails {
|
|
785
|
-
/**
|
|
786
|
-
* Ethereum address of the receiving user
|
|
787
|
-
*/
|
|
788
|
-
receiver: string;
|
|
789
|
-
/**
|
|
790
|
-
* The token ID
|
|
791
|
-
*/
|
|
792
|
-
tokenId: string;
|
|
793
|
-
/**
|
|
794
|
-
* The token contract address
|
|
795
|
-
*/
|
|
796
|
-
tokenAddress: string;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* The configuration for the Ethereum network
|
|
801
|
-
*/
|
|
802
|
-
interface EthConfiguration {
|
|
803
|
-
coreContractAddress: string;
|
|
804
|
-
registrationContractAddress: string;
|
|
805
|
-
chainID: number;
|
|
806
|
-
}
|
|
807
|
-
/**
|
|
808
|
-
* The configuration for the ImmutableX client
|
|
809
|
-
*/
|
|
810
|
-
interface ImmutableXConfiguration {
|
|
811
|
-
/**
|
|
812
|
-
* The configuration for the API client
|
|
813
|
-
*/
|
|
814
|
-
apiConfiguration: Configuration;
|
|
815
|
-
/**
|
|
816
|
-
* The configuration for the Ethereum network
|
|
817
|
-
*/
|
|
818
|
-
ethConfiguration: EthConfiguration;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
interface IMXProvider {
|
|
822
|
-
/**
|
|
823
|
-
* Get the Signer address
|
|
824
|
-
*
|
|
825
|
-
* @return {Promise<string>} Returns a promise that resolves with the signer's address
|
|
826
|
-
*/
|
|
827
|
-
getAddress(): Promise<string>;
|
|
828
|
-
/**
|
|
829
|
-
* Register a User to Immutable X if they are not already registered
|
|
830
|
-
*
|
|
831
|
-
* @return {Promise<RegisterUserResponse>} Returns a promise that resolves with the user registration response
|
|
832
|
-
*/
|
|
833
|
-
registerOffchain(): Promise<RegisterUserResponse>;
|
|
834
|
-
/**
|
|
835
|
-
* Checks if a User is registered off-chain
|
|
836
|
-
*
|
|
837
|
-
* @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered with IMX, false otherwise
|
|
838
|
-
*/
|
|
839
|
-
isRegisteredOffchain(): Promise<boolean>;
|
|
840
|
-
/**
|
|
841
|
-
* Checks if a User is registered on-chain
|
|
842
|
-
*
|
|
843
|
-
* @return {Promise<boolean>} Returns a promise that resolves with true if the User is registered, false otherwise
|
|
844
|
-
*/
|
|
845
|
-
isRegisteredOnchain(): Promise<boolean>;
|
|
846
|
-
/**
|
|
847
|
-
* Create an Order
|
|
848
|
-
*
|
|
849
|
-
* @param {UnsignedOrderRequest} request The unsigned order request to create an order
|
|
850
|
-
* @return {Promise<CreateOrderResponse>} Returns a promise that resolves with the created Order
|
|
851
|
-
*/
|
|
852
|
-
createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse>;
|
|
853
|
-
/**
|
|
854
|
-
* Cancel an Order
|
|
855
|
-
*
|
|
856
|
-
* @param {GetSignableCancelOrderRequest} request The signable cancel order request
|
|
857
|
-
* @return {Promise<CancelOrderResponse>} Returns a promise that resolves with the cancelled Order
|
|
858
|
-
*/
|
|
859
|
-
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse>;
|
|
860
|
-
/**
|
|
861
|
-
* Create a Trade
|
|
862
|
-
*
|
|
863
|
-
* @param {GetSignableTradeRequest} request The signable trade request
|
|
864
|
-
* @return {Promise<CreateTradeResponse>} Returns a promise that resolves with the created Trade
|
|
865
|
-
*/
|
|
866
|
-
createTrade(request: GetSignableTradeRequest): Promise<CreateTradeResponse>;
|
|
867
|
-
/**
|
|
868
|
-
* Create a new Transfer request
|
|
869
|
-
*
|
|
870
|
-
* @param {UnsignedTransferRequest} request The unsigned transfer request
|
|
871
|
-
* @return {Promise<CreateTransferResponseV1>} Returns a promise that resolves with the created Transfer
|
|
872
|
-
*/
|
|
873
|
-
transfer(request: UnsignedTransferRequest): Promise<CreateTransferResponseV1>;
|
|
874
|
-
/**
|
|
875
|
-
* Create a batch of NFT transfer requests
|
|
876
|
-
*
|
|
877
|
-
* @param {Array<NftTransferDetails>} request An array of NFT transfer details
|
|
878
|
-
* @return {Promise<CreateTransferResponse>} Resolves a promise that resolves with the list of Transfer IDs
|
|
879
|
-
*/
|
|
880
|
-
batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
|
|
881
|
-
/**
|
|
882
|
-
* Create a new Exchange transaction
|
|
883
|
-
*
|
|
884
|
-
* @param {UnsignedExchangeTransferRequest} request The unsigned exchange transfer request
|
|
885
|
-
* @return {Promise<CreateTransferResponseV1>} Returns a promise that resolves with the created Exchange Transaction
|
|
886
|
-
*/
|
|
887
|
-
exchangeTransfer(request: UnsignedExchangeTransferRequest): Promise<CreateTransferResponseV1>;
|
|
888
|
-
/**
|
|
889
|
-
* Deposit either ETH, ERC20 or ERC721 tokens
|
|
890
|
-
*
|
|
891
|
-
* @param {TokenAmount} request The token type amount in its corresponding unit
|
|
892
|
-
* @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
|
|
893
|
-
*/
|
|
894
|
-
deposit(deposit: TokenAmount): Promise<TransactionResponse>;
|
|
895
|
-
/**
|
|
896
|
-
* Create a Withdrawal
|
|
897
|
-
*
|
|
898
|
-
* @param {TokenAmount} request The token type amount in its corresponding unit
|
|
899
|
-
* @return {Promise<CreateWithdrawalResponse>} Returns a promise that resolves with the created Withdrawal
|
|
900
|
-
*/
|
|
901
|
-
prepareWithdrawal(request: TokenAmount): Promise<CreateWithdrawalResponse>;
|
|
902
|
-
/**
|
|
903
|
-
* Completes a Withdrawal
|
|
904
|
-
*
|
|
905
|
-
* @param {string} starkPublicKey The stark public key
|
|
906
|
-
* @param {AnyToken} token The token to withdraw
|
|
907
|
-
* @return {Promise<TransactionResponse>} Returns a promise that resolves with the transaction
|
|
908
|
-
*/
|
|
909
|
-
completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
declare enum Environment {
|
|
913
|
-
PRODUCTION = "production",
|
|
914
|
-
SANDBOX = "sandbox"
|
|
915
|
-
}
|
|
916
|
-
declare class ImmutableConfiguration {
|
|
917
|
-
readonly environment: Environment;
|
|
918
|
-
readonly rateLimitingKey?: string;
|
|
919
|
-
readonly apiKey?: string;
|
|
920
|
-
readonly publishableKey?: string;
|
|
921
|
-
constructor(options: {
|
|
922
|
-
environment: Environment;
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
type ImmutableConfigurationWithRequireableFields<T> = ImmutableConfiguration & (T extends {
|
|
926
|
-
apiKey: 'required';
|
|
927
|
-
} ? Required<{
|
|
928
|
-
apiKey: string;
|
|
929
|
-
}> : {}) & (T extends {
|
|
930
|
-
publishableKey: 'required';
|
|
931
|
-
} ? Required<{
|
|
932
|
-
publishableKey: string;
|
|
933
|
-
}> : {});
|
|
934
|
-
type ImmutableConfigurationWithOmitableFields<T> = (T extends {
|
|
935
|
-
apiKey: 'omit';
|
|
936
|
-
} ? Omit<ImmutableConfigurationWithRequireableFields<T>, 'apiKey'> : ImmutableConfigurationWithRequireableFields<T>);
|
|
937
|
-
interface ModuleConfiguration<T> {
|
|
938
|
-
baseConfig: ImmutableConfigurationWithOmitableFields<T>;
|
|
939
|
-
overrides?: T;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
interface ProviderOverrides {
|
|
943
|
-
immutableXConfig: ImmutableXConfiguration;
|
|
944
|
-
}
|
|
945
|
-
interface ProviderModuleConfiguration extends ModuleConfiguration<ProviderOverrides> {
|
|
946
|
-
}
|
|
947
|
-
declare class ProviderConfiguration {
|
|
948
|
-
readonly immutableXConfig: ImmutableXConfiguration;
|
|
949
|
-
readonly baseConfig: ImmutableConfiguration;
|
|
950
|
-
constructor({ baseConfig, overrides }: ProviderModuleConfiguration);
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
declare class GenericIMXProvider implements IMXProvider {
|
|
954
|
-
private readonly config;
|
|
955
|
-
private readonly signers;
|
|
956
|
-
constructor(config: ProviderConfiguration, ethSigner: Signer, starkSigner: StarkSigner);
|
|
957
|
-
getAddress(): Promise<string>;
|
|
958
|
-
isRegisteredOffchain(): Promise<boolean>;
|
|
959
|
-
registerOffchain(): Promise<RegisterUserResponse>;
|
|
960
|
-
batchNftTransfer(request: Array<NftTransferDetails>): Promise<CreateTransferResponse>;
|
|
961
|
-
cancelOrder(request: GetSignableCancelOrderRequest): Promise<CancelOrderResponse>;
|
|
962
|
-
completeWithdrawal(starkPublicKey: string, token: AnyToken): Promise<TransactionResponse>;
|
|
963
|
-
createOrder(request: UnsignedOrderRequest): Promise<CreateOrderResponse>;
|
|
964
|
-
createTrade(request: GetSignableTradeRequest): Promise<CreateTradeResponse>;
|
|
965
|
-
deposit(tokenAmount: TokenAmount): Promise<TransactionResponse>;
|
|
966
|
-
exchangeTransfer(request: UnsignedExchangeTransferRequest): Promise<CreateTransferResponseV1>;
|
|
967
|
-
isRegisteredOnchain(): Promise<boolean>;
|
|
968
|
-
prepareWithdrawal(request: TokenAmount): Promise<CreateWithdrawalResponse>;
|
|
969
|
-
transfer(request: UnsignedTransferRequest): Promise<CreateTransferResponseV1>;
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
declare class MetaMaskIMXProvider extends GenericIMXProvider {
|
|
973
|
-
private static imxSigner;
|
|
974
|
-
static connect(config: ProviderConfiguration): Promise<MetaMaskIMXProvider>;
|
|
975
|
-
static disconnect(): Promise<void>;
|
|
976
|
-
static signMessage(message: string): Promise<string>;
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
export { GenericIMXProvider, IMXProvider, MetaMaskIMXProvider, ProviderConfiguration };
|