@imtbl/sdk 0.1.8-alpha.2 → 0.1.9-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain-data.d.ts +402 -110
- package/dist/blockchain-data.js +1699 -232
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +163 -68
- package/dist/checkout_sdk.js +570 -215
- package/dist/checkout_widgets.d.ts +63 -156
- package/dist/checkout_widgets.js +20 -80
- package/dist/erc20.d.ts +180 -11
- package/dist/erc20.js +22 -22
- package/dist/erc721-permissioned-mintable.d.ts +258 -84
- package/dist/erc721-permissioned-mintable.js +134 -114
- package/dist/immutablex_client.js +1 -1
- package/dist/index.cjs +6966 -1834
- package/dist/index.d.ts +712 -413
- package/dist/index.js +6988 -1855
- package/dist/orderbook.d.ts +16 -16
- package/dist/orderbook.js +221 -114
- package/dist/passport.d.ts +3 -4
- package/dist/passport.js +3681 -436
- package/package.json +6 -1
package/dist/blockchain-data.js
CHANGED
|
@@ -77,6 +77,18 @@ const assertParamExists = function (functionName, paramName, paramValue) {
|
|
|
77
77
|
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
*
|
|
82
|
+
* @export
|
|
83
|
+
*/
|
|
84
|
+
const setBearerAuthToObject = async function (object, configuration) {
|
|
85
|
+
if (configuration && configuration.accessToken) {
|
|
86
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
87
|
+
? await configuration.accessToken()
|
|
88
|
+
: await configuration.accessToken;
|
|
89
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
80
92
|
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
81
93
|
if (typeof parameter === "object") {
|
|
82
94
|
if (Array.isArray(parameter)) {
|
|
@@ -104,6 +116,19 @@ const setSearchParams = function (url, ...objects) {
|
|
|
104
116
|
setFlattenedQueryParams(searchParams, objects);
|
|
105
117
|
url.search = searchParams.toString();
|
|
106
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @export
|
|
122
|
+
*/
|
|
123
|
+
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
124
|
+
const nonString = typeof value !== 'string';
|
|
125
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
126
|
+
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
127
|
+
: nonString;
|
|
128
|
+
return needsSerialization
|
|
129
|
+
? JSON.stringify(value !== undefined ? value : {})
|
|
130
|
+
: (value || "");
|
|
131
|
+
};
|
|
107
132
|
/**
|
|
108
133
|
*
|
|
109
134
|
* @export
|
|
@@ -185,7 +210,7 @@ const ActivitiesApiAxiosParamCreator = function (configuration) {
|
|
|
185
210
|
* @param {string} [fromIndexedAt] From indexed at including given date
|
|
186
211
|
* @param {string} [toIndexedAt] To indexed at including given date
|
|
187
212
|
* @param {string} [transactionHash] The transaction hash of activity
|
|
188
|
-
* @param {string} [pageCursor]
|
|
213
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
189
214
|
* @param {number} [pageSize] Maximum number of items to return
|
|
190
215
|
* @param {*} [options] Override http request option.
|
|
191
216
|
* @throws {RequiredError}
|
|
@@ -275,7 +300,7 @@ const ActivitiesApiFp = function (configuration) {
|
|
|
275
300
|
* @param {string} [fromIndexedAt] From indexed at including given date
|
|
276
301
|
* @param {string} [toIndexedAt] To indexed at including given date
|
|
277
302
|
* @param {string} [transactionHash] The transaction hash of activity
|
|
278
|
-
* @param {string} [pageCursor]
|
|
303
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
279
304
|
* @param {number} [pageSize] Maximum number of items to return
|
|
280
305
|
* @param {*} [options] Override http request option.
|
|
281
306
|
* @throws {RequiredError}
|
|
@@ -286,6 +311,45 @@ const ActivitiesApiFp = function (configuration) {
|
|
|
286
311
|
},
|
|
287
312
|
};
|
|
288
313
|
};
|
|
314
|
+
/**
|
|
315
|
+
* ActivitiesApi - factory interface
|
|
316
|
+
* @export
|
|
317
|
+
*/
|
|
318
|
+
const ActivitiesApiFactory = function (configuration, basePath, axios) {
|
|
319
|
+
const localVarFp = ActivitiesApiFp(configuration);
|
|
320
|
+
return {
|
|
321
|
+
/**
|
|
322
|
+
* Get a single activity by ID
|
|
323
|
+
* @summary Get a single activity by ID
|
|
324
|
+
* @param {string} chainName The name of chain
|
|
325
|
+
* @param {string} activityId The id of activity
|
|
326
|
+
* @param {*} [options] Override http request option.
|
|
327
|
+
* @throws {RequiredError}
|
|
328
|
+
*/
|
|
329
|
+
getActivity(chainName, activityId, options) {
|
|
330
|
+
return localVarFp.getActivity(chainName, activityId, options).then((request) => request(axios, basePath));
|
|
331
|
+
},
|
|
332
|
+
/**
|
|
333
|
+
* List all activities
|
|
334
|
+
* @summary List all activities
|
|
335
|
+
* @param {string} chainName The name of chain
|
|
336
|
+
* @param {string} [contractAddress] The contract address of NFT or ERC20 Token
|
|
337
|
+
* @param {string} [tokenId] An `uint256` token id as string
|
|
338
|
+
* @param {string} [accountAddress] The account address activity contains
|
|
339
|
+
* @param {ActivityType} [activityType] The activity type
|
|
340
|
+
* @param {string} [fromIndexedAt] From indexed at including given date
|
|
341
|
+
* @param {string} [toIndexedAt] To indexed at including given date
|
|
342
|
+
* @param {string} [transactionHash] The transaction hash of activity
|
|
343
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
344
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
345
|
+
* @param {*} [options] Override http request option.
|
|
346
|
+
* @throws {RequiredError}
|
|
347
|
+
*/
|
|
348
|
+
listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options) {
|
|
349
|
+
return localVarFp.listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
350
|
+
},
|
|
351
|
+
};
|
|
352
|
+
};
|
|
289
353
|
/**
|
|
290
354
|
* ActivitiesApi - object-oriented interface
|
|
291
355
|
* @export
|
|
@@ -339,7 +403,7 @@ const ChainsApiAxiosParamCreator = function (configuration) {
|
|
|
339
403
|
/**
|
|
340
404
|
* List supported chains
|
|
341
405
|
* @summary List supported chains
|
|
342
|
-
* @param {string} [pageCursor]
|
|
406
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
343
407
|
* @param {number} [pageSize] Maximum number of items to return
|
|
344
408
|
* @param {*} [options] Override http request option.
|
|
345
409
|
* @throws {RequiredError}
|
|
@@ -381,7 +445,7 @@ const ChainsApiFp = function (configuration) {
|
|
|
381
445
|
/**
|
|
382
446
|
* List supported chains
|
|
383
447
|
* @summary List supported chains
|
|
384
|
-
* @param {string} [pageCursor]
|
|
448
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
385
449
|
* @param {number} [pageSize] Maximum number of items to return
|
|
386
450
|
* @param {*} [options] Override http request option.
|
|
387
451
|
* @throws {RequiredError}
|
|
@@ -392,6 +456,26 @@ const ChainsApiFp = function (configuration) {
|
|
|
392
456
|
},
|
|
393
457
|
};
|
|
394
458
|
};
|
|
459
|
+
/**
|
|
460
|
+
* ChainsApi - factory interface
|
|
461
|
+
* @export
|
|
462
|
+
*/
|
|
463
|
+
const ChainsApiFactory = function (configuration, basePath, axios) {
|
|
464
|
+
const localVarFp = ChainsApiFp(configuration);
|
|
465
|
+
return {
|
|
466
|
+
/**
|
|
467
|
+
* List supported chains
|
|
468
|
+
* @summary List supported chains
|
|
469
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
470
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
471
|
+
* @param {*} [options] Override http request option.
|
|
472
|
+
* @throws {RequiredError}
|
|
473
|
+
*/
|
|
474
|
+
listChains(pageCursor, pageSize, options) {
|
|
475
|
+
return localVarFp.listChains(pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
476
|
+
},
|
|
477
|
+
};
|
|
478
|
+
};
|
|
395
479
|
/**
|
|
396
480
|
* ChainsApi - object-oriented interface
|
|
397
481
|
* @export
|
|
@@ -468,7 +552,7 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
468
552
|
* List all collections
|
|
469
553
|
* @summary List all collections
|
|
470
554
|
* @param {string} chainName The name of chain
|
|
471
|
-
* @param {string} [pageCursor]
|
|
555
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
472
556
|
* @param {number} [pageSize] Maximum number of items to return
|
|
473
557
|
* @param {*} [options] Override http request option.
|
|
474
558
|
* @throws {RequiredError}
|
|
@@ -526,7 +610,7 @@ const CollectionsApiFp = function (configuration) {
|
|
|
526
610
|
* List all collections
|
|
527
611
|
* @summary List all collections
|
|
528
612
|
* @param {string} chainName The name of chain
|
|
529
|
-
* @param {string} [pageCursor]
|
|
613
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
530
614
|
* @param {number} [pageSize] Maximum number of items to return
|
|
531
615
|
* @param {*} [options] Override http request option.
|
|
532
616
|
* @throws {RequiredError}
|
|
@@ -537,6 +621,38 @@ const CollectionsApiFp = function (configuration) {
|
|
|
537
621
|
},
|
|
538
622
|
};
|
|
539
623
|
};
|
|
624
|
+
/**
|
|
625
|
+
* CollectionsApi - factory interface
|
|
626
|
+
* @export
|
|
627
|
+
*/
|
|
628
|
+
const CollectionsApiFactory = function (configuration, basePath, axios) {
|
|
629
|
+
const localVarFp = CollectionsApiFp(configuration);
|
|
630
|
+
return {
|
|
631
|
+
/**
|
|
632
|
+
* Get collection by contract address
|
|
633
|
+
* @summary Get collection by contract address
|
|
634
|
+
* @param {string} contractAddress The address contract
|
|
635
|
+
* @param {string} chainName The name of chain
|
|
636
|
+
* @param {*} [options] Override http request option.
|
|
637
|
+
* @throws {RequiredError}
|
|
638
|
+
*/
|
|
639
|
+
getCollection(contractAddress, chainName, options) {
|
|
640
|
+
return localVarFp.getCollection(contractAddress, chainName, options).then((request) => request(axios, basePath));
|
|
641
|
+
},
|
|
642
|
+
/**
|
|
643
|
+
* List all collections
|
|
644
|
+
* @summary List all collections
|
|
645
|
+
* @param {string} chainName The name of chain
|
|
646
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
647
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
648
|
+
* @param {*} [options] Override http request option.
|
|
649
|
+
* @throws {RequiredError}
|
|
650
|
+
*/
|
|
651
|
+
listCollections(chainName, pageCursor, pageSize, options) {
|
|
652
|
+
return localVarFp.listCollections(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
653
|
+
},
|
|
654
|
+
};
|
|
655
|
+
};
|
|
540
656
|
/**
|
|
541
657
|
* CollectionsApi - object-oriented interface
|
|
542
658
|
* @export
|
|
@@ -582,32 +698,25 @@ class CollectionsApi extends BaseAPI {
|
|
|
582
698
|
* Do not edit the class manually.
|
|
583
699
|
*/
|
|
584
700
|
/**
|
|
585
|
-
*
|
|
701
|
+
* ListingsApi - axios parameter creator
|
|
586
702
|
* @export
|
|
587
703
|
*/
|
|
588
|
-
const
|
|
704
|
+
const ListingsApiAxiosParamCreator = function (configuration) {
|
|
589
705
|
return {
|
|
590
706
|
/**
|
|
591
|
-
*
|
|
592
|
-
* @summary
|
|
593
|
-
* @param {string}
|
|
594
|
-
* @param {
|
|
595
|
-
* @param {string} chainName The name of chain
|
|
596
|
-
* @param {string} [pageCursor] Base64 encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
597
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
707
|
+
* Create a listing
|
|
708
|
+
* @summary Create a listing
|
|
709
|
+
* @param {string} chainName
|
|
710
|
+
* @param {CreateListingRequestBody} createListingRequestBody
|
|
598
711
|
* @param {*} [options] Override http request option.
|
|
599
712
|
* @throws {RequiredError}
|
|
600
713
|
*/
|
|
601
|
-
|
|
602
|
-
// verify required parameter 'contractAddress' is not null or undefined
|
|
603
|
-
assertParamExists('listNFTOwners', 'contractAddress', contractAddress);
|
|
604
|
-
// verify required parameter 'tokenId' is not null or undefined
|
|
605
|
-
assertParamExists('listNFTOwners', 'tokenId', tokenId);
|
|
714
|
+
createListing: async (chainName, createListingRequestBody, options = {}) => {
|
|
606
715
|
// verify required parameter 'chainName' is not null or undefined
|
|
607
|
-
assertParamExists('
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
716
|
+
assertParamExists('createListing', 'chainName', chainName);
|
|
717
|
+
// verify required parameter 'createListingRequestBody' is not null or undefined
|
|
718
|
+
assertParamExists('createListing', 'createListingRequestBody', createListingRequestBody);
|
|
719
|
+
const localVarPath = `/v1/chains/{chain_name}/listings`
|
|
611
720
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
612
721
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
613
722
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -615,15 +724,101 @@ const NftOwnersApiAxiosParamCreator = function (configuration) {
|
|
|
615
724
|
if (configuration) {
|
|
616
725
|
baseOptions = configuration.baseOptions;
|
|
617
726
|
}
|
|
727
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
728
|
+
const localVarHeaderParameter = {};
|
|
729
|
+
const localVarQueryParameter = {};
|
|
730
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
731
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
732
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
733
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
734
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createListingRequestBody, localVarRequestOptions, configuration);
|
|
735
|
+
return {
|
|
736
|
+
url: toPathString(localVarUrlObj),
|
|
737
|
+
options: localVarRequestOptions,
|
|
738
|
+
};
|
|
739
|
+
},
|
|
740
|
+
/**
|
|
741
|
+
* Get a single listing by ID
|
|
742
|
+
* @summary Get a single listing by ID
|
|
743
|
+
* @param {string} chainName
|
|
744
|
+
* @param {string} listingId Global Order identifier
|
|
745
|
+
* @param {*} [options] Override http request option.
|
|
746
|
+
* @throws {RequiredError}
|
|
747
|
+
*/
|
|
748
|
+
getListing: async (chainName, listingId, options = {}) => {
|
|
749
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
750
|
+
assertParamExists('getListing', 'chainName', chainName);
|
|
751
|
+
// verify required parameter 'listingId' is not null or undefined
|
|
752
|
+
assertParamExists('getListing', 'listingId', listingId);
|
|
753
|
+
const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
|
|
754
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
|
|
755
|
+
.replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
|
|
756
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
757
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
758
|
+
let baseOptions;
|
|
759
|
+
if (configuration) {
|
|
760
|
+
baseOptions = configuration.baseOptions;
|
|
761
|
+
}
|
|
618
762
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
619
763
|
const localVarHeaderParameter = {};
|
|
620
764
|
const localVarQueryParameter = {};
|
|
621
|
-
|
|
622
|
-
|
|
765
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
766
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
767
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
768
|
+
return {
|
|
769
|
+
url: toPathString(localVarUrlObj),
|
|
770
|
+
options: localVarRequestOptions,
|
|
771
|
+
};
|
|
772
|
+
},
|
|
773
|
+
/**
|
|
774
|
+
* List all listings
|
|
775
|
+
* @summary List all listings
|
|
776
|
+
* @param {string} chainName
|
|
777
|
+
* @param {OrderStatus} [status] Order status to filter by
|
|
778
|
+
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
779
|
+
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
780
|
+
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
781
|
+
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
782
|
+
* @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
|
|
783
|
+
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
784
|
+
* @param {*} [options] Override http request option.
|
|
785
|
+
* @throws {RequiredError}
|
|
786
|
+
*/
|
|
787
|
+
listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
|
|
788
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
789
|
+
assertParamExists('listListings', 'chainName', chainName);
|
|
790
|
+
const localVarPath = `/v1/chains/{chain_name}/listings`
|
|
791
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
792
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
793
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
794
|
+
let baseOptions;
|
|
795
|
+
if (configuration) {
|
|
796
|
+
baseOptions = configuration.baseOptions;
|
|
797
|
+
}
|
|
798
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
799
|
+
const localVarHeaderParameter = {};
|
|
800
|
+
const localVarQueryParameter = {};
|
|
801
|
+
if (status !== undefined) {
|
|
802
|
+
localVarQueryParameter['status'] = status;
|
|
803
|
+
}
|
|
804
|
+
if (sellItemContractAddress !== undefined) {
|
|
805
|
+
localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
|
|
806
|
+
}
|
|
807
|
+
if (sellItemTokenId !== undefined) {
|
|
808
|
+
localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
|
|
623
809
|
}
|
|
624
810
|
if (pageSize !== undefined) {
|
|
625
811
|
localVarQueryParameter['page_size'] = pageSize;
|
|
626
812
|
}
|
|
813
|
+
if (sortBy !== undefined) {
|
|
814
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
815
|
+
}
|
|
816
|
+
if (sortDirection !== undefined) {
|
|
817
|
+
localVarQueryParameter['sort_direction'] = sortDirection;
|
|
818
|
+
}
|
|
819
|
+
if (pageCursor !== undefined) {
|
|
820
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
821
|
+
}
|
|
627
822
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
628
823
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
629
824
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -635,46 +830,143 @@ const NftOwnersApiAxiosParamCreator = function (configuration) {
|
|
|
635
830
|
};
|
|
636
831
|
};
|
|
637
832
|
/**
|
|
638
|
-
*
|
|
833
|
+
* ListingsApi - functional programming interface
|
|
639
834
|
* @export
|
|
640
835
|
*/
|
|
641
|
-
const
|
|
642
|
-
const localVarAxiosParamCreator =
|
|
836
|
+
const ListingsApiFp = function (configuration) {
|
|
837
|
+
const localVarAxiosParamCreator = ListingsApiAxiosParamCreator(configuration);
|
|
643
838
|
return {
|
|
644
839
|
/**
|
|
645
|
-
*
|
|
646
|
-
* @summary
|
|
647
|
-
* @param {string}
|
|
648
|
-
* @param {
|
|
649
|
-
* @param {string} chainName The name of chain
|
|
650
|
-
* @param {string} [pageCursor] Base64 encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
651
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
840
|
+
* Create a listing
|
|
841
|
+
* @summary Create a listing
|
|
842
|
+
* @param {string} chainName
|
|
843
|
+
* @param {CreateListingRequestBody} createListingRequestBody
|
|
652
844
|
* @param {*} [options] Override http request option.
|
|
653
845
|
* @throws {RequiredError}
|
|
654
846
|
*/
|
|
655
|
-
async
|
|
656
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
847
|
+
async createListing(chainName, createListingRequestBody, options) {
|
|
848
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createListing(chainName, createListingRequestBody, options);
|
|
849
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
850
|
+
},
|
|
851
|
+
/**
|
|
852
|
+
* Get a single listing by ID
|
|
853
|
+
* @summary Get a single listing by ID
|
|
854
|
+
* @param {string} chainName
|
|
855
|
+
* @param {string} listingId Global Order identifier
|
|
856
|
+
* @param {*} [options] Override http request option.
|
|
857
|
+
* @throws {RequiredError}
|
|
858
|
+
*/
|
|
859
|
+
async getListing(chainName, listingId, options) {
|
|
860
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
|
|
861
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
862
|
+
},
|
|
863
|
+
/**
|
|
864
|
+
* List all listings
|
|
865
|
+
* @summary List all listings
|
|
866
|
+
* @param {string} chainName
|
|
867
|
+
* @param {OrderStatus} [status] Order status to filter by
|
|
868
|
+
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
869
|
+
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
870
|
+
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
871
|
+
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
872
|
+
* @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
|
|
873
|
+
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
874
|
+
* @param {*} [options] Override http request option.
|
|
875
|
+
* @throws {RequiredError}
|
|
876
|
+
*/
|
|
877
|
+
async listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
|
|
878
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
|
|
657
879
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
658
880
|
},
|
|
659
881
|
};
|
|
660
882
|
};
|
|
661
883
|
/**
|
|
662
|
-
*
|
|
884
|
+
* ListingsApi - factory interface
|
|
663
885
|
* @export
|
|
664
|
-
|
|
886
|
+
*/
|
|
887
|
+
const ListingsApiFactory = function (configuration, basePath, axios) {
|
|
888
|
+
const localVarFp = ListingsApiFp(configuration);
|
|
889
|
+
return {
|
|
890
|
+
/**
|
|
891
|
+
* Create a listing
|
|
892
|
+
* @summary Create a listing
|
|
893
|
+
* @param {string} chainName
|
|
894
|
+
* @param {CreateListingRequestBody} createListingRequestBody
|
|
895
|
+
* @param {*} [options] Override http request option.
|
|
896
|
+
* @throws {RequiredError}
|
|
897
|
+
*/
|
|
898
|
+
createListing(chainName, createListingRequestBody, options) {
|
|
899
|
+
return localVarFp.createListing(chainName, createListingRequestBody, options).then((request) => request(axios, basePath));
|
|
900
|
+
},
|
|
901
|
+
/**
|
|
902
|
+
* Get a single listing by ID
|
|
903
|
+
* @summary Get a single listing by ID
|
|
904
|
+
* @param {string} chainName
|
|
905
|
+
* @param {string} listingId Global Order identifier
|
|
906
|
+
* @param {*} [options] Override http request option.
|
|
907
|
+
* @throws {RequiredError}
|
|
908
|
+
*/
|
|
909
|
+
getListing(chainName, listingId, options) {
|
|
910
|
+
return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
|
|
911
|
+
},
|
|
912
|
+
/**
|
|
913
|
+
* List all listings
|
|
914
|
+
* @summary List all listings
|
|
915
|
+
* @param {string} chainName
|
|
916
|
+
* @param {OrderStatus} [status] Order status to filter by
|
|
917
|
+
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
918
|
+
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
919
|
+
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
920
|
+
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
921
|
+
* @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
|
|
922
|
+
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
923
|
+
* @param {*} [options] Override http request option.
|
|
924
|
+
* @throws {RequiredError}
|
|
925
|
+
*/
|
|
926
|
+
listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
|
|
927
|
+
return localVarFp.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
|
|
928
|
+
},
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
/**
|
|
932
|
+
* ListingsApi - object-oriented interface
|
|
933
|
+
* @export
|
|
934
|
+
* @class ListingsApi
|
|
665
935
|
* @extends {BaseAPI}
|
|
666
936
|
*/
|
|
667
|
-
class
|
|
937
|
+
class ListingsApi extends BaseAPI {
|
|
668
938
|
/**
|
|
669
|
-
*
|
|
670
|
-
* @summary
|
|
671
|
-
* @param {
|
|
939
|
+
* Create a listing
|
|
940
|
+
* @summary Create a listing
|
|
941
|
+
* @param {ListingsApiCreateListingRequest} requestParameters Request parameters.
|
|
672
942
|
* @param {*} [options] Override http request option.
|
|
673
943
|
* @throws {RequiredError}
|
|
674
|
-
* @memberof
|
|
944
|
+
* @memberof ListingsApi
|
|
675
945
|
*/
|
|
676
|
-
|
|
677
|
-
return
|
|
946
|
+
createListing(requestParameters, options) {
|
|
947
|
+
return ListingsApiFp(this.configuration).createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Get a single listing by ID
|
|
951
|
+
* @summary Get a single listing by ID
|
|
952
|
+
* @param {ListingsApiGetListingRequest} requestParameters Request parameters.
|
|
953
|
+
* @param {*} [options] Override http request option.
|
|
954
|
+
* @throws {RequiredError}
|
|
955
|
+
* @memberof ListingsApi
|
|
956
|
+
*/
|
|
957
|
+
getListing(requestParameters, options) {
|
|
958
|
+
return ListingsApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* List all listings
|
|
962
|
+
* @summary List all listings
|
|
963
|
+
* @param {ListingsApiListListingsRequest} requestParameters Request parameters.
|
|
964
|
+
* @param {*} [options] Override http request option.
|
|
965
|
+
* @throws {RequiredError}
|
|
966
|
+
* @memberof ListingsApi
|
|
967
|
+
*/
|
|
968
|
+
listListings(requestParameters, options) {
|
|
969
|
+
return ListingsApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
|
|
678
970
|
}
|
|
679
971
|
}
|
|
680
972
|
|
|
@@ -692,28 +984,30 @@ class NftOwnersApi extends BaseAPI {
|
|
|
692
984
|
* Do not edit the class manually.
|
|
693
985
|
*/
|
|
694
986
|
/**
|
|
695
|
-
*
|
|
987
|
+
* NftOwnersApi - axios parameter creator
|
|
696
988
|
* @export
|
|
697
989
|
*/
|
|
698
|
-
const
|
|
990
|
+
const NftOwnersApiAxiosParamCreator = function (configuration) {
|
|
699
991
|
return {
|
|
700
992
|
/**
|
|
701
|
-
*
|
|
702
|
-
* @summary
|
|
703
|
-
* @param {string} contractAddress The address of
|
|
993
|
+
* List NFT owners by token ID
|
|
994
|
+
* @summary List NFT owners by token ID
|
|
995
|
+
* @param {string} contractAddress The address of contract
|
|
704
996
|
* @param {string} tokenId An `uint256` token id as string
|
|
705
997
|
* @param {string} chainName The name of chain
|
|
998
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
999
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
706
1000
|
* @param {*} [options] Override http request option.
|
|
707
1001
|
* @throws {RequiredError}
|
|
708
1002
|
*/
|
|
709
|
-
|
|
1003
|
+
listNFTOwners: async (contractAddress, tokenId, chainName, pageCursor, pageSize, options = {}) => {
|
|
710
1004
|
// verify required parameter 'contractAddress' is not null or undefined
|
|
711
|
-
assertParamExists('
|
|
1005
|
+
assertParamExists('listNFTOwners', 'contractAddress', contractAddress);
|
|
712
1006
|
// verify required parameter 'tokenId' is not null or undefined
|
|
713
|
-
assertParamExists('
|
|
1007
|
+
assertParamExists('listNFTOwners', 'tokenId', tokenId);
|
|
714
1008
|
// verify required parameter 'chainName' is not null or undefined
|
|
715
|
-
assertParamExists('
|
|
716
|
-
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}`
|
|
1009
|
+
assertParamExists('listNFTOwners', 'chainName', chainName);
|
|
1010
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}/owners`
|
|
717
1011
|
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
718
1012
|
.replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
|
|
719
1013
|
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
@@ -726,6 +1020,12 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
726
1020
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
727
1021
|
const localVarHeaderParameter = {};
|
|
728
1022
|
const localVarQueryParameter = {};
|
|
1023
|
+
if (pageCursor !== undefined) {
|
|
1024
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
1025
|
+
}
|
|
1026
|
+
if (pageSize !== undefined) {
|
|
1027
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
1028
|
+
}
|
|
729
1029
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
730
1030
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
731
1031
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -734,14 +1034,139 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
734
1034
|
options: localVarRequestOptions,
|
|
735
1035
|
};
|
|
736
1036
|
},
|
|
1037
|
+
};
|
|
1038
|
+
};
|
|
1039
|
+
/**
|
|
1040
|
+
* NftOwnersApi - functional programming interface
|
|
1041
|
+
* @export
|
|
1042
|
+
*/
|
|
1043
|
+
const NftOwnersApiFp = function (configuration) {
|
|
1044
|
+
const localVarAxiosParamCreator = NftOwnersApiAxiosParamCreator(configuration);
|
|
1045
|
+
return {
|
|
737
1046
|
/**
|
|
738
|
-
* List
|
|
739
|
-
* @summary List
|
|
740
|
-
* @param {string} contractAddress
|
|
741
|
-
* @param {string}
|
|
742
|
-
* @param {string}
|
|
743
|
-
* @param {
|
|
744
|
-
* @param {
|
|
1047
|
+
* List NFT owners by token ID
|
|
1048
|
+
* @summary List NFT owners by token ID
|
|
1049
|
+
* @param {string} contractAddress The address of contract
|
|
1050
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
1051
|
+
* @param {string} chainName The name of chain
|
|
1052
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1053
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1054
|
+
* @param {*} [options] Override http request option.
|
|
1055
|
+
* @throws {RequiredError}
|
|
1056
|
+
*/
|
|
1057
|
+
async listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
1058
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
|
|
1059
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1060
|
+
},
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
/**
|
|
1064
|
+
* NftOwnersApi - factory interface
|
|
1065
|
+
* @export
|
|
1066
|
+
*/
|
|
1067
|
+
const NftOwnersApiFactory = function (configuration, basePath, axios) {
|
|
1068
|
+
const localVarFp = NftOwnersApiFp(configuration);
|
|
1069
|
+
return {
|
|
1070
|
+
/**
|
|
1071
|
+
* List NFT owners by token ID
|
|
1072
|
+
* @summary List NFT owners by token ID
|
|
1073
|
+
* @param {string} contractAddress The address of contract
|
|
1074
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
1075
|
+
* @param {string} chainName The name of chain
|
|
1076
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1077
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1078
|
+
* @param {*} [options] Override http request option.
|
|
1079
|
+
* @throws {RequiredError}
|
|
1080
|
+
*/
|
|
1081
|
+
listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
1082
|
+
return localVarFp.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
1083
|
+
},
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
/**
|
|
1087
|
+
* NftOwnersApi - object-oriented interface
|
|
1088
|
+
* @export
|
|
1089
|
+
* @class NftOwnersApi
|
|
1090
|
+
* @extends {BaseAPI}
|
|
1091
|
+
*/
|
|
1092
|
+
class NftOwnersApi extends BaseAPI {
|
|
1093
|
+
/**
|
|
1094
|
+
* List NFT owners by token ID
|
|
1095
|
+
* @summary List NFT owners by token ID
|
|
1096
|
+
* @param {NftOwnersApiListNFTOwnersRequest} requestParameters Request parameters.
|
|
1097
|
+
* @param {*} [options] Override http request option.
|
|
1098
|
+
* @throws {RequiredError}
|
|
1099
|
+
* @memberof NftOwnersApi
|
|
1100
|
+
*/
|
|
1101
|
+
listNFTOwners(requestParameters, options) {
|
|
1102
|
+
return NftOwnersApiFp(this.configuration).listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/* tslint:disable */
|
|
1107
|
+
/* eslint-disable */
|
|
1108
|
+
/**
|
|
1109
|
+
* Immutable X API
|
|
1110
|
+
* Immutable Multi Rollup API
|
|
1111
|
+
*
|
|
1112
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1113
|
+
* Contact: support@immutable.com
|
|
1114
|
+
*
|
|
1115
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1116
|
+
* https://openapi-generator.tech
|
|
1117
|
+
* Do not edit the class manually.
|
|
1118
|
+
*/
|
|
1119
|
+
/**
|
|
1120
|
+
* NftsApi - axios parameter creator
|
|
1121
|
+
* @export
|
|
1122
|
+
*/
|
|
1123
|
+
const NftsApiAxiosParamCreator = function (configuration) {
|
|
1124
|
+
return {
|
|
1125
|
+
/**
|
|
1126
|
+
* Get NFT by token ID
|
|
1127
|
+
* @summary Get NFT by token ID
|
|
1128
|
+
* @param {string} contractAddress The address of NFT contract
|
|
1129
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
1130
|
+
* @param {string} chainName The name of chain
|
|
1131
|
+
* @param {*} [options] Override http request option.
|
|
1132
|
+
* @throws {RequiredError}
|
|
1133
|
+
*/
|
|
1134
|
+
getNFT: async (contractAddress, tokenId, chainName, options = {}) => {
|
|
1135
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
1136
|
+
assertParamExists('getNFT', 'contractAddress', contractAddress);
|
|
1137
|
+
// verify required parameter 'tokenId' is not null or undefined
|
|
1138
|
+
assertParamExists('getNFT', 'tokenId', tokenId);
|
|
1139
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
1140
|
+
assertParamExists('getNFT', 'chainName', chainName);
|
|
1141
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}`
|
|
1142
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
1143
|
+
.replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
|
|
1144
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1145
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1146
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1147
|
+
let baseOptions;
|
|
1148
|
+
if (configuration) {
|
|
1149
|
+
baseOptions = configuration.baseOptions;
|
|
1150
|
+
}
|
|
1151
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1152
|
+
const localVarHeaderParameter = {};
|
|
1153
|
+
const localVarQueryParameter = {};
|
|
1154
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1155
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1156
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1157
|
+
return {
|
|
1158
|
+
url: toPathString(localVarUrlObj),
|
|
1159
|
+
options: localVarRequestOptions,
|
|
1160
|
+
};
|
|
1161
|
+
},
|
|
1162
|
+
/**
|
|
1163
|
+
* List NFTs by contract address
|
|
1164
|
+
* @summary List NFTs by contract address
|
|
1165
|
+
* @param {string} contractAddress Contract address
|
|
1166
|
+
* @param {string} chainName The name of chain
|
|
1167
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1168
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1169
|
+
* @param {*} [options] Override http request option.
|
|
745
1170
|
* @throws {RequiredError}
|
|
746
1171
|
*/
|
|
747
1172
|
listNFTs: async (contractAddress, chainName, pageCursor, pageSize, options = {}) => {
|
|
@@ -781,7 +1206,7 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
781
1206
|
* @param {string} accountAddress Account address
|
|
782
1207
|
* @param {string} chainName The name of chain
|
|
783
1208
|
* @param {string} [contractAddress] The address of contract
|
|
784
|
-
* @param {string} [pageCursor]
|
|
1209
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
785
1210
|
* @param {number} [pageSize] Maximum number of items to return
|
|
786
1211
|
* @param {*} [options] Override http request option.
|
|
787
1212
|
* @throws {RequiredError}
|
|
@@ -823,97 +1248,1126 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
823
1248
|
};
|
|
824
1249
|
};
|
|
825
1250
|
/**
|
|
826
|
-
* NftsApi - functional programming interface
|
|
1251
|
+
* NftsApi - functional programming interface
|
|
1252
|
+
* @export
|
|
1253
|
+
*/
|
|
1254
|
+
const NftsApiFp = function (configuration) {
|
|
1255
|
+
const localVarAxiosParamCreator = NftsApiAxiosParamCreator(configuration);
|
|
1256
|
+
return {
|
|
1257
|
+
/**
|
|
1258
|
+
* Get NFT by token ID
|
|
1259
|
+
* @summary Get NFT by token ID
|
|
1260
|
+
* @param {string} contractAddress The address of NFT contract
|
|
1261
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
1262
|
+
* @param {string} chainName The name of chain
|
|
1263
|
+
* @param {*} [options] Override http request option.
|
|
1264
|
+
* @throws {RequiredError}
|
|
1265
|
+
*/
|
|
1266
|
+
async getNFT(contractAddress, tokenId, chainName, options) {
|
|
1267
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getNFT(contractAddress, tokenId, chainName, options);
|
|
1268
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1269
|
+
},
|
|
1270
|
+
/**
|
|
1271
|
+
* List NFTs by contract address
|
|
1272
|
+
* @summary List NFTs by contract address
|
|
1273
|
+
* @param {string} contractAddress Contract address
|
|
1274
|
+
* @param {string} chainName The name of chain
|
|
1275
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1276
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1277
|
+
* @param {*} [options] Override http request option.
|
|
1278
|
+
* @throws {RequiredError}
|
|
1279
|
+
*/
|
|
1280
|
+
async listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
|
|
1281
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, pageCursor, pageSize, options);
|
|
1282
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1283
|
+
},
|
|
1284
|
+
/**
|
|
1285
|
+
* List NFTs by account address
|
|
1286
|
+
* @summary List NFTs by account address
|
|
1287
|
+
* @param {string} accountAddress Account address
|
|
1288
|
+
* @param {string} chainName The name of chain
|
|
1289
|
+
* @param {string} [contractAddress] The address of contract
|
|
1290
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1291
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1292
|
+
* @param {*} [options] Override http request option.
|
|
1293
|
+
* @throws {RequiredError}
|
|
1294
|
+
*/
|
|
1295
|
+
async listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options) {
|
|
1296
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options);
|
|
1297
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1298
|
+
},
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
/**
|
|
1302
|
+
* NftsApi - factory interface
|
|
1303
|
+
* @export
|
|
1304
|
+
*/
|
|
1305
|
+
const NftsApiFactory = function (configuration, basePath, axios) {
|
|
1306
|
+
const localVarFp = NftsApiFp(configuration);
|
|
1307
|
+
return {
|
|
1308
|
+
/**
|
|
1309
|
+
* Get NFT by token ID
|
|
1310
|
+
* @summary Get NFT by token ID
|
|
1311
|
+
* @param {string} contractAddress The address of NFT contract
|
|
1312
|
+
* @param {string} tokenId An `uint256` token id as string
|
|
1313
|
+
* @param {string} chainName The name of chain
|
|
1314
|
+
* @param {*} [options] Override http request option.
|
|
1315
|
+
* @throws {RequiredError}
|
|
1316
|
+
*/
|
|
1317
|
+
getNFT(contractAddress, tokenId, chainName, options) {
|
|
1318
|
+
return localVarFp.getNFT(contractAddress, tokenId, chainName, options).then((request) => request(axios, basePath));
|
|
1319
|
+
},
|
|
1320
|
+
/**
|
|
1321
|
+
* List NFTs by contract address
|
|
1322
|
+
* @summary List NFTs by contract address
|
|
1323
|
+
* @param {string} contractAddress Contract address
|
|
1324
|
+
* @param {string} chainName The name of chain
|
|
1325
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1326
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1327
|
+
* @param {*} [options] Override http request option.
|
|
1328
|
+
* @throws {RequiredError}
|
|
1329
|
+
*/
|
|
1330
|
+
listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
|
|
1331
|
+
return localVarFp.listNFTs(contractAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
1332
|
+
},
|
|
1333
|
+
/**
|
|
1334
|
+
* List NFTs by account address
|
|
1335
|
+
* @summary List NFTs by account address
|
|
1336
|
+
* @param {string} accountAddress Account address
|
|
1337
|
+
* @param {string} chainName The name of chain
|
|
1338
|
+
* @param {string} [contractAddress] The address of contract
|
|
1339
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1340
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1341
|
+
* @param {*} [options] Override http request option.
|
|
1342
|
+
* @throws {RequiredError}
|
|
1343
|
+
*/
|
|
1344
|
+
listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options) {
|
|
1345
|
+
return localVarFp.listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
1346
|
+
},
|
|
1347
|
+
};
|
|
1348
|
+
};
|
|
1349
|
+
/**
|
|
1350
|
+
* NftsApi - object-oriented interface
|
|
1351
|
+
* @export
|
|
1352
|
+
* @class NftsApi
|
|
1353
|
+
* @extends {BaseAPI}
|
|
1354
|
+
*/
|
|
1355
|
+
class NftsApi extends BaseAPI {
|
|
1356
|
+
/**
|
|
1357
|
+
* Get NFT by token ID
|
|
1358
|
+
* @summary Get NFT by token ID
|
|
1359
|
+
* @param {NftsApiGetNFTRequest} requestParameters Request parameters.
|
|
1360
|
+
* @param {*} [options] Override http request option.
|
|
1361
|
+
* @throws {RequiredError}
|
|
1362
|
+
* @memberof NftsApi
|
|
1363
|
+
*/
|
|
1364
|
+
getNFT(requestParameters, options) {
|
|
1365
|
+
return NftsApiFp(this.configuration).getNFT(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* List NFTs by contract address
|
|
1369
|
+
* @summary List NFTs by contract address
|
|
1370
|
+
* @param {NftsApiListNFTsRequest} requestParameters Request parameters.
|
|
1371
|
+
* @param {*} [options] Override http request option.
|
|
1372
|
+
* @throws {RequiredError}
|
|
1373
|
+
* @memberof NftsApi
|
|
1374
|
+
*/
|
|
1375
|
+
listNFTs(requestParameters, options) {
|
|
1376
|
+
return NftsApiFp(this.configuration).listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* List NFTs by account address
|
|
1380
|
+
* @summary List NFTs by account address
|
|
1381
|
+
* @param {NftsApiListNFTsByAccountAddressRequest} requestParameters Request parameters.
|
|
1382
|
+
* @param {*} [options] Override http request option.
|
|
1383
|
+
* @throws {RequiredError}
|
|
1384
|
+
* @memberof NftsApi
|
|
1385
|
+
*/
|
|
1386
|
+
listNFTsByAccountAddress(requestParameters, options) {
|
|
1387
|
+
return NftsApiFp(this.configuration).listNFTsByAccountAddress(requestParameters.accountAddress, requestParameters.chainName, requestParameters.contractAddress, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
/* tslint:disable */
|
|
1392
|
+
/* eslint-disable */
|
|
1393
|
+
/**
|
|
1394
|
+
* Immutable X API
|
|
1395
|
+
* Immutable Multi Rollup API
|
|
1396
|
+
*
|
|
1397
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1398
|
+
* Contact: support@immutable.com
|
|
1399
|
+
*
|
|
1400
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1401
|
+
* https://openapi-generator.tech
|
|
1402
|
+
* Do not edit the class manually.
|
|
1403
|
+
*/
|
|
1404
|
+
/**
|
|
1405
|
+
* OrdersApi - axios parameter creator
|
|
1406
|
+
* @export
|
|
1407
|
+
*/
|
|
1408
|
+
const OrdersApiAxiosParamCreator = function (configuration) {
|
|
1409
|
+
return {
|
|
1410
|
+
/**
|
|
1411
|
+
* Create a listing
|
|
1412
|
+
* @summary Create a listing
|
|
1413
|
+
* @param {string} chainName
|
|
1414
|
+
* @param {CreateListingRequestBody} createListingRequestBody
|
|
1415
|
+
* @param {*} [options] Override http request option.
|
|
1416
|
+
* @throws {RequiredError}
|
|
1417
|
+
*/
|
|
1418
|
+
createListing: async (chainName, createListingRequestBody, options = {}) => {
|
|
1419
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
1420
|
+
assertParamExists('createListing', 'chainName', chainName);
|
|
1421
|
+
// verify required parameter 'createListingRequestBody' is not null or undefined
|
|
1422
|
+
assertParamExists('createListing', 'createListingRequestBody', createListingRequestBody);
|
|
1423
|
+
const localVarPath = `/v1/chains/{chain_name}/listings`
|
|
1424
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1425
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1426
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1427
|
+
let baseOptions;
|
|
1428
|
+
if (configuration) {
|
|
1429
|
+
baseOptions = configuration.baseOptions;
|
|
1430
|
+
}
|
|
1431
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1432
|
+
const localVarHeaderParameter = {};
|
|
1433
|
+
const localVarQueryParameter = {};
|
|
1434
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1435
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1436
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1437
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1438
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createListingRequestBody, localVarRequestOptions, configuration);
|
|
1439
|
+
return {
|
|
1440
|
+
url: toPathString(localVarUrlObj),
|
|
1441
|
+
options: localVarRequestOptions,
|
|
1442
|
+
};
|
|
1443
|
+
},
|
|
1444
|
+
/**
|
|
1445
|
+
* Get a single listing by ID
|
|
1446
|
+
* @summary Get a single listing by ID
|
|
1447
|
+
* @param {string} chainName
|
|
1448
|
+
* @param {string} listingId Global Order identifier
|
|
1449
|
+
* @param {*} [options] Override http request option.
|
|
1450
|
+
* @throws {RequiredError}
|
|
1451
|
+
*/
|
|
1452
|
+
getListing: async (chainName, listingId, options = {}) => {
|
|
1453
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
1454
|
+
assertParamExists('getListing', 'chainName', chainName);
|
|
1455
|
+
// verify required parameter 'listingId' is not null or undefined
|
|
1456
|
+
assertParamExists('getListing', 'listingId', listingId);
|
|
1457
|
+
const localVarPath = `/v1/chains/{chain_name}/listings/{listing_id}`
|
|
1458
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
|
|
1459
|
+
.replace(`{${"listing_id"}}`, encodeURIComponent(String(listingId)));
|
|
1460
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1461
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1462
|
+
let baseOptions;
|
|
1463
|
+
if (configuration) {
|
|
1464
|
+
baseOptions = configuration.baseOptions;
|
|
1465
|
+
}
|
|
1466
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1467
|
+
const localVarHeaderParameter = {};
|
|
1468
|
+
const localVarQueryParameter = {};
|
|
1469
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1470
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1471
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1472
|
+
return {
|
|
1473
|
+
url: toPathString(localVarUrlObj),
|
|
1474
|
+
options: localVarRequestOptions,
|
|
1475
|
+
};
|
|
1476
|
+
},
|
|
1477
|
+
/**
|
|
1478
|
+
* List all listings
|
|
1479
|
+
* @summary List all listings
|
|
1480
|
+
* @param {string} chainName
|
|
1481
|
+
* @param {OrderStatus} [status] Order status to filter by
|
|
1482
|
+
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1483
|
+
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1484
|
+
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1485
|
+
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
1486
|
+
* @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
|
|
1487
|
+
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1488
|
+
* @param {*} [options] Override http request option.
|
|
1489
|
+
* @throws {RequiredError}
|
|
1490
|
+
*/
|
|
1491
|
+
listListings: async (chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options = {}) => {
|
|
1492
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
1493
|
+
assertParamExists('listListings', 'chainName', chainName);
|
|
1494
|
+
const localVarPath = `/v1/chains/{chain_name}/listings`
|
|
1495
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1496
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1497
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1498
|
+
let baseOptions;
|
|
1499
|
+
if (configuration) {
|
|
1500
|
+
baseOptions = configuration.baseOptions;
|
|
1501
|
+
}
|
|
1502
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1503
|
+
const localVarHeaderParameter = {};
|
|
1504
|
+
const localVarQueryParameter = {};
|
|
1505
|
+
if (status !== undefined) {
|
|
1506
|
+
localVarQueryParameter['status'] = status;
|
|
1507
|
+
}
|
|
1508
|
+
if (sellItemContractAddress !== undefined) {
|
|
1509
|
+
localVarQueryParameter['sell_item_contract_address'] = sellItemContractAddress;
|
|
1510
|
+
}
|
|
1511
|
+
if (sellItemTokenId !== undefined) {
|
|
1512
|
+
localVarQueryParameter['sell_item_token_id'] = sellItemTokenId;
|
|
1513
|
+
}
|
|
1514
|
+
if (pageSize !== undefined) {
|
|
1515
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
1516
|
+
}
|
|
1517
|
+
if (sortBy !== undefined) {
|
|
1518
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
1519
|
+
}
|
|
1520
|
+
if (sortDirection !== undefined) {
|
|
1521
|
+
localVarQueryParameter['sort_direction'] = sortDirection;
|
|
1522
|
+
}
|
|
1523
|
+
if (pageCursor !== undefined) {
|
|
1524
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
1525
|
+
}
|
|
1526
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1527
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1528
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1529
|
+
return {
|
|
1530
|
+
url: toPathString(localVarUrlObj),
|
|
1531
|
+
options: localVarRequestOptions,
|
|
1532
|
+
};
|
|
1533
|
+
},
|
|
1534
|
+
};
|
|
1535
|
+
};
|
|
1536
|
+
/**
|
|
1537
|
+
* OrdersApi - functional programming interface
|
|
1538
|
+
* @export
|
|
1539
|
+
*/
|
|
1540
|
+
const OrdersApiFp = function (configuration) {
|
|
1541
|
+
const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
|
|
1542
|
+
return {
|
|
1543
|
+
/**
|
|
1544
|
+
* Create a listing
|
|
1545
|
+
* @summary Create a listing
|
|
1546
|
+
* @param {string} chainName
|
|
1547
|
+
* @param {CreateListingRequestBody} createListingRequestBody
|
|
1548
|
+
* @param {*} [options] Override http request option.
|
|
1549
|
+
* @throws {RequiredError}
|
|
1550
|
+
*/
|
|
1551
|
+
async createListing(chainName, createListingRequestBody, options) {
|
|
1552
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createListing(chainName, createListingRequestBody, options);
|
|
1553
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1554
|
+
},
|
|
1555
|
+
/**
|
|
1556
|
+
* Get a single listing by ID
|
|
1557
|
+
* @summary Get a single listing by ID
|
|
1558
|
+
* @param {string} chainName
|
|
1559
|
+
* @param {string} listingId Global Order identifier
|
|
1560
|
+
* @param {*} [options] Override http request option.
|
|
1561
|
+
* @throws {RequiredError}
|
|
1562
|
+
*/
|
|
1563
|
+
async getListing(chainName, listingId, options) {
|
|
1564
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getListing(chainName, listingId, options);
|
|
1565
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1566
|
+
},
|
|
1567
|
+
/**
|
|
1568
|
+
* List all listings
|
|
1569
|
+
* @summary List all listings
|
|
1570
|
+
* @param {string} chainName
|
|
1571
|
+
* @param {OrderStatus} [status] Order status to filter by
|
|
1572
|
+
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1573
|
+
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1574
|
+
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1575
|
+
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
1576
|
+
* @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
|
|
1577
|
+
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1578
|
+
* @param {*} [options] Override http request option.
|
|
1579
|
+
* @throws {RequiredError}
|
|
1580
|
+
*/
|
|
1581
|
+
async listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
|
|
1582
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options);
|
|
1583
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1584
|
+
},
|
|
1585
|
+
};
|
|
1586
|
+
};
|
|
1587
|
+
/**
|
|
1588
|
+
* OrdersApi - factory interface
|
|
1589
|
+
* @export
|
|
1590
|
+
*/
|
|
1591
|
+
const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
1592
|
+
const localVarFp = OrdersApiFp(configuration);
|
|
1593
|
+
return {
|
|
1594
|
+
/**
|
|
1595
|
+
* Create a listing
|
|
1596
|
+
* @summary Create a listing
|
|
1597
|
+
* @param {string} chainName
|
|
1598
|
+
* @param {CreateListingRequestBody} createListingRequestBody
|
|
1599
|
+
* @param {*} [options] Override http request option.
|
|
1600
|
+
* @throws {RequiredError}
|
|
1601
|
+
*/
|
|
1602
|
+
createListing(chainName, createListingRequestBody, options) {
|
|
1603
|
+
return localVarFp.createListing(chainName, createListingRequestBody, options).then((request) => request(axios, basePath));
|
|
1604
|
+
},
|
|
1605
|
+
/**
|
|
1606
|
+
* Get a single listing by ID
|
|
1607
|
+
* @summary Get a single listing by ID
|
|
1608
|
+
* @param {string} chainName
|
|
1609
|
+
* @param {string} listingId Global Order identifier
|
|
1610
|
+
* @param {*} [options] Override http request option.
|
|
1611
|
+
* @throws {RequiredError}
|
|
1612
|
+
*/
|
|
1613
|
+
getListing(chainName, listingId, options) {
|
|
1614
|
+
return localVarFp.getListing(chainName, listingId, options).then((request) => request(axios, basePath));
|
|
1615
|
+
},
|
|
1616
|
+
/**
|
|
1617
|
+
* List all listings
|
|
1618
|
+
* @summary List all listings
|
|
1619
|
+
* @param {string} chainName
|
|
1620
|
+
* @param {OrderStatus} [status] Order status to filter by
|
|
1621
|
+
* @param {string} [sellItemContractAddress] Sell item contract address to filter by
|
|
1622
|
+
* @param {string} [sellItemTokenId] Sell item token identifier to filter by
|
|
1623
|
+
* @param {number} [pageSize] Maximum number of orders to return per page
|
|
1624
|
+
* @param {'created_at' | 'updated_at' | 'buy_item_amount'} [sortBy] Order field to sort by
|
|
1625
|
+
* @param {'asc' | 'desc'} [sortDirection] Ascending or descending direction for sort
|
|
1626
|
+
* @param {string} [pageCursor] Page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1627
|
+
* @param {*} [options] Override http request option.
|
|
1628
|
+
* @throws {RequiredError}
|
|
1629
|
+
*/
|
|
1630
|
+
listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options) {
|
|
1631
|
+
return localVarFp.listListings(chainName, status, sellItemContractAddress, sellItemTokenId, pageSize, sortBy, sortDirection, pageCursor, options).then((request) => request(axios, basePath));
|
|
1632
|
+
},
|
|
1633
|
+
};
|
|
1634
|
+
};
|
|
1635
|
+
/**
|
|
1636
|
+
* OrdersApi - object-oriented interface
|
|
1637
|
+
* @export
|
|
1638
|
+
* @class OrdersApi
|
|
1639
|
+
* @extends {BaseAPI}
|
|
1640
|
+
*/
|
|
1641
|
+
class OrdersApi extends BaseAPI {
|
|
1642
|
+
/**
|
|
1643
|
+
* Create a listing
|
|
1644
|
+
* @summary Create a listing
|
|
1645
|
+
* @param {OrdersApiCreateListingRequest} requestParameters Request parameters.
|
|
1646
|
+
* @param {*} [options] Override http request option.
|
|
1647
|
+
* @throws {RequiredError}
|
|
1648
|
+
* @memberof OrdersApi
|
|
1649
|
+
*/
|
|
1650
|
+
createListing(requestParameters, options) {
|
|
1651
|
+
return OrdersApiFp(this.configuration).createListing(requestParameters.chainName, requestParameters.createListingRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Get a single listing by ID
|
|
1655
|
+
* @summary Get a single listing by ID
|
|
1656
|
+
* @param {OrdersApiGetListingRequest} requestParameters Request parameters.
|
|
1657
|
+
* @param {*} [options] Override http request option.
|
|
1658
|
+
* @throws {RequiredError}
|
|
1659
|
+
* @memberof OrdersApi
|
|
1660
|
+
*/
|
|
1661
|
+
getListing(requestParameters, options) {
|
|
1662
|
+
return OrdersApiFp(this.configuration).getListing(requestParameters.chainName, requestParameters.listingId, options).then((request) => request(this.axios, this.basePath));
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* List all listings
|
|
1666
|
+
* @summary List all listings
|
|
1667
|
+
* @param {OrdersApiListListingsRequest} requestParameters Request parameters.
|
|
1668
|
+
* @param {*} [options] Override http request option.
|
|
1669
|
+
* @throws {RequiredError}
|
|
1670
|
+
* @memberof OrdersApi
|
|
1671
|
+
*/
|
|
1672
|
+
listListings(requestParameters, options) {
|
|
1673
|
+
return OrdersApiFp(this.configuration).listListings(requestParameters.chainName, requestParameters.status, requestParameters.sellItemContractAddress, requestParameters.sellItemTokenId, requestParameters.pageSize, requestParameters.sortBy, requestParameters.sortDirection, requestParameters.pageCursor, options).then((request) => request(this.axios, this.basePath));
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/* tslint:disable */
|
|
1678
|
+
/* eslint-disable */
|
|
1679
|
+
/**
|
|
1680
|
+
* Immutable X API
|
|
1681
|
+
* Immutable Multi Rollup API
|
|
1682
|
+
*
|
|
1683
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1684
|
+
* Contact: support@immutable.com
|
|
1685
|
+
*
|
|
1686
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1687
|
+
* https://openapi-generator.tech
|
|
1688
|
+
* Do not edit the class manually.
|
|
1689
|
+
*/
|
|
1690
|
+
/**
|
|
1691
|
+
* PassportApi - axios parameter creator
|
|
1692
|
+
* @export
|
|
1693
|
+
*/
|
|
1694
|
+
const PassportApiAxiosParamCreator = function (configuration) {
|
|
1695
|
+
return {
|
|
1696
|
+
/**
|
|
1697
|
+
* Create a counterfactual address for a user based on their Ethereum address
|
|
1698
|
+
* @summary Create a counterfactual address
|
|
1699
|
+
* @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
|
|
1700
|
+
* @param {*} [options] Override http request option.
|
|
1701
|
+
* @throws {RequiredError}
|
|
1702
|
+
*/
|
|
1703
|
+
createCounterfactualAddress: async (createCounterfactualAddressRequest, options = {}) => {
|
|
1704
|
+
// verify required parameter 'createCounterfactualAddressRequest' is not null or undefined
|
|
1705
|
+
assertParamExists('createCounterfactualAddress', 'createCounterfactualAddressRequest', createCounterfactualAddressRequest);
|
|
1706
|
+
const localVarPath = `/v1/counterfactual-address`;
|
|
1707
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1708
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1709
|
+
let baseOptions;
|
|
1710
|
+
if (configuration) {
|
|
1711
|
+
baseOptions = configuration.baseOptions;
|
|
1712
|
+
}
|
|
1713
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1714
|
+
const localVarHeaderParameter = {};
|
|
1715
|
+
const localVarQueryParameter = {};
|
|
1716
|
+
// authentication BearerAuth required
|
|
1717
|
+
// http bearer authentication required
|
|
1718
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1719
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1720
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1721
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1722
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1723
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createCounterfactualAddressRequest, localVarRequestOptions, configuration);
|
|
1724
|
+
return {
|
|
1725
|
+
url: toPathString(localVarUrlObj),
|
|
1726
|
+
options: localVarRequestOptions,
|
|
1727
|
+
};
|
|
1728
|
+
},
|
|
1729
|
+
};
|
|
1730
|
+
};
|
|
1731
|
+
/**
|
|
1732
|
+
* PassportApi - functional programming interface
|
|
1733
|
+
* @export
|
|
1734
|
+
*/
|
|
1735
|
+
const PassportApiFp = function (configuration) {
|
|
1736
|
+
const localVarAxiosParamCreator = PassportApiAxiosParamCreator(configuration);
|
|
1737
|
+
return {
|
|
1738
|
+
/**
|
|
1739
|
+
* Create a counterfactual address for a user based on their Ethereum address
|
|
1740
|
+
* @summary Create a counterfactual address
|
|
1741
|
+
* @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
|
|
1742
|
+
* @param {*} [options] Override http request option.
|
|
1743
|
+
* @throws {RequiredError}
|
|
1744
|
+
*/
|
|
1745
|
+
async createCounterfactualAddress(createCounterfactualAddressRequest, options) {
|
|
1746
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCounterfactualAddress(createCounterfactualAddressRequest, options);
|
|
1747
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1748
|
+
},
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
/**
|
|
1752
|
+
* PassportApi - factory interface
|
|
1753
|
+
* @export
|
|
1754
|
+
*/
|
|
1755
|
+
const PassportApiFactory = function (configuration, basePath, axios) {
|
|
1756
|
+
const localVarFp = PassportApiFp(configuration);
|
|
1757
|
+
return {
|
|
1758
|
+
/**
|
|
1759
|
+
* Create a counterfactual address for a user based on their Ethereum address
|
|
1760
|
+
* @summary Create a counterfactual address
|
|
1761
|
+
* @param {CreateCounterfactualAddressRequest} createCounterfactualAddressRequest
|
|
1762
|
+
* @param {*} [options] Override http request option.
|
|
1763
|
+
* @throws {RequiredError}
|
|
1764
|
+
*/
|
|
1765
|
+
createCounterfactualAddress(createCounterfactualAddressRequest, options) {
|
|
1766
|
+
return localVarFp.createCounterfactualAddress(createCounterfactualAddressRequest, options).then((request) => request(axios, basePath));
|
|
1767
|
+
},
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
/**
|
|
1771
|
+
* PassportApi - object-oriented interface
|
|
1772
|
+
* @export
|
|
1773
|
+
* @class PassportApi
|
|
1774
|
+
* @extends {BaseAPI}
|
|
1775
|
+
*/
|
|
1776
|
+
class PassportApi extends BaseAPI {
|
|
1777
|
+
/**
|
|
1778
|
+
* Create a counterfactual address for a user based on their Ethereum address
|
|
1779
|
+
* @summary Create a counterfactual address
|
|
1780
|
+
* @param {PassportApiCreateCounterfactualAddressRequest} requestParameters Request parameters.
|
|
1781
|
+
* @param {*} [options] Override http request option.
|
|
1782
|
+
* @throws {RequiredError}
|
|
1783
|
+
* @memberof PassportApi
|
|
1784
|
+
*/
|
|
1785
|
+
createCounterfactualAddress(requestParameters, options) {
|
|
1786
|
+
return PassportApiFp(this.configuration).createCounterfactualAddress(requestParameters.createCounterfactualAddressRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/* tslint:disable */
|
|
1791
|
+
/* eslint-disable */
|
|
1792
|
+
/**
|
|
1793
|
+
* Immutable X API
|
|
1794
|
+
* Immutable Multi Rollup API
|
|
1795
|
+
*
|
|
1796
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1797
|
+
* Contact: support@immutable.com
|
|
1798
|
+
*
|
|
1799
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1800
|
+
* https://openapi-generator.tech
|
|
1801
|
+
* Do not edit the class manually.
|
|
1802
|
+
*/
|
|
1803
|
+
/**
|
|
1804
|
+
* TokensApi - axios parameter creator
|
|
1805
|
+
* @export
|
|
1806
|
+
*/
|
|
1807
|
+
const TokensApiAxiosParamCreator = function (configuration) {
|
|
1808
|
+
return {
|
|
1809
|
+
/**
|
|
1810
|
+
* Get single ERC20 token
|
|
1811
|
+
* @summary Get single ERC20 token
|
|
1812
|
+
* @param {string} contractAddress The address of contract
|
|
1813
|
+
* @param {string} chainName The name of chain
|
|
1814
|
+
* @param {*} [options] Override http request option.
|
|
1815
|
+
* @throws {RequiredError}
|
|
1816
|
+
*/
|
|
1817
|
+
getERC20Token: async (contractAddress, chainName, options = {}) => {
|
|
1818
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
1819
|
+
assertParamExists('getERC20Token', 'contractAddress', contractAddress);
|
|
1820
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
1821
|
+
assertParamExists('getERC20Token', 'chainName', chainName);
|
|
1822
|
+
const localVarPath = `/v1/chains/{chain_name}/tokens/{contract_address}`
|
|
1823
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
1824
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1825
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1826
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1827
|
+
let baseOptions;
|
|
1828
|
+
if (configuration) {
|
|
1829
|
+
baseOptions = configuration.baseOptions;
|
|
1830
|
+
}
|
|
1831
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1832
|
+
const localVarHeaderParameter = {};
|
|
1833
|
+
const localVarQueryParameter = {};
|
|
1834
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1835
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1836
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1837
|
+
return {
|
|
1838
|
+
url: toPathString(localVarUrlObj),
|
|
1839
|
+
options: localVarRequestOptions,
|
|
1840
|
+
};
|
|
1841
|
+
},
|
|
1842
|
+
/**
|
|
1843
|
+
* List ERC20 tokens
|
|
1844
|
+
* @summary List ERC20 tokens
|
|
1845
|
+
* @param {string} chainName The name of chain
|
|
1846
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1847
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1848
|
+
* @param {*} [options] Override http request option.
|
|
1849
|
+
* @throws {RequiredError}
|
|
1850
|
+
*/
|
|
1851
|
+
listERC20Tokens: async (chainName, pageCursor, pageSize, options = {}) => {
|
|
1852
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
1853
|
+
assertParamExists('listERC20Tokens', 'chainName', chainName);
|
|
1854
|
+
const localVarPath = `/v1/chains/{chain_name}/tokens`
|
|
1855
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
1856
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1857
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1858
|
+
let baseOptions;
|
|
1859
|
+
if (configuration) {
|
|
1860
|
+
baseOptions = configuration.baseOptions;
|
|
1861
|
+
}
|
|
1862
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1863
|
+
const localVarHeaderParameter = {};
|
|
1864
|
+
const localVarQueryParameter = {};
|
|
1865
|
+
if (pageCursor !== undefined) {
|
|
1866
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
1867
|
+
}
|
|
1868
|
+
if (pageSize !== undefined) {
|
|
1869
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
1870
|
+
}
|
|
1871
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1872
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1873
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1874
|
+
return {
|
|
1875
|
+
url: toPathString(localVarUrlObj),
|
|
1876
|
+
options: localVarRequestOptions,
|
|
1877
|
+
};
|
|
1878
|
+
},
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
/**
|
|
1882
|
+
* TokensApi - functional programming interface
|
|
1883
|
+
* @export
|
|
1884
|
+
*/
|
|
1885
|
+
const TokensApiFp = function (configuration) {
|
|
1886
|
+
const localVarAxiosParamCreator = TokensApiAxiosParamCreator(configuration);
|
|
1887
|
+
return {
|
|
1888
|
+
/**
|
|
1889
|
+
* Get single ERC20 token
|
|
1890
|
+
* @summary Get single ERC20 token
|
|
1891
|
+
* @param {string} contractAddress The address of contract
|
|
1892
|
+
* @param {string} chainName The name of chain
|
|
1893
|
+
* @param {*} [options] Override http request option.
|
|
1894
|
+
* @throws {RequiredError}
|
|
1895
|
+
*/
|
|
1896
|
+
async getERC20Token(contractAddress, chainName, options) {
|
|
1897
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getERC20Token(contractAddress, chainName, options);
|
|
1898
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1899
|
+
},
|
|
1900
|
+
/**
|
|
1901
|
+
* List ERC20 tokens
|
|
1902
|
+
* @summary List ERC20 tokens
|
|
1903
|
+
* @param {string} chainName The name of chain
|
|
1904
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1905
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1906
|
+
* @param {*} [options] Override http request option.
|
|
1907
|
+
* @throws {RequiredError}
|
|
1908
|
+
*/
|
|
1909
|
+
async listERC20Tokens(chainName, pageCursor, pageSize, options) {
|
|
1910
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listERC20Tokens(chainName, pageCursor, pageSize, options);
|
|
1911
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1912
|
+
},
|
|
1913
|
+
};
|
|
1914
|
+
};
|
|
1915
|
+
/**
|
|
1916
|
+
* TokensApi - factory interface
|
|
1917
|
+
* @export
|
|
1918
|
+
*/
|
|
1919
|
+
const TokensApiFactory = function (configuration, basePath, axios) {
|
|
1920
|
+
const localVarFp = TokensApiFp(configuration);
|
|
1921
|
+
return {
|
|
1922
|
+
/**
|
|
1923
|
+
* Get single ERC20 token
|
|
1924
|
+
* @summary Get single ERC20 token
|
|
1925
|
+
* @param {string} contractAddress The address of contract
|
|
1926
|
+
* @param {string} chainName The name of chain
|
|
1927
|
+
* @param {*} [options] Override http request option.
|
|
1928
|
+
* @throws {RequiredError}
|
|
1929
|
+
*/
|
|
1930
|
+
getERC20Token(contractAddress, chainName, options) {
|
|
1931
|
+
return localVarFp.getERC20Token(contractAddress, chainName, options).then((request) => request(axios, basePath));
|
|
1932
|
+
},
|
|
1933
|
+
/**
|
|
1934
|
+
* List ERC20 tokens
|
|
1935
|
+
* @summary List ERC20 tokens
|
|
1936
|
+
* @param {string} chainName The name of chain
|
|
1937
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
1938
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
1939
|
+
* @param {*} [options] Override http request option.
|
|
1940
|
+
* @throws {RequiredError}
|
|
1941
|
+
*/
|
|
1942
|
+
listERC20Tokens(chainName, pageCursor, pageSize, options) {
|
|
1943
|
+
return localVarFp.listERC20Tokens(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
1944
|
+
},
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
/**
|
|
1948
|
+
* TokensApi - object-oriented interface
|
|
1949
|
+
* @export
|
|
1950
|
+
* @class TokensApi
|
|
1951
|
+
* @extends {BaseAPI}
|
|
1952
|
+
*/
|
|
1953
|
+
class TokensApi extends BaseAPI {
|
|
1954
|
+
/**
|
|
1955
|
+
* Get single ERC20 token
|
|
1956
|
+
* @summary Get single ERC20 token
|
|
1957
|
+
* @param {TokensApiGetERC20TokenRequest} requestParameters Request parameters.
|
|
1958
|
+
* @param {*} [options] Override http request option.
|
|
1959
|
+
* @throws {RequiredError}
|
|
1960
|
+
* @memberof TokensApi
|
|
1961
|
+
*/
|
|
1962
|
+
getERC20Token(requestParameters, options) {
|
|
1963
|
+
return TokensApiFp(this.configuration).getERC20Token(requestParameters.contractAddress, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
|
|
1964
|
+
}
|
|
1965
|
+
/**
|
|
1966
|
+
* List ERC20 tokens
|
|
1967
|
+
* @summary List ERC20 tokens
|
|
1968
|
+
* @param {TokensApiListERC20TokensRequest} requestParameters Request parameters.
|
|
1969
|
+
* @param {*} [options] Override http request option.
|
|
1970
|
+
* @throws {RequiredError}
|
|
1971
|
+
* @memberof TokensApi
|
|
1972
|
+
*/
|
|
1973
|
+
listERC20Tokens(requestParameters, options) {
|
|
1974
|
+
return TokensApiFp(this.configuration).listERC20Tokens(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
/* tslint:disable */
|
|
1979
|
+
/* eslint-disable */
|
|
1980
|
+
/**
|
|
1981
|
+
* Immutable X API
|
|
1982
|
+
* Immutable Multi Rollup API
|
|
1983
|
+
*
|
|
1984
|
+
* The version of the OpenAPI document: 1.0.0
|
|
1985
|
+
* Contact: support@immutable.com
|
|
1986
|
+
*
|
|
1987
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
1988
|
+
* https://openapi-generator.tech
|
|
1989
|
+
* Do not edit the class manually.
|
|
1990
|
+
*/
|
|
1991
|
+
class Configuration {
|
|
1992
|
+
/**
|
|
1993
|
+
* parameter for apiKey security
|
|
1994
|
+
* @param name security name
|
|
1995
|
+
* @memberof Configuration
|
|
1996
|
+
*/
|
|
1997
|
+
apiKey;
|
|
1998
|
+
/**
|
|
1999
|
+
* parameter for basic security
|
|
2000
|
+
*
|
|
2001
|
+
* @type {string}
|
|
2002
|
+
* @memberof Configuration
|
|
2003
|
+
*/
|
|
2004
|
+
username;
|
|
2005
|
+
/**
|
|
2006
|
+
* parameter for basic security
|
|
2007
|
+
*
|
|
2008
|
+
* @type {string}
|
|
2009
|
+
* @memberof Configuration
|
|
2010
|
+
*/
|
|
2011
|
+
password;
|
|
2012
|
+
/**
|
|
2013
|
+
* parameter for oauth2 security
|
|
2014
|
+
* @param name security name
|
|
2015
|
+
* @param scopes oauth2 scope
|
|
2016
|
+
* @memberof Configuration
|
|
2017
|
+
*/
|
|
2018
|
+
accessToken;
|
|
2019
|
+
/**
|
|
2020
|
+
* override base path
|
|
2021
|
+
*
|
|
2022
|
+
* @type {string}
|
|
2023
|
+
* @memberof Configuration
|
|
2024
|
+
*/
|
|
2025
|
+
basePath;
|
|
2026
|
+
/**
|
|
2027
|
+
* base options for axios calls
|
|
2028
|
+
*
|
|
2029
|
+
* @type {any}
|
|
2030
|
+
* @memberof Configuration
|
|
2031
|
+
*/
|
|
2032
|
+
baseOptions;
|
|
2033
|
+
/**
|
|
2034
|
+
* The FormData constructor that will be used to create multipart form data
|
|
2035
|
+
* requests. You can inject this here so that execution environments that
|
|
2036
|
+
* do not support the FormData class can still run the generated client.
|
|
2037
|
+
*
|
|
2038
|
+
* @type {new () => FormData}
|
|
2039
|
+
*/
|
|
2040
|
+
formDataCtor;
|
|
2041
|
+
constructor(param = {}) {
|
|
2042
|
+
this.apiKey = param.apiKey;
|
|
2043
|
+
this.username = param.username;
|
|
2044
|
+
this.password = param.password;
|
|
2045
|
+
this.accessToken = param.accessToken;
|
|
2046
|
+
this.basePath = param.basePath;
|
|
2047
|
+
this.baseOptions = param.baseOptions;
|
|
2048
|
+
this.formDataCtor = param.formDataCtor;
|
|
2049
|
+
}
|
|
2050
|
+
/**
|
|
2051
|
+
* Check if the given MIME is a JSON MIME.
|
|
2052
|
+
* JSON MIME examples:
|
|
2053
|
+
* application/json
|
|
2054
|
+
* application/json; charset=UTF8
|
|
2055
|
+
* APPLICATION/JSON
|
|
2056
|
+
* application/vnd.company+json
|
|
2057
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
2058
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
2059
|
+
*/
|
|
2060
|
+
isJsonMime(mime) {
|
|
2061
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
2062
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
/* tslint:disable */
|
|
2067
|
+
/* eslint-disable */
|
|
2068
|
+
/**
|
|
2069
|
+
* Immutable X API
|
|
2070
|
+
* Immutable Multi Rollup API
|
|
2071
|
+
*
|
|
2072
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2073
|
+
* Contact: support@immutable.com
|
|
2074
|
+
*
|
|
2075
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2076
|
+
* https://openapi-generator.tech
|
|
2077
|
+
* Do not edit the class manually.
|
|
2078
|
+
*/
|
|
2079
|
+
const APIError400AllOfCodeEnum = {
|
|
2080
|
+
ValidationError: 'VALIDATION_ERROR'
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
/* tslint:disable */
|
|
2084
|
+
/* eslint-disable */
|
|
2085
|
+
/**
|
|
2086
|
+
* Immutable X API
|
|
2087
|
+
* Immutable Multi Rollup API
|
|
2088
|
+
*
|
|
2089
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2090
|
+
* Contact: support@immutable.com
|
|
2091
|
+
*
|
|
2092
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2093
|
+
* https://openapi-generator.tech
|
|
2094
|
+
* Do not edit the class manually.
|
|
2095
|
+
*/
|
|
2096
|
+
const APIError401AllOfCodeEnum = {
|
|
2097
|
+
UnauthorisedRequest: 'UNAUTHORISED_REQUEST'
|
|
2098
|
+
};
|
|
2099
|
+
|
|
2100
|
+
/* tslint:disable */
|
|
2101
|
+
/* eslint-disable */
|
|
2102
|
+
/**
|
|
2103
|
+
* Immutable X API
|
|
2104
|
+
* Immutable Multi Rollup API
|
|
2105
|
+
*
|
|
2106
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2107
|
+
* Contact: support@immutable.com
|
|
2108
|
+
*
|
|
2109
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2110
|
+
* https://openapi-generator.tech
|
|
2111
|
+
* Do not edit the class manually.
|
|
2112
|
+
*/
|
|
2113
|
+
const APIError403AllOfCodeEnum = {
|
|
2114
|
+
AuthenticationError: 'AUTHENTICATION_ERROR'
|
|
2115
|
+
};
|
|
2116
|
+
|
|
2117
|
+
/* tslint:disable */
|
|
2118
|
+
/* eslint-disable */
|
|
2119
|
+
/**
|
|
2120
|
+
* Immutable X API
|
|
2121
|
+
* Immutable Multi Rollup API
|
|
2122
|
+
*
|
|
2123
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2124
|
+
* Contact: support@immutable.com
|
|
2125
|
+
*
|
|
2126
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2127
|
+
* https://openapi-generator.tech
|
|
2128
|
+
* Do not edit the class manually.
|
|
2129
|
+
*/
|
|
2130
|
+
const APIError404AllOfCodeEnum = {
|
|
2131
|
+
ResourceNotFound: 'RESOURCE_NOT_FOUND'
|
|
2132
|
+
};
|
|
2133
|
+
|
|
2134
|
+
/* tslint:disable */
|
|
2135
|
+
/* eslint-disable */
|
|
2136
|
+
/**
|
|
2137
|
+
* Immutable X API
|
|
2138
|
+
* Immutable Multi Rollup API
|
|
2139
|
+
*
|
|
2140
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2141
|
+
* Contact: support@immutable.com
|
|
2142
|
+
*
|
|
2143
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2144
|
+
* https://openapi-generator.tech
|
|
2145
|
+
* Do not edit the class manually.
|
|
2146
|
+
*/
|
|
2147
|
+
const APIError429AllOfCodeEnum = {
|
|
2148
|
+
TooManyRequestsError: 'TOO_MANY_REQUESTS_ERROR'
|
|
2149
|
+
};
|
|
2150
|
+
|
|
2151
|
+
/* tslint:disable */
|
|
2152
|
+
/* eslint-disable */
|
|
2153
|
+
/**
|
|
2154
|
+
* Immutable X API
|
|
2155
|
+
* Immutable Multi Rollup API
|
|
2156
|
+
*
|
|
2157
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2158
|
+
* Contact: support@immutable.com
|
|
2159
|
+
*
|
|
2160
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2161
|
+
* https://openapi-generator.tech
|
|
2162
|
+
* Do not edit the class manually.
|
|
2163
|
+
*/
|
|
2164
|
+
const APIError500AllOfCodeEnum = {
|
|
2165
|
+
InternalServerError: 'INTERNAL_SERVER_ERROR'
|
|
2166
|
+
};
|
|
2167
|
+
|
|
2168
|
+
/* tslint:disable */
|
|
2169
|
+
/* eslint-disable */
|
|
2170
|
+
/**
|
|
2171
|
+
* Immutable X API
|
|
2172
|
+
* Immutable Multi Rollup API
|
|
2173
|
+
*
|
|
2174
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2175
|
+
* Contact: support@immutable.com
|
|
2176
|
+
*
|
|
2177
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2178
|
+
* https://openapi-generator.tech
|
|
2179
|
+
* Do not edit the class manually.
|
|
2180
|
+
*/
|
|
2181
|
+
/**
|
|
2182
|
+
* The activity type
|
|
2183
|
+
* @export
|
|
2184
|
+
* @enum {string}
|
|
2185
|
+
*/
|
|
2186
|
+
const ActivityType = {
|
|
2187
|
+
Mint: 'mint',
|
|
2188
|
+
Burn: 'burn',
|
|
2189
|
+
Transfer: 'transfer',
|
|
2190
|
+
Sale: 'sale'
|
|
2191
|
+
};
|
|
2192
|
+
|
|
2193
|
+
/* tslint:disable */
|
|
2194
|
+
/* eslint-disable */
|
|
2195
|
+
/**
|
|
2196
|
+
* Immutable X API
|
|
2197
|
+
* Immutable Multi Rollup API
|
|
2198
|
+
*
|
|
2199
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2200
|
+
* Contact: support@immutable.com
|
|
2201
|
+
*
|
|
2202
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2203
|
+
* https://openapi-generator.tech
|
|
2204
|
+
* Do not edit the class manually.
|
|
2205
|
+
*/
|
|
2206
|
+
const BuyItemItemTypeEnum = {
|
|
2207
|
+
Native: 'NATIVE',
|
|
2208
|
+
Erc20: 'ERC20'
|
|
2209
|
+
};
|
|
2210
|
+
|
|
2211
|
+
/* tslint:disable */
|
|
2212
|
+
/* eslint-disable */
|
|
2213
|
+
/**
|
|
2214
|
+
* Immutable X API
|
|
2215
|
+
* Immutable Multi Rollup API
|
|
2216
|
+
*
|
|
2217
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2218
|
+
* Contact: support@immutable.com
|
|
2219
|
+
*
|
|
2220
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2221
|
+
* https://openapi-generator.tech
|
|
2222
|
+
* Do not edit the class manually.
|
|
2223
|
+
*/
|
|
2224
|
+
/**
|
|
2225
|
+
* The collection contract type
|
|
2226
|
+
* @export
|
|
2227
|
+
* @enum {string}
|
|
2228
|
+
*/
|
|
2229
|
+
const CollectionContractType = {
|
|
2230
|
+
Erc721: 'ERC721'
|
|
2231
|
+
};
|
|
2232
|
+
|
|
2233
|
+
/* tslint:disable */
|
|
2234
|
+
/* eslint-disable */
|
|
2235
|
+
/**
|
|
2236
|
+
* Immutable X API
|
|
2237
|
+
* Immutable Multi Rollup API
|
|
2238
|
+
*
|
|
2239
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2240
|
+
* Contact: support@immutable.com
|
|
2241
|
+
*
|
|
2242
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2243
|
+
* https://openapi-generator.tech
|
|
2244
|
+
* Do not edit the class manually.
|
|
2245
|
+
*/
|
|
2246
|
+
const CreateOrderProtocolDataOrderTypeEnum = {
|
|
2247
|
+
FullRestricted: 'FULL_RESTRICTED'
|
|
2248
|
+
};
|
|
2249
|
+
|
|
2250
|
+
/* tslint:disable */
|
|
2251
|
+
/* eslint-disable */
|
|
2252
|
+
/**
|
|
2253
|
+
* Immutable X API
|
|
2254
|
+
* Immutable Multi Rollup API
|
|
2255
|
+
*
|
|
2256
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2257
|
+
* Contact: support@immutable.com
|
|
2258
|
+
*
|
|
2259
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2260
|
+
* https://openapi-generator.tech
|
|
2261
|
+
* Do not edit the class manually.
|
|
2262
|
+
*/
|
|
2263
|
+
const FeeFeeTypeEnum = {
|
|
2264
|
+
Royalty: 'ROYALTY'
|
|
2265
|
+
};
|
|
2266
|
+
|
|
2267
|
+
/* tslint:disable */
|
|
2268
|
+
/* eslint-disable */
|
|
2269
|
+
/**
|
|
2270
|
+
* Immutable X API
|
|
2271
|
+
* Immutable Multi Rollup API
|
|
2272
|
+
*
|
|
2273
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2274
|
+
* Contact: support@immutable.com
|
|
2275
|
+
*
|
|
2276
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2277
|
+
* https://openapi-generator.tech
|
|
2278
|
+
* Do not edit the class manually.
|
|
2279
|
+
*/
|
|
2280
|
+
/**
|
|
2281
|
+
* The contract type for an NFT
|
|
827
2282
|
* @export
|
|
2283
|
+
* @enum {string}
|
|
828
2284
|
*/
|
|
829
|
-
const
|
|
830
|
-
|
|
831
|
-
return {
|
|
832
|
-
/**
|
|
833
|
-
* Get NFT by token ID
|
|
834
|
-
* @summary Get NFT by token ID
|
|
835
|
-
* @param {string} contractAddress The address of NFT contract
|
|
836
|
-
* @param {string} tokenId An `uint256` token id as string
|
|
837
|
-
* @param {string} chainName The name of chain
|
|
838
|
-
* @param {*} [options] Override http request option.
|
|
839
|
-
* @throws {RequiredError}
|
|
840
|
-
*/
|
|
841
|
-
async getNFT(contractAddress, tokenId, chainName, options) {
|
|
842
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getNFT(contractAddress, tokenId, chainName, options);
|
|
843
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
844
|
-
},
|
|
845
|
-
/**
|
|
846
|
-
* List NFTs by contract address
|
|
847
|
-
* @summary List NFTs by contract address
|
|
848
|
-
* @param {string} contractAddress Contract address
|
|
849
|
-
* @param {string} chainName The name of chain
|
|
850
|
-
* @param {string} [pageCursor] Base64 encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
851
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
852
|
-
* @param {*} [options] Override http request option.
|
|
853
|
-
* @throws {RequiredError}
|
|
854
|
-
*/
|
|
855
|
-
async listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
|
|
856
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, pageCursor, pageSize, options);
|
|
857
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
858
|
-
},
|
|
859
|
-
/**
|
|
860
|
-
* List NFTs by account address
|
|
861
|
-
* @summary List NFTs by account address
|
|
862
|
-
* @param {string} accountAddress Account address
|
|
863
|
-
* @param {string} chainName The name of chain
|
|
864
|
-
* @param {string} [contractAddress] The address of contract
|
|
865
|
-
* @param {string} [pageCursor] Base64 encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
866
|
-
* @param {number} [pageSize] Maximum number of items to return
|
|
867
|
-
* @param {*} [options] Override http request option.
|
|
868
|
-
* @throws {RequiredError}
|
|
869
|
-
*/
|
|
870
|
-
async listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options) {
|
|
871
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options);
|
|
872
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
873
|
-
},
|
|
874
|
-
};
|
|
2285
|
+
const NFTContractType = {
|
|
2286
|
+
Erc721: 'ERC721'
|
|
875
2287
|
};
|
|
2288
|
+
|
|
2289
|
+
/* tslint:disable */
|
|
2290
|
+
/* eslint-disable */
|
|
876
2291
|
/**
|
|
877
|
-
*
|
|
2292
|
+
* Immutable X API
|
|
2293
|
+
* Immutable Multi Rollup API
|
|
2294
|
+
*
|
|
2295
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2296
|
+
* Contact: support@immutable.com
|
|
2297
|
+
*
|
|
2298
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2299
|
+
* https://openapi-generator.tech
|
|
2300
|
+
* Do not edit the class manually.
|
|
2301
|
+
*/
|
|
2302
|
+
/**
|
|
2303
|
+
* The Order status
|
|
878
2304
|
* @export
|
|
879
|
-
* @
|
|
880
|
-
* @extends {BaseAPI}
|
|
2305
|
+
* @enum {string}
|
|
881
2306
|
*/
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
2307
|
+
const OrderStatus = {
|
|
2308
|
+
Pending: 'PENDING',
|
|
2309
|
+
Active: 'ACTIVE',
|
|
2310
|
+
Inactive: 'INACTIVE',
|
|
2311
|
+
Filled: 'FILLED',
|
|
2312
|
+
Cancelled: 'CANCELLED',
|
|
2313
|
+
Expired: 'EXPIRED'
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2316
|
+
/* tslint:disable */
|
|
2317
|
+
/* eslint-disable */
|
|
2318
|
+
/**
|
|
2319
|
+
* Immutable X API
|
|
2320
|
+
* Immutable Multi Rollup API
|
|
2321
|
+
*
|
|
2322
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2323
|
+
* Contact: support@immutable.com
|
|
2324
|
+
*
|
|
2325
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2326
|
+
* https://openapi-generator.tech
|
|
2327
|
+
* Do not edit the class manually.
|
|
2328
|
+
*/
|
|
2329
|
+
const SaleFeeTypeEnum = {
|
|
2330
|
+
Royalty: 'ROYALTY'
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
/* tslint:disable */
|
|
2334
|
+
/* eslint-disable */
|
|
2335
|
+
/**
|
|
2336
|
+
* Immutable X API
|
|
2337
|
+
* Immutable Multi Rollup API
|
|
2338
|
+
*
|
|
2339
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2340
|
+
* Contact: support@immutable.com
|
|
2341
|
+
*
|
|
2342
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2343
|
+
* https://openapi-generator.tech
|
|
2344
|
+
* Do not edit the class manually.
|
|
2345
|
+
*/
|
|
2346
|
+
const SellItemItemTypeEnum = {
|
|
2347
|
+
Erc721: 'ERC721'
|
|
2348
|
+
};
|
|
2349
|
+
|
|
2350
|
+
/* tslint:disable */
|
|
2351
|
+
/* eslint-disable */
|
|
2352
|
+
/**
|
|
2353
|
+
* Immutable X API
|
|
2354
|
+
* Immutable Multi Rollup API
|
|
2355
|
+
*
|
|
2356
|
+
* The version of the OpenAPI document: 1.0.0
|
|
2357
|
+
* Contact: support@immutable.com
|
|
2358
|
+
*
|
|
2359
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2360
|
+
* https://openapi-generator.tech
|
|
2361
|
+
* Do not edit the class manually.
|
|
2362
|
+
*/
|
|
2363
|
+
/**
|
|
2364
|
+
* The contract type for a token
|
|
2365
|
+
* @export
|
|
2366
|
+
* @enum {string}
|
|
2367
|
+
*/
|
|
2368
|
+
const TokenContractType = {
|
|
2369
|
+
Erc20: 'ERC20'
|
|
2370
|
+
};
|
|
917
2371
|
|
|
918
2372
|
/* tslint:disable */
|
|
919
2373
|
/* eslint-disable */
|
|
@@ -928,80 +2382,63 @@ class NftsApi extends BaseAPI {
|
|
|
928
2382
|
* https://openapi-generator.tech
|
|
929
2383
|
* Do not edit the class manually.
|
|
930
2384
|
*/
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
this.formDataCtor = param.formDataCtor;
|
|
989
|
-
}
|
|
990
|
-
/**
|
|
991
|
-
* Check if the given MIME is a JSON MIME.
|
|
992
|
-
* JSON MIME examples:
|
|
993
|
-
* application/json
|
|
994
|
-
* application/json; charset=UTF8
|
|
995
|
-
* APPLICATION/JSON
|
|
996
|
-
* application/vnd.company+json
|
|
997
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
998
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
999
|
-
*/
|
|
1000
|
-
isJsonMime(mime) {
|
|
1001
|
-
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
1002
|
-
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
2385
|
+
|
|
2386
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
2387
|
+
__proto__: null,
|
|
2388
|
+
APIError400AllOfCodeEnum: APIError400AllOfCodeEnum,
|
|
2389
|
+
APIError401AllOfCodeEnum: APIError401AllOfCodeEnum,
|
|
2390
|
+
APIError403AllOfCodeEnum: APIError403AllOfCodeEnum,
|
|
2391
|
+
APIError404AllOfCodeEnum: APIError404AllOfCodeEnum,
|
|
2392
|
+
APIError429AllOfCodeEnum: APIError429AllOfCodeEnum,
|
|
2393
|
+
APIError500AllOfCodeEnum: APIError500AllOfCodeEnum,
|
|
2394
|
+
ActivitiesApi: ActivitiesApi,
|
|
2395
|
+
ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
|
|
2396
|
+
ActivitiesApiFactory: ActivitiesApiFactory,
|
|
2397
|
+
ActivitiesApiFp: ActivitiesApiFp,
|
|
2398
|
+
ActivityType: ActivityType,
|
|
2399
|
+
BuyItemItemTypeEnum: BuyItemItemTypeEnum,
|
|
2400
|
+
ChainsApi: ChainsApi,
|
|
2401
|
+
ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
|
|
2402
|
+
ChainsApiFactory: ChainsApiFactory,
|
|
2403
|
+
ChainsApiFp: ChainsApiFp,
|
|
2404
|
+
CollectionContractType: CollectionContractType,
|
|
2405
|
+
CollectionsApi: CollectionsApi,
|
|
2406
|
+
CollectionsApiAxiosParamCreator: CollectionsApiAxiosParamCreator,
|
|
2407
|
+
CollectionsApiFactory: CollectionsApiFactory,
|
|
2408
|
+
CollectionsApiFp: CollectionsApiFp,
|
|
2409
|
+
Configuration: Configuration,
|
|
2410
|
+
CreateOrderProtocolDataOrderTypeEnum: CreateOrderProtocolDataOrderTypeEnum,
|
|
2411
|
+
FeeFeeTypeEnum: FeeFeeTypeEnum,
|
|
2412
|
+
ListingsApi: ListingsApi,
|
|
2413
|
+
ListingsApiAxiosParamCreator: ListingsApiAxiosParamCreator,
|
|
2414
|
+
ListingsApiFactory: ListingsApiFactory,
|
|
2415
|
+
ListingsApiFp: ListingsApiFp,
|
|
2416
|
+
NFTContractType: NFTContractType,
|
|
2417
|
+
NftOwnersApi: NftOwnersApi,
|
|
2418
|
+
NftOwnersApiAxiosParamCreator: NftOwnersApiAxiosParamCreator,
|
|
2419
|
+
NftOwnersApiFactory: NftOwnersApiFactory,
|
|
2420
|
+
NftOwnersApiFp: NftOwnersApiFp,
|
|
2421
|
+
NftsApi: NftsApi,
|
|
2422
|
+
NftsApiAxiosParamCreator: NftsApiAxiosParamCreator,
|
|
2423
|
+
NftsApiFactory: NftsApiFactory,
|
|
2424
|
+
NftsApiFp: NftsApiFp,
|
|
2425
|
+
OrderStatus: OrderStatus,
|
|
2426
|
+
OrdersApi: OrdersApi,
|
|
2427
|
+
OrdersApiAxiosParamCreator: OrdersApiAxiosParamCreator,
|
|
2428
|
+
OrdersApiFactory: OrdersApiFactory,
|
|
2429
|
+
OrdersApiFp: OrdersApiFp,
|
|
2430
|
+
PassportApi: PassportApi,
|
|
2431
|
+
PassportApiAxiosParamCreator: PassportApiAxiosParamCreator,
|
|
2432
|
+
PassportApiFactory: PassportApiFactory,
|
|
2433
|
+
PassportApiFp: PassportApiFp,
|
|
2434
|
+
SaleFeeTypeEnum: SaleFeeTypeEnum,
|
|
2435
|
+
SellItemItemTypeEnum: SellItemItemTypeEnum,
|
|
2436
|
+
TokenContractType: TokenContractType,
|
|
2437
|
+
TokensApi: TokensApi,
|
|
2438
|
+
TokensApiAxiosParamCreator: TokensApiAxiosParamCreator,
|
|
2439
|
+
TokensApiFactory: TokensApiFactory,
|
|
2440
|
+
TokensApiFp: TokensApiFp
|
|
2441
|
+
});
|
|
1005
2442
|
|
|
1006
2443
|
var Environment;
|
|
1007
2444
|
(function (Environment) {
|
|
@@ -1028,10 +2465,10 @@ class APIError extends Error {
|
|
|
1028
2465
|
|
|
1029
2466
|
/* eslint-disable implicit-arrow-linebreak */
|
|
1030
2467
|
const defaultHeaders = {
|
|
1031
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.
|
|
2468
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.9-alpha',
|
|
1032
2469
|
};
|
|
1033
2470
|
/**
|
|
1034
|
-
* createAPIConfiguration to create a custom
|
|
2471
|
+
* createAPIConfiguration to create a custom Configuration
|
|
1035
2472
|
* other than the production and sandbox defined below.
|
|
1036
2473
|
*/
|
|
1037
2474
|
const createAPIConfiguration = ({ basePath, headers: baseHeaders, }) => {
|
|
@@ -1043,7 +2480,7 @@ const createAPIConfiguration = ({ basePath, headers: baseHeaders, }) => {
|
|
|
1043
2480
|
basePath,
|
|
1044
2481
|
baseOptions: { headers },
|
|
1045
2482
|
};
|
|
1046
|
-
return new Configuration(configParams);
|
|
2483
|
+
return new index.Configuration(configParams);
|
|
1047
2484
|
};
|
|
1048
2485
|
const production = () => createAPIConfiguration({
|
|
1049
2486
|
basePath: 'https://indexer-mr.dev.imtbl.com/v1', // TODO update before mainnet release
|
|
@@ -1119,13 +2556,15 @@ class BlockchainData {
|
|
|
1119
2556
|
collections;
|
|
1120
2557
|
nfts;
|
|
1121
2558
|
nftOwners;
|
|
2559
|
+
tokens;
|
|
1122
2560
|
constructor(moduleConfig) {
|
|
1123
2561
|
this.config = new BlockchainDataConfiguration(moduleConfig);
|
|
1124
|
-
this.activities = new ActivitiesApi(this.config.apiConfig);
|
|
1125
|
-
this.chains = new ChainsApi(this.config.apiConfig);
|
|
1126
|
-
this.collections = new CollectionsApi(this.config.apiConfig);
|
|
1127
|
-
this.nfts = new NftsApi(this.config.apiConfig);
|
|
1128
|
-
this.nftOwners = new NftOwnersApi(this.config.apiConfig);
|
|
2562
|
+
this.activities = new index.ActivitiesApi(this.config.apiConfig);
|
|
2563
|
+
this.chains = new index.ChainsApi(this.config.apiConfig);
|
|
2564
|
+
this.collections = new index.CollectionsApi(this.config.apiConfig);
|
|
2565
|
+
this.nfts = new index.NftsApi(this.config.apiConfig);
|
|
2566
|
+
this.nftOwners = new index.NftOwnersApi(this.config.apiConfig);
|
|
2567
|
+
this.tokens = new index.TokensApi(this.config.apiConfig);
|
|
1129
2568
|
}
|
|
1130
2569
|
/**
|
|
1131
2570
|
* List all activities
|
|
@@ -1253,6 +2692,34 @@ class BlockchainData {
|
|
|
1253
2692
|
throw formatError(err);
|
|
1254
2693
|
});
|
|
1255
2694
|
}
|
|
2695
|
+
/**
|
|
2696
|
+
* List ERC20 Token contracts
|
|
2697
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
2698
|
+
* @returns a promise that resolves with a list of ERC20 Tokens
|
|
2699
|
+
* @throws {@link index.APIError}
|
|
2700
|
+
*/
|
|
2701
|
+
async listTokens(request) {
|
|
2702
|
+
return await this.tokens
|
|
2703
|
+
.listERC20Tokens(request)
|
|
2704
|
+
.then((res) => res.data)
|
|
2705
|
+
.catch((err) => {
|
|
2706
|
+
throw formatError(err);
|
|
2707
|
+
});
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* Get details for an ERC20 Token by contract address
|
|
2711
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
2712
|
+
* @returns a promise that resolves with a list of ERC20 Tokens
|
|
2713
|
+
* @throws {@link index.APIError}
|
|
2714
|
+
*/
|
|
2715
|
+
async getToken(request) {
|
|
2716
|
+
return await this.tokens
|
|
2717
|
+
.getERC20Token(request)
|
|
2718
|
+
.then((res) => res.data)
|
|
2719
|
+
.catch((err) => {
|
|
2720
|
+
throw formatError(err);
|
|
2721
|
+
});
|
|
2722
|
+
}
|
|
1256
2723
|
}
|
|
1257
2724
|
|
|
1258
2725
|
export { APIError, BlockchainData };
|