@imtbl/sdk 0.31.1 → 0.31.2-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/.eslintrc +13 -0
- package/.gitignore +8 -0
- package/blockchain_data.js +1 -0
- package/checkout_sdk.js +9 -0
- package/config.js +1 -0
- package/dist/browser/checkout/sdk.js +2 -2
- package/dist/browser/checkout/widgets.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/immutablex_client.js +1 -0
- package/index.cjs +9 -0
- package/index.d.ts +18603 -0
- package/index.js +9 -0
- package/module-release.json +30 -0
- package/orderbook.js +1 -0
- package/package.json +24 -18
- package/passport.js +1 -0
- package/provider.js +1 -0
- package/rollup.config.js +158 -0
- package/scripts/copyBrowserBundles.js +62 -0
- package/scripts/generate-package-list.sh +5 -0
- package/scripts/generateIndex.js +44 -0
- package/scripts/updateDependencies.js +137 -0
- package/scripts/updateExports.js +62 -0
- package/src/blockchain_data.ts +1 -0
- package/src/checkout_sdk.ts +1 -0
- package/src/checkout_widgets.ts +1 -0
- package/src/config.ts +1 -0
- package/src/immutablex_client.ts +1 -0
- package/src/index.ts +7 -0
- package/src/orderbook.ts +1 -0
- package/src/passport.ts +1 -0
- package/src/provider.ts +1 -0
- package/tsconfig.json +27 -0
- package/typedoc.json +4 -0
- package/workspace-packages.json +31 -0
- package/dist/blockchain_data.js +0 -4010
- package/dist/checkout_sdk.js +0 -26016
- package/dist/config.js +0 -37
- package/dist/immutablex_client.js +0 -523
- package/dist/index.cjs +0 -34452
- package/dist/index.js +0 -34424
- package/dist/orderbook.js +0 -1583
- package/dist/passport.js +0 -9159
- package/dist/provider.js +0 -1165
- /package/{dist/blockchain_data.d.ts → blockchain_data.d.ts} +0 -0
- /package/{dist/checkout_sdk.d.ts → checkout_sdk.d.ts} +0 -0
- /package/{dist/config.d.ts → config.d.ts} +0 -0
- /package/{dist/immutablex_client.d.ts → immutablex_client.d.ts} +0 -0
- /package/{dist/index.d.ts → index.d.cts} +0 -0
- /package/{dist/orderbook.d.ts → orderbook.d.ts} +0 -0
- /package/{dist/passport.d.ts → passport.d.ts} +0 -0
- /package/{dist/provider.d.ts → provider.d.ts} +0 -0
package/dist/config.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
|
|
3
|
-
var Environment;
|
|
4
|
-
(function (Environment) {
|
|
5
|
-
Environment["PRODUCTION"] = "production";
|
|
6
|
-
Environment["SANDBOX"] = "sandbox";
|
|
7
|
-
})(Environment || (Environment = {}));
|
|
8
|
-
class ImmutableConfiguration {
|
|
9
|
-
environment;
|
|
10
|
-
rateLimitingKey;
|
|
11
|
-
apiKey;
|
|
12
|
-
publishableKey;
|
|
13
|
-
constructor(options) {
|
|
14
|
-
this.environment = options.environment;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
const API_KEY_PREFIX = 'sk_imapik-';
|
|
18
|
-
const PUBLISHABLE_KEY_PREFIX = 'pk_imapik-';
|
|
19
|
-
const PUBLISHABLE_KEY_LENGTH = 30;
|
|
20
|
-
const addApiKeyToAxiosHeader = (apiKey) => {
|
|
21
|
-
if (!apiKey.startsWith(API_KEY_PREFIX)) {
|
|
22
|
-
throw new Error('Invalid API key. Create your api key in Immutable developer hub. https://hub.immutable.com');
|
|
23
|
-
}
|
|
24
|
-
axios.defaults.headers.common['x-immutable-api-key'] = apiKey;
|
|
25
|
-
};
|
|
26
|
-
const addPublishableKeyToAxiosHeader = (publishableKey) => {
|
|
27
|
-
if (!publishableKey.startsWith(PUBLISHABLE_KEY_PREFIX) || publishableKey.length !== PUBLISHABLE_KEY_LENGTH) {
|
|
28
|
-
throw new Error('Invalid Publishable key. Create your Publishable key in Immutable developer hub.'
|
|
29
|
-
+ ' https://hub.immutable.com');
|
|
30
|
-
}
|
|
31
|
-
axios.defaults.headers.common['x-immutable-publishable-key'] = publishableKey;
|
|
32
|
-
};
|
|
33
|
-
const addRateLimitingKeyToAxiosHeader = (rateLimitingKey) => {
|
|
34
|
-
axios.defaults.headers.common['x-api-key'] = rateLimitingKey;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export { Environment, ImmutableConfiguration, addApiKeyToAxiosHeader, addPublishableKeyToAxiosHeader, addRateLimitingKeyToAxiosHeader };
|
|
@@ -1,523 +0,0 @@
|
|
|
1
|
-
import { ImmutableX, Config } from '@imtbl/core-sdk';
|
|
2
|
-
export { IMXError, createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey } from '@imtbl/core-sdk';
|
|
3
|
-
import 'axios';
|
|
4
|
-
|
|
5
|
-
var Environment;
|
|
6
|
-
(function (Environment) {
|
|
7
|
-
Environment["PRODUCTION"] = "production";
|
|
8
|
-
Environment["SANDBOX"] = "sandbox";
|
|
9
|
-
})(Environment || (Environment = {}));
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* createImmutableXConfiguration to create a custom ImmutableXConfiguration
|
|
13
|
-
* other than the production and sandbox defined below.
|
|
14
|
-
*/
|
|
15
|
-
const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress, registrationContractAddress, }) => Config.createConfig({
|
|
16
|
-
basePath,
|
|
17
|
-
chainID,
|
|
18
|
-
coreContractAddress,
|
|
19
|
-
registrationContractAddress,
|
|
20
|
-
sdkVersion: 'ts-immutable-sdk-0.31.1',
|
|
21
|
-
});
|
|
22
|
-
/**
|
|
23
|
-
* Sets `sdkVersion` at the time of build
|
|
24
|
-
*/
|
|
25
|
-
const production = () => createImmutableXConfiguration({
|
|
26
|
-
basePath: 'https://api.x.immutable.com',
|
|
27
|
-
chainID: 1,
|
|
28
|
-
coreContractAddress: '0x5FDCCA53617f4d2b9134B29090C87D01058e27e9',
|
|
29
|
-
registrationContractAddress: '0x72a06bf2a1CE5e39cBA06c0CAb824960B587d64c',
|
|
30
|
-
});
|
|
31
|
-
/**
|
|
32
|
-
* Sets `sdkVersion` at the time of build
|
|
33
|
-
*/
|
|
34
|
-
const sandbox = () => createImmutableXConfiguration({
|
|
35
|
-
basePath: 'https://api.sandbox.x.immutable.com',
|
|
36
|
-
chainID: 11155111,
|
|
37
|
-
coreContractAddress: '0x2d5C349fD8464DA06a3f90b4B0E9195F3d1b7F98',
|
|
38
|
-
registrationContractAddress: '0xDbA6129C02E69405622fAdc3d5A7f8d23eac3b97',
|
|
39
|
-
});
|
|
40
|
-
class ImxConfiguration {
|
|
41
|
-
immutableXConfig;
|
|
42
|
-
baseConfig;
|
|
43
|
-
constructor({ baseConfig, overrides }) {
|
|
44
|
-
this.baseConfig = baseConfig;
|
|
45
|
-
if (overrides) {
|
|
46
|
-
this.immutableXConfig = overrides.immutableXConfig;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
switch (baseConfig.environment) {
|
|
50
|
-
case Environment.SANDBOX: {
|
|
51
|
-
this.immutableXConfig = sandbox();
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
case Environment.PRODUCTION: {
|
|
55
|
-
this.immutableXConfig = production();
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
default: {
|
|
59
|
-
this.immutableXConfig = sandbox();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
class ImmutableXClient {
|
|
67
|
-
immutableX;
|
|
68
|
-
depositsApi;
|
|
69
|
-
mintsApi;
|
|
70
|
-
ordersApi;
|
|
71
|
-
tokensApi;
|
|
72
|
-
tradesApi;
|
|
73
|
-
transfersApi;
|
|
74
|
-
exchangeApi;
|
|
75
|
-
nftCheckoutPrimaryApi;
|
|
76
|
-
usersApi;
|
|
77
|
-
withdrawalsApi;
|
|
78
|
-
balanceApi;
|
|
79
|
-
assetApi;
|
|
80
|
-
collectionApi;
|
|
81
|
-
metadataApi;
|
|
82
|
-
metadataRefreshesApi;
|
|
83
|
-
projectsApi;
|
|
84
|
-
constructor(config) {
|
|
85
|
-
const imxConfig = new ImxConfiguration(config);
|
|
86
|
-
this.immutableX = new ImmutableX(imxConfig.immutableXConfig);
|
|
87
|
-
this.depositsApi = this.immutableX.depositsApi;
|
|
88
|
-
this.mintsApi = this.immutableX.mintsApi;
|
|
89
|
-
this.ordersApi = this.immutableX.ordersApi;
|
|
90
|
-
this.tokensApi = this.immutableX.tokensApi;
|
|
91
|
-
this.tradesApi = this.immutableX.tradesApi;
|
|
92
|
-
this.transfersApi = this.immutableX.transfersApi;
|
|
93
|
-
this.exchangeApi = this.immutableX.exchangeApi;
|
|
94
|
-
this.usersApi = this.immutableX.usersApi;
|
|
95
|
-
this.withdrawalsApi = this.immutableX.withdrawalsApi;
|
|
96
|
-
this.balanceApi = this.immutableX.balanceApi;
|
|
97
|
-
this.assetApi = this.immutableX.assetApi;
|
|
98
|
-
this.collectionApi = this.immutableX.collectionApi;
|
|
99
|
-
this.metadataApi = this.immutableX.metadataApi;
|
|
100
|
-
this.metadataRefreshesApi = this.immutableX.metadataRefreshesApi;
|
|
101
|
-
this.nftCheckoutPrimaryApi = this.immutableX.nftCheckoutPrimaryApi;
|
|
102
|
-
this.projectsApi = this.immutableX.projectsApi;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Get details of a Deposit with the given ID
|
|
106
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
107
|
-
* @returns a promise that resolves with the requested Deposit
|
|
108
|
-
* @throws {@link index.IMXError}
|
|
109
|
-
*/
|
|
110
|
-
getDeposit(request) {
|
|
111
|
-
return this.immutableX.getDeposit(request);
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Get a list of Deposits
|
|
115
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
116
|
-
* @returns a promise that resolves with the requested list of Deposits
|
|
117
|
-
* @throws {@link index.IMXError}
|
|
118
|
-
*/
|
|
119
|
-
listDeposits(request) {
|
|
120
|
-
return this.immutableX.listDeposits(request);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Get Stark keys for a registered User
|
|
124
|
-
* @param ethAddress - the eth address of the User
|
|
125
|
-
* @returns a promise that resolves with the requested User
|
|
126
|
-
* @throws {@link index.IMXError}
|
|
127
|
-
*/
|
|
128
|
-
getUser(ethAddress) {
|
|
129
|
-
return this.immutableX.getUser(ethAddress);
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Get details of an Asset
|
|
133
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
134
|
-
* @returns a promise that resolves with the requested Asset
|
|
135
|
-
* @throws {@link index.IMXError}
|
|
136
|
-
*/
|
|
137
|
-
getAsset(request) {
|
|
138
|
-
return this.immutableX.getAsset(request);
|
|
139
|
-
}
|
|
140
|
-
/**
|
|
141
|
-
* Get a list of Assets
|
|
142
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
143
|
-
* @returns a promise that resolves with the requested list of Assets
|
|
144
|
-
* @throws {@link index.IMXError}
|
|
145
|
-
*/
|
|
146
|
-
listAssets(request) {
|
|
147
|
-
return this.immutableX.listAssets(request);
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Create a Collection
|
|
151
|
-
* @param ethSigner - the L1 signer
|
|
152
|
-
* @param request - the request object to be provided in the API request
|
|
153
|
-
* @returns a promise that resolves with the created Collection
|
|
154
|
-
* @throws {@link index.IMXError}
|
|
155
|
-
*/
|
|
156
|
-
createCollection(ethSigner, request) {
|
|
157
|
-
return this.immutableX.createCollection(ethSigner, request);
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Get details of a Collection at the given address
|
|
161
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
162
|
-
* @returns a promise that resolves with the requested Collection
|
|
163
|
-
* @throws {@link index.IMXError}
|
|
164
|
-
*/
|
|
165
|
-
getCollection(request) {
|
|
166
|
-
return this.immutableX.getCollection(request);
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Get a list of Collection filters
|
|
170
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
171
|
-
* @returns a promise that resolves with the requested list of Collection Filters
|
|
172
|
-
* @throws {@link index.IMXError}
|
|
173
|
-
*/
|
|
174
|
-
listCollectionFilters(request) {
|
|
175
|
-
return this.immutableX.listCollectionFilters(request);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Get a list of Collections
|
|
179
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
180
|
-
* @returns a promise that resolves with the requested list of Collections
|
|
181
|
-
* @throws {@link index.IMXError}
|
|
182
|
-
*/
|
|
183
|
-
listCollections(request) {
|
|
184
|
-
return this.collectionApi.listCollections(request).then((res) => res.data);
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Update a Collection
|
|
188
|
-
* @param ethSigner - the L1 signer
|
|
189
|
-
* @param collectionAddress - the Collection contract address
|
|
190
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
191
|
-
* @returns a promise that resolves with the updated Collection
|
|
192
|
-
* @throws {@link index.IMXError}
|
|
193
|
-
*/
|
|
194
|
-
updateCollection(ethSigner, collectionAddress, request) {
|
|
195
|
-
return this.immutableX.updateCollection(ethSigner, collectionAddress, request);
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Add metadata schema to Collection
|
|
199
|
-
* @param ethSigner - the L1 signer
|
|
200
|
-
* @param collectionAddress - the Collection contract address
|
|
201
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
202
|
-
* @returns a promise that resolves with the SuccessResponse if successful
|
|
203
|
-
* @throws {@link index.IMXError}
|
|
204
|
-
*/
|
|
205
|
-
addMetadataSchemaToCollection(ethSigner, collectionAddress, request) {
|
|
206
|
-
return this.immutableX.addMetadataSchemaToCollection(ethSigner, collectionAddress, request);
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Get Metadata schema
|
|
210
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
211
|
-
* @returns a promise that resolves with the requested Metadata schema
|
|
212
|
-
* @throws {@link index.IMXError}
|
|
213
|
-
*/
|
|
214
|
-
getMetadataSchema(request) {
|
|
215
|
-
return this.immutableX.getMetadataSchema(request);
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* Update metadata schema by name
|
|
219
|
-
* @param ethSigner - the L1 signer
|
|
220
|
-
* @param collectionAddress - the Collection contract address
|
|
221
|
-
* @param name - the Metadata schema name
|
|
222
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
223
|
-
* @returns a promise that resolves with the SuccessResponse if successful
|
|
224
|
-
* @throws {@link index.IMXError}
|
|
225
|
-
*/
|
|
226
|
-
updateMetadataSchemaByName(ethSigner, collectionAddress, name, request) {
|
|
227
|
-
return this.immutableX.updateMetadataSchemaByName(ethSigner, collectionAddress, name, request);
|
|
228
|
-
}
|
|
229
|
-
/**
|
|
230
|
-
* Get a list of metadata refreshes
|
|
231
|
-
* @param ethSigner - the L1 signer
|
|
232
|
-
* @param collectionAddress - the Collection contract address
|
|
233
|
-
* @param pageSize - the page size of the result
|
|
234
|
-
* @param cursor - the cursor
|
|
235
|
-
* @returns a promise that resolves with the requested metadata refreshes
|
|
236
|
-
* @throws {@link index.IMXError}
|
|
237
|
-
*/
|
|
238
|
-
listMetadataRefreshes(ethSigner, collectionAddress, pageSize, cursor) {
|
|
239
|
-
return this.immutableX.listMetadataRefreshes(ethSigner, collectionAddress, pageSize, cursor);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Get a list of metadata refresh errors
|
|
243
|
-
* @param ethSigner - the L1 signer
|
|
244
|
-
* @param refreshId - the metadata refresh ID
|
|
245
|
-
* @param pageSize - the page size of the result
|
|
246
|
-
* @param cursor - the cursor
|
|
247
|
-
* @returns a promise that resolves with the requested metadata refresh errors
|
|
248
|
-
* @throws {@link index.IMXError}
|
|
249
|
-
*/
|
|
250
|
-
getMetadataRefreshErrors(ethSigner, refreshId, pageSize, cursor) {
|
|
251
|
-
return this.immutableX.getMetadataRefreshErrors(ethSigner, refreshId, pageSize, cursor);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Get a list of metadata refresh results
|
|
255
|
-
* @param ethSigner - the L1 signer
|
|
256
|
-
* @param refreshId - the metadata refresh ID
|
|
257
|
-
* @returns a promise that resolves with the requested metadata refresh results
|
|
258
|
-
* @throws {@link index.IMXError}
|
|
259
|
-
*/
|
|
260
|
-
getMetadataRefreshResults(ethSigner, refreshId) {
|
|
261
|
-
return this.immutableX.getMetadataRefreshResults(ethSigner, refreshId);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Request a metadata refresh
|
|
265
|
-
* @param ethSigner - the L1 signer
|
|
266
|
-
* @param request the request object containing the parameters to be provided in the API request
|
|
267
|
-
* @returns a promise that resolves with the requested metadata refresh
|
|
268
|
-
* @throws {@link index.IMXError}
|
|
269
|
-
*/
|
|
270
|
-
createMetadataRefresh(ethSigner, request) {
|
|
271
|
-
return this.immutableX.createMetadataRefresh(ethSigner, request);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Create a Project
|
|
275
|
-
* @param ethSigner - the L1 signer
|
|
276
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
277
|
-
* @returns a promise that resolves with the created Project
|
|
278
|
-
* @throws {@link index.IMXError}
|
|
279
|
-
*/
|
|
280
|
-
async createProject(ethSigner, request) {
|
|
281
|
-
return this.immutableX.createProject(ethSigner, request);
|
|
282
|
-
}
|
|
283
|
-
/**
|
|
284
|
-
* Get a Project
|
|
285
|
-
* @param ethSigner - the L1 signer
|
|
286
|
-
* @param id - the Project ID
|
|
287
|
-
* @returns a promise that resolves with the requested Project
|
|
288
|
-
* @throws {@link index.IMXError}
|
|
289
|
-
*/
|
|
290
|
-
async getProject(ethSigner, id) {
|
|
291
|
-
return this.immutableX.getProject(ethSigner, id);
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Get Projects owned by the given User
|
|
295
|
-
* @param ethSigner - the L1 signer
|
|
296
|
-
* @param pageSize - the page size of the result
|
|
297
|
-
* @param cursor - the cursor
|
|
298
|
-
* @param orderBy - the property to sort by
|
|
299
|
-
* @param direction - direction to sort (asc/desc)
|
|
300
|
-
* @returns a promise that resolves with the requested Projects
|
|
301
|
-
* @throws {@link index.IMXError}
|
|
302
|
-
*/
|
|
303
|
-
async getProjects(ethSigner, pageSize, cursor, orderBy, direction) {
|
|
304
|
-
return this.immutableX.getProjects(ethSigner, pageSize, cursor, orderBy, direction);
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Get the token Balances of the User
|
|
308
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
309
|
-
* @returns a promise that resolves with the requested Balance
|
|
310
|
-
* @throws {@link index.IMXError}
|
|
311
|
-
*/
|
|
312
|
-
getBalance(request) {
|
|
313
|
-
return this.immutableX.getBalance(request);
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Get a list of Balances for given User
|
|
317
|
-
* @param request the request object containing the parameters to be provided in the API request
|
|
318
|
-
* @returns a promise that resolves with the requested list of Balances
|
|
319
|
-
* @throws {@link index.IMXError}
|
|
320
|
-
*/
|
|
321
|
-
listBalances(request) {
|
|
322
|
-
return this.immutableX.listBalances(request);
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Get details of a Mint with the given ID
|
|
326
|
-
* @param request the request object containing the parameters to be provided in the API request
|
|
327
|
-
* @returns a promise that resolves with the requested Mint
|
|
328
|
-
* @throws {@link index.IMXError}
|
|
329
|
-
*/
|
|
330
|
-
getMint(request) {
|
|
331
|
-
return this.immutableX.getMint(request);
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Get a list of Mints
|
|
335
|
-
* @param request optional object containing the parameters to be provided in the API request
|
|
336
|
-
* @returns a promise that resolves with the requested list of Mints
|
|
337
|
-
* @throws {@link index.IMXError}
|
|
338
|
-
*/
|
|
339
|
-
listMints(request) {
|
|
340
|
-
return this.immutableX.listMints(request);
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Mint tokens in a batch with fees
|
|
344
|
-
* @param ethSigner - the L1 signer
|
|
345
|
-
* @param request - the request object to be provided in the API request
|
|
346
|
-
* @returns a promise that resolves with the minted tokens
|
|
347
|
-
* @throws {@link index.IMXError}
|
|
348
|
-
*/
|
|
349
|
-
mint(ethSigner, request) {
|
|
350
|
-
return this.immutableX.mint(ethSigner, request);
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* Get a list of Withdrawals
|
|
354
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
355
|
-
* @returns a promise that resolves with the requested list of Withdrawals
|
|
356
|
-
* @throws {@link index.IMXError}
|
|
357
|
-
*/
|
|
358
|
-
listWithdrawals(request) {
|
|
359
|
-
return this.immutableX.listWithdrawals(request);
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Get details of Withdrawal with the given ID
|
|
363
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
364
|
-
* @returns a promise that resolves with the requested Withdrawal
|
|
365
|
-
* @throws {@link index.IMXError}
|
|
366
|
-
*/
|
|
367
|
-
getWithdrawal(request) {
|
|
368
|
-
return this.immutableX.getWithdrawal(request);
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Get details of an Order with the given ID
|
|
372
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
373
|
-
* @returns a promise that resolves with the requested Order
|
|
374
|
-
* @throws {@link index.IMXError}
|
|
375
|
-
*/
|
|
376
|
-
getOrder(request) {
|
|
377
|
-
return this.immutableX.getOrder(request);
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* Get a list of Orders
|
|
381
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
382
|
-
* @returns a promise that resolves with the requested list of Orders
|
|
383
|
-
* @throws {@link index.IMXError}
|
|
384
|
-
*/
|
|
385
|
-
listOrders(request) {
|
|
386
|
-
return this.immutableX.listOrders(request);
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* Get details of a Trade with the given ID
|
|
390
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
391
|
-
* @returns a promise that resolves with the requested Trade
|
|
392
|
-
* @throws {@link index.IMXError}
|
|
393
|
-
*/
|
|
394
|
-
getTrade(request) {
|
|
395
|
-
return this.immutableX.getTrade(request);
|
|
396
|
-
}
|
|
397
|
-
/**
|
|
398
|
-
* Get a list of Trades
|
|
399
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
400
|
-
* @returns a promise that resolves with the requested list of Trades
|
|
401
|
-
* @throws {@link index.IMXError}
|
|
402
|
-
*/
|
|
403
|
-
listTrades(request) {
|
|
404
|
-
return this.immutableX.listTrades(request);
|
|
405
|
-
}
|
|
406
|
-
/**
|
|
407
|
-
* Get details of a Token
|
|
408
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
409
|
-
* @returns a promise that resolves with the requested Token
|
|
410
|
-
* @throws {@link index.IMXError}
|
|
411
|
-
*/
|
|
412
|
-
getToken(request) {
|
|
413
|
-
return this.immutableX.getToken(request);
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Get a list of Tokens
|
|
417
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
418
|
-
* @returns a promise that resolves with the requested list of Tokens
|
|
419
|
-
* @throws {@link index.IMXError}
|
|
420
|
-
*/
|
|
421
|
-
listTokens(request) {
|
|
422
|
-
return this.immutableX.listTokens(request);
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Get details of a Transfer with the given ID
|
|
426
|
-
* @param request - the request object containing the parameters to be provided in the API request
|
|
427
|
-
* @returns a promise that resolves with the requested Transfer
|
|
428
|
-
* @throws {@link index.IMXError}
|
|
429
|
-
*/
|
|
430
|
-
getTransfer(request) {
|
|
431
|
-
return this.immutableX.getTransfer(request);
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* Get a list of Transfers
|
|
435
|
-
* @param request - optional object containing the parameters to be provided in the API request
|
|
436
|
-
* @returns a promise that resolves with the requested list of Transfers
|
|
437
|
-
* @throws {@link index.IMXError}
|
|
438
|
-
*/
|
|
439
|
-
listTransfers(request) {
|
|
440
|
-
return this.immutableX.listTransfers(request);
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Create a new Exchange transaction
|
|
444
|
-
* @param request - the request object to be provided in the API request
|
|
445
|
-
* @returns a promise that resolves with the created Exchange Transaction
|
|
446
|
-
* @throws {@link index.IMXError}
|
|
447
|
-
*/
|
|
448
|
-
createExchange(request) {
|
|
449
|
-
return this.immutableX.createExchange(request).then((res) => res.data);
|
|
450
|
-
}
|
|
451
|
-
/**
|
|
452
|
-
* Get an Exchange transaction
|
|
453
|
-
* @param request - the request object to be provided in the API request
|
|
454
|
-
* @returns a promise that resolves with the Exchange Transaction
|
|
455
|
-
* @throws {@link index.IMXError}
|
|
456
|
-
*/
|
|
457
|
-
getExchange(request) {
|
|
458
|
-
return this.immutableX.getExchange(request).then((res) => res.data);
|
|
459
|
-
}
|
|
460
|
-
/**
|
|
461
|
-
* Get Exchange transactions
|
|
462
|
-
* @param request - the request object to be provided in the API request
|
|
463
|
-
* @returns a promise that resolves with Exchange Transactions
|
|
464
|
-
* @throws {@link index.IMXError}
|
|
465
|
-
*/
|
|
466
|
-
getExchanges(request) {
|
|
467
|
-
return this.immutableX.getExchanges(request).then((res) => res.data);
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Create a new Transfer request
|
|
471
|
-
* @param walletConnection - the pair of Eth/Stark signers
|
|
472
|
-
* @param request - the request object to be provided in the API request
|
|
473
|
-
* @returns a promise that resolves with the created Exchange Transfer
|
|
474
|
-
* @throws {@link index.IMXError}
|
|
475
|
-
*/
|
|
476
|
-
exchangeTransfer(walletConnection, request) {
|
|
477
|
-
return this.immutableX.exchangeTransfer(walletConnection, request);
|
|
478
|
-
}
|
|
479
|
-
/**
|
|
480
|
-
* Create a new nft primary transaction
|
|
481
|
-
* @param request - the request object to be provided in the API request
|
|
482
|
-
* @returns a promise that resolves with the created nft primary Transaction
|
|
483
|
-
* @throws {@link index.IMXError}
|
|
484
|
-
*/
|
|
485
|
-
createNftPrimary(request) {
|
|
486
|
-
return this.immutableX.createNftPrimary(request).then((res) => res.data);
|
|
487
|
-
}
|
|
488
|
-
/**
|
|
489
|
-
* Get nft primary supported currencies and their limits
|
|
490
|
-
* @param request - the request object to be provided in the API request
|
|
491
|
-
* @returns a promise that resolves with nft primary Currencies
|
|
492
|
-
* @throws {@link index.IMXError}
|
|
493
|
-
*/
|
|
494
|
-
getCurrenciesNFTCheckoutPrimary(request) {
|
|
495
|
-
return this.immutableX
|
|
496
|
-
.getCurrenciesNFTCheckoutPrimary(request)
|
|
497
|
-
.then((res) => res.data);
|
|
498
|
-
}
|
|
499
|
-
/**
|
|
500
|
-
* Get nft primary transaction by transaction id
|
|
501
|
-
* @param request - the request object to be provided in the API request
|
|
502
|
-
* @returns a promise that resolves with nft primary transaction
|
|
503
|
-
* @throws {@link index.IMXError}
|
|
504
|
-
*/
|
|
505
|
-
getNftPrimaryTransaction(request) {
|
|
506
|
-
return this.immutableX
|
|
507
|
-
.getNftPrimaryTransaction(request)
|
|
508
|
-
.then((res) => res.data);
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
* Get list of nft primary transactions
|
|
512
|
-
* @param request - the request object to be provided in the API request
|
|
513
|
-
* @returns a promise that resolves with nft primary transaction
|
|
514
|
-
* @throws {@link index.IMXError}
|
|
515
|
-
*/
|
|
516
|
-
getNftPrimaryTransactions(request) {
|
|
517
|
-
return this.immutableX
|
|
518
|
-
.getNftPrimaryTransactions(request)
|
|
519
|
-
.then((res) => res.data);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
export { ImmutableXClient };
|