@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.
Files changed (53) hide show
  1. package/.eslintrc +13 -0
  2. package/.gitignore +8 -0
  3. package/blockchain_data.js +1 -0
  4. package/checkout_sdk.js +9 -0
  5. package/config.js +1 -0
  6. package/dist/browser/checkout/sdk.js +2 -2
  7. package/dist/browser/checkout/widgets.js +1 -1
  8. package/dist/index.browser.js +4 -4
  9. package/dist/index.browser.js.map +1 -1
  10. package/immutablex_client.js +1 -0
  11. package/index.cjs +9 -0
  12. package/index.d.ts +18603 -0
  13. package/index.js +9 -0
  14. package/module-release.json +30 -0
  15. package/orderbook.js +1 -0
  16. package/package.json +24 -18
  17. package/passport.js +1 -0
  18. package/provider.js +1 -0
  19. package/rollup.config.js +158 -0
  20. package/scripts/copyBrowserBundles.js +62 -0
  21. package/scripts/generate-package-list.sh +5 -0
  22. package/scripts/generateIndex.js +44 -0
  23. package/scripts/updateDependencies.js +137 -0
  24. package/scripts/updateExports.js +62 -0
  25. package/src/blockchain_data.ts +1 -0
  26. package/src/checkout_sdk.ts +1 -0
  27. package/src/checkout_widgets.ts +1 -0
  28. package/src/config.ts +1 -0
  29. package/src/immutablex_client.ts +1 -0
  30. package/src/index.ts +7 -0
  31. package/src/orderbook.ts +1 -0
  32. package/src/passport.ts +1 -0
  33. package/src/provider.ts +1 -0
  34. package/tsconfig.json +27 -0
  35. package/typedoc.json +4 -0
  36. package/workspace-packages.json +31 -0
  37. package/dist/blockchain_data.js +0 -4010
  38. package/dist/checkout_sdk.js +0 -26016
  39. package/dist/config.js +0 -37
  40. package/dist/immutablex_client.js +0 -523
  41. package/dist/index.cjs +0 -34452
  42. package/dist/index.js +0 -34424
  43. package/dist/orderbook.js +0 -1583
  44. package/dist/passport.js +0 -9159
  45. package/dist/provider.js +0 -1165
  46. /package/{dist/blockchain_data.d.ts → blockchain_data.d.ts} +0 -0
  47. /package/{dist/checkout_sdk.d.ts → checkout_sdk.d.ts} +0 -0
  48. /package/{dist/config.d.ts → config.d.ts} +0 -0
  49. /package/{dist/immutablex_client.d.ts → immutablex_client.d.ts} +0 -0
  50. /package/{dist/index.d.ts → index.d.cts} +0 -0
  51. /package/{dist/orderbook.d.ts → orderbook.d.ts} +0 -0
  52. /package/{dist/passport.d.ts → passport.d.ts} +0 -0
  53. /package/{dist/provider.d.ts → provider.d.ts} +0 -0
@@ -1,4010 +0,0 @@
1
- import globalAxios from 'axios';
2
-
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- /**
6
- * Immutable zkEVM API
7
- * Immutable Multi Rollup API
8
- *
9
- * The version of the OpenAPI document: 1.0.0
10
- * Contact: support@immutable.com
11
- *
12
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13
- * https://openapi-generator.tech
14
- * Do not edit the class manually.
15
- */
16
- const BASE_PATH = "https://api.sandbox.immutable.com".replace(/\/+$/, "");
17
- /**
18
- *
19
- * @export
20
- * @class BaseAPI
21
- */
22
- class BaseAPI {
23
- basePath;
24
- axios;
25
- configuration;
26
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
27
- this.basePath = basePath;
28
- this.axios = axios;
29
- if (configuration) {
30
- this.configuration = configuration;
31
- this.basePath = configuration.basePath || this.basePath;
32
- }
33
- }
34
- }
35
- /**
36
- *
37
- * @export
38
- * @class RequiredError
39
- * @extends {Error}
40
- */
41
- class RequiredError extends Error {
42
- field;
43
- constructor(field, msg) {
44
- super(msg);
45
- this.field = field;
46
- this.name = "RequiredError";
47
- }
48
- }
49
-
50
- /* tslint:disable */
51
- /* eslint-disable */
52
- /**
53
- * Immutable zkEVM API
54
- * Immutable Multi Rollup API
55
- *
56
- * The version of the OpenAPI document: 1.0.0
57
- * Contact: support@immutable.com
58
- *
59
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
60
- * https://openapi-generator.tech
61
- * Do not edit the class manually.
62
- */
63
- /**
64
- *
65
- * @export
66
- */
67
- const DUMMY_BASE_URL = 'https://example.com';
68
- /**
69
- *
70
- * @throws {RequiredError}
71
- * @export
72
- */
73
- const assertParamExists = function (functionName, paramName, paramValue) {
74
- if (paramValue === null || paramValue === undefined) {
75
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
76
- }
77
- };
78
- /**
79
- *
80
- * @export
81
- */
82
- const setApiKeyToObject = async function (object, keyParamName, configuration) {
83
- if (configuration && configuration.apiKey) {
84
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
85
- ? await configuration.apiKey(keyParamName)
86
- : await configuration.apiKey;
87
- object[keyParamName] = localVarApiKeyValue;
88
- }
89
- };
90
- /**
91
- *
92
- * @export
93
- */
94
- const setBearerAuthToObject = async function (object, configuration) {
95
- if (configuration && configuration.accessToken) {
96
- const accessToken = typeof configuration.accessToken === 'function'
97
- ? await configuration.accessToken()
98
- : await configuration.accessToken;
99
- object["Authorization"] = "Bearer " + accessToken;
100
- }
101
- };
102
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
103
- if (parameter == null)
104
- return;
105
- if (typeof parameter === "object") {
106
- if (Array.isArray(parameter)) {
107
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
108
- }
109
- else {
110
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
111
- }
112
- }
113
- else {
114
- if (urlSearchParams.has(key)) {
115
- urlSearchParams.append(key, parameter);
116
- }
117
- else {
118
- urlSearchParams.set(key, parameter);
119
- }
120
- }
121
- }
122
- /**
123
- *
124
- * @export
125
- */
126
- const setSearchParams = function (url, ...objects) {
127
- const searchParams = new URLSearchParams(url.search);
128
- setFlattenedQueryParams(searchParams, objects);
129
- url.search = searchParams.toString();
130
- };
131
- /**
132
- *
133
- * @export
134
- */
135
- const serializeDataIfNeeded = function (value, requestOptions, configuration) {
136
- const nonString = typeof value !== 'string';
137
- const needsSerialization = nonString && configuration && configuration.isJsonMime
138
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
139
- : nonString;
140
- return needsSerialization
141
- ? JSON.stringify(value !== undefined ? value : {})
142
- : (value || "");
143
- };
144
- /**
145
- *
146
- * @export
147
- */
148
- const toPathString = function (url) {
149
- return url.pathname + url.search + url.hash;
150
- };
151
- /**
152
- *
153
- * @export
154
- */
155
- const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
156
- return (axios = globalAxios, basePath = BASE_PATH) => {
157
- const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || axios.defaults.baseURL || basePath) + axiosArgs.url };
158
- return axios.request(axiosRequestArgs);
159
- };
160
- };
161
-
162
- /* tslint:disable */
163
- /* eslint-disable */
164
- /**
165
- * Immutable zkEVM API
166
- * Immutable Multi Rollup API
167
- *
168
- * The version of the OpenAPI document: 1.0.0
169
- * Contact: support@immutable.com
170
- *
171
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
172
- * https://openapi-generator.tech
173
- * Do not edit the class manually.
174
- */
175
- /**
176
- * ActivitiesApi - axios parameter creator
177
- * @export
178
- */
179
- const ActivitiesApiAxiosParamCreator = function (configuration) {
180
- return {
181
- /**
182
- * Get a single activity by ID
183
- * @summary Get a single activity by ID
184
- * @param {string} chainName The name of chain
185
- * @param {string} activityId The id of activity
186
- * @param {*} [options] Override http request option.
187
- * @throws {RequiredError}
188
- */
189
- getActivity: async (chainName, activityId, options = {}) => {
190
- // verify required parameter 'chainName' is not null or undefined
191
- assertParamExists('getActivity', 'chainName', chainName);
192
- // verify required parameter 'activityId' is not null or undefined
193
- assertParamExists('getActivity', 'activityId', activityId);
194
- const localVarPath = `/v1/chains/{chain_name}/activities/{activity_id}`
195
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
196
- .replace(`{${"activity_id"}}`, encodeURIComponent(String(activityId)));
197
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
198
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
199
- let baseOptions;
200
- if (configuration) {
201
- baseOptions = configuration.baseOptions;
202
- }
203
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
204
- const localVarHeaderParameter = {};
205
- const localVarQueryParameter = {};
206
- setSearchParams(localVarUrlObj, localVarQueryParameter);
207
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
208
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
209
- return {
210
- url: toPathString(localVarUrlObj),
211
- options: localVarRequestOptions,
212
- };
213
- },
214
- /**
215
- * List all activities
216
- * @summary List all activities
217
- * @param {string} chainName The name of chain
218
- * @param {string} [contractAddress] The contract address of NFT or ERC20 Token
219
- * @param {string} [tokenId] An `uint256` token id as string
220
- * @param {string} [accountAddress] The account address activity contains
221
- * @param {ActivityType} [activityType] The activity type
222
- * @param {string} [fromIndexedAt] From indexed at including given date
223
- * @param {string} [toIndexedAt] To indexed at including given date
224
- * @param {string} [transactionHash] The transaction hash of activity
225
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
226
- * @param {number} [pageSize] Maximum number of items to return
227
- * @param {*} [options] Override http request option.
228
- * @throws {RequiredError}
229
- */
230
- listActivities: async (chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options = {}) => {
231
- // verify required parameter 'chainName' is not null or undefined
232
- assertParamExists('listActivities', 'chainName', chainName);
233
- const localVarPath = `/v1/chains/{chain_name}/activities`
234
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
235
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
236
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
237
- let baseOptions;
238
- if (configuration) {
239
- baseOptions = configuration.baseOptions;
240
- }
241
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
242
- const localVarHeaderParameter = {};
243
- const localVarQueryParameter = {};
244
- if (contractAddress !== undefined) {
245
- localVarQueryParameter['contract_address'] = contractAddress;
246
- }
247
- if (tokenId !== undefined) {
248
- localVarQueryParameter['token_id'] = tokenId;
249
- }
250
- if (accountAddress !== undefined) {
251
- localVarQueryParameter['account_address'] = accountAddress;
252
- }
253
- if (activityType !== undefined) {
254
- localVarQueryParameter['activity_type'] = activityType;
255
- }
256
- if (fromIndexedAt !== undefined) {
257
- localVarQueryParameter['from_indexed_at'] = (fromIndexedAt instanceof Date) ?
258
- fromIndexedAt.toISOString() :
259
- fromIndexedAt;
260
- }
261
- if (toIndexedAt !== undefined) {
262
- localVarQueryParameter['to_indexed_at'] = (toIndexedAt instanceof Date) ?
263
- toIndexedAt.toISOString() :
264
- toIndexedAt;
265
- }
266
- if (transactionHash !== undefined) {
267
- localVarQueryParameter['transaction_hash'] = transactionHash;
268
- }
269
- if (pageCursor !== undefined) {
270
- localVarQueryParameter['page_cursor'] = pageCursor;
271
- }
272
- if (pageSize !== undefined) {
273
- localVarQueryParameter['page_size'] = pageSize;
274
- }
275
- setSearchParams(localVarUrlObj, localVarQueryParameter);
276
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
277
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
278
- return {
279
- url: toPathString(localVarUrlObj),
280
- options: localVarRequestOptions,
281
- };
282
- },
283
- };
284
- };
285
- /**
286
- * ActivitiesApi - functional programming interface
287
- * @export
288
- */
289
- const ActivitiesApiFp = function (configuration) {
290
- const localVarAxiosParamCreator = ActivitiesApiAxiosParamCreator(configuration);
291
- return {
292
- /**
293
- * Get a single activity by ID
294
- * @summary Get a single activity by ID
295
- * @param {string} chainName The name of chain
296
- * @param {string} activityId The id of activity
297
- * @param {*} [options] Override http request option.
298
- * @throws {RequiredError}
299
- */
300
- async getActivity(chainName, activityId, options) {
301
- const localVarAxiosArgs = await localVarAxiosParamCreator.getActivity(chainName, activityId, options);
302
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
303
- },
304
- /**
305
- * List all activities
306
- * @summary List all activities
307
- * @param {string} chainName The name of chain
308
- * @param {string} [contractAddress] The contract address of NFT or ERC20 Token
309
- * @param {string} [tokenId] An `uint256` token id as string
310
- * @param {string} [accountAddress] The account address activity contains
311
- * @param {ActivityType} [activityType] The activity type
312
- * @param {string} [fromIndexedAt] From indexed at including given date
313
- * @param {string} [toIndexedAt] To indexed at including given date
314
- * @param {string} [transactionHash] The transaction hash of activity
315
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
316
- * @param {number} [pageSize] Maximum number of items to return
317
- * @param {*} [options] Override http request option.
318
- * @throws {RequiredError}
319
- */
320
- async listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options) {
321
- const localVarAxiosArgs = await localVarAxiosParamCreator.listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options);
322
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
323
- },
324
- };
325
- };
326
- /**
327
- * ActivitiesApi - factory interface
328
- * @export
329
- */
330
- const ActivitiesApiFactory = function (configuration, basePath, axios) {
331
- const localVarFp = ActivitiesApiFp(configuration);
332
- return {
333
- /**
334
- * Get a single activity by ID
335
- * @summary Get a single activity by ID
336
- * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters.
337
- * @param {*} [options] Override http request option.
338
- * @throws {RequiredError}
339
- */
340
- getActivity(requestParameters, options) {
341
- return localVarFp.getActivity(requestParameters.chainName, requestParameters.activityId, options).then((request) => request(axios, basePath));
342
- },
343
- /**
344
- * List all activities
345
- * @summary List all activities
346
- * @param {ActivitiesApiListActivitiesRequest} requestParameters Request parameters.
347
- * @param {*} [options] Override http request option.
348
- * @throws {RequiredError}
349
- */
350
- listActivities(requestParameters, options) {
351
- return localVarFp.listActivities(requestParameters.chainName, requestParameters.contractAddress, requestParameters.tokenId, requestParameters.accountAddress, requestParameters.activityType, requestParameters.fromIndexedAt, requestParameters.toIndexedAt, requestParameters.transactionHash, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
352
- },
353
- };
354
- };
355
- /**
356
- * ActivitiesApi - object-oriented interface
357
- * @export
358
- * @class ActivitiesApi
359
- * @extends {BaseAPI}
360
- */
361
- class ActivitiesApi extends BaseAPI {
362
- /**
363
- * Get a single activity by ID
364
- * @summary Get a single activity by ID
365
- * @param {ActivitiesApiGetActivityRequest} requestParameters Request parameters.
366
- * @param {*} [options] Override http request option.
367
- * @throws {RequiredError}
368
- * @memberof ActivitiesApi
369
- */
370
- getActivity(requestParameters, options) {
371
- return ActivitiesApiFp(this.configuration).getActivity(requestParameters.chainName, requestParameters.activityId, options).then((request) => request(this.axios, this.basePath));
372
- }
373
- /**
374
- * List all activities
375
- * @summary List all activities
376
- * @param {ActivitiesApiListActivitiesRequest} requestParameters Request parameters.
377
- * @param {*} [options] Override http request option.
378
- * @throws {RequiredError}
379
- * @memberof ActivitiesApi
380
- */
381
- listActivities(requestParameters, options) {
382
- return ActivitiesApiFp(this.configuration).listActivities(requestParameters.chainName, requestParameters.contractAddress, requestParameters.tokenId, requestParameters.accountAddress, requestParameters.activityType, requestParameters.fromIndexedAt, requestParameters.toIndexedAt, requestParameters.transactionHash, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
383
- }
384
- }
385
-
386
- /* tslint:disable */
387
- /* eslint-disable */
388
- /**
389
- * Immutable zkEVM API
390
- * Immutable Multi Rollup API
391
- *
392
- * The version of the OpenAPI document: 1.0.0
393
- * Contact: support@immutable.com
394
- *
395
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
396
- * https://openapi-generator.tech
397
- * Do not edit the class manually.
398
- */
399
- /**
400
- * ChainsApi - axios parameter creator
401
- * @export
402
- */
403
- const ChainsApiAxiosParamCreator = function (configuration) {
404
- return {
405
- /**
406
- * List supported chains
407
- * @summary List supported chains
408
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
409
- * @param {number} [pageSize] Maximum number of items to return
410
- * @param {*} [options] Override http request option.
411
- * @throws {RequiredError}
412
- */
413
- listChains: async (pageCursor, pageSize, options = {}) => {
414
- const localVarPath = `/v1/chains`;
415
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
416
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
417
- let baseOptions;
418
- if (configuration) {
419
- baseOptions = configuration.baseOptions;
420
- }
421
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
422
- const localVarHeaderParameter = {};
423
- const localVarQueryParameter = {};
424
- if (pageCursor !== undefined) {
425
- localVarQueryParameter['page_cursor'] = pageCursor;
426
- }
427
- if (pageSize !== undefined) {
428
- localVarQueryParameter['page_size'] = pageSize;
429
- }
430
- setSearchParams(localVarUrlObj, localVarQueryParameter);
431
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
432
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
433
- return {
434
- url: toPathString(localVarUrlObj),
435
- options: localVarRequestOptions,
436
- };
437
- },
438
- };
439
- };
440
- /**
441
- * ChainsApi - functional programming interface
442
- * @export
443
- */
444
- const ChainsApiFp = function (configuration) {
445
- const localVarAxiosParamCreator = ChainsApiAxiosParamCreator(configuration);
446
- return {
447
- /**
448
- * List supported chains
449
- * @summary List supported chains
450
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
451
- * @param {number} [pageSize] Maximum number of items to return
452
- * @param {*} [options] Override http request option.
453
- * @throws {RequiredError}
454
- */
455
- async listChains(pageCursor, pageSize, options) {
456
- const localVarAxiosArgs = await localVarAxiosParamCreator.listChains(pageCursor, pageSize, options);
457
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
458
- },
459
- };
460
- };
461
- /**
462
- * ChainsApi - factory interface
463
- * @export
464
- */
465
- const ChainsApiFactory = function (configuration, basePath, axios) {
466
- const localVarFp = ChainsApiFp(configuration);
467
- return {
468
- /**
469
- * List supported chains
470
- * @summary List supported chains
471
- * @param {ChainsApiListChainsRequest} requestParameters Request parameters.
472
- * @param {*} [options] Override http request option.
473
- * @throws {RequiredError}
474
- */
475
- listChains(requestParameters = {}, options) {
476
- return localVarFp.listChains(requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
477
- },
478
- };
479
- };
480
- /**
481
- * ChainsApi - object-oriented interface
482
- * @export
483
- * @class ChainsApi
484
- * @extends {BaseAPI}
485
- */
486
- class ChainsApi extends BaseAPI {
487
- /**
488
- * List supported chains
489
- * @summary List supported chains
490
- * @param {ChainsApiListChainsRequest} requestParameters Request parameters.
491
- * @param {*} [options] Override http request option.
492
- * @throws {RequiredError}
493
- * @memberof ChainsApi
494
- */
495
- listChains(requestParameters = {}, options) {
496
- return ChainsApiFp(this.configuration).listChains(requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
497
- }
498
- }
499
-
500
- /* tslint:disable */
501
- /* eslint-disable */
502
- /**
503
- * Immutable zkEVM API
504
- * Immutable Multi Rollup API
505
- *
506
- * The version of the OpenAPI document: 1.0.0
507
- * Contact: support@immutable.com
508
- *
509
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
510
- * https://openapi-generator.tech
511
- * Do not edit the class manually.
512
- */
513
- /**
514
- * CollectionsApi - axios parameter creator
515
- * @export
516
- */
517
- const CollectionsApiAxiosParamCreator = function (configuration) {
518
- return {
519
- /**
520
- * Get collection by contract address
521
- * @summary Get collection by contract address
522
- * @param {string} contractAddress The address contract
523
- * @param {string} chainName The name of chain
524
- * @param {*} [options] Override http request option.
525
- * @throws {RequiredError}
526
- */
527
- getCollection: async (contractAddress, chainName, options = {}) => {
528
- // verify required parameter 'contractAddress' is not null or undefined
529
- assertParamExists('getCollection', 'contractAddress', contractAddress);
530
- // verify required parameter 'chainName' is not null or undefined
531
- assertParamExists('getCollection', 'chainName', chainName);
532
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}`
533
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
534
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
535
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
536
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
537
- let baseOptions;
538
- if (configuration) {
539
- baseOptions = configuration.baseOptions;
540
- }
541
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
542
- const localVarHeaderParameter = {};
543
- const localVarQueryParameter = {};
544
- setSearchParams(localVarUrlObj, localVarQueryParameter);
545
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
546
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
547
- return {
548
- url: toPathString(localVarUrlObj),
549
- options: localVarRequestOptions,
550
- };
551
- },
552
- /**
553
- * List all collections
554
- * @summary List all collections
555
- * @param {string} chainName The name of chain
556
- * @param {Array<string>} [contractAddress] List of contract addresses to filter by
557
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
558
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
559
- * @param {number} [pageSize] Maximum number of items to return
560
- * @param {*} [options] Override http request option.
561
- * @throws {RequiredError}
562
- */
563
- listCollections: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
564
- // verify required parameter 'chainName' is not null or undefined
565
- assertParamExists('listCollections', 'chainName', chainName);
566
- const localVarPath = `/v1/chains/{chain_name}/collections`
567
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
568
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
569
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
570
- let baseOptions;
571
- if (configuration) {
572
- baseOptions = configuration.baseOptions;
573
- }
574
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
575
- const localVarHeaderParameter = {};
576
- const localVarQueryParameter = {};
577
- if (contractAddress) {
578
- localVarQueryParameter['contract_address'] = contractAddress;
579
- }
580
- if (fromUpdatedAt !== undefined) {
581
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
582
- fromUpdatedAt.toISOString() :
583
- fromUpdatedAt;
584
- }
585
- if (pageCursor !== undefined) {
586
- localVarQueryParameter['page_cursor'] = pageCursor;
587
- }
588
- if (pageSize !== undefined) {
589
- localVarQueryParameter['page_size'] = pageSize;
590
- }
591
- setSearchParams(localVarUrlObj, localVarQueryParameter);
592
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
593
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
594
- return {
595
- url: toPathString(localVarUrlObj),
596
- options: localVarRequestOptions,
597
- };
598
- },
599
- /**
600
- * List collections by NFT owner account address
601
- * @summary List collections by NFT owner
602
- * @param {string} accountAddress Account address
603
- * @param {string} chainName The name of chain
604
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
605
- * @param {number} [pageSize] Maximum number of items to return
606
- * @param {*} [options] Override http request option.
607
- * @throws {RequiredError}
608
- */
609
- listCollectionsByNFTOwner: async (accountAddress, chainName, pageCursor, pageSize, options = {}) => {
610
- // verify required parameter 'accountAddress' is not null or undefined
611
- assertParamExists('listCollectionsByNFTOwner', 'accountAddress', accountAddress);
612
- // verify required parameter 'chainName' is not null or undefined
613
- assertParamExists('listCollectionsByNFTOwner', 'chainName', chainName);
614
- const localVarPath = `/v1/chains/{chain_name}/accounts/{account_address}/collections`
615
- .replace(`{${"account_address"}}`, encodeURIComponent(String(accountAddress)))
616
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
617
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
618
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
619
- let baseOptions;
620
- if (configuration) {
621
- baseOptions = configuration.baseOptions;
622
- }
623
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
624
- const localVarHeaderParameter = {};
625
- const localVarQueryParameter = {};
626
- if (pageCursor !== undefined) {
627
- localVarQueryParameter['page_cursor'] = pageCursor;
628
- }
629
- if (pageSize !== undefined) {
630
- localVarQueryParameter['page_size'] = pageSize;
631
- }
632
- setSearchParams(localVarUrlObj, localVarQueryParameter);
633
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
634
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
635
- return {
636
- url: toPathString(localVarUrlObj),
637
- options: localVarRequestOptions,
638
- };
639
- },
640
- /**
641
- * Refresh collection metadata
642
- * @summary Refresh collection metadata
643
- * @param {string} contractAddress The address contract
644
- * @param {string} chainName The name of chain
645
- * @param {RefreshCollectionMetadataRequest} refreshCollectionMetadataRequest The request body
646
- * @param {*} [options] Override http request option.
647
- * @throws {RequiredError}
648
- */
649
- refreshCollectionMetadata: async (contractAddress, chainName, refreshCollectionMetadataRequest, options = {}) => {
650
- // verify required parameter 'contractAddress' is not null or undefined
651
- assertParamExists('refreshCollectionMetadata', 'contractAddress', contractAddress);
652
- // verify required parameter 'chainName' is not null or undefined
653
- assertParamExists('refreshCollectionMetadata', 'chainName', chainName);
654
- // verify required parameter 'refreshCollectionMetadataRequest' is not null or undefined
655
- assertParamExists('refreshCollectionMetadata', 'refreshCollectionMetadataRequest', refreshCollectionMetadataRequest);
656
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata`
657
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
658
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
659
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
660
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
661
- let baseOptions;
662
- if (configuration) {
663
- baseOptions = configuration.baseOptions;
664
- }
665
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
666
- const localVarHeaderParameter = {};
667
- const localVarQueryParameter = {};
668
- // authentication ImmutableApiKey required
669
- await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
670
- localVarHeaderParameter['Content-Type'] = 'application/json';
671
- setSearchParams(localVarUrlObj, localVarQueryParameter);
672
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
673
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
674
- localVarRequestOptions.data = serializeDataIfNeeded(refreshCollectionMetadataRequest, localVarRequestOptions, configuration);
675
- return {
676
- url: toPathString(localVarUrlObj),
677
- options: localVarRequestOptions,
678
- };
679
- },
680
- };
681
- };
682
- /**
683
- * CollectionsApi - functional programming interface
684
- * @export
685
- */
686
- const CollectionsApiFp = function (configuration) {
687
- const localVarAxiosParamCreator = CollectionsApiAxiosParamCreator(configuration);
688
- return {
689
- /**
690
- * Get collection by contract address
691
- * @summary Get collection by contract address
692
- * @param {string} contractAddress The address contract
693
- * @param {string} chainName The name of chain
694
- * @param {*} [options] Override http request option.
695
- * @throws {RequiredError}
696
- */
697
- async getCollection(contractAddress, chainName, options) {
698
- const localVarAxiosArgs = await localVarAxiosParamCreator.getCollection(contractAddress, chainName, options);
699
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
700
- },
701
- /**
702
- * List all collections
703
- * @summary List all collections
704
- * @param {string} chainName The name of chain
705
- * @param {Array<string>} [contractAddress] List of contract addresses to filter by
706
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
707
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
708
- * @param {number} [pageSize] Maximum number of items to return
709
- * @param {*} [options] Override http request option.
710
- * @throws {RequiredError}
711
- */
712
- async listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
713
- const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
714
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
715
- },
716
- /**
717
- * List collections by NFT owner account address
718
- * @summary List collections by NFT owner
719
- * @param {string} accountAddress Account address
720
- * @param {string} chainName The name of chain
721
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
722
- * @param {number} [pageSize] Maximum number of items to return
723
- * @param {*} [options] Override http request option.
724
- * @throws {RequiredError}
725
- */
726
- async listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options) {
727
- const localVarAxiosArgs = await localVarAxiosParamCreator.listCollectionsByNFTOwner(accountAddress, chainName, pageCursor, pageSize, options);
728
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
729
- },
730
- /**
731
- * Refresh collection metadata
732
- * @summary Refresh collection metadata
733
- * @param {string} contractAddress The address contract
734
- * @param {string} chainName The name of chain
735
- * @param {RefreshCollectionMetadataRequest} refreshCollectionMetadataRequest The request body
736
- * @param {*} [options] Override http request option.
737
- * @throws {RequiredError}
738
- */
739
- async refreshCollectionMetadata(contractAddress, chainName, refreshCollectionMetadataRequest, options) {
740
- const localVarAxiosArgs = await localVarAxiosParamCreator.refreshCollectionMetadata(contractAddress, chainName, refreshCollectionMetadataRequest, options);
741
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
742
- },
743
- };
744
- };
745
- /**
746
- * CollectionsApi - factory interface
747
- * @export
748
- */
749
- const CollectionsApiFactory = function (configuration, basePath, axios) {
750
- const localVarFp = CollectionsApiFp(configuration);
751
- return {
752
- /**
753
- * Get collection by contract address
754
- * @summary Get collection by contract address
755
- * @param {CollectionsApiGetCollectionRequest} requestParameters Request parameters.
756
- * @param {*} [options] Override http request option.
757
- * @throws {RequiredError}
758
- */
759
- getCollection(requestParameters, options) {
760
- return localVarFp.getCollection(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(axios, basePath));
761
- },
762
- /**
763
- * List all collections
764
- * @summary List all collections
765
- * @param {CollectionsApiListCollectionsRequest} requestParameters Request parameters.
766
- * @param {*} [options] Override http request option.
767
- * @throws {RequiredError}
768
- */
769
- listCollections(requestParameters, options) {
770
- return localVarFp.listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
771
- },
772
- /**
773
- * List collections by NFT owner account address
774
- * @summary List collections by NFT owner
775
- * @param {CollectionsApiListCollectionsByNFTOwnerRequest} requestParameters Request parameters.
776
- * @param {*} [options] Override http request option.
777
- * @throws {RequiredError}
778
- */
779
- listCollectionsByNFTOwner(requestParameters, options) {
780
- return localVarFp.listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
781
- },
782
- /**
783
- * Refresh collection metadata
784
- * @summary Refresh collection metadata
785
- * @param {CollectionsApiRefreshCollectionMetadataRequest} requestParameters Request parameters.
786
- * @param {*} [options] Override http request option.
787
- * @throws {RequiredError}
788
- */
789
- refreshCollectionMetadata(requestParameters, options) {
790
- return localVarFp.refreshCollectionMetadata(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshCollectionMetadataRequest, options).then((request) => request(axios, basePath));
791
- },
792
- };
793
- };
794
- /**
795
- * CollectionsApi - object-oriented interface
796
- * @export
797
- * @class CollectionsApi
798
- * @extends {BaseAPI}
799
- */
800
- class CollectionsApi extends BaseAPI {
801
- /**
802
- * Get collection by contract address
803
- * @summary Get collection by contract address
804
- * @param {CollectionsApiGetCollectionRequest} requestParameters Request parameters.
805
- * @param {*} [options] Override http request option.
806
- * @throws {RequiredError}
807
- * @memberof CollectionsApi
808
- */
809
- getCollection(requestParameters, options) {
810
- return CollectionsApiFp(this.configuration).getCollection(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
811
- }
812
- /**
813
- * List all collections
814
- * @summary List all collections
815
- * @param {CollectionsApiListCollectionsRequest} requestParameters Request parameters.
816
- * @param {*} [options] Override http request option.
817
- * @throws {RequiredError}
818
- * @memberof CollectionsApi
819
- */
820
- listCollections(requestParameters, options) {
821
- return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
822
- }
823
- /**
824
- * List collections by NFT owner account address
825
- * @summary List collections by NFT owner
826
- * @param {CollectionsApiListCollectionsByNFTOwnerRequest} requestParameters Request parameters.
827
- * @param {*} [options] Override http request option.
828
- * @throws {RequiredError}
829
- * @memberof CollectionsApi
830
- */
831
- listCollectionsByNFTOwner(requestParameters, options) {
832
- return CollectionsApiFp(this.configuration).listCollectionsByNFTOwner(requestParameters.accountAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
833
- }
834
- /**
835
- * Refresh collection metadata
836
- * @summary Refresh collection metadata
837
- * @param {CollectionsApiRefreshCollectionMetadataRequest} requestParameters Request parameters.
838
- * @param {*} [options] Override http request option.
839
- * @throws {RequiredError}
840
- * @memberof CollectionsApi
841
- */
842
- refreshCollectionMetadata(requestParameters, options) {
843
- return CollectionsApiFp(this.configuration).refreshCollectionMetadata(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshCollectionMetadataRequest, options).then((request) => request(this.axios, this.basePath));
844
- }
845
- }
846
-
847
- /* tslint:disable */
848
- /* eslint-disable */
849
- /**
850
- * Immutable zkEVM API
851
- * Immutable Multi Rollup API
852
- *
853
- * The version of the OpenAPI document: 1.0.0
854
- * Contact: support@immutable.com
855
- *
856
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
857
- * https://openapi-generator.tech
858
- * Do not edit the class manually.
859
- */
860
- /**
861
- * MetadataApi - axios parameter creator
862
- * @export
863
- */
864
- const MetadataApiAxiosParamCreator = function (configuration) {
865
- return {
866
- /**
867
- * Get metadata by ID
868
- * @summary Get metadata by ID
869
- * @param {string} chainName The name of chain
870
- * @param {string} contractAddress The address of metadata contract
871
- * @param {string} metadataId The id of the metadata
872
- * @param {*} [options] Override http request option.
873
- * @throws {RequiredError}
874
- */
875
- getMetadata: async (chainName, contractAddress, metadataId, options = {}) => {
876
- // verify required parameter 'chainName' is not null or undefined
877
- assertParamExists('getMetadata', 'chainName', chainName);
878
- // verify required parameter 'contractAddress' is not null or undefined
879
- assertParamExists('getMetadata', 'contractAddress', contractAddress);
880
- // verify required parameter 'metadataId' is not null or undefined
881
- assertParamExists('getMetadata', 'metadataId', metadataId);
882
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata/{metadata_id}`
883
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
884
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
885
- .replace(`{${"metadata_id"}}`, encodeURIComponent(String(metadataId)));
886
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
887
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
888
- let baseOptions;
889
- if (configuration) {
890
- baseOptions = configuration.baseOptions;
891
- }
892
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
893
- const localVarHeaderParameter = {};
894
- const localVarQueryParameter = {};
895
- setSearchParams(localVarUrlObj, localVarQueryParameter);
896
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
897
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
898
- return {
899
- url: toPathString(localVarUrlObj),
900
- options: localVarRequestOptions,
901
- };
902
- },
903
- /**
904
- * Get a list of metadata by from the a given contract
905
- * @summary Get a list of metadata by from the a given contract
906
- * @param {string} chainName The name of chain
907
- * @param {string} contractAddress The address of metadata contract
908
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
909
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
910
- * @param {number} [pageSize] Maximum number of items to return
911
- * @param {*} [options] Override http request option.
912
- * @throws {RequiredError}
913
- */
914
- listMetadata: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
915
- // verify required parameter 'chainName' is not null or undefined
916
- assertParamExists('listMetadata', 'chainName', chainName);
917
- // verify required parameter 'contractAddress' is not null or undefined
918
- assertParamExists('listMetadata', 'contractAddress', contractAddress);
919
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata`
920
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
921
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)));
922
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
923
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
924
- let baseOptions;
925
- if (configuration) {
926
- baseOptions = configuration.baseOptions;
927
- }
928
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
929
- const localVarHeaderParameter = {};
930
- const localVarQueryParameter = {};
931
- if (fromUpdatedAt !== undefined) {
932
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
933
- fromUpdatedAt.toISOString() :
934
- fromUpdatedAt;
935
- }
936
- if (pageCursor !== undefined) {
937
- localVarQueryParameter['page_cursor'] = pageCursor;
938
- }
939
- if (pageSize !== undefined) {
940
- localVarQueryParameter['page_size'] = pageSize;
941
- }
942
- setSearchParams(localVarUrlObj, localVarQueryParameter);
943
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
944
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
945
- return {
946
- url: toPathString(localVarUrlObj),
947
- options: localVarRequestOptions,
948
- };
949
- },
950
- /**
951
- * Refresh stacked metadata
952
- * @summary Refresh stacked metadata
953
- * @param {string} chainName The name of chain
954
- * @param {string} contractAddress Contract address
955
- * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
956
- * @param {*} [options] Override http request option.
957
- * @throws {RequiredError}
958
- */
959
- refreshMetadataByID: async (chainName, contractAddress, refreshMetadataByIDRequest, options = {}) => {
960
- // verify required parameter 'chainName' is not null or undefined
961
- assertParamExists('refreshMetadataByID', 'chainName', chainName);
962
- // verify required parameter 'contractAddress' is not null or undefined
963
- assertParamExists('refreshMetadataByID', 'contractAddress', contractAddress);
964
- // verify required parameter 'refreshMetadataByIDRequest' is not null or undefined
965
- assertParamExists('refreshMetadataByID', 'refreshMetadataByIDRequest', refreshMetadataByIDRequest);
966
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata/refresh-metadata`
967
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
968
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)));
969
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
970
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
971
- let baseOptions;
972
- if (configuration) {
973
- baseOptions = configuration.baseOptions;
974
- }
975
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
976
- const localVarHeaderParameter = {};
977
- const localVarQueryParameter = {};
978
- // authentication ImmutableApiKey required
979
- await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
980
- localVarHeaderParameter['Content-Type'] = 'application/json';
981
- setSearchParams(localVarUrlObj, localVarQueryParameter);
982
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
983
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
984
- localVarRequestOptions.data = serializeDataIfNeeded(refreshMetadataByIDRequest, localVarRequestOptions, configuration);
985
- return {
986
- url: toPathString(localVarUrlObj),
987
- options: localVarRequestOptions,
988
- };
989
- },
990
- /**
991
- * Refresh NFT metadata
992
- * @summary Refresh NFT metadata
993
- * @param {string} contractAddress The address of contract
994
- * @param {string} chainName The name of chain
995
- * @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
996
- * @param {*} [options] Override http request option.
997
- * @throws {RequiredError}
998
- */
999
- refreshNFTMetadataByTokenID: async (contractAddress, chainName, refreshNFTMetadataByTokenIDRequest, options = {}) => {
1000
- // verify required parameter 'contractAddress' is not null or undefined
1001
- assertParamExists('refreshNFTMetadataByTokenID', 'contractAddress', contractAddress);
1002
- // verify required parameter 'chainName' is not null or undefined
1003
- assertParamExists('refreshNFTMetadataByTokenID', 'chainName', chainName);
1004
- // verify required parameter 'refreshNFTMetadataByTokenIDRequest' is not null or undefined
1005
- assertParamExists('refreshNFTMetadataByTokenID', 'refreshNFTMetadataByTokenIDRequest', refreshNFTMetadataByTokenIDRequest);
1006
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/refresh-metadata`
1007
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
1008
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1009
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1010
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1011
- let baseOptions;
1012
- if (configuration) {
1013
- baseOptions = configuration.baseOptions;
1014
- }
1015
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1016
- const localVarHeaderParameter = {};
1017
- const localVarQueryParameter = {};
1018
- // authentication ImmutableApiKey required
1019
- await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
1020
- localVarHeaderParameter['Content-Type'] = 'application/json';
1021
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1022
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1023
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1024
- localVarRequestOptions.data = serializeDataIfNeeded(refreshNFTMetadataByTokenIDRequest, localVarRequestOptions, configuration);
1025
- return {
1026
- url: toPathString(localVarUrlObj),
1027
- options: localVarRequestOptions,
1028
- };
1029
- },
1030
- };
1031
- };
1032
- /**
1033
- * MetadataApi - functional programming interface
1034
- * @export
1035
- */
1036
- const MetadataApiFp = function (configuration) {
1037
- const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration);
1038
- return {
1039
- /**
1040
- * Get metadata by ID
1041
- * @summary Get metadata by ID
1042
- * @param {string} chainName The name of chain
1043
- * @param {string} contractAddress The address of metadata contract
1044
- * @param {string} metadataId The id of the metadata
1045
- * @param {*} [options] Override http request option.
1046
- * @throws {RequiredError}
1047
- */
1048
- async getMetadata(chainName, contractAddress, metadataId, options) {
1049
- const localVarAxiosArgs = await localVarAxiosParamCreator.getMetadata(chainName, contractAddress, metadataId, options);
1050
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1051
- },
1052
- /**
1053
- * Get a list of metadata by from the a given contract
1054
- * @summary Get a list of metadata by from the a given contract
1055
- * @param {string} chainName The name of chain
1056
- * @param {string} contractAddress The address of metadata contract
1057
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1058
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1059
- * @param {number} [pageSize] Maximum number of items to return
1060
- * @param {*} [options] Override http request option.
1061
- * @throws {RequiredError}
1062
- */
1063
- async listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
1064
- const localVarAxiosArgs = await localVarAxiosParamCreator.listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
1065
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1066
- },
1067
- /**
1068
- * Refresh stacked metadata
1069
- * @summary Refresh stacked metadata
1070
- * @param {string} chainName The name of chain
1071
- * @param {string} contractAddress Contract address
1072
- * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
1073
- * @param {*} [options] Override http request option.
1074
- * @throws {RequiredError}
1075
- */
1076
- async refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options) {
1077
- const localVarAxiosArgs = await localVarAxiosParamCreator.refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options);
1078
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1079
- },
1080
- /**
1081
- * Refresh NFT metadata
1082
- * @summary Refresh NFT metadata
1083
- * @param {string} contractAddress The address of contract
1084
- * @param {string} chainName The name of chain
1085
- * @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
1086
- * @param {*} [options] Override http request option.
1087
- * @throws {RequiredError}
1088
- */
1089
- async refreshNFTMetadataByTokenID(contractAddress, chainName, refreshNFTMetadataByTokenIDRequest, options) {
1090
- const localVarAxiosArgs = await localVarAxiosParamCreator.refreshNFTMetadataByTokenID(contractAddress, chainName, refreshNFTMetadataByTokenIDRequest, options);
1091
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1092
- },
1093
- };
1094
- };
1095
- /**
1096
- * MetadataApi - factory interface
1097
- * @export
1098
- */
1099
- const MetadataApiFactory = function (configuration, basePath, axios) {
1100
- const localVarFp = MetadataApiFp(configuration);
1101
- return {
1102
- /**
1103
- * Get metadata by ID
1104
- * @summary Get metadata by ID
1105
- * @param {MetadataApiGetMetadataRequest} requestParameters Request parameters.
1106
- * @param {*} [options] Override http request option.
1107
- * @throws {RequiredError}
1108
- */
1109
- getMetadata(requestParameters, options) {
1110
- return localVarFp.getMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.metadataId, options).then((request) => request(axios, basePath));
1111
- },
1112
- /**
1113
- * Get a list of metadata by from the a given contract
1114
- * @summary Get a list of metadata by from the a given contract
1115
- * @param {MetadataApiListMetadataRequest} requestParameters Request parameters.
1116
- * @param {*} [options] Override http request option.
1117
- * @throws {RequiredError}
1118
- */
1119
- listMetadata(requestParameters, options) {
1120
- return localVarFp.listMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1121
- },
1122
- /**
1123
- * Refresh stacked metadata
1124
- * @summary Refresh stacked metadata
1125
- * @param {MetadataApiRefreshMetadataByIDRequest} requestParameters Request parameters.
1126
- * @param {*} [options] Override http request option.
1127
- * @throws {RequiredError}
1128
- */
1129
- refreshMetadataByID(requestParameters, options) {
1130
- return localVarFp.refreshMetadataByID(requestParameters.chainName, requestParameters.contractAddress, requestParameters.refreshMetadataByIDRequest, options).then((request) => request(axios, basePath));
1131
- },
1132
- /**
1133
- * Refresh NFT metadata
1134
- * @summary Refresh NFT metadata
1135
- * @param {MetadataApiRefreshNFTMetadataByTokenIDRequest} requestParameters Request parameters.
1136
- * @param {*} [options] Override http request option.
1137
- * @throws {RequiredError}
1138
- */
1139
- refreshNFTMetadataByTokenID(requestParameters, options) {
1140
- return localVarFp.refreshNFTMetadataByTokenID(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshNFTMetadataByTokenIDRequest, options).then((request) => request(axios, basePath));
1141
- },
1142
- };
1143
- };
1144
- /**
1145
- * MetadataApi - object-oriented interface
1146
- * @export
1147
- * @class MetadataApi
1148
- * @extends {BaseAPI}
1149
- */
1150
- class MetadataApi extends BaseAPI {
1151
- /**
1152
- * Get metadata by ID
1153
- * @summary Get metadata by ID
1154
- * @param {MetadataApiGetMetadataRequest} requestParameters Request parameters.
1155
- * @param {*} [options] Override http request option.
1156
- * @throws {RequiredError}
1157
- * @memberof MetadataApi
1158
- */
1159
- getMetadata(requestParameters, options) {
1160
- return MetadataApiFp(this.configuration).getMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.metadataId, options).then((request) => request(this.axios, this.basePath));
1161
- }
1162
- /**
1163
- * Get a list of metadata by from the a given contract
1164
- * @summary Get a list of metadata by from the a given contract
1165
- * @param {MetadataApiListMetadataRequest} requestParameters Request parameters.
1166
- * @param {*} [options] Override http request option.
1167
- * @throws {RequiredError}
1168
- * @memberof MetadataApi
1169
- */
1170
- listMetadata(requestParameters, options) {
1171
- return MetadataApiFp(this.configuration).listMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1172
- }
1173
- /**
1174
- * Refresh stacked metadata
1175
- * @summary Refresh stacked metadata
1176
- * @param {MetadataApiRefreshMetadataByIDRequest} requestParameters Request parameters.
1177
- * @param {*} [options] Override http request option.
1178
- * @throws {RequiredError}
1179
- * @memberof MetadataApi
1180
- */
1181
- refreshMetadataByID(requestParameters, options) {
1182
- return MetadataApiFp(this.configuration).refreshMetadataByID(requestParameters.chainName, requestParameters.contractAddress, requestParameters.refreshMetadataByIDRequest, options).then((request) => request(this.axios, this.basePath));
1183
- }
1184
- /**
1185
- * Refresh NFT metadata
1186
- * @summary Refresh NFT metadata
1187
- * @param {MetadataApiRefreshNFTMetadataByTokenIDRequest} requestParameters Request parameters.
1188
- * @param {*} [options] Override http request option.
1189
- * @throws {RequiredError}
1190
- * @memberof MetadataApi
1191
- */
1192
- refreshNFTMetadataByTokenID(requestParameters, options) {
1193
- return MetadataApiFp(this.configuration).refreshNFTMetadataByTokenID(requestParameters.contractAddress, requestParameters.chainName, requestParameters.refreshNFTMetadataByTokenIDRequest, options).then((request) => request(this.axios, this.basePath));
1194
- }
1195
- }
1196
-
1197
- /* tslint:disable */
1198
- /* eslint-disable */
1199
- /**
1200
- * Immutable zkEVM API
1201
- * Immutable Multi Rollup API
1202
- *
1203
- * The version of the OpenAPI document: 1.0.0
1204
- * Contact: support@immutable.com
1205
- *
1206
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1207
- * https://openapi-generator.tech
1208
- * Do not edit the class manually.
1209
- */
1210
- /**
1211
- * NftOwnersApi - axios parameter creator
1212
- * @export
1213
- */
1214
- const NftOwnersApiAxiosParamCreator = function (configuration) {
1215
- return {
1216
- /**
1217
- * List NFT owners by token ID
1218
- * @summary List NFT owners by token ID
1219
- * @param {string} contractAddress The address of contract
1220
- * @param {string} tokenId An &#x60;uint256&#x60; token id as string
1221
- * @param {string} chainName The name of chain
1222
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1223
- * @param {number} [pageSize] Maximum number of items to return
1224
- * @param {*} [options] Override http request option.
1225
- * @throws {RequiredError}
1226
- */
1227
- listNFTOwners: async (contractAddress, tokenId, chainName, pageCursor, pageSize, options = {}) => {
1228
- // verify required parameter 'contractAddress' is not null or undefined
1229
- assertParamExists('listNFTOwners', 'contractAddress', contractAddress);
1230
- // verify required parameter 'tokenId' is not null or undefined
1231
- assertParamExists('listNFTOwners', 'tokenId', tokenId);
1232
- // verify required parameter 'chainName' is not null or undefined
1233
- assertParamExists('listNFTOwners', 'chainName', chainName);
1234
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}/owners`
1235
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
1236
- .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
1237
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1238
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1239
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1240
- let baseOptions;
1241
- if (configuration) {
1242
- baseOptions = configuration.baseOptions;
1243
- }
1244
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1245
- const localVarHeaderParameter = {};
1246
- const localVarQueryParameter = {};
1247
- if (pageCursor !== undefined) {
1248
- localVarQueryParameter['page_cursor'] = pageCursor;
1249
- }
1250
- if (pageSize !== undefined) {
1251
- localVarQueryParameter['page_size'] = pageSize;
1252
- }
1253
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1254
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1255
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1256
- return {
1257
- url: toPathString(localVarUrlObj),
1258
- options: localVarRequestOptions,
1259
- };
1260
- },
1261
- /**
1262
- * List owners by contract address
1263
- * @summary List owners by contract address
1264
- * @param {string} contractAddress The address of contract
1265
- * @param {string} chainName The name of chain
1266
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1267
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1268
- * @param {number} [pageSize] Maximum number of items to return
1269
- * @param {*} [options] Override http request option.
1270
- * @throws {RequiredError}
1271
- */
1272
- listOwnersByContractAddress: async (contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1273
- // verify required parameter 'contractAddress' is not null or undefined
1274
- assertParamExists('listOwnersByContractAddress', 'contractAddress', contractAddress);
1275
- // verify required parameter 'chainName' is not null or undefined
1276
- assertParamExists('listOwnersByContractAddress', 'chainName', chainName);
1277
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/owners`
1278
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
1279
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1280
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1281
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1282
- let baseOptions;
1283
- if (configuration) {
1284
- baseOptions = configuration.baseOptions;
1285
- }
1286
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1287
- const localVarHeaderParameter = {};
1288
- const localVarQueryParameter = {};
1289
- if (fromUpdatedAt !== undefined) {
1290
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1291
- fromUpdatedAt.toISOString() :
1292
- fromUpdatedAt;
1293
- }
1294
- if (pageCursor !== undefined) {
1295
- localVarQueryParameter['page_cursor'] = pageCursor;
1296
- }
1297
- if (pageSize !== undefined) {
1298
- localVarQueryParameter['page_size'] = pageSize;
1299
- }
1300
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1301
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1302
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1303
- return {
1304
- url: toPathString(localVarUrlObj),
1305
- options: localVarRequestOptions,
1306
- };
1307
- },
1308
- };
1309
- };
1310
- /**
1311
- * NftOwnersApi - functional programming interface
1312
- * @export
1313
- */
1314
- const NftOwnersApiFp = function (configuration) {
1315
- const localVarAxiosParamCreator = NftOwnersApiAxiosParamCreator(configuration);
1316
- return {
1317
- /**
1318
- * List NFT owners by token ID
1319
- * @summary List NFT owners by token ID
1320
- * @param {string} contractAddress The address of contract
1321
- * @param {string} tokenId An &#x60;uint256&#x60; token id as string
1322
- * @param {string} chainName The name of chain
1323
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1324
- * @param {number} [pageSize] Maximum number of items to return
1325
- * @param {*} [options] Override http request option.
1326
- * @throws {RequiredError}
1327
- */
1328
- async listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
1329
- const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
1330
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1331
- },
1332
- /**
1333
- * List owners by contract address
1334
- * @summary List owners by contract address
1335
- * @param {string} contractAddress The address of contract
1336
- * @param {string} chainName The name of chain
1337
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1338
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1339
- * @param {number} [pageSize] Maximum number of items to return
1340
- * @param {*} [options] Override http request option.
1341
- * @throws {RequiredError}
1342
- */
1343
- async listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1344
- const localVarAxiosArgs = await localVarAxiosParamCreator.listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options);
1345
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1346
- },
1347
- };
1348
- };
1349
- /**
1350
- * NftOwnersApi - factory interface
1351
- * @export
1352
- */
1353
- const NftOwnersApiFactory = function (configuration, basePath, axios) {
1354
- const localVarFp = NftOwnersApiFp(configuration);
1355
- return {
1356
- /**
1357
- * List NFT owners by token ID
1358
- * @summary List NFT owners by token ID
1359
- * @param {NftOwnersApiListNFTOwnersRequest} requestParameters Request parameters.
1360
- * @param {*} [options] Override http request option.
1361
- * @throws {RequiredError}
1362
- */
1363
- listNFTOwners(requestParameters, options) {
1364
- return localVarFp.listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1365
- },
1366
- /**
1367
- * List owners by contract address
1368
- * @summary List owners by contract address
1369
- * @param {NftOwnersApiListOwnersByContractAddressRequest} requestParameters Request parameters.
1370
- * @param {*} [options] Override http request option.
1371
- * @throws {RequiredError}
1372
- */
1373
- listOwnersByContractAddress(requestParameters, options) {
1374
- return localVarFp.listOwnersByContractAddress(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1375
- },
1376
- };
1377
- };
1378
- /**
1379
- * NftOwnersApi - object-oriented interface
1380
- * @export
1381
- * @class NftOwnersApi
1382
- * @extends {BaseAPI}
1383
- */
1384
- class NftOwnersApi extends BaseAPI {
1385
- /**
1386
- * List NFT owners by token ID
1387
- * @summary List NFT owners by token ID
1388
- * @param {NftOwnersApiListNFTOwnersRequest} requestParameters Request parameters.
1389
- * @param {*} [options] Override http request option.
1390
- * @throws {RequiredError}
1391
- * @memberof NftOwnersApi
1392
- */
1393
- listNFTOwners(requestParameters, options) {
1394
- return NftOwnersApiFp(this.configuration).listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1395
- }
1396
- /**
1397
- * List owners by contract address
1398
- * @summary List owners by contract address
1399
- * @param {NftOwnersApiListOwnersByContractAddressRequest} requestParameters Request parameters.
1400
- * @param {*} [options] Override http request option.
1401
- * @throws {RequiredError}
1402
- * @memberof NftOwnersApi
1403
- */
1404
- listOwnersByContractAddress(requestParameters, options) {
1405
- return NftOwnersApiFp(this.configuration).listOwnersByContractAddress(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1406
- }
1407
- }
1408
-
1409
- /* tslint:disable */
1410
- /* eslint-disable */
1411
- /**
1412
- * Immutable zkEVM API
1413
- * Immutable Multi Rollup API
1414
- *
1415
- * The version of the OpenAPI document: 1.0.0
1416
- * Contact: support@immutable.com
1417
- *
1418
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1419
- * https://openapi-generator.tech
1420
- * Do not edit the class manually.
1421
- */
1422
- /**
1423
- * NftsApi - axios parameter creator
1424
- * @export
1425
- */
1426
- const NftsApiAxiosParamCreator = function (configuration) {
1427
- return {
1428
- /**
1429
- * Get NFT by token ID
1430
- * @summary Get NFT by token ID
1431
- * @param {string} contractAddress The address of NFT contract
1432
- * @param {string} tokenId An &#x60;uint256&#x60; token id as string
1433
- * @param {string} chainName The name of chain
1434
- * @param {*} [options] Override http request option.
1435
- * @throws {RequiredError}
1436
- */
1437
- getNFT: async (contractAddress, tokenId, chainName, options = {}) => {
1438
- // verify required parameter 'contractAddress' is not null or undefined
1439
- assertParamExists('getNFT', 'contractAddress', contractAddress);
1440
- // verify required parameter 'tokenId' is not null or undefined
1441
- assertParamExists('getNFT', 'tokenId', tokenId);
1442
- // verify required parameter 'chainName' is not null or undefined
1443
- assertParamExists('getNFT', 'chainName', chainName);
1444
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}`
1445
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
1446
- .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
1447
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1448
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1449
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1450
- let baseOptions;
1451
- if (configuration) {
1452
- baseOptions = configuration.baseOptions;
1453
- }
1454
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1455
- const localVarHeaderParameter = {};
1456
- const localVarQueryParameter = {};
1457
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1458
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1459
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1460
- return {
1461
- url: toPathString(localVarUrlObj),
1462
- options: localVarRequestOptions,
1463
- };
1464
- },
1465
- /**
1466
- * List all NFT owners on a chain
1467
- * @summary List all NFT owners
1468
- * @param {string} chainName The name of chain
1469
- * @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
1470
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1471
- * @param {number} [pageSize] Maximum number of items to return
1472
- * @param {*} [options] Override http request option.
1473
- * @throws {RequiredError}
1474
- */
1475
- listAllNFTOwners: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1476
- // verify required parameter 'chainName' is not null or undefined
1477
- assertParamExists('listAllNFTOwners', 'chainName', chainName);
1478
- // verify required parameter 'fromUpdatedAt' is not null or undefined
1479
- assertParamExists('listAllNFTOwners', 'fromUpdatedAt', fromUpdatedAt);
1480
- const localVarPath = `/v1/chains/{chain_name}/nft-owners`
1481
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1482
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1483
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1484
- let baseOptions;
1485
- if (configuration) {
1486
- baseOptions = configuration.baseOptions;
1487
- }
1488
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1489
- const localVarHeaderParameter = {};
1490
- const localVarQueryParameter = {};
1491
- if (fromUpdatedAt !== undefined) {
1492
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1493
- fromUpdatedAt.toISOString() :
1494
- fromUpdatedAt;
1495
- }
1496
- if (pageCursor !== undefined) {
1497
- localVarQueryParameter['page_cursor'] = pageCursor;
1498
- }
1499
- if (pageSize !== undefined) {
1500
- localVarQueryParameter['page_size'] = pageSize;
1501
- }
1502
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1503
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1504
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1505
- return {
1506
- url: toPathString(localVarUrlObj),
1507
- options: localVarRequestOptions,
1508
- };
1509
- },
1510
- /**
1511
- * List all NFTs on a chain
1512
- * @summary List all NFTs
1513
- * @param {string} chainName The name of chain
1514
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1515
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1516
- * @param {number} [pageSize] Maximum number of items to return
1517
- * @param {*} [options] Override http request option.
1518
- * @throws {RequiredError}
1519
- */
1520
- listAllNFTs: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1521
- // verify required parameter 'chainName' is not null or undefined
1522
- assertParamExists('listAllNFTs', 'chainName', chainName);
1523
- const localVarPath = `/v1/chains/{chain_name}/nfts`
1524
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1525
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1526
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1527
- let baseOptions;
1528
- if (configuration) {
1529
- baseOptions = configuration.baseOptions;
1530
- }
1531
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1532
- const localVarHeaderParameter = {};
1533
- const localVarQueryParameter = {};
1534
- if (fromUpdatedAt !== undefined) {
1535
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1536
- fromUpdatedAt.toISOString() :
1537
- fromUpdatedAt;
1538
- }
1539
- if (pageCursor !== undefined) {
1540
- localVarQueryParameter['page_cursor'] = pageCursor;
1541
- }
1542
- if (pageSize !== undefined) {
1543
- localVarQueryParameter['page_size'] = pageSize;
1544
- }
1545
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1546
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1547
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1548
- return {
1549
- url: toPathString(localVarUrlObj),
1550
- options: localVarRequestOptions,
1551
- };
1552
- },
1553
- /**
1554
- * List NFTs by contract address
1555
- * @summary List NFTs by contract address
1556
- * @param {string} contractAddress Contract address
1557
- * @param {string} chainName The name of chain
1558
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1559
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1560
- * @param {number} [pageSize] Maximum number of items to return
1561
- * @param {*} [options] Override http request option.
1562
- * @throws {RequiredError}
1563
- */
1564
- listNFTs: async (contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1565
- // verify required parameter 'contractAddress' is not null or undefined
1566
- assertParamExists('listNFTs', 'contractAddress', contractAddress);
1567
- // verify required parameter 'chainName' is not null or undefined
1568
- assertParamExists('listNFTs', 'chainName', chainName);
1569
- const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts`
1570
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
1571
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1572
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1573
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1574
- let baseOptions;
1575
- if (configuration) {
1576
- baseOptions = configuration.baseOptions;
1577
- }
1578
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1579
- const localVarHeaderParameter = {};
1580
- const localVarQueryParameter = {};
1581
- if (fromUpdatedAt !== undefined) {
1582
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1583
- fromUpdatedAt.toISOString() :
1584
- fromUpdatedAt;
1585
- }
1586
- if (pageCursor !== undefined) {
1587
- localVarQueryParameter['page_cursor'] = pageCursor;
1588
- }
1589
- if (pageSize !== undefined) {
1590
- localVarQueryParameter['page_size'] = pageSize;
1591
- }
1592
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1593
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1594
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1595
- return {
1596
- url: toPathString(localVarUrlObj),
1597
- options: localVarRequestOptions,
1598
- };
1599
- },
1600
- /**
1601
- * List NFTs by account address
1602
- * @summary List NFTs by account address
1603
- * @param {string} accountAddress Account address
1604
- * @param {string} chainName The name of chain
1605
- * @param {string} [contractAddress] The address of contract
1606
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1607
- * @param {number} [pageSize] Maximum number of items to return
1608
- * @param {*} [options] Override http request option.
1609
- * @throws {RequiredError}
1610
- */
1611
- listNFTsByAccountAddress: async (accountAddress, chainName, contractAddress, pageCursor, pageSize, options = {}) => {
1612
- // verify required parameter 'accountAddress' is not null or undefined
1613
- assertParamExists('listNFTsByAccountAddress', 'accountAddress', accountAddress);
1614
- // verify required parameter 'chainName' is not null or undefined
1615
- assertParamExists('listNFTsByAccountAddress', 'chainName', chainName);
1616
- const localVarPath = `/v1/chains/{chain_name}/accounts/{account_address}/nfts`
1617
- .replace(`{${"account_address"}}`, encodeURIComponent(String(accountAddress)))
1618
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1619
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1620
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1621
- let baseOptions;
1622
- if (configuration) {
1623
- baseOptions = configuration.baseOptions;
1624
- }
1625
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1626
- const localVarHeaderParameter = {};
1627
- const localVarQueryParameter = {};
1628
- if (contractAddress !== undefined) {
1629
- localVarQueryParameter['contract_address'] = contractAddress;
1630
- }
1631
- if (pageCursor !== undefined) {
1632
- localVarQueryParameter['page_cursor'] = pageCursor;
1633
- }
1634
- if (pageSize !== undefined) {
1635
- localVarQueryParameter['page_size'] = pageSize;
1636
- }
1637
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1638
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1639
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1640
- return {
1641
- url: toPathString(localVarUrlObj),
1642
- options: localVarRequestOptions,
1643
- };
1644
- },
1645
- };
1646
- };
1647
- /**
1648
- * NftsApi - functional programming interface
1649
- * @export
1650
- */
1651
- const NftsApiFp = function (configuration) {
1652
- const localVarAxiosParamCreator = NftsApiAxiosParamCreator(configuration);
1653
- return {
1654
- /**
1655
- * Get NFT by token ID
1656
- * @summary Get NFT by token ID
1657
- * @param {string} contractAddress The address of NFT contract
1658
- * @param {string} tokenId An &#x60;uint256&#x60; token id as string
1659
- * @param {string} chainName The name of chain
1660
- * @param {*} [options] Override http request option.
1661
- * @throws {RequiredError}
1662
- */
1663
- async getNFT(contractAddress, tokenId, chainName, options) {
1664
- const localVarAxiosArgs = await localVarAxiosParamCreator.getNFT(contractAddress, tokenId, chainName, options);
1665
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1666
- },
1667
- /**
1668
- * List all NFT owners on a chain
1669
- * @summary List all NFT owners
1670
- * @param {string} chainName The name of chain
1671
- * @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
1672
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1673
- * @param {number} [pageSize] Maximum number of items to return
1674
- * @param {*} [options] Override http request option.
1675
- * @throws {RequiredError}
1676
- */
1677
- async listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1678
- const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options);
1679
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1680
- },
1681
- /**
1682
- * List all NFTs on a chain
1683
- * @summary List all NFTs
1684
- * @param {string} chainName The name of chain
1685
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1686
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1687
- * @param {number} [pageSize] Maximum number of items to return
1688
- * @param {*} [options] Override http request option.
1689
- * @throws {RequiredError}
1690
- */
1691
- async listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1692
- const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options);
1693
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1694
- },
1695
- /**
1696
- * List NFTs by contract address
1697
- * @summary List NFTs by contract address
1698
- * @param {string} contractAddress Contract address
1699
- * @param {string} chainName The name of chain
1700
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1701
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1702
- * @param {number} [pageSize] Maximum number of items to return
1703
- * @param {*} [options] Override http request option.
1704
- * @throws {RequiredError}
1705
- */
1706
- async listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1707
- const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options);
1708
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1709
- },
1710
- /**
1711
- * List NFTs by account address
1712
- * @summary List NFTs by account address
1713
- * @param {string} accountAddress Account address
1714
- * @param {string} chainName The name of chain
1715
- * @param {string} [contractAddress] The address of contract
1716
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1717
- * @param {number} [pageSize] Maximum number of items to return
1718
- * @param {*} [options] Override http request option.
1719
- * @throws {RequiredError}
1720
- */
1721
- async listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options) {
1722
- const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options);
1723
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1724
- },
1725
- };
1726
- };
1727
- /**
1728
- * NftsApi - factory interface
1729
- * @export
1730
- */
1731
- const NftsApiFactory = function (configuration, basePath, axios) {
1732
- const localVarFp = NftsApiFp(configuration);
1733
- return {
1734
- /**
1735
- * Get NFT by token ID
1736
- * @summary Get NFT by token ID
1737
- * @param {NftsApiGetNFTRequest} requestParameters Request parameters.
1738
- * @param {*} [options] Override http request option.
1739
- * @throws {RequiredError}
1740
- */
1741
- getNFT(requestParameters, options) {
1742
- return localVarFp.getNFT(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, options).then((request) => request(axios, basePath));
1743
- },
1744
- /**
1745
- * List all NFT owners on a chain
1746
- * @summary List all NFT owners
1747
- * @param {NftsApiListAllNFTOwnersRequest} requestParameters Request parameters.
1748
- * @param {*} [options] Override http request option.
1749
- * @throws {RequiredError}
1750
- */
1751
- listAllNFTOwners(requestParameters, options) {
1752
- return localVarFp.listAllNFTOwners(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1753
- },
1754
- /**
1755
- * List all NFTs on a chain
1756
- * @summary List all NFTs
1757
- * @param {NftsApiListAllNFTsRequest} requestParameters Request parameters.
1758
- * @param {*} [options] Override http request option.
1759
- * @throws {RequiredError}
1760
- */
1761
- listAllNFTs(requestParameters, options) {
1762
- return localVarFp.listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1763
- },
1764
- /**
1765
- * List NFTs by contract address
1766
- * @summary List NFTs by contract address
1767
- * @param {NftsApiListNFTsRequest} requestParameters Request parameters.
1768
- * @param {*} [options] Override http request option.
1769
- * @throws {RequiredError}
1770
- */
1771
- listNFTs(requestParameters, options) {
1772
- return localVarFp.listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1773
- },
1774
- /**
1775
- * List NFTs by account address
1776
- * @summary List NFTs by account address
1777
- * @param {NftsApiListNFTsByAccountAddressRequest} requestParameters Request parameters.
1778
- * @param {*} [options] Override http request option.
1779
- * @throws {RequiredError}
1780
- */
1781
- listNFTsByAccountAddress(requestParameters, options) {
1782
- return localVarFp.listNFTsByAccountAddress(requestParameters.accountAddress, requestParameters.chainName, requestParameters.contractAddress, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
1783
- },
1784
- };
1785
- };
1786
- /**
1787
- * NftsApi - object-oriented interface
1788
- * @export
1789
- * @class NftsApi
1790
- * @extends {BaseAPI}
1791
- */
1792
- class NftsApi extends BaseAPI {
1793
- /**
1794
- * Get NFT by token ID
1795
- * @summary Get NFT by token ID
1796
- * @param {NftsApiGetNFTRequest} requestParameters Request parameters.
1797
- * @param {*} [options] Override http request option.
1798
- * @throws {RequiredError}
1799
- * @memberof NftsApi
1800
- */
1801
- getNFT(requestParameters, options) {
1802
- return NftsApiFp(this.configuration).getNFT(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
1803
- }
1804
- /**
1805
- * List all NFT owners on a chain
1806
- * @summary List all NFT owners
1807
- * @param {NftsApiListAllNFTOwnersRequest} requestParameters Request parameters.
1808
- * @param {*} [options] Override http request option.
1809
- * @throws {RequiredError}
1810
- * @memberof NftsApi
1811
- */
1812
- listAllNFTOwners(requestParameters, options) {
1813
- return NftsApiFp(this.configuration).listAllNFTOwners(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1814
- }
1815
- /**
1816
- * List all NFTs on a chain
1817
- * @summary List all NFTs
1818
- * @param {NftsApiListAllNFTsRequest} requestParameters Request parameters.
1819
- * @param {*} [options] Override http request option.
1820
- * @throws {RequiredError}
1821
- * @memberof NftsApi
1822
- */
1823
- listAllNFTs(requestParameters, options) {
1824
- return NftsApiFp(this.configuration).listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1825
- }
1826
- /**
1827
- * List NFTs by contract address
1828
- * @summary List NFTs by contract address
1829
- * @param {NftsApiListNFTsRequest} requestParameters Request parameters.
1830
- * @param {*} [options] Override http request option.
1831
- * @throws {RequiredError}
1832
- * @memberof NftsApi
1833
- */
1834
- listNFTs(requestParameters, options) {
1835
- return NftsApiFp(this.configuration).listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1836
- }
1837
- /**
1838
- * List NFTs by account address
1839
- * @summary List NFTs by account address
1840
- * @param {NftsApiListNFTsByAccountAddressRequest} requestParameters Request parameters.
1841
- * @param {*} [options] Override http request option.
1842
- * @throws {RequiredError}
1843
- * @memberof NftsApi
1844
- */
1845
- listNFTsByAccountAddress(requestParameters, options) {
1846
- return NftsApiFp(this.configuration).listNFTsByAccountAddress(requestParameters.accountAddress, requestParameters.chainName, requestParameters.contractAddress, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1847
- }
1848
- }
1849
-
1850
- /* tslint:disable */
1851
- /* eslint-disable */
1852
- /**
1853
- * Immutable zkEVM API
1854
- * Immutable Multi Rollup API
1855
- *
1856
- * The version of the OpenAPI document: 1.0.0
1857
- * Contact: support@immutable.com
1858
- *
1859
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1860
- * https://openapi-generator.tech
1861
- * Do not edit the class manually.
1862
- */
1863
- /**
1864
- * OrdersApi - axios parameter creator
1865
- * @export
1866
- */
1867
- const OrdersApiAxiosParamCreator = function (configuration) {
1868
- return {
1869
- /**
1870
- * Cancel one or more orders
1871
- * @summary Cancel one or more orders
1872
- * @param {string} chainName
1873
- * @param {CancelOrdersRequestBody} cancelOrdersRequestBody
1874
- * @param {*} [options] Override http request option.
1875
- * @throws {RequiredError}
1876
- */
1877
- cancelOrders: async (chainName, cancelOrdersRequestBody, options = {}) => {
1878
- // verify required parameter 'chainName' is not null or undefined
1879
- assertParamExists('cancelOrders', 'chainName', chainName);
1880
- // verify required parameter 'cancelOrdersRequestBody' is not null or undefined
1881
- assertParamExists('cancelOrders', 'cancelOrdersRequestBody', cancelOrdersRequestBody);
1882
- const localVarPath = `/v1/chains/{chain_name}/orders/cancel`
1883
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1884
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1885
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1886
- let baseOptions;
1887
- if (configuration) {
1888
- baseOptions = configuration.baseOptions;
1889
- }
1890
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1891
- const localVarHeaderParameter = {};
1892
- const localVarQueryParameter = {};
1893
- localVarHeaderParameter['Content-Type'] = 'application/json';
1894
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1895
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1896
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1897
- localVarRequestOptions.data = serializeDataIfNeeded(cancelOrdersRequestBody, localVarRequestOptions, configuration);
1898
- return {
1899
- url: toPathString(localVarUrlObj),
1900
- options: localVarRequestOptions,
1901
- };
1902
- },
1903
- /**
1904
- * Create a listing
1905
- * @summary Create a listing
1906
- * @param {string} chainName
1907
- * @param {CreateListingRequestBody} createListingRequestBody
1908
- * @param {*} [options] Override http request option.
1909
- * @throws {RequiredError}
1910
- */
1911
- createListing: async (chainName, createListingRequestBody, options = {}) => {
1912
- // verify required parameter 'chainName' is not null or undefined
1913
- assertParamExists('createListing', 'chainName', chainName);
1914
- // verify required parameter 'createListingRequestBody' is not null or undefined
1915
- assertParamExists('createListing', 'createListingRequestBody', createListingRequestBody);
1916
- const localVarPath = `/v1/chains/{chain_name}/orders/listings`
1917
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1918
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1919
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1920
- let baseOptions;
1921
- if (configuration) {
1922
- baseOptions = configuration.baseOptions;
1923
- }
1924
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1925
- const localVarHeaderParameter = {};
1926
- const localVarQueryParameter = {};
1927
- localVarHeaderParameter['Content-Type'] = 'application/json';
1928
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1929
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1930
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1931
- localVarRequestOptions.data = serializeDataIfNeeded(createListingRequestBody, localVarRequestOptions, configuration);
1932
- return {
1933
- url: toPathString(localVarUrlObj),
1934
- options: localVarRequestOptions,
1935
- };
1936
- },
1937
- /**
1938
- * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
1939
- * @summary Retrieve fulfillment data for orders
1940
- * @param {string} chainName
1941
- * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
1942
- * @param {*} [options] Override http request option.
1943
- * @throws {RequiredError}
1944
- */
1945
- fulfillmentData: async (chainName, fulfillmentDataRequest, options = {}) => {
1946
- // verify required parameter 'chainName' is not null or undefined
1947
- assertParamExists('fulfillmentData', 'chainName', chainName);
1948
- // verify required parameter 'fulfillmentDataRequest' is not null or undefined
1949
- assertParamExists('fulfillmentData', 'fulfillmentDataRequest', fulfillmentDataRequest);
1950
- const localVarPath = `/v1/chains/{chain_name}/orders/fulfillment-data`
1951
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1952
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1953
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1954
- let baseOptions;
1955
- if (configuration) {
1956
- baseOptions = configuration.baseOptions;
1957
- }
1958
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1959
- const localVarHeaderParameter = {};
1960
- const localVarQueryParameter = {};
1961
- localVarHeaderParameter['Content-Type'] = 'application/json';
1962
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1963
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1964
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1965
- localVarRequestOptions.data = serializeDataIfNeeded(fulfillmentDataRequest, localVarRequestOptions, configuration);
1966
- return {
1967
- url: toPathString(localVarUrlObj),
1968
- options: localVarRequestOptions,
1969
- };
1970
- },
1971
- /**
1972
- * Get a single listing by ID
1973
- * @summary Get a single listing by ID
1974
- * @param {string} chainName
1975
- * @param {string} listingId Global Order identifier
1976
- * @param {*} [options] Override http request option.
1977
- * @throws {RequiredError}
1978
- */
1979
- getListing: async (chainName, listingId, options = {}) => {
1980
- // verify required parameter 'chainName' is not null or undefined
1981
- assertParamExists('getListing', 'chainName', chainName);
1982
- // verify required parameter 'listingId' is not null or undefined
1983
- assertParamExists('getListing', 'listingId', listingId);
1984
- const localVarPath = `/v1/chains/{chain_name}/orders/listings/{listing_id}`
1985
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
1986
- .replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
1987
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1988
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1989
- let baseOptions;
1990
- if (configuration) {
1991
- baseOptions = configuration.baseOptions;
1992
- }
1993
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1994
- const localVarHeaderParameter = {};
1995
- const localVarQueryParameter = {};
1996
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1997
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1998
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1999
- return {
2000
- url: toPathString(localVarUrlObj),
2001
- options: localVarRequestOptions,
2002
- };
2003
- },
2004
- /**
2005
- * Get a single trade by ID
2006
- * @summary Get a single trade by ID
2007
- * @param {string} chainName
2008
- * @param {string} tradeId Global Trade identifier
2009
- * @param {*} [options] Override http request option.
2010
- * @throws {RequiredError}
2011
- */
2012
- getTrade: async (chainName, tradeId, options = {}) => {
2013
- // verify required parameter 'chainName' is not null or undefined
2014
- assertParamExists('getTrade', 'chainName', chainName);
2015
- // verify required parameter 'tradeId' is not null or undefined
2016
- assertParamExists('getTrade', 'tradeId', tradeId);
2017
- const localVarPath = `/v1/chains/{chain_name}/trades/{trade_id}`
2018
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
2019
- .replace(`{${"trade_id"}}`, encodeURIComponent(String(tradeId)));
2020
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2021
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2022
- let baseOptions;
2023
- if (configuration) {
2024
- baseOptions = configuration.baseOptions;
2025
- }
2026
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2027
- const localVarHeaderParameter = {};
2028
- const localVarQueryParameter = {};
2029
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2030
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2031
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2032
- return {
2033
- url: toPathString(localVarUrlObj),
2034
- options: localVarRequestOptions,
2035
- };
2036
- },
2037
- /**
2038
- * List all listings
2039
- * @summary List all listings
2040
- * @param {string} chainName
2041
- * @param {OrderStatusName} [status] Order status to filter by
2042
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
2043
- * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2044
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
2045
- * @param {number} [pageSize] Maximum number of orders to return per page
2046
- * @param {ListListingsSortByEnum} [sortBy] Order field to sort by
2047
- * @param {ListListingsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2048
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2049
- * @param {*} [options] Override http request option.
2050
- * @throws {RequiredError}
2051
- */
2052
- listListings: async (chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
2053
- // verify required parameter 'chainName' is not null or undefined
2054
- assertParamExists('listListings', 'chainName', chainName);
2055
- const localVarPath = `/v1/chains/{chain_name}/orders/listings`
2056
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2057
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2058
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2059
- let baseOptions;
2060
- if (configuration) {
2061
- baseOptions = configuration.baseOptions;
2062
- }
2063
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2064
- const localVarHeaderParameter = {};
2065
- const localVarQueryParameter = {};
2066
- if (status !== undefined) {
2067
- localVarQueryParameter['status'] = status;
2068
- }
2069
- if (sellItemContractAddress !== undefined) {
2070
- localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
2071
- }
2072
- if (buyItemContractAddress !== undefined) {
2073
- localVarQueryParameter['buy_item_contract_address'] = buyItemContractAddress;
2074
- }
2075
- if (sellItemTokenId !== undefined) {
2076
- localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
2077
- }
2078
- if (pageSize !== undefined) {
2079
- localVarQueryParameter['page_size'] = pageSize;
2080
- }
2081
- if (sortBy !== undefined) {
2082
- localVarQueryParameter['sort_by'] = sortBy;
2083
- }
2084
- if (sortDirection !== undefined) {
2085
- localVarQueryParameter['sort_direction'] = sortDirection;
2086
- }
2087
- if (pageCursor !== undefined) {
2088
- localVarQueryParameter['page_cursor'] = pageCursor;
2089
- }
2090
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2091
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2092
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2093
- return {
2094
- url: toPathString(localVarUrlObj),
2095
- options: localVarRequestOptions,
2096
- };
2097
- },
2098
- /**
2099
- * List all trades
2100
- * @summary List all trades
2101
- * @param {string} chainName
2102
- * @param {string} [accountAddress]
2103
- * @param {number} [pageSize] Maximum number of trades to return per page
2104
- * @param {ListTradesSortByEnum} [sortBy] Trade field to sort by
2105
- * @param {ListTradesSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2106
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2107
- * @param {*} [options] Override http request option.
2108
- * @throws {RequiredError}
2109
- */
2110
- listTrades: async (chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
2111
- // verify required parameter 'chainName' is not null or undefined
2112
- assertParamExists('listTrades', 'chainName', chainName);
2113
- const localVarPath = `/v1/chains/{chain_name}/trades`
2114
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2115
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2116
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2117
- let baseOptions;
2118
- if (configuration) {
2119
- baseOptions = configuration.baseOptions;
2120
- }
2121
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2122
- const localVarHeaderParameter = {};
2123
- const localVarQueryParameter = {};
2124
- if (accountAddress !== undefined) {
2125
- localVarQueryParameter['account_address'] = accountAddress;
2126
- }
2127
- if (pageSize !== undefined) {
2128
- localVarQueryParameter['page_size'] = pageSize;
2129
- }
2130
- if (sortBy !== undefined) {
2131
- localVarQueryParameter['sort_by'] = sortBy;
2132
- }
2133
- if (sortDirection !== undefined) {
2134
- localVarQueryParameter['sort_direction'] = sortDirection;
2135
- }
2136
- if (pageCursor !== undefined) {
2137
- localVarQueryParameter['page_cursor'] = pageCursor;
2138
- }
2139
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2140
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2141
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2142
- return {
2143
- url: toPathString(localVarUrlObj),
2144
- options: localVarRequestOptions,
2145
- };
2146
- },
2147
- };
2148
- };
2149
- /**
2150
- * OrdersApi - functional programming interface
2151
- * @export
2152
- */
2153
- const OrdersApiFp = function (configuration) {
2154
- const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
2155
- return {
2156
- /**
2157
- * Cancel one or more orders
2158
- * @summary Cancel one or more orders
2159
- * @param {string} chainName
2160
- * @param {CancelOrdersRequestBody} cancelOrdersRequestBody
2161
- * @param {*} [options] Override http request option.
2162
- * @throws {RequiredError}
2163
- */
2164
- async cancelOrders(chainName, cancelOrdersRequestBody, options) {
2165
- const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrders(chainName, cancelOrdersRequestBody, options);
2166
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2167
- },
2168
- /**
2169
- * Create a listing
2170
- * @summary Create a listing
2171
- * @param {string} chainName
2172
- * @param {CreateListingRequestBody} createListingRequestBody
2173
- * @param {*} [options] Override http request option.
2174
- * @throws {RequiredError}
2175
- */
2176
- async createListing(chainName, createListingRequestBody, options) {
2177
- const localVarAxiosArgs = await localVarAxiosParamCreator.createListing(chainName, createListingRequestBody, options);
2178
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2179
- },
2180
- /**
2181
- * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
2182
- * @summary Retrieve fulfillment data for orders
2183
- * @param {string} chainName
2184
- * @param {Array<FulfillmentDataRequest>} fulfillmentDataRequest
2185
- * @param {*} [options] Override http request option.
2186
- * @throws {RequiredError}
2187
- */
2188
- async fulfillmentData(chainName, fulfillmentDataRequest, options) {
2189
- const localVarAxiosArgs = await localVarAxiosParamCreator.fulfillmentData(chainName, fulfillmentDataRequest, options);
2190
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2191
- },
2192
- /**
2193
- * Get a single listing by ID
2194
- * @summary Get a single listing by ID
2195
- * @param {string} chainName
2196
- * @param {string} listingId Global Order identifier
2197
- * @param {*} [options] Override http request option.
2198
- * @throws {RequiredError}
2199
- */
2200
- async getListing(chainName, listingId, options) {
2201
- const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
2202
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2203
- },
2204
- /**
2205
- * Get a single trade by ID
2206
- * @summary Get a single trade by ID
2207
- * @param {string} chainName
2208
- * @param {string} tradeId Global Trade identifier
2209
- * @param {*} [options] Override http request option.
2210
- * @throws {RequiredError}
2211
- */
2212
- async getTrade(chainName, tradeId, options) {
2213
- const localVarAxiosArgs = await localVarAxiosParamCreator.getTrade(chainName, tradeId, options);
2214
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2215
- },
2216
- /**
2217
- * List all listings
2218
- * @summary List all listings
2219
- * @param {string} chainName
2220
- * @param {OrderStatusName} [status] Order status to filter by
2221
- * @param {string} [sellItemContractAddress] Sell item contract address to filter by
2222
- * @param {string} [buyItemContractAddress] Buy item contract address to filter by
2223
- * @param {string} [sellItemTokenId] Sell item token identifier to filter by
2224
- * @param {number} [pageSize] Maximum number of orders to return per page
2225
- * @param {ListListingsSortByEnum} [sortBy] Order field to sort by
2226
- * @param {ListListingsSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2227
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2228
- * @param {*} [options] Override http request option.
2229
- * @throws {RequiredError}
2230
- */
2231
- async listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
2232
- const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, buyItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
2233
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2234
- },
2235
- /**
2236
- * List all trades
2237
- * @summary List all trades
2238
- * @param {string} chainName
2239
- * @param {string} [accountAddress]
2240
- * @param {number} [pageSize] Maximum number of trades to return per page
2241
- * @param {ListTradesSortByEnum} [sortBy] Trade field to sort by
2242
- * @param {ListTradesSortDirectionEnum} [sortDirection] Ascending or descending direction for sort
2243
- * @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
2244
- * @param {*} [options] Override http request option.
2245
- * @throws {RequiredError}
2246
- */
2247
- async listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options) {
2248
- const localVarAxiosArgs = await localVarAxiosParamCreator.listTrades(chainName, accountAddress, pageSize, sortBy, sortDirection, pageCursor, options);
2249
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2250
- },
2251
- };
2252
- };
2253
- /**
2254
- * OrdersApi - factory interface
2255
- * @export
2256
- */
2257
- const OrdersApiFactory = function (configuration, basePath, axios) {
2258
- const localVarFp = OrdersApiFp(configuration);
2259
- return {
2260
- /**
2261
- * Cancel one or more orders
2262
- * @summary Cancel one or more orders
2263
- * @param {OrdersApiCancelOrdersRequest} requestParameters Request parameters.
2264
- * @param {*} [options] Override http request option.
2265
- * @throws {RequiredError}
2266
- */
2267
- cancelOrders(requestParameters, options) {
2268
- return localVarFp.cancelOrders(requestParameters.chainName, requestParameters.cancelOrdersRequestBody, options).then((request) => request(axios, basePath));
2269
- },
2270
- /**
2271
- * Create a listing
2272
- * @summary Create a listing
2273
- * @param {OrdersApiCreateListingRequest} requestParameters Request parameters.
2274
- * @param {*} [options] Override http request option.
2275
- * @throws {RequiredError}
2276
- */
2277
- createListing(requestParameters, options) {
2278
- return localVarFp.createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(axios, basePath));
2279
- },
2280
- /**
2281
- * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
2282
- * @summary Retrieve fulfillment data for orders
2283
- * @param {OrdersApiFulfillmentDataRequest} requestParameters Request parameters.
2284
- * @param {*} [options] Override http request option.
2285
- * @throws {RequiredError}
2286
- */
2287
- fulfillmentData(requestParameters, options) {
2288
- return localVarFp.fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequest, options).then((request) => request(axios, basePath));
2289
- },
2290
- /**
2291
- * Get a single listing by ID
2292
- * @summary Get a single listing by ID
2293
- * @param {OrdersApiGetListingRequest} requestParameters Request parameters.
2294
- * @param {*} [options] Override http request option.
2295
- * @throws {RequiredError}
2296
- */
2297
- getListing(requestParameters, options) {
2298
- return localVarFp.getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(axios, basePath));
2299
- },
2300
- /**
2301
- * Get a single trade by ID
2302
- * @summary Get a single trade by ID
2303
- * @param {OrdersApiGetTradeRequest} requestParameters Request parameters.
2304
- * @param {*} [options] Override http request option.
2305
- * @throws {RequiredError}
2306
- */
2307
- getTrade(requestParameters, options) {
2308
- return localVarFp.getTrade(requestParameters.chainName, requestParameters.tradeId, options).then((request) => request(axios, basePath));
2309
- },
2310
- /**
2311
- * List all listings
2312
- * @summary List all listings
2313
- * @param {OrdersApiListListingsRequest} requestParameters Request parameters.
2314
- * @param {*} [options] Override http request option.
2315
- * @throws {RequiredError}
2316
- */
2317
- listListings(requestParameters, options) {
2318
- return localVarFp.listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.buyItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(axios, basePath));
2319
- },
2320
- /**
2321
- * List all trades
2322
- * @summary List all trades
2323
- * @param {OrdersApiListTradesRequest} requestParameters Request parameters.
2324
- * @param {*} [options] Override http request option.
2325
- * @throws {RequiredError}
2326
- */
2327
- listTrades(requestParameters, options) {
2328
- return localVarFp.listTrades(requestParameters.chainName, requestParameters.accountAddress, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(axios, basePath));
2329
- },
2330
- };
2331
- };
2332
- /**
2333
- * OrdersApi - object-oriented interface
2334
- * @export
2335
- * @class OrdersApi
2336
- * @extends {BaseAPI}
2337
- */
2338
- class OrdersApi extends BaseAPI {
2339
- /**
2340
- * Cancel one or more orders
2341
- * @summary Cancel one or more orders
2342
- * @param {OrdersApiCancelOrdersRequest} requestParameters Request parameters.
2343
- * @param {*} [options] Override http request option.
2344
- * @throws {RequiredError}
2345
- * @memberof OrdersApi
2346
- */
2347
- cancelOrders(requestParameters, options) {
2348
- return OrdersApiFp(this.configuration).cancelOrders(requestParameters.chainName, requestParameters.cancelOrdersRequestBody, options).then((request) => request(this.axios, this.basePath));
2349
- }
2350
- /**
2351
- * Create a listing
2352
- * @summary Create a listing
2353
- * @param {OrdersApiCreateListingRequest} requestParameters Request parameters.
2354
- * @param {*} [options] Override http request option.
2355
- * @throws {RequiredError}
2356
- * @memberof OrdersApi
2357
- */
2358
- createListing(requestParameters, options) {
2359
- return OrdersApiFp(this.configuration).createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(this.axios, this.basePath));
2360
- }
2361
- /**
2362
- * Retrieve signed fulfillment data based on the list of order IDs and corresponding fees.
2363
- * @summary Retrieve fulfillment data for orders
2364
- * @param {OrdersApiFulfillmentDataRequest} requestParameters Request parameters.
2365
- * @param {*} [options] Override http request option.
2366
- * @throws {RequiredError}
2367
- * @memberof OrdersApi
2368
- */
2369
- fulfillmentData(requestParameters, options) {
2370
- return OrdersApiFp(this.configuration).fulfillmentData(requestParameters.chainName, requestParameters.fulfillmentDataRequest, options).then((request) => request(this.axios, this.basePath));
2371
- }
2372
- /**
2373
- * Get a single listing by ID
2374
- * @summary Get a single listing by ID
2375
- * @param {OrdersApiGetListingRequest} requestParameters Request parameters.
2376
- * @param {*} [options] Override http request option.
2377
- * @throws {RequiredError}
2378
- * @memberof OrdersApi
2379
- */
2380
- getListing(requestParameters, options) {
2381
- return OrdersApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
2382
- }
2383
- /**
2384
- * Get a single trade by ID
2385
- * @summary Get a single trade by ID
2386
- * @param {OrdersApiGetTradeRequest} requestParameters Request parameters.
2387
- * @param {*} [options] Override http request option.
2388
- * @throws {RequiredError}
2389
- * @memberof OrdersApi
2390
- */
2391
- getTrade(requestParameters, options) {
2392
- return OrdersApiFp(this.configuration).getTrade(requestParameters.chainName, requestParameters.tradeId, options).then((request) => request(this.axios, this.basePath));
2393
- }
2394
- /**
2395
- * List all listings
2396
- * @summary List all listings
2397
- * @param {OrdersApiListListingsRequest} requestParameters Request parameters.
2398
- * @param {*} [options] Override http request option.
2399
- * @throws {RequiredError}
2400
- * @memberof OrdersApi
2401
- */
2402
- listListings(requestParameters, options) {
2403
- return OrdersApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.buyItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
2404
- }
2405
- /**
2406
- * List all trades
2407
- * @summary List all trades
2408
- * @param {OrdersApiListTradesRequest} requestParameters Request parameters.
2409
- * @param {*} [options] Override http request option.
2410
- * @throws {RequiredError}
2411
- * @memberof OrdersApi
2412
- */
2413
- listTrades(requestParameters, options) {
2414
- return OrdersApiFp(this.configuration).listTrades(requestParameters.chainName, requestParameters.accountAddress, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
2415
- }
2416
- }
2417
- /**
2418
- * @export
2419
- */
2420
- const ListListingsSortByEnum$1 = {
2421
- CreatedAt: 'created_at',
2422
- UpdatedAt: 'updated_at',
2423
- BuyItemAmount: 'buy_item_amount'
2424
- };
2425
- /**
2426
- * @export
2427
- */
2428
- const ListListingsSortDirectionEnum$1 = {
2429
- Asc: 'asc',
2430
- Desc: 'desc'
2431
- };
2432
- /**
2433
- * @export
2434
- */
2435
- const ListTradesSortByEnum$1 = {
2436
- IndexedAt: 'indexed_at'
2437
- };
2438
- /**
2439
- * @export
2440
- */
2441
- const ListTradesSortDirectionEnum$1 = {
2442
- Asc: 'asc',
2443
- Desc: 'desc'
2444
- };
2445
-
2446
- /* tslint:disable */
2447
- /* eslint-disable */
2448
- /**
2449
- * Immutable zkEVM API
2450
- * Immutable Multi Rollup API
2451
- *
2452
- * The version of the OpenAPI document: 1.0.0
2453
- * Contact: support@immutable.com
2454
- *
2455
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2456
- * https://openapi-generator.tech
2457
- * Do not edit the class manually.
2458
- */
2459
- /**
2460
- * PassportApi - axios parameter creator
2461
- * @export
2462
- */
2463
- const PassportApiAxiosParamCreator = function (configuration) {
2464
- return {
2465
- /**
2466
- * Create a counterfactual address for a user based on their Ethereum address
2467
- * @summary Create a counterfactual address
2468
- * @param {string} chainName
2469
- * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
2470
- * @param {*} [options] Override http request option.
2471
- * @throws {RequiredError}
2472
- */
2473
- createCounterfactualAddress: async (chainName, createCounterfactualAddressRequest, options = {}) => {
2474
- // verify required parameter 'chainName' is not null or undefined
2475
- assertParamExists('createCounterfactualAddress', 'chainName', chainName);
2476
- // verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
2477
- assertParamExists('createCounterfactualAddress', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
2478
- const localVarPath = `/v1/chains/{chain_name}/passport/counterfactual-address`
2479
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2480
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2481
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2482
- let baseOptions;
2483
- if (configuration) {
2484
- baseOptions = configuration.baseOptions;
2485
- }
2486
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2487
- const localVarHeaderParameter = {};
2488
- const localVarQueryParameter = {};
2489
- // authentication BearerAuth required
2490
- // http bearer authentication required
2491
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
2492
- localVarHeaderParameter['Content-Type'] = 'application/json';
2493
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2494
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2495
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2496
- localVarRequestOptions.data = serializeDataIfNeeded(createCounterfactualAddressRequest, localVarRequestOptions, configuration);
2497
- return {
2498
- url: toPathString(localVarUrlObj),
2499
- options: localVarRequestOptions,
2500
- };
2501
- },
2502
- /**
2503
- * Create a counterfactual address for a user based on their Ethereum address
2504
- * @summary Create a counterfactual address
2505
- * @param {CreateCounterfactualAddressRequestDeprecated} createCounterfactualAddressRequestDeprecated
2506
- * @param {*} [options] Override http request option.
2507
- * @throws {RequiredError}
2508
- */
2509
- createCounterfactualAddressDeprecated: async (createCounterfactualAddressRequestDeprecated, options = {}) => {
2510
- // verify required parameter 'createCounterfactualAddressRequestDeprecated' is not null or undefined
2511
- assertParamExists('createCounterfactualAddressDeprecated', 'createCounterfactualAddressRequestDeprecated', createCounterfactualAddressRequestDeprecated);
2512
- const localVarPath = `/passport-mr/v1/counterfactual-address`;
2513
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2514
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2515
- let baseOptions;
2516
- if (configuration) {
2517
- baseOptions = configuration.baseOptions;
2518
- }
2519
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2520
- const localVarHeaderParameter = {};
2521
- const localVarQueryParameter = {};
2522
- // authentication BearerAuth required
2523
- // http bearer authentication required
2524
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
2525
- localVarHeaderParameter['Content-Type'] = 'application/json';
2526
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2527
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2528
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2529
- localVarRequestOptions.data = serializeDataIfNeeded(createCounterfactualAddressRequestDeprecated, localVarRequestOptions, configuration);
2530
- return {
2531
- url: toPathString(localVarUrlObj),
2532
- options: localVarRequestOptions,
2533
- };
2534
- },
2535
- /**
2536
- * Get all the Ethereum linked addresses for a user based on its userId
2537
- * @summary Get Ethereum linked addresses for a user
2538
- * @param {string} userId The user\&#39;s userId
2539
- * @param {string} chainName
2540
- * @param {*} [options] Override http request option.
2541
- * @throws {RequiredError}
2542
- */
2543
- getLinkedAddresses: async (userId, chainName, options = {}) => {
2544
- // verify required parameter 'userId' is not null or undefined
2545
- assertParamExists('getLinkedAddresses', 'userId', userId);
2546
- // verify required parameter 'chainName' is not null or undefined
2547
- assertParamExists('getLinkedAddresses', 'chainName', chainName);
2548
- const localVarPath = `/v1/chains/{chain_name}/passport/users/{user_id}/linked-addresses`
2549
- .replace(`{${"user_id"}}`, encodeURIComponent(String(userId)))
2550
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2551
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2552
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2553
- let baseOptions;
2554
- if (configuration) {
2555
- baseOptions = configuration.baseOptions;
2556
- }
2557
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2558
- const localVarHeaderParameter = {};
2559
- const localVarQueryParameter = {};
2560
- // authentication BearerAuth required
2561
- // http bearer authentication required
2562
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
2563
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2564
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2565
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2566
- return {
2567
- url: toPathString(localVarUrlObj),
2568
- options: localVarRequestOptions,
2569
- };
2570
- },
2571
- /**
2572
- * Get all the Ethereum linked addresses for a user based on its userId
2573
- * @summary Get Ethereum linked addresses for a user
2574
- * @param {string} userId The user\&#39;s userId
2575
- * @param {*} [options] Override http request option.
2576
- * @throws {RequiredError}
2577
- */
2578
- getLinkedAddressesDeprecated: async (userId, options = {}) => {
2579
- // verify required parameter 'userId' is not null or undefined
2580
- assertParamExists('getLinkedAddressesDeprecated', 'userId', userId);
2581
- const localVarPath = `/passport-mr/v1/users/{userId}/linked-addresses`
2582
- .replace(`{${"userId"}}`, encodeURIComponent(String(userId)));
2583
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2584
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2585
- let baseOptions;
2586
- if (configuration) {
2587
- baseOptions = configuration.baseOptions;
2588
- }
2589
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2590
- const localVarHeaderParameter = {};
2591
- const localVarQueryParameter = {};
2592
- // authentication BearerAuth required
2593
- // http bearer authentication required
2594
- await setBearerAuthToObject(localVarHeaderParameter, configuration);
2595
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2596
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2597
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2598
- return {
2599
- url: toPathString(localVarUrlObj),
2600
- options: localVarRequestOptions,
2601
- };
2602
- },
2603
- };
2604
- };
2605
- /**
2606
- * PassportApi - functional programming interface
2607
- * @export
2608
- */
2609
- const PassportApiFp = function (configuration) {
2610
- const localVarAxiosParamCreator = PassportApiAxiosParamCreator(configuration);
2611
- return {
2612
- /**
2613
- * Create a counterfactual address for a user based on their Ethereum address
2614
- * @summary Create a counterfactual address
2615
- * @param {string} chainName
2616
- * @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
2617
- * @param {*} [options] Override http request option.
2618
- * @throws {RequiredError}
2619
- */
2620
- async createCounterfactualAddress(chainName, createCounterfactualAddressRequest, options) {
2621
- const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddress(chainName, createCounterfactualAddressRequest, options);
2622
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2623
- },
2624
- /**
2625
- * Create a counterfactual address for a user based on their Ethereum address
2626
- * @summary Create a counterfactual address
2627
- * @param {CreateCounterfactualAddressRequestDeprecated} createCounterfactualAddressRequestDeprecated
2628
- * @param {*} [options] Override http request option.
2629
- * @throws {RequiredError}
2630
- */
2631
- async createCounterfactualAddressDeprecated(createCounterfactualAddressRequestDeprecated, options) {
2632
- const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddressDeprecated(createCounterfactualAddressRequestDeprecated, options);
2633
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2634
- },
2635
- /**
2636
- * Get all the Ethereum linked addresses for a user based on its userId
2637
- * @summary Get Ethereum linked addresses for a user
2638
- * @param {string} userId The user\&#39;s userId
2639
- * @param {string} chainName
2640
- * @param {*} [options] Override http request option.
2641
- * @throws {RequiredError}
2642
- */
2643
- async getLinkedAddresses(userId, chainName, options) {
2644
- const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedAddresses(userId, chainName, options);
2645
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2646
- },
2647
- /**
2648
- * Get all the Ethereum linked addresses for a user based on its userId
2649
- * @summary Get Ethereum linked addresses for a user
2650
- * @param {string} userId The user\&#39;s userId
2651
- * @param {*} [options] Override http request option.
2652
- * @throws {RequiredError}
2653
- */
2654
- async getLinkedAddressesDeprecated(userId, options) {
2655
- const localVarAxiosArgs = await localVarAxiosParamCreator.getLinkedAddressesDeprecated(userId, options);
2656
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2657
- },
2658
- };
2659
- };
2660
- /**
2661
- * PassportApi - factory interface
2662
- * @export
2663
- */
2664
- const PassportApiFactory = function (configuration, basePath, axios) {
2665
- const localVarFp = PassportApiFp(configuration);
2666
- return {
2667
- /**
2668
- * Create a counterfactual address for a user based on their Ethereum address
2669
- * @summary Create a counterfactual address
2670
- * @param {PassportApiCreateCounterfactualAddressRequest} requestParameters Request parameters.
2671
- * @param {*} [options] Override http request option.
2672
- * @throws {RequiredError}
2673
- */
2674
- createCounterfactualAddress(requestParameters, options) {
2675
- return localVarFp.createCounterfactualAddress(requestParameters.chainName, requestParameters.createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
2676
- },
2677
- /**
2678
- * Create a counterfactual address for a user based on their Ethereum address
2679
- * @summary Create a counterfactual address
2680
- * @param {PassportApiCreateCounterfactualAddressDeprecatedRequest} requestParameters Request parameters.
2681
- * @param {*} [options] Override http request option.
2682
- * @throws {RequiredError}
2683
- */
2684
- createCounterfactualAddressDeprecated(requestParameters, options) {
2685
- return localVarFp.createCounterfactualAddressDeprecated(requestParameters.createCounterfactualAddressRequestDeprecated, options).then((request) => request(axios, basePath));
2686
- },
2687
- /**
2688
- * Get all the Ethereum linked addresses for a user based on its userId
2689
- * @summary Get Ethereum linked addresses for a user
2690
- * @param {PassportApiGetLinkedAddressesRequest} requestParameters Request parameters.
2691
- * @param {*} [options] Override http request option.
2692
- * @throws {RequiredError}
2693
- */
2694
- getLinkedAddresses(requestParameters, options) {
2695
- return localVarFp.getLinkedAddresses(requestParameters.userId, requestParameters.chainName, options).then((request) => request(axios, basePath));
2696
- },
2697
- /**
2698
- * Get all the Ethereum linked addresses for a user based on its userId
2699
- * @summary Get Ethereum linked addresses for a user
2700
- * @param {PassportApiGetLinkedAddressesDeprecatedRequest} requestParameters Request parameters.
2701
- * @param {*} [options] Override http request option.
2702
- * @throws {RequiredError}
2703
- */
2704
- getLinkedAddressesDeprecated(requestParameters, options) {
2705
- return localVarFp.getLinkedAddressesDeprecated(requestParameters.userId, options).then((request) => request(axios, basePath));
2706
- },
2707
- };
2708
- };
2709
- /**
2710
- * PassportApi - object-oriented interface
2711
- * @export
2712
- * @class PassportApi
2713
- * @extends {BaseAPI}
2714
- */
2715
- class PassportApi extends BaseAPI {
2716
- /**
2717
- * Create a counterfactual address for a user based on their Ethereum address
2718
- * @summary Create a counterfactual address
2719
- * @param {PassportApiCreateCounterfactualAddressRequest} requestParameters Request parameters.
2720
- * @param {*} [options] Override http request option.
2721
- * @throws {RequiredError}
2722
- * @memberof PassportApi
2723
- */
2724
- createCounterfactualAddress(requestParameters, options) {
2725
- return PassportApiFp(this.configuration).createCounterfactualAddress(requestParameters.chainName, requestParameters.createCounterfactualAddressRequest, options).then((request) => request(this.axios, this.basePath));
2726
- }
2727
- /**
2728
- * Create a counterfactual address for a user based on their Ethereum address
2729
- * @summary Create a counterfactual address
2730
- * @param {PassportApiCreateCounterfactualAddressDeprecatedRequest} requestParameters Request parameters.
2731
- * @param {*} [options] Override http request option.
2732
- * @throws {RequiredError}
2733
- * @memberof PassportApi
2734
- */
2735
- createCounterfactualAddressDeprecated(requestParameters, options) {
2736
- return PassportApiFp(this.configuration).createCounterfactualAddressDeprecated(requestParameters.createCounterfactualAddressRequestDeprecated, options).then((request) => request(this.axios, this.basePath));
2737
- }
2738
- /**
2739
- * Get all the Ethereum linked addresses for a user based on its userId
2740
- * @summary Get Ethereum linked addresses for a user
2741
- * @param {PassportApiGetLinkedAddressesRequest} requestParameters Request parameters.
2742
- * @param {*} [options] Override http request option.
2743
- * @throws {RequiredError}
2744
- * @memberof PassportApi
2745
- */
2746
- getLinkedAddresses(requestParameters, options) {
2747
- return PassportApiFp(this.configuration).getLinkedAddresses(requestParameters.userId, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
2748
- }
2749
- /**
2750
- * Get all the Ethereum linked addresses for a user based on its userId
2751
- * @summary Get Ethereum linked addresses for a user
2752
- * @param {PassportApiGetLinkedAddressesDeprecatedRequest} requestParameters Request parameters.
2753
- * @param {*} [options] Override http request option.
2754
- * @throws {RequiredError}
2755
- * @memberof PassportApi
2756
- */
2757
- getLinkedAddressesDeprecated(requestParameters, options) {
2758
- return PassportApiFp(this.configuration).getLinkedAddressesDeprecated(requestParameters.userId, options).then((request) => request(this.axios, this.basePath));
2759
- }
2760
- }
2761
-
2762
- /* tslint:disable */
2763
- /* eslint-disable */
2764
- /**
2765
- * Immutable zkEVM API
2766
- * Immutable Multi Rollup API
2767
- *
2768
- * The version of the OpenAPI document: 1.0.0
2769
- * Contact: support@immutable.com
2770
- *
2771
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2772
- * https://openapi-generator.tech
2773
- * Do not edit the class manually.
2774
- */
2775
- /**
2776
- * TokensApi - axios parameter creator
2777
- * @export
2778
- */
2779
- const TokensApiAxiosParamCreator = function (configuration) {
2780
- return {
2781
- /**
2782
- * Get single ERC20 token
2783
- * @summary Get single ERC20 token
2784
- * @param {string} contractAddress The address of contract
2785
- * @param {string} chainName The name of chain
2786
- * @param {*} [options] Override http request option.
2787
- * @throws {RequiredError}
2788
- */
2789
- getERC20Token: async (contractAddress, chainName, options = {}) => {
2790
- // verify required parameter 'contractAddress' is not null or undefined
2791
- assertParamExists('getERC20Token', 'contractAddress', contractAddress);
2792
- // verify required parameter 'chainName' is not null or undefined
2793
- assertParamExists('getERC20Token', 'chainName', chainName);
2794
- const localVarPath = `/v1/chains/{chain_name}/tokens/{contract_address}`
2795
- .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
2796
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2797
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2798
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2799
- let baseOptions;
2800
- if (configuration) {
2801
- baseOptions = configuration.baseOptions;
2802
- }
2803
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2804
- const localVarHeaderParameter = {};
2805
- const localVarQueryParameter = {};
2806
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2807
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2808
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2809
- return {
2810
- url: toPathString(localVarUrlObj),
2811
- options: localVarRequestOptions,
2812
- };
2813
- },
2814
- /**
2815
- * List ERC20 tokens
2816
- * @summary List ERC20 tokens
2817
- * @param {string} chainName The name of chain
2818
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
2819
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2820
- * @param {number} [pageSize] Maximum number of items to return
2821
- * @param {*} [options] Override http request option.
2822
- * @throws {RequiredError}
2823
- */
2824
- listERC20Tokens: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
2825
- // verify required parameter 'chainName' is not null or undefined
2826
- assertParamExists('listERC20Tokens', 'chainName', chainName);
2827
- const localVarPath = `/v1/chains/{chain_name}/tokens`
2828
- .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2829
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
2830
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2831
- let baseOptions;
2832
- if (configuration) {
2833
- baseOptions = configuration.baseOptions;
2834
- }
2835
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2836
- const localVarHeaderParameter = {};
2837
- const localVarQueryParameter = {};
2838
- if (fromUpdatedAt !== undefined) {
2839
- localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
2840
- fromUpdatedAt.toISOString() :
2841
- fromUpdatedAt;
2842
- }
2843
- if (pageCursor !== undefined) {
2844
- localVarQueryParameter['page_cursor'] = pageCursor;
2845
- }
2846
- if (pageSize !== undefined) {
2847
- localVarQueryParameter['page_size'] = pageSize;
2848
- }
2849
- setSearchParams(localVarUrlObj, localVarQueryParameter);
2850
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2851
- localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2852
- return {
2853
- url: toPathString(localVarUrlObj),
2854
- options: localVarRequestOptions,
2855
- };
2856
- },
2857
- };
2858
- };
2859
- /**
2860
- * TokensApi - functional programming interface
2861
- * @export
2862
- */
2863
- const TokensApiFp = function (configuration) {
2864
- const localVarAxiosParamCreator = TokensApiAxiosParamCreator(configuration);
2865
- return {
2866
- /**
2867
- * Get single ERC20 token
2868
- * @summary Get single ERC20 token
2869
- * @param {string} contractAddress The address of contract
2870
- * @param {string} chainName The name of chain
2871
- * @param {*} [options] Override http request option.
2872
- * @throws {RequiredError}
2873
- */
2874
- async getERC20Token(contractAddress, chainName, options) {
2875
- const localVarAxiosArgs = await localVarAxiosParamCreator.getERC20Token(contractAddress, chainName, options);
2876
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2877
- },
2878
- /**
2879
- * List ERC20 tokens
2880
- * @summary List ERC20 tokens
2881
- * @param {string} chainName The name of chain
2882
- * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
2883
- * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2884
- * @param {number} [pageSize] Maximum number of items to return
2885
- * @param {*} [options] Override http request option.
2886
- * @throws {RequiredError}
2887
- */
2888
- async listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
2889
- const localVarAxiosArgs = await localVarAxiosParamCreator.listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options);
2890
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2891
- },
2892
- };
2893
- };
2894
- /**
2895
- * TokensApi - factory interface
2896
- * @export
2897
- */
2898
- const TokensApiFactory = function (configuration, basePath, axios) {
2899
- const localVarFp = TokensApiFp(configuration);
2900
- return {
2901
- /**
2902
- * Get single ERC20 token
2903
- * @summary Get single ERC20 token
2904
- * @param {TokensApiGetERC20TokenRequest} requestParameters Request parameters.
2905
- * @param {*} [options] Override http request option.
2906
- * @throws {RequiredError}
2907
- */
2908
- getERC20Token(requestParameters, options) {
2909
- return localVarFp.getERC20Token(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(axios, basePath));
2910
- },
2911
- /**
2912
- * List ERC20 tokens
2913
- * @summary List ERC20 tokens
2914
- * @param {TokensApiListERC20TokensRequest} requestParameters Request parameters.
2915
- * @param {*} [options] Override http request option.
2916
- * @throws {RequiredError}
2917
- */
2918
- listERC20Tokens(requestParameters, options) {
2919
- return localVarFp.listERC20Tokens(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
2920
- },
2921
- };
2922
- };
2923
- /**
2924
- * TokensApi - object-oriented interface
2925
- * @export
2926
- * @class TokensApi
2927
- * @extends {BaseAPI}
2928
- */
2929
- class TokensApi extends BaseAPI {
2930
- /**
2931
- * Get single ERC20 token
2932
- * @summary Get single ERC20 token
2933
- * @param {TokensApiGetERC20TokenRequest} requestParameters Request parameters.
2934
- * @param {*} [options] Override http request option.
2935
- * @throws {RequiredError}
2936
- * @memberof TokensApi
2937
- */
2938
- getERC20Token(requestParameters, options) {
2939
- return TokensApiFp(this.configuration).getERC20Token(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
2940
- }
2941
- /**
2942
- * List ERC20 tokens
2943
- * @summary List ERC20 tokens
2944
- * @param {TokensApiListERC20TokensRequest} requestParameters Request parameters.
2945
- * @param {*} [options] Override http request option.
2946
- * @throws {RequiredError}
2947
- * @memberof TokensApi
2948
- */
2949
- listERC20Tokens(requestParameters, options) {
2950
- return TokensApiFp(this.configuration).listERC20Tokens(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2951
- }
2952
- }
2953
-
2954
- /* tslint:disable */
2955
- /* eslint-disable */
2956
- /**
2957
- * Immutable zkEVM API
2958
- * Immutable Multi Rollup API
2959
- *
2960
- * The version of the OpenAPI document: 1.0.0
2961
- * Contact: support@immutable.com
2962
- *
2963
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2964
- * https://openapi-generator.tech
2965
- * Do not edit the class manually.
2966
- */
2967
- class Configuration {
2968
- /**
2969
- * parameter for apiKey security
2970
- * @param name security name
2971
- * @memberof Configuration
2972
- */
2973
- apiKey;
2974
- /**
2975
- * parameter for basic security
2976
- *
2977
- * @type {string}
2978
- * @memberof Configuration
2979
- */
2980
- username;
2981
- /**
2982
- * parameter for basic security
2983
- *
2984
- * @type {string}
2985
- * @memberof Configuration
2986
- */
2987
- password;
2988
- /**
2989
- * parameter for oauth2 security
2990
- * @param name security name
2991
- * @param scopes oauth2 scope
2992
- * @memberof Configuration
2993
- */
2994
- accessToken;
2995
- /**
2996
- * override base path
2997
- *
2998
- * @type {string}
2999
- * @memberof Configuration
3000
- */
3001
- basePath;
3002
- /**
3003
- * base options for axios calls
3004
- *
3005
- * @type {any}
3006
- * @memberof Configuration
3007
- */
3008
- baseOptions;
3009
- /**
3010
- * The FormData constructor that will be used to create multipart form data
3011
- * requests. You can inject this here so that execution environments that
3012
- * do not support the FormData class can still run the generated client.
3013
- *
3014
- * @type {new () => FormData}
3015
- */
3016
- formDataCtor;
3017
- constructor(param = {}) {
3018
- this.apiKey = param.apiKey;
3019
- this.username = param.username;
3020
- this.password = param.password;
3021
- this.accessToken = param.accessToken;
3022
- this.basePath = param.basePath;
3023
- this.baseOptions = param.baseOptions;
3024
- this.formDataCtor = param.formDataCtor;
3025
- }
3026
- /**
3027
- * Check if the given MIME is a JSON MIME.
3028
- * JSON MIME examples:
3029
- * application/json
3030
- * application/json; charset=UTF8
3031
- * APPLICATION/JSON
3032
- * application/vnd.company+json
3033
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
3034
- * @return True if the given MIME is JSON, false otherwise.
3035
- */
3036
- isJsonMime(mime) {
3037
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
3038
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
3039
- }
3040
- }
3041
-
3042
- /* tslint:disable */
3043
- /* eslint-disable */
3044
- /**
3045
- * Immutable zkEVM API
3046
- * Immutable Multi Rollup API
3047
- *
3048
- * The version of the OpenAPI document: 1.0.0
3049
- * Contact: support@immutable.com
3050
- *
3051
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3052
- * https://openapi-generator.tech
3053
- * Do not edit the class manually.
3054
- */
3055
- const ActiveOrderStatusNameEnum = {
3056
- Active: 'ACTIVE'
3057
- };
3058
-
3059
- /* tslint:disable */
3060
- /* eslint-disable */
3061
- /**
3062
- * Immutable zkEVM API
3063
- * Immutable Multi Rollup API
3064
- *
3065
- * The version of the OpenAPI document: 1.0.0
3066
- * Contact: support@immutable.com
3067
- *
3068
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3069
- * https://openapi-generator.tech
3070
- * Do not edit the class manually.
3071
- */
3072
- /**
3073
- * The activity type
3074
- * @export
3075
- * @enum {string}
3076
- */
3077
- const ActivityType = {
3078
- Mint: 'mint',
3079
- Burn: 'burn',
3080
- Transfer: 'transfer',
3081
- Sale: 'sale',
3082
- Deposit: 'deposit',
3083
- Withdrawal: 'withdrawal'
3084
- };
3085
-
3086
- /* tslint:disable */
3087
- /* eslint-disable */
3088
- /**
3089
- * Immutable zkEVM API
3090
- * Immutable Multi Rollup API
3091
- *
3092
- * The version of the OpenAPI document: 1.0.0
3093
- * Contact: support@immutable.com
3094
- *
3095
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3096
- * https://openapi-generator.tech
3097
- * Do not edit the class manually.
3098
- */
3099
- const CancelledOrderStatusNameEnum = {
3100
- Cancelled: 'CANCELLED'
3101
- };
3102
- const CancelledOrderStatusCancellationTypeEnum = {
3103
- OnChain: 'ON_CHAIN',
3104
- OffChain: 'OFF_CHAIN'
3105
- };
3106
-
3107
- /* tslint:disable */
3108
- /* eslint-disable */
3109
- /**
3110
- * Immutable zkEVM API
3111
- * Immutable Multi Rollup API
3112
- *
3113
- * The version of the OpenAPI document: 1.0.0
3114
- * Contact: support@immutable.com
3115
- *
3116
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3117
- * https://openapi-generator.tech
3118
- * Do not edit the class manually.
3119
- */
3120
- /**
3121
- * The collection contract type
3122
- * @export
3123
- * @enum {string}
3124
- */
3125
- const CollectionContractType = {
3126
- Erc721: 'ERC721'
3127
- };
3128
-
3129
- /* tslint:disable */
3130
- /* eslint-disable */
3131
- /**
3132
- * Immutable zkEVM API
3133
- * Immutable Multi Rollup API
3134
- *
3135
- * The version of the OpenAPI document: 1.0.0
3136
- * Contact: support@immutable.com
3137
- *
3138
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3139
- * https://openapi-generator.tech
3140
- * Do not edit the class manually.
3141
- */
3142
- const ERC20ItemItemTypeEnum = {
3143
- Erc20: 'ERC20'
3144
- };
3145
-
3146
- /* tslint:disable */
3147
- /* eslint-disable */
3148
- /**
3149
- * Immutable zkEVM API
3150
- * Immutable Multi Rollup API
3151
- *
3152
- * The version of the OpenAPI document: 1.0.0
3153
- * Contact: support@immutable.com
3154
- *
3155
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3156
- * https://openapi-generator.tech
3157
- * Do not edit the class manually.
3158
- */
3159
- const ERC721ItemItemTypeEnum = {
3160
- Erc721: 'ERC721'
3161
- };
3162
-
3163
- /* tslint:disable */
3164
- /* eslint-disable */
3165
- /**
3166
- * Immutable zkEVM API
3167
- * Immutable Multi Rollup API
3168
- *
3169
- * The version of the OpenAPI document: 1.0.0
3170
- * Contact: support@immutable.com
3171
- *
3172
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3173
- * https://openapi-generator.tech
3174
- * Do not edit the class manually.
3175
- */
3176
- const ExpiredOrderStatusNameEnum = {
3177
- Expired: 'EXPIRED'
3178
- };
3179
-
3180
- /* tslint:disable */
3181
- /* eslint-disable */
3182
- /**
3183
- * Immutable zkEVM API
3184
- * Immutable Multi Rollup API
3185
- *
3186
- * The version of the OpenAPI document: 1.0.0
3187
- * Contact: support@immutable.com
3188
- *
3189
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3190
- * https://openapi-generator.tech
3191
- * Do not edit the class manually.
3192
- */
3193
- const FailedOrderCancellationReasonCodeEnum = {
3194
- AlreadyFilled: 'ALREADY_FILLED'
3195
- };
3196
-
3197
- /* tslint:disable */
3198
- /* eslint-disable */
3199
- /**
3200
- * Immutable zkEVM API
3201
- * Immutable Multi Rollup API
3202
- *
3203
- * The version of the OpenAPI document: 1.0.0
3204
- * Contact: support@immutable.com
3205
- *
3206
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3207
- * https://openapi-generator.tech
3208
- * Do not edit the class manually.
3209
- */
3210
- const FeeFeeTypeEnum = {
3211
- Royalty: 'ROYALTY',
3212
- MakerEcosystem: 'MAKER_ECOSYSTEM',
3213
- TakerEcosystem: 'TAKER_ECOSYSTEM',
3214
- Protocol: 'PROTOCOL'
3215
- };
3216
-
3217
- /* tslint:disable */
3218
- /* eslint-disable */
3219
- /**
3220
- * Immutable zkEVM API
3221
- * Immutable Multi Rollup API
3222
- *
3223
- * The version of the OpenAPI document: 1.0.0
3224
- * Contact: support@immutable.com
3225
- *
3226
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3227
- * https://openapi-generator.tech
3228
- * Do not edit the class manually.
3229
- */
3230
- const FilledOrderStatusNameEnum = {
3231
- Filled: 'FILLED'
3232
- };
3233
-
3234
- /* tslint:disable */
3235
- /* eslint-disable */
3236
- /**
3237
- * Immutable zkEVM API
3238
- * Immutable Multi Rollup API
3239
- *
3240
- * The version of the OpenAPI document: 1.0.0
3241
- * Contact: support@immutable.com
3242
- *
3243
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3244
- * https://openapi-generator.tech
3245
- * Do not edit the class manually.
3246
- */
3247
- const InactiveOrderStatusNameEnum = {
3248
- Inactive: 'INACTIVE'
3249
- };
3250
-
3251
- /* tslint:disable */
3252
- /* eslint-disable */
3253
- /**
3254
- * Immutable zkEVM API
3255
- * Immutable Multi Rollup API
3256
- *
3257
- * The version of the OpenAPI document: 1.0.0
3258
- * Contact: support@immutable.com
3259
- *
3260
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3261
- * https://openapi-generator.tech
3262
- * Do not edit the class manually.
3263
- */
3264
- /**
3265
- * The contract type for an NFT
3266
- * @export
3267
- * @enum {string}
3268
- */
3269
- const NFTContractType = {
3270
- Erc721: 'ERC721'
3271
- };
3272
-
3273
- /* tslint:disable */
3274
- /* eslint-disable */
3275
- /**
3276
- * Immutable zkEVM API
3277
- * Immutable Multi Rollup API
3278
- *
3279
- * The version of the OpenAPI document: 1.0.0
3280
- * Contact: support@immutable.com
3281
- *
3282
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3283
- * https://openapi-generator.tech
3284
- * Do not edit the class manually.
3285
- */
3286
- const NativeItemItemTypeEnum = {
3287
- Native: 'NATIVE'
3288
- };
3289
-
3290
- /* tslint:disable */
3291
- /* eslint-disable */
3292
- /**
3293
- * Immutable zkEVM API
3294
- * Immutable Multi Rollup API
3295
- *
3296
- * The version of the OpenAPI document: 1.0.0
3297
- * Contact: support@immutable.com
3298
- *
3299
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3300
- * https://openapi-generator.tech
3301
- * Do not edit the class manually.
3302
- */
3303
- /**
3304
- * The Order status
3305
- * @export
3306
- * @enum {string}
3307
- */
3308
- const OrderStatusName = {
3309
- Pending: 'PENDING',
3310
- Active: 'ACTIVE',
3311
- Inactive: 'INACTIVE',
3312
- Filled: 'FILLED',
3313
- Expired: 'EXPIRED',
3314
- Cancelled: 'CANCELLED'
3315
- };
3316
-
3317
- /* tslint:disable */
3318
- /* eslint-disable */
3319
- /**
3320
- * Immutable zkEVM API
3321
- * Immutable Multi Rollup API
3322
- *
3323
- * The version of the OpenAPI document: 1.0.0
3324
- * Contact: support@immutable.com
3325
- *
3326
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3327
- * https://openapi-generator.tech
3328
- * Do not edit the class manually.
3329
- */
3330
- const PendingOrderStatusNameEnum = {
3331
- Pending: 'PENDING'
3332
- };
3333
-
3334
- /* tslint:disable */
3335
- /* eslint-disable */
3336
- /**
3337
- * Immutable zkEVM API
3338
- * Immutable Multi Rollup API
3339
- *
3340
- * The version of the OpenAPI document: 1.0.0
3341
- * Contact: support@immutable.com
3342
- *
3343
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3344
- * https://openapi-generator.tech
3345
- * Do not edit the class manually.
3346
- */
3347
- const ProtocolDataOrderTypeEnum = {
3348
- FullRestricted: 'FULL_RESTRICTED'
3349
- };
3350
-
3351
- /* tslint:disable */
3352
- /* eslint-disable */
3353
- /**
3354
- * Immutable zkEVM API
3355
- * Immutable Multi Rollup API
3356
- *
3357
- * The version of the OpenAPI document: 1.0.0
3358
- * Contact: support@immutable.com
3359
- *
3360
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3361
- * https://openapi-generator.tech
3362
- * Do not edit the class manually.
3363
- */
3364
- const SaleFeeTypeEnum = {
3365
- Royalty: 'ROYALTY'
3366
- };
3367
-
3368
- /* tslint:disable */
3369
- /* eslint-disable */
3370
- /**
3371
- * Immutable zkEVM API
3372
- * Immutable Multi Rollup API
3373
- *
3374
- * The version of the OpenAPI document: 1.0.0
3375
- * Contact: support@immutable.com
3376
- *
3377
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3378
- * https://openapi-generator.tech
3379
- * Do not edit the class manually.
3380
- */
3381
- /**
3382
- * The contract type for a token
3383
- * @export
3384
- * @enum {string}
3385
- */
3386
- const TokenContractType = {
3387
- Erc20: 'ERC20'
3388
- };
3389
-
3390
- /* tslint:disable */
3391
- /* eslint-disable */
3392
- /**
3393
- * Immutable zkEVM API
3394
- * Immutable Multi Rollup API
3395
- *
3396
- * The version of the OpenAPI document: 1.0.0
3397
- * Contact: support@immutable.com
3398
- *
3399
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3400
- * https://openapi-generator.tech
3401
- * Do not edit the class manually.
3402
- */
3403
-
3404
- var index = /*#__PURE__*/Object.freeze({
3405
- __proto__: null,
3406
- ActiveOrderStatusNameEnum: ActiveOrderStatusNameEnum,
3407
- ActivitiesApi: ActivitiesApi,
3408
- ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
3409
- ActivitiesApiFactory: ActivitiesApiFactory,
3410
- ActivitiesApiFp: ActivitiesApiFp,
3411
- ActivityType: ActivityType,
3412
- CancelledOrderStatusCancellationTypeEnum: CancelledOrderStatusCancellationTypeEnum,
3413
- CancelledOrderStatusNameEnum: CancelledOrderStatusNameEnum,
3414
- ChainsApi: ChainsApi,
3415
- ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
3416
- ChainsApiFactory: ChainsApiFactory,
3417
- ChainsApiFp: ChainsApiFp,
3418
- CollectionContractType: CollectionContractType,
3419
- CollectionsApi: CollectionsApi,
3420
- CollectionsApiAxiosParamCreator: CollectionsApiAxiosParamCreator,
3421
- CollectionsApiFactory: CollectionsApiFactory,
3422
- CollectionsApiFp: CollectionsApiFp,
3423
- Configuration: Configuration,
3424
- ERC20ItemItemTypeEnum: ERC20ItemItemTypeEnum,
3425
- ERC721ItemItemTypeEnum: ERC721ItemItemTypeEnum,
3426
- ExpiredOrderStatusNameEnum: ExpiredOrderStatusNameEnum,
3427
- FailedOrderCancellationReasonCodeEnum: FailedOrderCancellationReasonCodeEnum,
3428
- FeeFeeTypeEnum: FeeFeeTypeEnum,
3429
- FilledOrderStatusNameEnum: FilledOrderStatusNameEnum,
3430
- InactiveOrderStatusNameEnum: InactiveOrderStatusNameEnum,
3431
- ListListingsSortByEnum: ListListingsSortByEnum$1,
3432
- ListListingsSortDirectionEnum: ListListingsSortDirectionEnum$1,
3433
- ListTradesSortByEnum: ListTradesSortByEnum$1,
3434
- ListTradesSortDirectionEnum: ListTradesSortDirectionEnum$1,
3435
- MetadataApi: MetadataApi,
3436
- MetadataApiAxiosParamCreator: MetadataApiAxiosParamCreator,
3437
- MetadataApiFactory: MetadataApiFactory,
3438
- MetadataApiFp: MetadataApiFp,
3439
- NFTContractType: NFTContractType,
3440
- NativeItemItemTypeEnum: NativeItemItemTypeEnum,
3441
- NftOwnersApi: NftOwnersApi,
3442
- NftOwnersApiAxiosParamCreator: NftOwnersApiAxiosParamCreator,
3443
- NftOwnersApiFactory: NftOwnersApiFactory,
3444
- NftOwnersApiFp: NftOwnersApiFp,
3445
- NftsApi: NftsApi,
3446
- NftsApiAxiosParamCreator: NftsApiAxiosParamCreator,
3447
- NftsApiFactory: NftsApiFactory,
3448
- NftsApiFp: NftsApiFp,
3449
- OrderStatusName: OrderStatusName,
3450
- OrdersApi: OrdersApi,
3451
- OrdersApiAxiosParamCreator: OrdersApiAxiosParamCreator,
3452
- OrdersApiFactory: OrdersApiFactory,
3453
- OrdersApiFp: OrdersApiFp,
3454
- PassportApi: PassportApi,
3455
- PassportApiAxiosParamCreator: PassportApiAxiosParamCreator,
3456
- PassportApiFactory: PassportApiFactory,
3457
- PassportApiFp: PassportApiFp,
3458
- PendingOrderStatusNameEnum: PendingOrderStatusNameEnum,
3459
- ProtocolDataOrderTypeEnum: ProtocolDataOrderTypeEnum,
3460
- SaleFeeTypeEnum: SaleFeeTypeEnum,
3461
- TokenContractType: TokenContractType,
3462
- TokensApi: TokensApi,
3463
- TokensApiAxiosParamCreator: TokensApiAxiosParamCreator,
3464
- TokensApiFactory: TokensApiFactory,
3465
- TokensApiFp: TokensApiFp
3466
- });
3467
-
3468
- /* tslint:disable */
3469
- /* eslint-disable */
3470
- /**
3471
- * Immutable zkEVM API
3472
- * Immutable Multi Rollup API
3473
- *
3474
- * The version of the OpenAPI document: 1.0.0
3475
- * Contact: support@immutable.com
3476
- *
3477
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3478
- * https://openapi-generator.tech
3479
- * Do not edit the class manually.
3480
- */
3481
- // @ts-ignore
3482
-
3483
- var activitiesApiTypes = /*#__PURE__*/Object.freeze({
3484
- __proto__: null,
3485
- ActivityType: ActivityType
3486
- });
3487
-
3488
- /* tslint:disable */
3489
- /* eslint-disable */
3490
- /**
3491
- * Immutable zkEVM API
3492
- * Immutable Multi Rollup API
3493
- *
3494
- * The version of the OpenAPI document: 1.0.0
3495
- * Contact: support@immutable.com
3496
- *
3497
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3498
- * https://openapi-generator.tech
3499
- * Do not edit the class manually.
3500
- */
3501
-
3502
- var chainsApiTypes = /*#__PURE__*/Object.freeze({
3503
- __proto__: null
3504
- });
3505
-
3506
- /* tslint:disable */
3507
- /* eslint-disable */
3508
- /**
3509
- * Immutable zkEVM API
3510
- * Immutable Multi Rollup API
3511
- *
3512
- * The version of the OpenAPI document: 1.0.0
3513
- * Contact: support@immutable.com
3514
- *
3515
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3516
- * https://openapi-generator.tech
3517
- * Do not edit the class manually.
3518
- */
3519
-
3520
- var collectionsApiTypes = /*#__PURE__*/Object.freeze({
3521
- __proto__: null
3522
- });
3523
-
3524
- /* tslint:disable */
3525
- /* eslint-disable */
3526
- /**
3527
- * Immutable zkEVM API
3528
- * Immutable Multi Rollup API
3529
- *
3530
- * The version of the OpenAPI document: 1.0.0
3531
- * Contact: support@immutable.com
3532
- *
3533
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3534
- * https://openapi-generator.tech
3535
- * Do not edit the class manually.
3536
- */
3537
-
3538
- var metadataApiTypes = /*#__PURE__*/Object.freeze({
3539
- __proto__: null
3540
- });
3541
-
3542
- /* tslint:disable */
3543
- /* eslint-disable */
3544
- /**
3545
- * Immutable zkEVM API
3546
- * Immutable Multi Rollup API
3547
- *
3548
- * The version of the OpenAPI document: 1.0.0
3549
- * Contact: support@immutable.com
3550
- *
3551
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3552
- * https://openapi-generator.tech
3553
- * Do not edit the class manually.
3554
- */
3555
-
3556
- var nftOwnersApiTypes = /*#__PURE__*/Object.freeze({
3557
- __proto__: null
3558
- });
3559
-
3560
- /* tslint:disable */
3561
- /* eslint-disable */
3562
- /**
3563
- * Immutable zkEVM API
3564
- * Immutable Multi Rollup API
3565
- *
3566
- * The version of the OpenAPI document: 1.0.0
3567
- * Contact: support@immutable.com
3568
- *
3569
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3570
- * https://openapi-generator.tech
3571
- * Do not edit the class manually.
3572
- */
3573
-
3574
- var nftsApiTypes = /*#__PURE__*/Object.freeze({
3575
- __proto__: null
3576
- });
3577
-
3578
- /* tslint:disable */
3579
- /* eslint-disable */
3580
- /**
3581
- * Immutable zkEVM API
3582
- * Immutable Multi Rollup API
3583
- *
3584
- * The version of the OpenAPI document: 1.0.0
3585
- * Contact: support@immutable.com
3586
- *
3587
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3588
- * https://openapi-generator.tech
3589
- * Do not edit the class manually.
3590
- */
3591
-
3592
- var tokensApiTypes = /*#__PURE__*/Object.freeze({
3593
- __proto__: null
3594
- });
3595
-
3596
- var Environment;
3597
- (function (Environment) {
3598
- Environment["PRODUCTION"] = "production";
3599
- Environment["SANDBOX"] = "sandbox";
3600
- })(Environment || (Environment = {}));
3601
-
3602
- /**
3603
- * Custom Error class that is returned from the API when a request fails
3604
- */
3605
- class APIError extends Error {
3606
- code;
3607
- details;
3608
- link;
3609
- traceId;
3610
- constructor({ message, code, details, link, trace_id: traceId, }) {
3611
- super(message);
3612
- this.code = code;
3613
- this.details = details;
3614
- this.link = link;
3615
- this.traceId = traceId;
3616
- }
3617
- }
3618
-
3619
- /* eslint-disable implicit-arrow-linebreak */
3620
- const defaultHeaders = {
3621
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.31.1',
3622
- };
3623
- /**
3624
- * createAPIConfiguration to create a custom Configuration
3625
- * other than the production and sandbox defined below.
3626
- */
3627
- const createAPIConfiguration = ({ baseConfig, basePath, headers: baseHeaders, }) => {
3628
- if (!basePath.trim()) {
3629
- throw Error('basePath can not be empty');
3630
- }
3631
- const headers = { ...(baseHeaders || {}), ...defaultHeaders };
3632
- const configParams = {
3633
- ...baseConfig,
3634
- basePath,
3635
- baseOptions: { headers },
3636
- };
3637
- return new index.Configuration(configParams);
3638
- };
3639
- class BlockchainDataConfiguration {
3640
- apiConfig;
3641
- baseConfig;
3642
- constructor({ baseConfig, overrides }) {
3643
- this.baseConfig = baseConfig;
3644
- if (overrides) {
3645
- this.apiConfig = createAPIConfiguration(overrides);
3646
- }
3647
- else {
3648
- switch (baseConfig.environment) {
3649
- case Environment.SANDBOX: {
3650
- this.apiConfig = createAPIConfiguration({
3651
- basePath: 'https://api.sandbox.immutable.com',
3652
- baseConfig,
3653
- });
3654
- break;
3655
- }
3656
- case Environment.PRODUCTION: {
3657
- this.apiConfig = createAPIConfiguration({
3658
- basePath: 'https://api.immutable.com',
3659
- baseConfig,
3660
- });
3661
- break;
3662
- }
3663
- default: {
3664
- this.apiConfig = createAPIConfiguration({
3665
- basePath: 'https://api.sandbox.immutable.com',
3666
- baseConfig,
3667
- });
3668
- }
3669
- }
3670
- }
3671
- }
3672
- }
3673
-
3674
- /* eslint-disable @typescript-eslint/naming-convention */
3675
- /**
3676
- * [Formats an error in the APIError shape](https://axios-http.com/docs/handling_errors)
3677
- * @param error - The Error object thrown by the request
3678
- * @returns APIError
3679
- */
3680
- function formatError(error) {
3681
- if (globalAxios.isAxiosError(error) && error.response) {
3682
- const apiError = error.response.data;
3683
- if (apiError.code && apiError.message) {
3684
- return new APIError({
3685
- code: apiError.code,
3686
- message: apiError.message,
3687
- details: apiError.details || null,
3688
- link: apiError.link || '',
3689
- trace_id: apiError.trace_id || '',
3690
- });
3691
- }
3692
- return new APIError({
3693
- code: error.code ?? error.response?.status.toString() ?? 'unknown_error_code',
3694
- message: String(error),
3695
- details: null,
3696
- link: '',
3697
- trace_id: '',
3698
- });
3699
- }
3700
- return new APIError({
3701
- code: 'unknown_error_code',
3702
- message: String(error),
3703
- details: null,
3704
- link: '',
3705
- trace_id: '',
3706
- });
3707
- }
3708
-
3709
- class BlockchainData {
3710
- config;
3711
- activities;
3712
- chains;
3713
- collections;
3714
- nfts;
3715
- nftOwners;
3716
- tokens;
3717
- metadata;
3718
- constructor(moduleConfig) {
3719
- this.config = new BlockchainDataConfiguration(moduleConfig);
3720
- this.activities = new index.ActivitiesApi(this.config.apiConfig);
3721
- this.chains = new index.ChainsApi(this.config.apiConfig);
3722
- this.collections = new index.CollectionsApi(this.config.apiConfig);
3723
- this.nfts = new index.NftsApi(this.config.apiConfig);
3724
- this.nftOwners = new index.NftOwnersApi(this.config.apiConfig);
3725
- this.tokens = new index.TokensApi(this.config.apiConfig);
3726
- this.metadata = new index.MetadataApi(this.config.apiConfig);
3727
- }
3728
- /**
3729
- * List all activities
3730
- * @param request - the request object containing the parameters to be provided in the API request
3731
- * @returns a promise that resolves with a list of activities
3732
- * @throws {@link index.APIError}
3733
- */
3734
- async listActivities(request) {
3735
- return await this.activities
3736
- .listActivities(request)
3737
- .then((res) => res.data)
3738
- .catch((err) => {
3739
- throw formatError(err);
3740
- });
3741
- }
3742
- /**
3743
- * Get a single activity by ID
3744
- * @param request - the request object containing the parameters to be provided in the API request
3745
- * @returns a promise that resolves with a single activity
3746
- * @throws {@link index.APIError}
3747
- */
3748
- async getActivity(request) {
3749
- return await this.activities
3750
- .getActivity(request)
3751
- .then((res) => res.data)
3752
- .catch((err) => {
3753
- throw formatError(err);
3754
- });
3755
- }
3756
- /**
3757
- * List supported chains
3758
- * @param request - the request object containing the parameters to be provided in the API request
3759
- * @returns a promise that resolves with a list of supported chains
3760
- * @throws {@link index.APIError}
3761
- */
3762
- async listChains(request) {
3763
- return await this.chains
3764
- .listChains(request)
3765
- .then((res) => res.data)
3766
- .catch((err) => {
3767
- throw formatError(err);
3768
- });
3769
- }
3770
- /**
3771
- * List all collections
3772
- * @param request - the request object containing the parameters to be provided in the API request
3773
- * @returns a promise that resolves with a list of collections
3774
- * @throws {@link index.APIError}
3775
- */
3776
- async listCollections(request) {
3777
- return await this.collections
3778
- .listCollections(request)
3779
- .then((res) => res.data)
3780
- .catch((err) => {
3781
- throw formatError(err);
3782
- });
3783
- }
3784
- /**
3785
- * List collections by NFT owner
3786
- * @param request - the request object containing the parameters to be provided in the API request
3787
- * @returns a promise that resolves with a list of collections
3788
- * @throws {@link index.APIError}
3789
- */
3790
- async listCollectionsByNFTOwner(request) {
3791
- return await this.collections
3792
- .listCollectionsByNFTOwner(request)
3793
- .then((res) => res.data)
3794
- .catch((err) => {
3795
- throw formatError(err);
3796
- });
3797
- }
3798
- /**
3799
- * Get collection by contract address
3800
- * @param request - the request object containing the parameters to be provided in the API request
3801
- * @returns a promise that resolves with a single collection
3802
- * @throws {@link index.APIError}
3803
- */
3804
- async getCollection(request) {
3805
- return await this.collections
3806
- .getCollection(request)
3807
- .then((res) => res.data)
3808
- .catch((err) => {
3809
- throw formatError(err);
3810
- });
3811
- }
3812
- /**
3813
- * Get NFT by token ID
3814
- * @param request - the request object containing the parameters to be provided in the API request
3815
- * @returns a promise that resolves with a single NFT
3816
- * @throws {@link index.APIError}
3817
- */
3818
- async getNFT(request) {
3819
- return await this.nfts
3820
- .getNFT(request)
3821
- .then((res) => res.data)
3822
- .catch((err) => {
3823
- throw formatError(err);
3824
- });
3825
- }
3826
- /**
3827
- * List NFTs by contract address
3828
- * @param request - the request object containing the parameters to be provided in the API request
3829
- * @returns a promise that resolves with a list of NFTs
3830
- * @throws {@link index.APIError}
3831
- */
3832
- async listNFTs(request) {
3833
- return await this.nfts
3834
- .listNFTs(request)
3835
- .then((res) => res.data)
3836
- .catch((err) => {
3837
- throw formatError(err);
3838
- });
3839
- }
3840
- /**
3841
- * List NFTs by account address
3842
- * @param request - the request object containing the parameters to be provided in the API request
3843
- * @returns a promise that resolves with a list of NFTs
3844
- * @throws {@link index.APIError}
3845
- */
3846
- async listNFTsByAccountAddress(request) {
3847
- return await this.nfts
3848
- .listNFTsByAccountAddress(request)
3849
- .then((res) => res.data)
3850
- .catch((err) => {
3851
- throw formatError(err);
3852
- });
3853
- }
3854
- /**
3855
- * List All NFTs on a chain
3856
- * @param request - the request object containing the parameters to be provided in the API request
3857
- * @returns a promise that resolves with a list of NFTs
3858
- * @throws {@link index.APIError}
3859
- */
3860
- async listAllNFTs(request) {
3861
- return await this.nfts
3862
- .listAllNFTs(request)
3863
- .then((res) => res.data)
3864
- .catch((err) => {
3865
- throw formatError(err);
3866
- });
3867
- }
3868
- /**
3869
- * List NFT owners by token ID
3870
- * @param request - the request object containing the parameters to be provided in the API request
3871
- * @returns a promise that resolves with a list of NFT owners
3872
- * @throws {@link index.APIError}
3873
- */
3874
- async listNFTOwners(request) {
3875
- return await this.nftOwners
3876
- .listNFTOwners(request)
3877
- .then((res) => res.data)
3878
- .catch((err) => {
3879
- throw formatError(err);
3880
- });
3881
- }
3882
- /**
3883
- * List NFT owners by contract address
3884
- * @param request - the request object containing the parameters to be provided in the API request
3885
- * @returns a promise that resolves with a list of NFT owners
3886
- * @throws {@link index.APIError}
3887
- */
3888
- async listNFTOwnersByContractAddress(request) {
3889
- return await this.nftOwners
3890
- .listOwnersByContractAddress(request)
3891
- .then((res) => res.data)
3892
- .catch((err) => {
3893
- throw formatError(err);
3894
- });
3895
- }
3896
- /**
3897
- * List All NFT owners on a chain
3898
- * @param request - the request object containing the parameters to be provided in the API request
3899
- * @returns a promise that resolves with a list of NFT owners
3900
- * @throws {@link index.APIError}
3901
- */
3902
- async listAllNFTOwners(request) {
3903
- return await this.nfts
3904
- .listAllNFTOwners(request)
3905
- .then((res) => res.data)
3906
- .catch((err) => {
3907
- throw formatError(err);
3908
- });
3909
- }
3910
- /**
3911
- * List ERC20 Token contracts
3912
- * @param request - the request object containing the parameters to be provided in the API request
3913
- * @returns a promise that resolves with a list of ERC20 Tokens
3914
- * @throws {@link index.APIError}
3915
- */
3916
- async listTokens(request) {
3917
- return await this.tokens
3918
- .listERC20Tokens(request)
3919
- .then((res) => res.data)
3920
- .catch((err) => {
3921
- throw formatError(err);
3922
- });
3923
- }
3924
- /**
3925
- * Get details for an ERC20 Token by contract address
3926
- * @param request - the request object containing the parameters to be provided in the API request
3927
- * @returns a promise that resolves with a list of ERC20 Tokens
3928
- * @throws {@link index.APIError}
3929
- */
3930
- async getToken(request) {
3931
- return await this.tokens
3932
- .getERC20Token(request)
3933
- .then((res) => res.data)
3934
- .catch((err) => {
3935
- throw formatError(err);
3936
- });
3937
- }
3938
- /**
3939
- * Get metadata by ID
3940
- * @param request - the request object containing the parameters to be provided in the API request
3941
- * @returns a promise that resolves with a single Metadata
3942
- * @throws {@link index.APIError}
3943
- */
3944
- async getMetadata(request) {
3945
- return await this.metadata
3946
- .getMetadata(request)
3947
- .then((res) => res.data)
3948
- .catch((err) => {
3949
- throw formatError(err);
3950
- });
3951
- }
3952
- /**
3953
- * List NFT Metadata by contract address
3954
- * @param request - the request object containing the parameters to be provided in the API request
3955
- * @returns a promise that resolves with a list of Metadata
3956
- * @throws {@link index.APIError}
3957
- */
3958
- async listNFTMetadataByContractAddress(request) {
3959
- return await this.metadata
3960
- .listMetadata(request)
3961
- .then((res) => res.data)
3962
- .catch((err) => {
3963
- throw formatError(err);
3964
- });
3965
- }
3966
- /**
3967
- * Refresh collection metadata
3968
- * @param request - the request object containing the parameters to be provided in the API request
3969
- * @returns a promise that resolves with the updated collection
3970
- * @throws {@link index.APIError}
3971
- */
3972
- async refreshCollectionMetadata(request) {
3973
- return await this.collections
3974
- .refreshCollectionMetadata(request)
3975
- .then((res) => res.data)
3976
- .catch((err) => {
3977
- throw formatError(err);
3978
- });
3979
- }
3980
- /**
3981
- * Refresh metadata for specific NFTs
3982
- * @param request - the request object containing the parameters to be provided in the API request
3983
- * @returns a promise that resolves with the remaining rate limits
3984
- * @throws {@link index.APIError}
3985
- */
3986
- async refreshNFTMetadata(request) {
3987
- return await this.metadata
3988
- .refreshNFTMetadataByTokenID(request)
3989
- .then((res) => res.data)
3990
- .catch((err) => {
3991
- throw formatError(err);
3992
- });
3993
- }
3994
- /**
3995
- * Refresh metadata by ID. This will refresh metadata for all NFTs that reference the given metadata ID.
3996
- * @param request - the request object containing the parameters to be provided in the API request
3997
- * @returns a promise that resolves with the remaining rate limits
3998
- * @throws {@link index.APIError}
3999
- */
4000
- async refreshStackedMetadata(request) {
4001
- return await this.metadata
4002
- .refreshMetadataByID(request)
4003
- .then((res) => res.data)
4004
- .catch((err) => {
4005
- throw formatError(err);
4006
- });
4007
- }
4008
- }
4009
-
4010
- export { APIError, activitiesApiTypes as ActivitiesTypes, BlockchainData, chainsApiTypes as ChainsTypes, collectionsApiTypes as CollectionsTypes, metadataApiTypes as MetadataTypes, nftOwnersApiTypes as NFTOwnersTypes, nftsApiTypes as NFTsTypes, tokensApiTypes as TokensTypes };