@imtbl/sdk 0.24.1 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.d.ts +324 -0
- package/dist/blockchain_data.js +570 -44
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.js +693 -67
- package/dist/checkout_widgets.js +1 -1
- package/dist/immutablex_client.js +1 -1
- package/dist/index.browser.js +6 -6
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +699 -73
- package/dist/index.d.ts +474 -14
- package/dist/index.js +699 -73
- package/dist/orderbook.d.ts +142 -12
- package/dist/orderbook.js +124 -24
- package/dist/passport.js +293 -11
- package/package.json +1 -1
package/dist/checkout_sdk.js
CHANGED
|
@@ -15995,6 +15995,31 @@ class OrdersService {
|
|
|
15995
15995
|
constructor(httpRequest) {
|
|
15996
15996
|
this.httpRequest = httpRequest;
|
|
15997
15997
|
}
|
|
15998
|
+
/**
|
|
15999
|
+
* Cancel one or more orders
|
|
16000
|
+
* Cancel one or more orders
|
|
16001
|
+
* @returns CancelOrdersResult Orders cancellation response.
|
|
16002
|
+
* @throws ApiError
|
|
16003
|
+
*/
|
|
16004
|
+
cancelOrders({ chainName, requestBody, }) {
|
|
16005
|
+
return this.httpRequest.request({
|
|
16006
|
+
method: 'POST',
|
|
16007
|
+
url: '/v1/chains/{chain_name}/orders/cancel',
|
|
16008
|
+
path: {
|
|
16009
|
+
'chain_name': chainName,
|
|
16010
|
+
},
|
|
16011
|
+
body: requestBody,
|
|
16012
|
+
mediaType: 'application/json',
|
|
16013
|
+
errors: {
|
|
16014
|
+
400: `Bad Request (400)`,
|
|
16015
|
+
401: `Unauthorised Request (401)`,
|
|
16016
|
+
404: `The specified resource was not found (404)`,
|
|
16017
|
+
429: `Too Many Requests (429)`,
|
|
16018
|
+
500: `Internal Server Error (500)`,
|
|
16019
|
+
501: `Not Implemented Error (501)`,
|
|
16020
|
+
},
|
|
16021
|
+
});
|
|
16022
|
+
}
|
|
15998
16023
|
/**
|
|
15999
16024
|
* List all listings
|
|
16000
16025
|
* List all listings
|
|
@@ -16159,6 +16184,17 @@ class OrderBookClient {
|
|
|
16159
16184
|
}
|
|
16160
16185
|
}
|
|
16161
16186
|
|
|
16187
|
+
/* istanbul ignore file */
|
|
16188
|
+
/* tslint:disable */
|
|
16189
|
+
/* eslint-disable */
|
|
16190
|
+
var CancelledOrderStatus;
|
|
16191
|
+
(function (CancelledOrderStatus) {
|
|
16192
|
+
(function (cancellation_type) {
|
|
16193
|
+
cancellation_type["ON_CHAIN"] = "ON_CHAIN";
|
|
16194
|
+
cancellation_type["OFF_CHAIN"] = "OFF_CHAIN";
|
|
16195
|
+
})(CancelledOrderStatus.cancellation_type || (CancelledOrderStatus.cancellation_type = {}));
|
|
16196
|
+
})(CancelledOrderStatus || (CancelledOrderStatus = {}));
|
|
16197
|
+
|
|
16162
16198
|
/* istanbul ignore file */
|
|
16163
16199
|
/* tslint:disable */
|
|
16164
16200
|
/* eslint-disable */
|
|
@@ -16178,15 +16214,15 @@ var Fee;
|
|
|
16178
16214
|
/**
|
|
16179
16215
|
* The Order status
|
|
16180
16216
|
*/
|
|
16181
|
-
var
|
|
16182
|
-
(function (
|
|
16183
|
-
|
|
16184
|
-
|
|
16185
|
-
|
|
16186
|
-
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
})(
|
|
16217
|
+
var OrderStatusName;
|
|
16218
|
+
(function (OrderStatusName) {
|
|
16219
|
+
OrderStatusName["PENDING"] = "PENDING";
|
|
16220
|
+
OrderStatusName["ACTIVE"] = "ACTIVE";
|
|
16221
|
+
OrderStatusName["INACTIVE"] = "INACTIVE";
|
|
16222
|
+
OrderStatusName["FILLED"] = "FILLED";
|
|
16223
|
+
OrderStatusName["EXPIRED"] = "EXPIRED";
|
|
16224
|
+
OrderStatusName["CANCELLED"] = "CANCELLED";
|
|
16225
|
+
})(OrderStatusName || (OrderStatusName = {}));
|
|
16190
16226
|
|
|
16191
16227
|
/* istanbul ignore file */
|
|
16192
16228
|
/* tslint:disable */
|
|
@@ -16561,18 +16597,57 @@ class Seaport {
|
|
|
16561
16597
|
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
|
|
16562
16598
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
16563
16599
|
});
|
|
16564
|
-
// Expirtaion bytes in SIP7 extra data [21:29]
|
|
16565
|
-
// In hex string -> [21 * 2 + 2 (0x) : 29 * 2]
|
|
16566
|
-
// In JS slice (start, end_inclusive), (44,60)
|
|
16567
|
-
// 8 bytes uint64 epoch time in seconds
|
|
16568
|
-
const expirationHex = extraData.slice(44, 60);
|
|
16569
|
-
const expirationInSeconds = parseInt(expirationHex, 16);
|
|
16570
16600
|
return {
|
|
16571
16601
|
actions: fulfillmentActions,
|
|
16572
|
-
expiration:
|
|
16602
|
+
expiration: Seaport.getExpirationISOTimeFromExtraData(extraData),
|
|
16573
16603
|
order: mapFromOpenApiOrder(order),
|
|
16574
16604
|
};
|
|
16575
16605
|
}
|
|
16606
|
+
async fulfillBulkOrders(fulfillingOrders, account) {
|
|
16607
|
+
// TODO: this function right now does not handle errors from the seaport.js
|
|
16608
|
+
// we should figure out why orders are rejected and return a submission
|
|
16609
|
+
// transaction on best efforts basis
|
|
16610
|
+
const fulfillOrderDetails = fulfillingOrders.map((o) => {
|
|
16611
|
+
const { orderComponents, tips } = this.mapImmutableOrderToSeaportOrderComponents(o.order);
|
|
16612
|
+
return {
|
|
16613
|
+
order: {
|
|
16614
|
+
parameters: orderComponents,
|
|
16615
|
+
signature: o.order.signature,
|
|
16616
|
+
},
|
|
16617
|
+
extraData: o.extra_data,
|
|
16618
|
+
tips,
|
|
16619
|
+
};
|
|
16620
|
+
});
|
|
16621
|
+
const { actions: seaportActions } = await this.getSeaportLib().fulfillOrders({
|
|
16622
|
+
fulfillOrderDetails,
|
|
16623
|
+
accountAddress: account,
|
|
16624
|
+
});
|
|
16625
|
+
const fulfillmentActions = [];
|
|
16626
|
+
const approvalAction = seaportActions.find((action) => action.type === 'approval');
|
|
16627
|
+
if (approvalAction) {
|
|
16628
|
+
fulfillmentActions.push({
|
|
16629
|
+
type: ActionType.TRANSACTION,
|
|
16630
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods),
|
|
16631
|
+
purpose: TransactionPurpose.APPROVAL,
|
|
16632
|
+
});
|
|
16633
|
+
}
|
|
16634
|
+
const fulfilOrderAction = seaportActions.find((action) => action.type === 'exchange');
|
|
16635
|
+
if (!fulfilOrderAction) {
|
|
16636
|
+
throw new Error('No exchange action found');
|
|
16637
|
+
}
|
|
16638
|
+
fulfillmentActions.push({
|
|
16639
|
+
type: ActionType.TRANSACTION,
|
|
16640
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
|
|
16641
|
+
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
16642
|
+
});
|
|
16643
|
+
return {
|
|
16644
|
+
actions: fulfillmentActions,
|
|
16645
|
+
// return the shortest expiration out of all extraData - they should be very close
|
|
16646
|
+
expiration: fulfillOrderDetails
|
|
16647
|
+
.map((d) => Seaport.getExpirationISOTimeFromExtraData(d.extraData))
|
|
16648
|
+
.reduce((p, c) => (new Date(p) < new Date(c) ? p : c)),
|
|
16649
|
+
};
|
|
16650
|
+
}
|
|
16576
16651
|
async cancelOrder(order, account) {
|
|
16577
16652
|
const { orderComponents } = this.mapImmutableOrderToSeaportOrderComponents(order);
|
|
16578
16653
|
const seaportLib = this.getSeaportLib(order);
|
|
@@ -16596,9 +16671,7 @@ class Seaport {
|
|
|
16596
16671
|
],
|
|
16597
16672
|
consideration: [
|
|
16598
16673
|
{
|
|
16599
|
-
token: considerationItem.type === 'ERC20'
|
|
16600
|
-
? considerationItem.contractAddress
|
|
16601
|
-
: undefined,
|
|
16674
|
+
token: considerationItem.type === 'ERC20' ? considerationItem.contractAddress : undefined,
|
|
16602
16675
|
amount: considerationItem.amount,
|
|
16603
16676
|
recipient: offerer,
|
|
16604
16677
|
},
|
|
@@ -16631,6 +16704,15 @@ class Seaport {
|
|
|
16631
16704
|
// }
|
|
16632
16705
|
return this.seaportLibFactory.create(seaportVersion, seaportAddress);
|
|
16633
16706
|
}
|
|
16707
|
+
static getExpirationISOTimeFromExtraData(extraData) {
|
|
16708
|
+
// Expirtaion bytes in SIP7 extra data [21:29]
|
|
16709
|
+
// In hex string -> [21 * 2 + 2 (0x) : 29 * 2]
|
|
16710
|
+
// In JS slice (start, end_inclusive), (44,60)
|
|
16711
|
+
// 8 bytes uint64 epoch time in seconds
|
|
16712
|
+
const expirationHex = extraData.slice(44, 60);
|
|
16713
|
+
const expirationInSeconds = parseInt(expirationHex, 16);
|
|
16714
|
+
return new Date(expirationInSeconds * 1000).toISOString();
|
|
16715
|
+
}
|
|
16634
16716
|
}
|
|
16635
16717
|
|
|
16636
16718
|
class ImmutableApiClient {
|
|
@@ -16929,11 +17011,29 @@ class Orderbook {
|
|
|
16929
17011
|
}
|
|
16930
17012
|
const extraData = fulfillmentDataRes.result.fulfillable_orders[0].extra_data;
|
|
16931
17013
|
const orderResult = fulfillmentDataRes.result.fulfillable_orders[0].order;
|
|
16932
|
-
if (orderResult.status !==
|
|
17014
|
+
if (orderResult.status.name !== OrderStatusName.ACTIVE) {
|
|
16933
17015
|
throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.status}`);
|
|
16934
17016
|
}
|
|
16935
17017
|
return this.seaport.fulfillOrder(orderResult, takerAddress, extraData);
|
|
16936
17018
|
}
|
|
17019
|
+
async fulfillBulkOrders(listings, takerAddress) {
|
|
17020
|
+
const fulfillmentDataRes = await this.apiClient.fulfillmentData(listings.map((listingRequest) => ({
|
|
17021
|
+
order_id: listingRequest.listingId,
|
|
17022
|
+
fees: listingRequest.takerFees.map((fee) => ({
|
|
17023
|
+
amount: fee.amount,
|
|
17024
|
+
fee_type: FeeType.TAKER_ECOSYSTEM,
|
|
17025
|
+
recipient: fee.recipient,
|
|
17026
|
+
})),
|
|
17027
|
+
})));
|
|
17028
|
+
return {
|
|
17029
|
+
...(await this.seaport.fulfillBulkOrders(fulfillmentDataRes.result.fulfillable_orders, takerAddress)),
|
|
17030
|
+
fulfillableOrders: fulfillmentDataRes.result.fulfillable_orders.map((o) => mapFromOpenApiOrder(o.order)),
|
|
17031
|
+
unfulfillableOrders: fulfillmentDataRes.result.unfulfillable_orders.map((o) => ({
|
|
17032
|
+
orderId: o.order_id,
|
|
17033
|
+
reason: o.reason,
|
|
17034
|
+
})),
|
|
17035
|
+
};
|
|
17036
|
+
}
|
|
16937
17037
|
/**
|
|
16938
17038
|
* Get an unsigned cancel order transaction. Orders can only be cancelled by
|
|
16939
17039
|
* the account that created them.
|
|
@@ -16943,9 +17043,9 @@ class Orderbook {
|
|
|
16943
17043
|
*/
|
|
16944
17044
|
async cancelOrder(listingId, accountAddress) {
|
|
16945
17045
|
const orderResult = await this.apiClient.getListing(listingId);
|
|
16946
|
-
if (orderResult.result.status !==
|
|
16947
|
-
&& orderResult.result.status !==
|
|
16948
|
-
&& orderResult.result.status !==
|
|
17046
|
+
if (orderResult.result.status.name !== OrderStatusName.ACTIVE
|
|
17047
|
+
&& orderResult.result.status.name !== OrderStatusName.INACTIVE
|
|
17048
|
+
&& orderResult.result.status.name !== OrderStatusName.PENDING) {
|
|
16949
17049
|
throw new Error(`Cannot cancel order with status ${orderResult.result.status}`);
|
|
16950
17050
|
}
|
|
16951
17051
|
if (orderResult.result.account_address !== accountAddress.toLowerCase()) {
|
|
@@ -17528,12 +17628,13 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
17528
17628
|
* List all collections
|
|
17529
17629
|
* @summary List all collections
|
|
17530
17630
|
* @param {string} chainName The name of chain
|
|
17631
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17531
17632
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17532
17633
|
* @param {number} [pageSize] Maximum number of items to return
|
|
17533
17634
|
* @param {*} [options] Override http request option.
|
|
17534
17635
|
* @throws {RequiredError}
|
|
17535
17636
|
*/
|
|
17536
|
-
listCollections: async (chainName, pageCursor, pageSize, options = {}) => {
|
|
17637
|
+
listCollections: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
17537
17638
|
// verify required parameter 'chainName' is not null or undefined
|
|
17538
17639
|
assertParamExists('listCollections', 'chainName', chainName);
|
|
17539
17640
|
const localVarPath = `/v1/chains/{chain_name}/collections`
|
|
@@ -17547,6 +17648,11 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
17547
17648
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
17548
17649
|
const localVarHeaderParameter = {};
|
|
17549
17650
|
const localVarQueryParameter = {};
|
|
17651
|
+
if (fromUpdatedAt !== undefined) {
|
|
17652
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
17653
|
+
fromUpdatedAt.toISOString() :
|
|
17654
|
+
fromUpdatedAt;
|
|
17655
|
+
}
|
|
17550
17656
|
if (pageCursor !== undefined) {
|
|
17551
17657
|
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
17552
17658
|
}
|
|
@@ -17631,7 +17737,7 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
|
|
|
17631
17737
|
const localVarHeaderParameter = {};
|
|
17632
17738
|
const localVarQueryParameter = {};
|
|
17633
17739
|
// authentication ImmutableApiKey required
|
|
17634
|
-
await setApiKeyToObject(localVarHeaderParameter, "
|
|
17740
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-Key", configuration);
|
|
17635
17741
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
17636
17742
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
17637
17743
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -17667,13 +17773,14 @@ const CollectionsApiFp = function (configuration) {
|
|
|
17667
17773
|
* List all collections
|
|
17668
17774
|
* @summary List all collections
|
|
17669
17775
|
* @param {string} chainName The name of chain
|
|
17776
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17670
17777
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17671
17778
|
* @param {number} [pageSize] Maximum number of items to return
|
|
17672
17779
|
* @param {*} [options] Override http request option.
|
|
17673
17780
|
* @throws {RequiredError}
|
|
17674
17781
|
*/
|
|
17675
|
-
async listCollections(chainName, pageCursor, pageSize, options) {
|
|
17676
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, pageCursor, pageSize, options);
|
|
17782
|
+
async listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
17783
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
17677
17784
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
17678
17785
|
},
|
|
17679
17786
|
/**
|
|
@@ -17727,13 +17834,14 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
|
|
|
17727
17834
|
* List all collections
|
|
17728
17835
|
* @summary List all collections
|
|
17729
17836
|
* @param {string} chainName The name of chain
|
|
17837
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17730
17838
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17731
17839
|
* @param {number} [pageSize] Maximum number of items to return
|
|
17732
17840
|
* @param {*} [options] Override http request option.
|
|
17733
17841
|
* @throws {RequiredError}
|
|
17734
17842
|
*/
|
|
17735
|
-
listCollections(chainName, pageCursor, pageSize, options) {
|
|
17736
|
-
return localVarFp.listCollections(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
17843
|
+
listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
17844
|
+
return localVarFp.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
17737
17845
|
},
|
|
17738
17846
|
/**
|
|
17739
17847
|
* List collections by NFT owner account address
|
|
@@ -17789,7 +17897,7 @@ class CollectionsApi extends BaseAPI {
|
|
|
17789
17897
|
* @memberof CollectionsApi
|
|
17790
17898
|
*/
|
|
17791
17899
|
listCollections(requestParameters, options) {
|
|
17792
|
-
return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
17900
|
+
return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
17793
17901
|
}
|
|
17794
17902
|
/**
|
|
17795
17903
|
* List collections by NFT owner account address
|
|
@@ -17835,8 +17943,8 @@ class CollectionsApi extends BaseAPI {
|
|
|
17835
17943
|
const MetadataApiAxiosParamCreator = function (configuration) {
|
|
17836
17944
|
return {
|
|
17837
17945
|
/**
|
|
17838
|
-
* Get
|
|
17839
|
-
* @summary Get
|
|
17946
|
+
* Get metadata by ID
|
|
17947
|
+
* @summary Get metadata by ID
|
|
17840
17948
|
* @param {string} chainName The name of chain
|
|
17841
17949
|
* @param {string} contractAddress The address of metadata contract
|
|
17842
17950
|
* @param {string} metadataId The id of the metadata
|
|
@@ -17872,7 +17980,55 @@ const MetadataApiAxiosParamCreator = function (configuration) {
|
|
|
17872
17980
|
};
|
|
17873
17981
|
},
|
|
17874
17982
|
/**
|
|
17875
|
-
*
|
|
17983
|
+
* Get a list of metadata by from the a given contract
|
|
17984
|
+
* @summary Get a list of metadata by from the a given contract
|
|
17985
|
+
* @param {string} chainName The name of chain
|
|
17986
|
+
* @param {string} contractAddress The address of metadata contract
|
|
17987
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
17988
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
17989
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
17990
|
+
* @param {*} [options] Override http request option.
|
|
17991
|
+
* @throws {RequiredError}
|
|
17992
|
+
*/
|
|
17993
|
+
listMetadata: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
17994
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
17995
|
+
assertParamExists('listMetadata', 'chainName', chainName);
|
|
17996
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
17997
|
+
assertParamExists('listMetadata', 'contractAddress', contractAddress);
|
|
17998
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata`
|
|
17999
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
|
|
18000
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)));
|
|
18001
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
18002
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
18003
|
+
let baseOptions;
|
|
18004
|
+
if (configuration) {
|
|
18005
|
+
baseOptions = configuration.baseOptions;
|
|
18006
|
+
}
|
|
18007
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
18008
|
+
const localVarHeaderParameter = {};
|
|
18009
|
+
const localVarQueryParameter = {};
|
|
18010
|
+
if (fromUpdatedAt !== undefined) {
|
|
18011
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
18012
|
+
fromUpdatedAt.toISOString() :
|
|
18013
|
+
fromUpdatedAt;
|
|
18014
|
+
}
|
|
18015
|
+
if (pageCursor !== undefined) {
|
|
18016
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
18017
|
+
}
|
|
18018
|
+
if (pageSize !== undefined) {
|
|
18019
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
18020
|
+
}
|
|
18021
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
18022
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
18023
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
18024
|
+
return {
|
|
18025
|
+
url: toPathString(localVarUrlObj),
|
|
18026
|
+
options: localVarRequestOptions,
|
|
18027
|
+
};
|
|
18028
|
+
},
|
|
18029
|
+
/**
|
|
18030
|
+
* Refresh stacked metadata
|
|
18031
|
+
* @summary Refresh stacked metadata
|
|
17876
18032
|
* @param {string} chainName The name of chain
|
|
17877
18033
|
* @param {string} contractAddress Contract address
|
|
17878
18034
|
* @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
|
|
@@ -17899,7 +18055,7 @@ const MetadataApiAxiosParamCreator = function (configuration) {
|
|
|
17899
18055
|
const localVarHeaderParameter = {};
|
|
17900
18056
|
const localVarQueryParameter = {};
|
|
17901
18057
|
// authentication ImmutableApiKey required
|
|
17902
|
-
await setApiKeyToObject(localVarHeaderParameter, "
|
|
18058
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-Key", configuration);
|
|
17903
18059
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
17904
18060
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
17905
18061
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -17911,8 +18067,8 @@ const MetadataApiAxiosParamCreator = function (configuration) {
|
|
|
17911
18067
|
};
|
|
17912
18068
|
},
|
|
17913
18069
|
/**
|
|
17914
|
-
*
|
|
17915
|
-
* @summary
|
|
18070
|
+
* Refresh NFT metadata
|
|
18071
|
+
* @summary Refresh NFT metadata
|
|
17916
18072
|
* @param {string} contractAddress The address of contract
|
|
17917
18073
|
* @param {string} chainName The name of chain
|
|
17918
18074
|
* @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
|
|
@@ -17939,7 +18095,7 @@ const MetadataApiAxiosParamCreator = function (configuration) {
|
|
|
17939
18095
|
const localVarHeaderParameter = {};
|
|
17940
18096
|
const localVarQueryParameter = {};
|
|
17941
18097
|
// authentication ImmutableApiKey required
|
|
17942
|
-
await setApiKeyToObject(localVarHeaderParameter, "
|
|
18098
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-Key", configuration);
|
|
17943
18099
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
17944
18100
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
17945
18101
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -17960,8 +18116,8 @@ const MetadataApiFp = function (configuration) {
|
|
|
17960
18116
|
const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration);
|
|
17961
18117
|
return {
|
|
17962
18118
|
/**
|
|
17963
|
-
* Get
|
|
17964
|
-
* @summary Get
|
|
18119
|
+
* Get metadata by ID
|
|
18120
|
+
* @summary Get metadata by ID
|
|
17965
18121
|
* @param {string} chainName The name of chain
|
|
17966
18122
|
* @param {string} contractAddress The address of metadata contract
|
|
17967
18123
|
* @param {string} metadataId The id of the metadata
|
|
@@ -17973,7 +18129,23 @@ const MetadataApiFp = function (configuration) {
|
|
|
17973
18129
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
17974
18130
|
},
|
|
17975
18131
|
/**
|
|
17976
|
-
*
|
|
18132
|
+
* Get a list of metadata by from the a given contract
|
|
18133
|
+
* @summary Get a list of metadata by from the a given contract
|
|
18134
|
+
* @param {string} chainName The name of chain
|
|
18135
|
+
* @param {string} contractAddress The address of metadata contract
|
|
18136
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18137
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18138
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18139
|
+
* @param {*} [options] Override http request option.
|
|
18140
|
+
* @throws {RequiredError}
|
|
18141
|
+
*/
|
|
18142
|
+
async listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18143
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
|
|
18144
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18145
|
+
},
|
|
18146
|
+
/**
|
|
18147
|
+
* Refresh stacked metadata
|
|
18148
|
+
* @summary Refresh stacked metadata
|
|
17977
18149
|
* @param {string} chainName The name of chain
|
|
17978
18150
|
* @param {string} contractAddress Contract address
|
|
17979
18151
|
* @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
|
|
@@ -17985,8 +18157,8 @@ const MetadataApiFp = function (configuration) {
|
|
|
17985
18157
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
17986
18158
|
},
|
|
17987
18159
|
/**
|
|
17988
|
-
*
|
|
17989
|
-
* @summary
|
|
18160
|
+
* Refresh NFT metadata
|
|
18161
|
+
* @summary Refresh NFT metadata
|
|
17990
18162
|
* @param {string} contractAddress The address of contract
|
|
17991
18163
|
* @param {string} chainName The name of chain
|
|
17992
18164
|
* @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
|
|
@@ -18007,8 +18179,8 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
|
|
|
18007
18179
|
const localVarFp = MetadataApiFp(configuration);
|
|
18008
18180
|
return {
|
|
18009
18181
|
/**
|
|
18010
|
-
* Get
|
|
18011
|
-
* @summary Get
|
|
18182
|
+
* Get metadata by ID
|
|
18183
|
+
* @summary Get metadata by ID
|
|
18012
18184
|
* @param {string} chainName The name of chain
|
|
18013
18185
|
* @param {string} contractAddress The address of metadata contract
|
|
18014
18186
|
* @param {string} metadataId The id of the metadata
|
|
@@ -18019,7 +18191,22 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
|
|
|
18019
18191
|
return localVarFp.getMetadata(chainName, contractAddress, metadataId, options).then((request) => request(axios, basePath));
|
|
18020
18192
|
},
|
|
18021
18193
|
/**
|
|
18022
|
-
*
|
|
18194
|
+
* Get a list of metadata by from the a given contract
|
|
18195
|
+
* @summary Get a list of metadata by from the a given contract
|
|
18196
|
+
* @param {string} chainName The name of chain
|
|
18197
|
+
* @param {string} contractAddress The address of metadata contract
|
|
18198
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18199
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18200
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18201
|
+
* @param {*} [options] Override http request option.
|
|
18202
|
+
* @throws {RequiredError}
|
|
18203
|
+
*/
|
|
18204
|
+
listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18205
|
+
return localVarFp.listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18206
|
+
},
|
|
18207
|
+
/**
|
|
18208
|
+
* Refresh stacked metadata
|
|
18209
|
+
* @summary Refresh stacked metadata
|
|
18023
18210
|
* @param {string} chainName The name of chain
|
|
18024
18211
|
* @param {string} contractAddress Contract address
|
|
18025
18212
|
* @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
|
|
@@ -18030,8 +18217,8 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
|
|
|
18030
18217
|
return localVarFp.refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options).then((request) => request(axios, basePath));
|
|
18031
18218
|
},
|
|
18032
18219
|
/**
|
|
18033
|
-
*
|
|
18034
|
-
* @summary
|
|
18220
|
+
* Refresh NFT metadata
|
|
18221
|
+
* @summary Refresh NFT metadata
|
|
18035
18222
|
* @param {string} contractAddress The address of contract
|
|
18036
18223
|
* @param {string} chainName The name of chain
|
|
18037
18224
|
* @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
|
|
@@ -18051,8 +18238,8 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
|
|
|
18051
18238
|
*/
|
|
18052
18239
|
class MetadataApi extends BaseAPI {
|
|
18053
18240
|
/**
|
|
18054
|
-
* Get
|
|
18055
|
-
* @summary Get
|
|
18241
|
+
* Get metadata by ID
|
|
18242
|
+
* @summary Get metadata by ID
|
|
18056
18243
|
* @param {MetadataApiGetMetadataRequest} requestParameters Request parameters.
|
|
18057
18244
|
* @param {*} [options] Override http request option.
|
|
18058
18245
|
* @throws {RequiredError}
|
|
@@ -18062,7 +18249,19 @@ class MetadataApi extends BaseAPI {
|
|
|
18062
18249
|
return MetadataApiFp(this.configuration).getMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.metadataId, options).then((request) => request(this.axios, this.basePath));
|
|
18063
18250
|
}
|
|
18064
18251
|
/**
|
|
18065
|
-
*
|
|
18252
|
+
* Get a list of metadata by from the a given contract
|
|
18253
|
+
* @summary Get a list of metadata by from the a given contract
|
|
18254
|
+
* @param {MetadataApiListMetadataRequest} requestParameters Request parameters.
|
|
18255
|
+
* @param {*} [options] Override http request option.
|
|
18256
|
+
* @throws {RequiredError}
|
|
18257
|
+
* @memberof MetadataApi
|
|
18258
|
+
*/
|
|
18259
|
+
listMetadata(requestParameters, options) {
|
|
18260
|
+
return MetadataApiFp(this.configuration).listMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18261
|
+
}
|
|
18262
|
+
/**
|
|
18263
|
+
* Refresh stacked metadata
|
|
18264
|
+
* @summary Refresh stacked metadata
|
|
18066
18265
|
* @param {MetadataApiRefreshMetadataByIDRequest} requestParameters Request parameters.
|
|
18067
18266
|
* @param {*} [options] Override http request option.
|
|
18068
18267
|
* @throws {RequiredError}
|
|
@@ -18072,8 +18271,8 @@ class MetadataApi extends BaseAPI {
|
|
|
18072
18271
|
return MetadataApiFp(this.configuration).refreshMetadataByID(requestParameters.chainName, requestParameters.contractAddress, requestParameters.refreshMetadataByIDRequest, options).then((request) => request(this.axios, this.basePath));
|
|
18073
18272
|
}
|
|
18074
18273
|
/**
|
|
18075
|
-
*
|
|
18076
|
-
* @summary
|
|
18274
|
+
* Refresh NFT metadata
|
|
18275
|
+
* @summary Refresh NFT metadata
|
|
18077
18276
|
* @param {MetadataApiRefreshNFTMetadataByTokenIDRequest} requestParameters Request parameters.
|
|
18078
18277
|
* @param {*} [options] Override http request option.
|
|
18079
18278
|
* @throws {RequiredError}
|
|
@@ -18148,6 +18347,53 @@ const NftOwnersApiAxiosParamCreator = function (configuration) {
|
|
|
18148
18347
|
options: localVarRequestOptions,
|
|
18149
18348
|
};
|
|
18150
18349
|
},
|
|
18350
|
+
/**
|
|
18351
|
+
* List owners by contract address
|
|
18352
|
+
* @summary List owners by contract address
|
|
18353
|
+
* @param {string} contractAddress The address of contract
|
|
18354
|
+
* @param {string} chainName The name of chain
|
|
18355
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18356
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18357
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18358
|
+
* @param {*} [options] Override http request option.
|
|
18359
|
+
* @throws {RequiredError}
|
|
18360
|
+
*/
|
|
18361
|
+
listOwnersByContractAddress: async (contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
18362
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
18363
|
+
assertParamExists('listOwnersByContractAddress', 'contractAddress', contractAddress);
|
|
18364
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
18365
|
+
assertParamExists('listOwnersByContractAddress', 'chainName', chainName);
|
|
18366
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/owners`
|
|
18367
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
18368
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
18369
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
18370
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
18371
|
+
let baseOptions;
|
|
18372
|
+
if (configuration) {
|
|
18373
|
+
baseOptions = configuration.baseOptions;
|
|
18374
|
+
}
|
|
18375
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
18376
|
+
const localVarHeaderParameter = {};
|
|
18377
|
+
const localVarQueryParameter = {};
|
|
18378
|
+
if (fromUpdatedAt !== undefined) {
|
|
18379
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
18380
|
+
fromUpdatedAt.toISOString() :
|
|
18381
|
+
fromUpdatedAt;
|
|
18382
|
+
}
|
|
18383
|
+
if (pageCursor !== undefined) {
|
|
18384
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
18385
|
+
}
|
|
18386
|
+
if (pageSize !== undefined) {
|
|
18387
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
18388
|
+
}
|
|
18389
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
18390
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
18391
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
18392
|
+
return {
|
|
18393
|
+
url: toPathString(localVarUrlObj),
|
|
18394
|
+
options: localVarRequestOptions,
|
|
18395
|
+
};
|
|
18396
|
+
},
|
|
18151
18397
|
};
|
|
18152
18398
|
};
|
|
18153
18399
|
/**
|
|
@@ -18172,6 +18418,21 @@ const NftOwnersApiFp = function (configuration) {
|
|
|
18172
18418
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
|
|
18173
18419
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18174
18420
|
},
|
|
18421
|
+
/**
|
|
18422
|
+
* List owners by contract address
|
|
18423
|
+
* @summary List owners by contract address
|
|
18424
|
+
* @param {string} contractAddress The address of contract
|
|
18425
|
+
* @param {string} chainName The name of chain
|
|
18426
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18427
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18428
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18429
|
+
* @param {*} [options] Override http request option.
|
|
18430
|
+
* @throws {RequiredError}
|
|
18431
|
+
*/
|
|
18432
|
+
async listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18433
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
18434
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18435
|
+
},
|
|
18175
18436
|
};
|
|
18176
18437
|
};
|
|
18177
18438
|
/**
|
|
@@ -18195,6 +18456,20 @@ const NftOwnersApiFactory = function (configuration, basePath, axios) {
|
|
|
18195
18456
|
listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
|
|
18196
18457
|
return localVarFp.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18197
18458
|
},
|
|
18459
|
+
/**
|
|
18460
|
+
* List owners by contract address
|
|
18461
|
+
* @summary List owners by contract address
|
|
18462
|
+
* @param {string} contractAddress The address of contract
|
|
18463
|
+
* @param {string} chainName The name of chain
|
|
18464
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18465
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18466
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18467
|
+
* @param {*} [options] Override http request option.
|
|
18468
|
+
* @throws {RequiredError}
|
|
18469
|
+
*/
|
|
18470
|
+
listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18471
|
+
return localVarFp.listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18472
|
+
},
|
|
18198
18473
|
};
|
|
18199
18474
|
};
|
|
18200
18475
|
/**
|
|
@@ -18215,6 +18490,17 @@ class NftOwnersApi extends BaseAPI {
|
|
|
18215
18490
|
listNFTOwners(requestParameters, options) {
|
|
18216
18491
|
return NftOwnersApiFp(this.configuration).listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18217
18492
|
}
|
|
18493
|
+
/**
|
|
18494
|
+
* List owners by contract address
|
|
18495
|
+
* @summary List owners by contract address
|
|
18496
|
+
* @param {NftOwnersApiListOwnersByContractAddressRequest} requestParameters Request parameters.
|
|
18497
|
+
* @param {*} [options] Override http request option.
|
|
18498
|
+
* @throws {RequiredError}
|
|
18499
|
+
* @memberof NftOwnersApi
|
|
18500
|
+
*/
|
|
18501
|
+
listOwnersByContractAddress(requestParameters, options) {
|
|
18502
|
+
return NftOwnersApiFp(this.configuration).listOwnersByContractAddress(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18503
|
+
}
|
|
18218
18504
|
}
|
|
18219
18505
|
|
|
18220
18506
|
/* tslint:disable */
|
|
@@ -18273,17 +18559,106 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
18273
18559
|
options: localVarRequestOptions,
|
|
18274
18560
|
};
|
|
18275
18561
|
},
|
|
18562
|
+
/**
|
|
18563
|
+
* List all NFT owners on a chain
|
|
18564
|
+
* @summary List all NFT owners
|
|
18565
|
+
* @param {string} chainName The name of chain
|
|
18566
|
+
* @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
|
|
18567
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18568
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18569
|
+
* @param {*} [options] Override http request option.
|
|
18570
|
+
* @throws {RequiredError}
|
|
18571
|
+
*/
|
|
18572
|
+
listAllNFTOwners: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
18573
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
18574
|
+
assertParamExists('listAllNFTOwners', 'chainName', chainName);
|
|
18575
|
+
// verify required parameter 'fromUpdatedAt' is not null or undefined
|
|
18576
|
+
assertParamExists('listAllNFTOwners', 'fromUpdatedAt', fromUpdatedAt);
|
|
18577
|
+
const localVarPath = `/v1/chains/{chain_name}/nft-owners`
|
|
18578
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
18579
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
18580
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
18581
|
+
let baseOptions;
|
|
18582
|
+
if (configuration) {
|
|
18583
|
+
baseOptions = configuration.baseOptions;
|
|
18584
|
+
}
|
|
18585
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
18586
|
+
const localVarHeaderParameter = {};
|
|
18587
|
+
const localVarQueryParameter = {};
|
|
18588
|
+
if (fromUpdatedAt !== undefined) {
|
|
18589
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
18590
|
+
fromUpdatedAt.toISOString() :
|
|
18591
|
+
fromUpdatedAt;
|
|
18592
|
+
}
|
|
18593
|
+
if (pageCursor !== undefined) {
|
|
18594
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
18595
|
+
}
|
|
18596
|
+
if (pageSize !== undefined) {
|
|
18597
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
18598
|
+
}
|
|
18599
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
18600
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
18601
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
18602
|
+
return {
|
|
18603
|
+
url: toPathString(localVarUrlObj),
|
|
18604
|
+
options: localVarRequestOptions,
|
|
18605
|
+
};
|
|
18606
|
+
},
|
|
18607
|
+
/**
|
|
18608
|
+
* List all NFTs on a chain
|
|
18609
|
+
* @summary List all NFTs
|
|
18610
|
+
* @param {string} chainName The name of chain
|
|
18611
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18612
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18613
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18614
|
+
* @param {*} [options] Override http request option.
|
|
18615
|
+
* @throws {RequiredError}
|
|
18616
|
+
*/
|
|
18617
|
+
listAllNFTs: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
18618
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
18619
|
+
assertParamExists('listAllNFTs', 'chainName', chainName);
|
|
18620
|
+
const localVarPath = `/v1/chains/{chain_name}/nfts`
|
|
18621
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
18622
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
18623
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
18624
|
+
let baseOptions;
|
|
18625
|
+
if (configuration) {
|
|
18626
|
+
baseOptions = configuration.baseOptions;
|
|
18627
|
+
}
|
|
18628
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
18629
|
+
const localVarHeaderParameter = {};
|
|
18630
|
+
const localVarQueryParameter = {};
|
|
18631
|
+
if (fromUpdatedAt !== undefined) {
|
|
18632
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
18633
|
+
fromUpdatedAt.toISOString() :
|
|
18634
|
+
fromUpdatedAt;
|
|
18635
|
+
}
|
|
18636
|
+
if (pageCursor !== undefined) {
|
|
18637
|
+
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
18638
|
+
}
|
|
18639
|
+
if (pageSize !== undefined) {
|
|
18640
|
+
localVarQueryParameter['page_size'] = pageSize;
|
|
18641
|
+
}
|
|
18642
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
18643
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
18644
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
18645
|
+
return {
|
|
18646
|
+
url: toPathString(localVarUrlObj),
|
|
18647
|
+
options: localVarRequestOptions,
|
|
18648
|
+
};
|
|
18649
|
+
},
|
|
18276
18650
|
/**
|
|
18277
18651
|
* List NFTs by contract address
|
|
18278
18652
|
* @summary List NFTs by contract address
|
|
18279
18653
|
* @param {string} contractAddress Contract address
|
|
18280
18654
|
* @param {string} chainName The name of chain
|
|
18655
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18281
18656
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18282
18657
|
* @param {number} [pageSize] Maximum number of items to return
|
|
18283
18658
|
* @param {*} [options] Override http request option.
|
|
18284
18659
|
* @throws {RequiredError}
|
|
18285
18660
|
*/
|
|
18286
|
-
listNFTs: async (contractAddress, chainName, pageCursor, pageSize, options = {}) => {
|
|
18661
|
+
listNFTs: async (contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
18287
18662
|
// verify required parameter 'contractAddress' is not null or undefined
|
|
18288
18663
|
assertParamExists('listNFTs', 'contractAddress', contractAddress);
|
|
18289
18664
|
// verify required parameter 'chainName' is not null or undefined
|
|
@@ -18300,6 +18675,11 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
18300
18675
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
18301
18676
|
const localVarHeaderParameter = {};
|
|
18302
18677
|
const localVarQueryParameter = {};
|
|
18678
|
+
if (fromUpdatedAt !== undefined) {
|
|
18679
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
18680
|
+
fromUpdatedAt.toISOString() :
|
|
18681
|
+
fromUpdatedAt;
|
|
18682
|
+
}
|
|
18303
18683
|
if (pageCursor !== undefined) {
|
|
18304
18684
|
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
18305
18685
|
}
|
|
@@ -18381,18 +18761,47 @@ const NftsApiFp = function (configuration) {
|
|
|
18381
18761
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getNFT(contractAddress, tokenId, chainName, options);
|
|
18382
18762
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18383
18763
|
},
|
|
18764
|
+
/**
|
|
18765
|
+
* List all NFT owners on a chain
|
|
18766
|
+
* @summary List all NFT owners
|
|
18767
|
+
* @param {string} chainName The name of chain
|
|
18768
|
+
* @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
|
|
18769
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18770
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18771
|
+
* @param {*} [options] Override http request option.
|
|
18772
|
+
* @throws {RequiredError}
|
|
18773
|
+
*/
|
|
18774
|
+
async listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18775
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
18776
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18777
|
+
},
|
|
18778
|
+
/**
|
|
18779
|
+
* List all NFTs on a chain
|
|
18780
|
+
* @summary List all NFTs
|
|
18781
|
+
* @param {string} chainName The name of chain
|
|
18782
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18783
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18784
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18785
|
+
* @param {*} [options] Override http request option.
|
|
18786
|
+
* @throws {RequiredError}
|
|
18787
|
+
*/
|
|
18788
|
+
async listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18789
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
18790
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18791
|
+
},
|
|
18384
18792
|
/**
|
|
18385
18793
|
* List NFTs by contract address
|
|
18386
18794
|
* @summary List NFTs by contract address
|
|
18387
18795
|
* @param {string} contractAddress Contract address
|
|
18388
18796
|
* @param {string} chainName The name of chain
|
|
18797
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18389
18798
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18390
18799
|
* @param {number} [pageSize] Maximum number of items to return
|
|
18391
18800
|
* @param {*} [options] Override http request option.
|
|
18392
18801
|
* @throws {RequiredError}
|
|
18393
18802
|
*/
|
|
18394
|
-
async listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
|
|
18395
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, pageCursor, pageSize, options);
|
|
18803
|
+
async listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18804
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
18396
18805
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
18397
18806
|
},
|
|
18398
18807
|
/**
|
|
@@ -18431,18 +18840,45 @@ const NftsApiFactory = function (configuration, basePath, axios) {
|
|
|
18431
18840
|
getNFT(contractAddress, tokenId, chainName, options) {
|
|
18432
18841
|
return localVarFp.getNFT(contractAddress, tokenId, chainName, options).then((request) => request(axios, basePath));
|
|
18433
18842
|
},
|
|
18843
|
+
/**
|
|
18844
|
+
* List all NFT owners on a chain
|
|
18845
|
+
* @summary List all NFT owners
|
|
18846
|
+
* @param {string} chainName The name of chain
|
|
18847
|
+
* @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
|
|
18848
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18849
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18850
|
+
* @param {*} [options] Override http request option.
|
|
18851
|
+
* @throws {RequiredError}
|
|
18852
|
+
*/
|
|
18853
|
+
listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18854
|
+
return localVarFp.listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18855
|
+
},
|
|
18856
|
+
/**
|
|
18857
|
+
* List all NFTs on a chain
|
|
18858
|
+
* @summary List all NFTs
|
|
18859
|
+
* @param {string} chainName The name of chain
|
|
18860
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18861
|
+
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18862
|
+
* @param {number} [pageSize] Maximum number of items to return
|
|
18863
|
+
* @param {*} [options] Override http request option.
|
|
18864
|
+
* @throws {RequiredError}
|
|
18865
|
+
*/
|
|
18866
|
+
listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18867
|
+
return localVarFp.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18868
|
+
},
|
|
18434
18869
|
/**
|
|
18435
18870
|
* List NFTs by contract address
|
|
18436
18871
|
* @summary List NFTs by contract address
|
|
18437
18872
|
* @param {string} contractAddress Contract address
|
|
18438
18873
|
* @param {string} chainName The name of chain
|
|
18874
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
18439
18875
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
18440
18876
|
* @param {number} [pageSize] Maximum number of items to return
|
|
18441
18877
|
* @param {*} [options] Override http request option.
|
|
18442
18878
|
* @throws {RequiredError}
|
|
18443
18879
|
*/
|
|
18444
|
-
listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
|
|
18445
|
-
return localVarFp.listNFTs(contractAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18880
|
+
listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
18881
|
+
return localVarFp.listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
18446
18882
|
},
|
|
18447
18883
|
/**
|
|
18448
18884
|
* List NFTs by account address
|
|
@@ -18478,6 +18914,28 @@ class NftsApi extends BaseAPI {
|
|
|
18478
18914
|
getNFT(requestParameters, options) {
|
|
18479
18915
|
return NftsApiFp(this.configuration).getNFT(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
|
|
18480
18916
|
}
|
|
18917
|
+
/**
|
|
18918
|
+
* List all NFT owners on a chain
|
|
18919
|
+
* @summary List all NFT owners
|
|
18920
|
+
* @param {NftsApiListAllNFTOwnersRequest} requestParameters Request parameters.
|
|
18921
|
+
* @param {*} [options] Override http request option.
|
|
18922
|
+
* @throws {RequiredError}
|
|
18923
|
+
* @memberof NftsApi
|
|
18924
|
+
*/
|
|
18925
|
+
listAllNFTOwners(requestParameters, options) {
|
|
18926
|
+
return NftsApiFp(this.configuration).listAllNFTOwners(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18927
|
+
}
|
|
18928
|
+
/**
|
|
18929
|
+
* List all NFTs on a chain
|
|
18930
|
+
* @summary List all NFTs
|
|
18931
|
+
* @param {NftsApiListAllNFTsRequest} requestParameters Request parameters.
|
|
18932
|
+
* @param {*} [options] Override http request option.
|
|
18933
|
+
* @throws {RequiredError}
|
|
18934
|
+
* @memberof NftsApi
|
|
18935
|
+
*/
|
|
18936
|
+
listAllNFTs(requestParameters, options) {
|
|
18937
|
+
return NftsApiFp(this.configuration).listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18938
|
+
}
|
|
18481
18939
|
/**
|
|
18482
18940
|
* List NFTs by contract address
|
|
18483
18941
|
* @summary List NFTs by contract address
|
|
@@ -18487,7 +18945,7 @@ class NftsApi extends BaseAPI {
|
|
|
18487
18945
|
* @memberof NftsApi
|
|
18488
18946
|
*/
|
|
18489
18947
|
listNFTs(requestParameters, options) {
|
|
18490
|
-
return NftsApiFp(this.configuration).listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18948
|
+
return NftsApiFp(this.configuration).listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
18491
18949
|
}
|
|
18492
18950
|
/**
|
|
18493
18951
|
* List NFTs by account address
|
|
@@ -18521,6 +18979,40 @@ class NftsApi extends BaseAPI {
|
|
|
18521
18979
|
*/
|
|
18522
18980
|
const OrdersApiAxiosParamCreator = function (configuration) {
|
|
18523
18981
|
return {
|
|
18982
|
+
/**
|
|
18983
|
+
* Cancel one or more orders
|
|
18984
|
+
* @summary Cancel one or more orders
|
|
18985
|
+
* @param {string} chainName
|
|
18986
|
+
* @param {CancelOrdersRequestBody} cancelOrdersRequestBody
|
|
18987
|
+
* @param {*} [options] Override http request option.
|
|
18988
|
+
* @throws {RequiredError}
|
|
18989
|
+
*/
|
|
18990
|
+
cancelOrders: async (chainName, cancelOrdersRequestBody, options = {}) => {
|
|
18991
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
18992
|
+
assertParamExists('cancelOrders', 'chainName', chainName);
|
|
18993
|
+
// verify required parameter 'cancelOrdersRequestBody' is not null or undefined
|
|
18994
|
+
assertParamExists('cancelOrders', 'cancelOrdersRequestBody', cancelOrdersRequestBody);
|
|
18995
|
+
const localVarPath = `/v1/chains/{chain_name}/orders/cancel`
|
|
18996
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
18997
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
18998
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
18999
|
+
let baseOptions;
|
|
19000
|
+
if (configuration) {
|
|
19001
|
+
baseOptions = configuration.baseOptions;
|
|
19002
|
+
}
|
|
19003
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
19004
|
+
const localVarHeaderParameter = {};
|
|
19005
|
+
const localVarQueryParameter = {};
|
|
19006
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
19007
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
19008
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
19009
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
19010
|
+
localVarRequestOptions.data = serializeDataIfNeeded(cancelOrdersRequestBody, localVarRequestOptions, configuration);
|
|
19011
|
+
return {
|
|
19012
|
+
url: toPathString(localVarUrlObj),
|
|
19013
|
+
options: localVarRequestOptions,
|
|
19014
|
+
};
|
|
19015
|
+
},
|
|
18524
19016
|
/**
|
|
18525
19017
|
* Create a listing
|
|
18526
19018
|
* @summary Create a listing
|
|
@@ -18774,6 +19266,18 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
18774
19266
|
const OrdersApiFp = function (configuration) {
|
|
18775
19267
|
const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
|
|
18776
19268
|
return {
|
|
19269
|
+
/**
|
|
19270
|
+
* Cancel one or more orders
|
|
19271
|
+
* @summary Cancel one or more orders
|
|
19272
|
+
* @param {string} chainName
|
|
19273
|
+
* @param {CancelOrdersRequestBody} cancelOrdersRequestBody
|
|
19274
|
+
* @param {*} [options] Override http request option.
|
|
19275
|
+
* @throws {RequiredError}
|
|
19276
|
+
*/
|
|
19277
|
+
async cancelOrders(chainName, cancelOrdersRequestBody, options) {
|
|
19278
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrders(chainName, cancelOrdersRequestBody, options);
|
|
19279
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
19280
|
+
},
|
|
18777
19281
|
/**
|
|
18778
19282
|
* Create a listing
|
|
18779
19283
|
* @summary Create a listing
|
|
@@ -18866,6 +19370,17 @@ const OrdersApiFp = function (configuration) {
|
|
|
18866
19370
|
const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
18867
19371
|
const localVarFp = OrdersApiFp(configuration);
|
|
18868
19372
|
return {
|
|
19373
|
+
/**
|
|
19374
|
+
* Cancel one or more orders
|
|
19375
|
+
* @summary Cancel one or more orders
|
|
19376
|
+
* @param {string} chainName
|
|
19377
|
+
* @param {CancelOrdersRequestBody} cancelOrdersRequestBody
|
|
19378
|
+
* @param {*} [options] Override http request option.
|
|
19379
|
+
* @throws {RequiredError}
|
|
19380
|
+
*/
|
|
19381
|
+
cancelOrders(chainName, cancelOrdersRequestBody, options) {
|
|
19382
|
+
return localVarFp.cancelOrders(chainName, cancelOrdersRequestBody, options).then((request) => request(axios, basePath));
|
|
19383
|
+
},
|
|
18869
19384
|
/**
|
|
18870
19385
|
* Create a listing
|
|
18871
19386
|
* @summary Create a listing
|
|
@@ -18952,6 +19467,17 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
18952
19467
|
* @extends {BaseAPI}
|
|
18953
19468
|
*/
|
|
18954
19469
|
class OrdersApi extends BaseAPI {
|
|
19470
|
+
/**
|
|
19471
|
+
* Cancel one or more orders
|
|
19472
|
+
* @summary Cancel one or more orders
|
|
19473
|
+
* @param {OrdersApiCancelOrdersRequest} requestParameters Request parameters.
|
|
19474
|
+
* @param {*} [options] Override http request option.
|
|
19475
|
+
* @throws {RequiredError}
|
|
19476
|
+
* @memberof OrdersApi
|
|
19477
|
+
*/
|
|
19478
|
+
cancelOrders(requestParameters, options) {
|
|
19479
|
+
return OrdersApiFp(this.configuration).cancelOrders(requestParameters.chainName, requestParameters.cancelOrdersRequestBody, options).then((request) => request(this.axios, this.basePath));
|
|
19480
|
+
}
|
|
18955
19481
|
/**
|
|
18956
19482
|
* Create a listing
|
|
18957
19483
|
* @summary Create a listing
|
|
@@ -19253,12 +19779,13 @@ const TokensApiAxiosParamCreator = function (configuration) {
|
|
|
19253
19779
|
* List ERC20 tokens
|
|
19254
19780
|
* @summary List ERC20 tokens
|
|
19255
19781
|
* @param {string} chainName The name of chain
|
|
19782
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
19256
19783
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
19257
19784
|
* @param {number} [pageSize] Maximum number of items to return
|
|
19258
19785
|
* @param {*} [options] Override http request option.
|
|
19259
19786
|
* @throws {RequiredError}
|
|
19260
19787
|
*/
|
|
19261
|
-
listERC20Tokens: async (chainName, pageCursor, pageSize, options = {}) => {
|
|
19788
|
+
listERC20Tokens: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
|
|
19262
19789
|
// verify required parameter 'chainName' is not null or undefined
|
|
19263
19790
|
assertParamExists('listERC20Tokens', 'chainName', chainName);
|
|
19264
19791
|
const localVarPath = `/v1/chains/{chain_name}/tokens`
|
|
@@ -19272,6 +19799,11 @@ const TokensApiAxiosParamCreator = function (configuration) {
|
|
|
19272
19799
|
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
19273
19800
|
const localVarHeaderParameter = {};
|
|
19274
19801
|
const localVarQueryParameter = {};
|
|
19802
|
+
if (fromUpdatedAt !== undefined) {
|
|
19803
|
+
localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
|
|
19804
|
+
fromUpdatedAt.toISOString() :
|
|
19805
|
+
fromUpdatedAt;
|
|
19806
|
+
}
|
|
19275
19807
|
if (pageCursor !== undefined) {
|
|
19276
19808
|
localVarQueryParameter['page_cursor'] = pageCursor;
|
|
19277
19809
|
}
|
|
@@ -19311,13 +19843,14 @@ const TokensApiFp = function (configuration) {
|
|
|
19311
19843
|
* List ERC20 tokens
|
|
19312
19844
|
* @summary List ERC20 tokens
|
|
19313
19845
|
* @param {string} chainName The name of chain
|
|
19846
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
19314
19847
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
19315
19848
|
* @param {number} [pageSize] Maximum number of items to return
|
|
19316
19849
|
* @param {*} [options] Override http request option.
|
|
19317
19850
|
* @throws {RequiredError}
|
|
19318
19851
|
*/
|
|
19319
|
-
async listERC20Tokens(chainName, pageCursor, pageSize, options) {
|
|
19320
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listERC20Tokens(chainName, pageCursor, pageSize, options);
|
|
19852
|
+
async listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
19853
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options);
|
|
19321
19854
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
19322
19855
|
},
|
|
19323
19856
|
};
|
|
@@ -19344,13 +19877,14 @@ const TokensApiFactory = function (configuration, basePath, axios) {
|
|
|
19344
19877
|
* List ERC20 tokens
|
|
19345
19878
|
* @summary List ERC20 tokens
|
|
19346
19879
|
* @param {string} chainName The name of chain
|
|
19880
|
+
* @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
|
|
19347
19881
|
* @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
|
|
19348
19882
|
* @param {number} [pageSize] Maximum number of items to return
|
|
19349
19883
|
* @param {*} [options] Override http request option.
|
|
19350
19884
|
* @throws {RequiredError}
|
|
19351
19885
|
*/
|
|
19352
|
-
listERC20Tokens(chainName, pageCursor, pageSize, options) {
|
|
19353
|
-
return localVarFp.listERC20Tokens(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
19886
|
+
listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
|
|
19887
|
+
return localVarFp.listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
|
|
19354
19888
|
},
|
|
19355
19889
|
};
|
|
19356
19890
|
};
|
|
@@ -19381,7 +19915,7 @@ class TokensApi extends BaseAPI {
|
|
|
19381
19915
|
* @memberof TokensApi
|
|
19382
19916
|
*/
|
|
19383
19917
|
listERC20Tokens(requestParameters, options) {
|
|
19384
|
-
return TokensApiFp(this.configuration).listERC20Tokens(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
19918
|
+
return TokensApiFp(this.configuration).listERC20Tokens(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
|
|
19385
19919
|
}
|
|
19386
19920
|
}
|
|
19387
19921
|
|
|
@@ -19575,6 +20109,23 @@ const APIError500AllOfCodeEnum = {
|
|
|
19575
20109
|
InternalServerError: 'INTERNAL_SERVER_ERROR'
|
|
19576
20110
|
};
|
|
19577
20111
|
|
|
20112
|
+
/* tslint:disable */
|
|
20113
|
+
/* eslint-disable */
|
|
20114
|
+
/**
|
|
20115
|
+
* Immutable zkEVM API
|
|
20116
|
+
* Immutable Multi Rollup API
|
|
20117
|
+
*
|
|
20118
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20119
|
+
* Contact: support@immutable.com
|
|
20120
|
+
*
|
|
20121
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20122
|
+
* https://openapi-generator.tech
|
|
20123
|
+
* Do not edit the class manually.
|
|
20124
|
+
*/
|
|
20125
|
+
const APIError501AllOfCodeEnum = {
|
|
20126
|
+
NotImplementedError: 'NOT_IMPLEMENTED_ERROR'
|
|
20127
|
+
};
|
|
20128
|
+
|
|
19578
20129
|
/* tslint:disable */
|
|
19579
20130
|
/* eslint-disable */
|
|
19580
20131
|
/**
|
|
@@ -19602,6 +20153,23 @@ const ActivityType = {
|
|
|
19602
20153
|
Withdrawal: 'withdrawal'
|
|
19603
20154
|
};
|
|
19604
20155
|
|
|
20156
|
+
/* tslint:disable */
|
|
20157
|
+
/* eslint-disable */
|
|
20158
|
+
/**
|
|
20159
|
+
* Immutable zkEVM API
|
|
20160
|
+
* Immutable Multi Rollup API
|
|
20161
|
+
*
|
|
20162
|
+
* The version of the OpenAPI document: 1.0.0
|
|
20163
|
+
* Contact: support@immutable.com
|
|
20164
|
+
*
|
|
20165
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
20166
|
+
* https://openapi-generator.tech
|
|
20167
|
+
* Do not edit the class manually.
|
|
20168
|
+
*/
|
|
20169
|
+
const CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum = {
|
|
20170
|
+
AlreadyFilled: 'ALREADY_FILLED'
|
|
20171
|
+
};
|
|
20172
|
+
|
|
19605
20173
|
/* tslint:disable */
|
|
19606
20174
|
/* eslint-disable */
|
|
19607
20175
|
/**
|
|
@@ -19673,8 +20241,8 @@ const ERC721ItemItemTypeEnum = {
|
|
|
19673
20241
|
*/
|
|
19674
20242
|
const FeeFeeTypeEnum = {
|
|
19675
20243
|
Royalty: 'ROYALTY',
|
|
19676
|
-
|
|
19677
|
-
|
|
20244
|
+
MakerEcosystem: 'MAKER_ECOSYSTEM',
|
|
20245
|
+
TakerEcosystem: 'TAKER_ECOSYSTEM',
|
|
19678
20246
|
Protocol: 'PROTOCOL'
|
|
19679
20247
|
};
|
|
19680
20248
|
|
|
@@ -19822,11 +20390,13 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
19822
20390
|
APIError404AllOfCodeEnum: APIError404AllOfCodeEnum,
|
|
19823
20391
|
APIError429AllOfCodeEnum: APIError429AllOfCodeEnum,
|
|
19824
20392
|
APIError500AllOfCodeEnum: APIError500AllOfCodeEnum,
|
|
20393
|
+
APIError501AllOfCodeEnum: APIError501AllOfCodeEnum,
|
|
19825
20394
|
ActivitiesApi: ActivitiesApi,
|
|
19826
20395
|
ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
|
|
19827
20396
|
ActivitiesApiFactory: ActivitiesApiFactory,
|
|
19828
20397
|
ActivitiesApiFp: ActivitiesApiFp,
|
|
19829
20398
|
ActivityType: ActivityType,
|
|
20399
|
+
CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum: CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum,
|
|
19830
20400
|
ChainsApi: ChainsApi,
|
|
19831
20401
|
ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
|
|
19832
20402
|
ChainsApiFactory: ChainsApiFactory,
|
|
@@ -19891,7 +20461,7 @@ class APIError extends Error {
|
|
|
19891
20461
|
|
|
19892
20462
|
/* eslint-disable implicit-arrow-linebreak */
|
|
19893
20463
|
const defaultHeaders = {
|
|
19894
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.
|
|
20464
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.25.0',
|
|
19895
20465
|
};
|
|
19896
20466
|
/**
|
|
19897
20467
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -20124,6 +20694,20 @@ class BlockchainData {
|
|
|
20124
20694
|
throw formatError(err);
|
|
20125
20695
|
});
|
|
20126
20696
|
}
|
|
20697
|
+
/**
|
|
20698
|
+
* List All NFTs on a chain
|
|
20699
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
20700
|
+
* @returns a promise that resolves with a list of NFTs
|
|
20701
|
+
* @throws {@link index.APIError}
|
|
20702
|
+
*/
|
|
20703
|
+
async listAllNFTs(request) {
|
|
20704
|
+
return await this.nfts
|
|
20705
|
+
.listAllNFTs(request)
|
|
20706
|
+
.then((res) => res.data)
|
|
20707
|
+
.catch((err) => {
|
|
20708
|
+
throw formatError(err);
|
|
20709
|
+
});
|
|
20710
|
+
}
|
|
20127
20711
|
/**
|
|
20128
20712
|
* List NFT owners by token ID
|
|
20129
20713
|
* @param request - the request object containing the parameters to be provided in the API request
|
|
@@ -20138,6 +20722,34 @@ class BlockchainData {
|
|
|
20138
20722
|
throw formatError(err);
|
|
20139
20723
|
});
|
|
20140
20724
|
}
|
|
20725
|
+
/**
|
|
20726
|
+
* List NFT owners by contract address
|
|
20727
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
20728
|
+
* @returns a promise that resolves with a list of NFT owners
|
|
20729
|
+
* @throws {@link index.APIError}
|
|
20730
|
+
*/
|
|
20731
|
+
async listNFTOwnersByContractAddress(request) {
|
|
20732
|
+
return await this.nftOwners
|
|
20733
|
+
.listOwnersByContractAddress(request)
|
|
20734
|
+
.then((res) => res.data)
|
|
20735
|
+
.catch((err) => {
|
|
20736
|
+
throw formatError(err);
|
|
20737
|
+
});
|
|
20738
|
+
}
|
|
20739
|
+
/**
|
|
20740
|
+
* List All NFT owners on a chain
|
|
20741
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
20742
|
+
* @returns a promise that resolves with a list of NFT owners
|
|
20743
|
+
* @throws {@link index.APIError}
|
|
20744
|
+
*/
|
|
20745
|
+
async listAllNFTOwners(request) {
|
|
20746
|
+
return await this.nfts
|
|
20747
|
+
.listAllNFTOwners(request)
|
|
20748
|
+
.then((res) => res.data)
|
|
20749
|
+
.catch((err) => {
|
|
20750
|
+
throw formatError(err);
|
|
20751
|
+
});
|
|
20752
|
+
}
|
|
20141
20753
|
/**
|
|
20142
20754
|
* List ERC20 Token contracts
|
|
20143
20755
|
* @param request - the request object containing the parameters to be provided in the API request
|
|
@@ -20166,6 +20778,20 @@ class BlockchainData {
|
|
|
20166
20778
|
throw formatError(err);
|
|
20167
20779
|
});
|
|
20168
20780
|
}
|
|
20781
|
+
/**
|
|
20782
|
+
* List NFT Metadata by contract address
|
|
20783
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
20784
|
+
* @returns a promise that resolves with a list of Metadata
|
|
20785
|
+
* @throws {@link index.APIError}
|
|
20786
|
+
*/
|
|
20787
|
+
async listNFTMetadataByContractAddress(request) {
|
|
20788
|
+
return await this.metadata
|
|
20789
|
+
.listMetadata(request)
|
|
20790
|
+
.then((res) => res.data)
|
|
20791
|
+
.catch((err) => {
|
|
20792
|
+
throw formatError(err);
|
|
20793
|
+
});
|
|
20794
|
+
}
|
|
20169
20795
|
/**
|
|
20170
20796
|
* Refresh collection metadata
|
|
20171
20797
|
* @param request - the request object containing the parameters to be provided in the API request
|