@imtbl/sdk 0.1.4-alpha → 0.1.6-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkout_sdk.d.ts +57 -3
- package/dist/checkout_sdk.js +22 -5
- package/dist/checkout_widgets.d.ts +907 -12
- package/dist/checkout_widgets.js +225 -142
- package/dist/immutablex_client.d.ts +9 -9
- package/dist/immutablex_client.js +34 -31
- package/dist/index.cjs +414 -166
- package/dist/index.d.ts +396 -23
- package/dist/index.js +417 -178
- package/dist/passport.d.ts +9 -9
- package/dist/passport.js +233 -202
- package/package.json +3 -3
|
@@ -7,26 +7,26 @@ var Environment;
|
|
|
7
7
|
Environment["SANDBOX"] = "sandbox";
|
|
8
8
|
})(Environment || (Environment = {}));
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
10
|
+
/**
|
|
11
|
+
* Set `sdkVersion` on config
|
|
12
|
+
*/
|
|
13
|
+
const production = () => Config.createConfig({
|
|
14
|
+
basePath: 'https://api.x.immutable.com',
|
|
15
|
+
chainID: 1,
|
|
16
|
+
coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
|
|
17
|
+
registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
|
|
18
|
+
sdkVersion: 'ts-immutable-sdk-0.1.6-alpha',
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Set `sdkVersion` on config
|
|
22
|
+
*/
|
|
23
|
+
const sandbox = () => Config.createConfig({
|
|
24
|
+
basePath: 'https://api.sandbox.x.immutable.com',
|
|
25
|
+
chainID: 5,
|
|
26
|
+
coreContractAddress: '0x7917eDb51ecD6CdB3F9854c3cc593F33de10c623',
|
|
27
|
+
registrationContractAddress: '0x1C97Ada273C9A52253f463042f29117090Cd7D83',
|
|
28
|
+
sdkVersion: 'ts-immutable-sdk-0.1.6-alpha',
|
|
29
|
+
});
|
|
30
30
|
class ImxConfiguration {
|
|
31
31
|
immutableXConfig;
|
|
32
32
|
baseConfig;
|
|
@@ -38,13 +38,16 @@ class ImxConfiguration {
|
|
|
38
38
|
else {
|
|
39
39
|
switch (baseConfig.environment) {
|
|
40
40
|
case Environment.SANDBOX: {
|
|
41
|
-
this.immutableXConfig =
|
|
41
|
+
this.immutableXConfig = sandbox();
|
|
42
42
|
break;
|
|
43
43
|
}
|
|
44
44
|
case Environment.PRODUCTION: {
|
|
45
|
-
this.immutableXConfig =
|
|
45
|
+
this.immutableXConfig = production();
|
|
46
46
|
break;
|
|
47
47
|
}
|
|
48
|
+
default: {
|
|
49
|
+
this.immutableXConfig = sandbox();
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
}
|
|
@@ -99,7 +102,7 @@ class ImmutableXClient {
|
|
|
99
102
|
}
|
|
100
103
|
/**
|
|
101
104
|
* Get a list of Deposits
|
|
102
|
-
* @param request - optional
|
|
105
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
103
106
|
* @returns a promise that resolves with the requested list of Deposits
|
|
104
107
|
* @throws {@link index.IMXError}
|
|
105
108
|
*/
|
|
@@ -126,7 +129,7 @@ class ImmutableXClient {
|
|
|
126
129
|
}
|
|
127
130
|
/**
|
|
128
131
|
* Get a list of Assets
|
|
129
|
-
* @param request - optional
|
|
132
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
130
133
|
* @returns a promise that resolves with the requested list of Assets
|
|
131
134
|
* @throws {@link index.IMXError}
|
|
132
135
|
*/
|
|
@@ -163,7 +166,7 @@ class ImmutableXClient {
|
|
|
163
166
|
}
|
|
164
167
|
/**
|
|
165
168
|
* Get a list of Collections
|
|
166
|
-
* @param request - optional
|
|
169
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
167
170
|
* @returns a promise that resolves with the requested list of Collections
|
|
168
171
|
* @throws {@link index.IMXError}
|
|
169
172
|
*/
|
|
@@ -319,7 +322,7 @@ class ImmutableXClient {
|
|
|
319
322
|
}
|
|
320
323
|
/**
|
|
321
324
|
* Get a list of Mints
|
|
322
|
-
* @param request optional
|
|
325
|
+
* @param request optional object containing the parameters to be provided in the API request
|
|
323
326
|
* @returns a promise that resolves with the requested list of Mints
|
|
324
327
|
* @throws {@link index.IMXError}
|
|
325
328
|
*/
|
|
@@ -338,7 +341,7 @@ class ImmutableXClient {
|
|
|
338
341
|
}
|
|
339
342
|
/**
|
|
340
343
|
* Get a list of Withdrawals
|
|
341
|
-
* @param request - optional
|
|
344
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
342
345
|
* @returns a promise that resolves with the requested list of Withdrawals
|
|
343
346
|
* @throws {@link index.IMXError}
|
|
344
347
|
*/
|
|
@@ -365,7 +368,7 @@ class ImmutableXClient {
|
|
|
365
368
|
}
|
|
366
369
|
/**
|
|
367
370
|
* Get a list of Orders
|
|
368
|
-
* @param request - optional
|
|
371
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
369
372
|
* @returns a promise that resolves with the requested list of Orders
|
|
370
373
|
* @throws {@link index.IMXError}
|
|
371
374
|
*/
|
|
@@ -383,7 +386,7 @@ class ImmutableXClient {
|
|
|
383
386
|
}
|
|
384
387
|
/**
|
|
385
388
|
* Get a list of Trades
|
|
386
|
-
* @param request - optional
|
|
389
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
387
390
|
* @returns a promise that resolves with the requested list of Trades
|
|
388
391
|
* @throws {@link index.IMXError}
|
|
389
392
|
*/
|
|
@@ -401,7 +404,7 @@ class ImmutableXClient {
|
|
|
401
404
|
}
|
|
402
405
|
/**
|
|
403
406
|
* Get a list of Tokens
|
|
404
|
-
* @param request - optional
|
|
407
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
405
408
|
* @returns a promise that resolves with the requested list of Tokens
|
|
406
409
|
* @throws {@link index.IMXError}
|
|
407
410
|
*/
|
|
@@ -419,7 +422,7 @@ class ImmutableXClient {
|
|
|
419
422
|
}
|
|
420
423
|
/**
|
|
421
424
|
* Get a list of Transfers
|
|
422
|
-
* @param request - optional
|
|
425
|
+
* @param request - optional object containing the parameters to be provided in the API request
|
|
423
426
|
* @returns a promise that resolves with the requested list of Transfers
|
|
424
427
|
* @throws {@link index.IMXError}
|
|
425
428
|
*/
|