@imtbl/sdk 0.24.1 → 0.26.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/index.js CHANGED
@@ -697,12 +697,13 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
697
697
  * List all collections
698
698
  * @summary List all collections
699
699
  * @param {string} chainName The name of chain
700
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
700
701
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
701
702
  * @param {number} [pageSize] Maximum number of items to return
702
703
  * @param {*} [options] Override http request option.
703
704
  * @throws {RequiredError}
704
705
  */
705
- listCollections: async (chainName, pageCursor, pageSize, options = {}) => {
706
+ listCollections: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
706
707
  // verify required parameter 'chainName' is not null or undefined
707
708
  assertParamExists$1('listCollections', 'chainName', chainName);
708
709
  const localVarPath = `/v1/chains/{chain_name}/collections`
@@ -716,6 +717,11 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
716
717
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
717
718
  const localVarHeaderParameter = {};
718
719
  const localVarQueryParameter = {};
720
+ if (fromUpdatedAt !== undefined) {
721
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
722
+ fromUpdatedAt.toISOString() :
723
+ fromUpdatedAt;
724
+ }
719
725
  if (pageCursor !== undefined) {
720
726
  localVarQueryParameter['page_cursor'] = pageCursor;
721
727
  }
@@ -800,7 +806,7 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
800
806
  const localVarHeaderParameter = {};
801
807
  const localVarQueryParameter = {};
802
808
  // authentication ImmutableApiKey required
803
- await setApiKeyToObject(localVarHeaderParameter, "X-Immutable-API-Key", configuration);
809
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-Key", configuration);
804
810
  localVarHeaderParameter['Content-Type'] = 'application/json';
805
811
  setSearchParams$1(localVarUrlObj, localVarQueryParameter);
806
812
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -836,13 +842,14 @@ const CollectionsApiFp = function (configuration) {
836
842
  * List all collections
837
843
  * @summary List all collections
838
844
  * @param {string} chainName The name of chain
845
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
839
846
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
840
847
  * @param {number} [pageSize] Maximum number of items to return
841
848
  * @param {*} [options] Override http request option.
842
849
  * @throws {RequiredError}
843
850
  */
844
- async listCollections(chainName, pageCursor, pageSize, options) {
845
- const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, pageCursor, pageSize, options);
851
+ async listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
852
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options);
846
853
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
847
854
  },
848
855
  /**
@@ -896,13 +903,14 @@ const CollectionsApiFactory = function (configuration, basePath, axios) {
896
903
  * List all collections
897
904
  * @summary List all collections
898
905
  * @param {string} chainName The name of chain
906
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
899
907
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
900
908
  * @param {number} [pageSize] Maximum number of items to return
901
909
  * @param {*} [options] Override http request option.
902
910
  * @throws {RequiredError}
903
911
  */
904
- listCollections(chainName, pageCursor, pageSize, options) {
905
- return localVarFp.listCollections(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
912
+ listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
913
+ return localVarFp.listCollections(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
906
914
  },
907
915
  /**
908
916
  * List collections by NFT owner account address
@@ -958,7 +966,7 @@ class CollectionsApi extends BaseAPI$1 {
958
966
  * @memberof CollectionsApi
959
967
  */
960
968
  listCollections(requestParameters, options) {
961
- return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
969
+ return CollectionsApiFp(this.configuration).listCollections(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
962
970
  }
963
971
  /**
964
972
  * List collections by NFT owner account address
@@ -1004,8 +1012,8 @@ class CollectionsApi extends BaseAPI$1 {
1004
1012
  const MetadataApiAxiosParamCreator = function (configuration) {
1005
1013
  return {
1006
1014
  /**
1007
- * Get a single metadata by ID
1008
- * @summary Get a single metadata by ID
1015
+ * Get metadata by ID
1016
+ * @summary Get metadata by ID
1009
1017
  * @param {string} chainName The name of chain
1010
1018
  * @param {string} contractAddress The address of metadata contract
1011
1019
  * @param {string} metadataId The id of the metadata
@@ -1041,7 +1049,55 @@ const MetadataApiAxiosParamCreator = function (configuration) {
1041
1049
  };
1042
1050
  },
1043
1051
  /**
1044
- * Refresh shared metadata for a collection
1052
+ * Get a list of metadata by from the a given contract
1053
+ * @summary Get a list of metadata by from the a given contract
1054
+ * @param {string} chainName The name of chain
1055
+ * @param {string} contractAddress The address of metadata contract
1056
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1057
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1058
+ * @param {number} [pageSize] Maximum number of items to return
1059
+ * @param {*} [options] Override http request option.
1060
+ * @throws {RequiredError}
1061
+ */
1062
+ listMetadata: async (chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1063
+ // verify required parameter 'chainName' is not null or undefined
1064
+ assertParamExists$1('listMetadata', 'chainName', chainName);
1065
+ // verify required parameter 'contractAddress' is not null or undefined
1066
+ assertParamExists$1('listMetadata', 'contractAddress', contractAddress);
1067
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/metadata`
1068
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
1069
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)));
1070
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1071
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1072
+ let baseOptions;
1073
+ if (configuration) {
1074
+ baseOptions = configuration.baseOptions;
1075
+ }
1076
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1077
+ const localVarHeaderParameter = {};
1078
+ const localVarQueryParameter = {};
1079
+ if (fromUpdatedAt !== undefined) {
1080
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1081
+ fromUpdatedAt.toISOString() :
1082
+ fromUpdatedAt;
1083
+ }
1084
+ if (pageCursor !== undefined) {
1085
+ localVarQueryParameter['page_cursor'] = pageCursor;
1086
+ }
1087
+ if (pageSize !== undefined) {
1088
+ localVarQueryParameter['page_size'] = pageSize;
1089
+ }
1090
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1091
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1092
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1093
+ return {
1094
+ url: toPathString$1(localVarUrlObj),
1095
+ options: localVarRequestOptions,
1096
+ };
1097
+ },
1098
+ /**
1099
+ * Refresh stacked metadata
1100
+ * @summary Refresh stacked metadata
1045
1101
  * @param {string} chainName The name of chain
1046
1102
  * @param {string} contractAddress Contract address
1047
1103
  * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
@@ -1068,7 +1124,7 @@ const MetadataApiAxiosParamCreator = function (configuration) {
1068
1124
  const localVarHeaderParameter = {};
1069
1125
  const localVarQueryParameter = {};
1070
1126
  // authentication ImmutableApiKey required
1071
- await setApiKeyToObject(localVarHeaderParameter, "X-Immutable-API-Key", configuration);
1127
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-Key", configuration);
1072
1128
  localVarHeaderParameter['Content-Type'] = 'application/json';
1073
1129
  setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1074
1130
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1080,8 +1136,8 @@ const MetadataApiAxiosParamCreator = function (configuration) {
1080
1136
  };
1081
1137
  },
1082
1138
  /**
1083
- * refresh metadata of a list of nfts
1084
- * @summary refresh the metedata data of a list of nfts by token id
1139
+ * Refresh NFT metadata
1140
+ * @summary Refresh NFT metadata
1085
1141
  * @param {string} contractAddress The address of contract
1086
1142
  * @param {string} chainName The name of chain
1087
1143
  * @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
@@ -1108,7 +1164,7 @@ const MetadataApiAxiosParamCreator = function (configuration) {
1108
1164
  const localVarHeaderParameter = {};
1109
1165
  const localVarQueryParameter = {};
1110
1166
  // authentication ImmutableApiKey required
1111
- await setApiKeyToObject(localVarHeaderParameter, "X-Immutable-API-Key", configuration);
1167
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-Key", configuration);
1112
1168
  localVarHeaderParameter['Content-Type'] = 'application/json';
1113
1169
  setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1114
1170
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -1129,8 +1185,8 @@ const MetadataApiFp = function (configuration) {
1129
1185
  const localVarAxiosParamCreator = MetadataApiAxiosParamCreator(configuration);
1130
1186
  return {
1131
1187
  /**
1132
- * Get a single metadata by ID
1133
- * @summary Get a single metadata by ID
1188
+ * Get metadata by ID
1189
+ * @summary Get metadata by ID
1134
1190
  * @param {string} chainName The name of chain
1135
1191
  * @param {string} contractAddress The address of metadata contract
1136
1192
  * @param {string} metadataId The id of the metadata
@@ -1142,7 +1198,23 @@ const MetadataApiFp = function (configuration) {
1142
1198
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1143
1199
  },
1144
1200
  /**
1145
- * Refresh shared metadata for a collection
1201
+ * Get a list of metadata by from the a given contract
1202
+ * @summary Get a list of metadata by from the a given contract
1203
+ * @param {string} chainName The name of chain
1204
+ * @param {string} contractAddress The address of metadata contract
1205
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1206
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1207
+ * @param {number} [pageSize] Maximum number of items to return
1208
+ * @param {*} [options] Override http request option.
1209
+ * @throws {RequiredError}
1210
+ */
1211
+ async listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
1212
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options);
1213
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1214
+ },
1215
+ /**
1216
+ * Refresh stacked metadata
1217
+ * @summary Refresh stacked metadata
1146
1218
  * @param {string} chainName The name of chain
1147
1219
  * @param {string} contractAddress Contract address
1148
1220
  * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
@@ -1154,8 +1226,8 @@ const MetadataApiFp = function (configuration) {
1154
1226
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1155
1227
  },
1156
1228
  /**
1157
- * refresh metadata of a list of nfts
1158
- * @summary refresh the metedata data of a list of nfts by token id
1229
+ * Refresh NFT metadata
1230
+ * @summary Refresh NFT metadata
1159
1231
  * @param {string} contractAddress The address of contract
1160
1232
  * @param {string} chainName The name of chain
1161
1233
  * @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
@@ -1176,8 +1248,8 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
1176
1248
  const localVarFp = MetadataApiFp(configuration);
1177
1249
  return {
1178
1250
  /**
1179
- * Get a single metadata by ID
1180
- * @summary Get a single metadata by ID
1251
+ * Get metadata by ID
1252
+ * @summary Get metadata by ID
1181
1253
  * @param {string} chainName The name of chain
1182
1254
  * @param {string} contractAddress The address of metadata contract
1183
1255
  * @param {string} metadataId The id of the metadata
@@ -1188,7 +1260,22 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
1188
1260
  return localVarFp.getMetadata(chainName, contractAddress, metadataId, options).then((request) => request(axios, basePath));
1189
1261
  },
1190
1262
  /**
1191
- * Refresh shared metadata for a collection
1263
+ * Get a list of metadata by from the a given contract
1264
+ * @summary Get a list of metadata by from the a given contract
1265
+ * @param {string} chainName The name of chain
1266
+ * @param {string} contractAddress The address of metadata contract
1267
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1268
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1269
+ * @param {number} [pageSize] Maximum number of items to return
1270
+ * @param {*} [options] Override http request option.
1271
+ * @throws {RequiredError}
1272
+ */
1273
+ listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options) {
1274
+ return localVarFp.listMetadata(chainName, contractAddress, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1275
+ },
1276
+ /**
1277
+ * Refresh stacked metadata
1278
+ * @summary Refresh stacked metadata
1192
1279
  * @param {string} chainName The name of chain
1193
1280
  * @param {string} contractAddress Contract address
1194
1281
  * @param {RefreshMetadataByIDRequest} refreshMetadataByIDRequest NFT Metadata Refresh Request
@@ -1199,8 +1286,8 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
1199
1286
  return localVarFp.refreshMetadataByID(chainName, contractAddress, refreshMetadataByIDRequest, options).then((request) => request(axios, basePath));
1200
1287
  },
1201
1288
  /**
1202
- * refresh metadata of a list of nfts
1203
- * @summary refresh the metedata data of a list of nfts by token id
1289
+ * Refresh NFT metadata
1290
+ * @summary Refresh NFT metadata
1204
1291
  * @param {string} contractAddress The address of contract
1205
1292
  * @param {string} chainName The name of chain
1206
1293
  * @param {RefreshNFTMetadataByTokenIDRequest} refreshNFTMetadataByTokenIDRequest the request body
@@ -1220,8 +1307,8 @@ const MetadataApiFactory = function (configuration, basePath, axios) {
1220
1307
  */
1221
1308
  class MetadataApi extends BaseAPI$1 {
1222
1309
  /**
1223
- * Get a single metadata by ID
1224
- * @summary Get a single metadata by ID
1310
+ * Get metadata by ID
1311
+ * @summary Get metadata by ID
1225
1312
  * @param {MetadataApiGetMetadataRequest} requestParameters Request parameters.
1226
1313
  * @param {*} [options] Override http request option.
1227
1314
  * @throws {RequiredError}
@@ -1231,7 +1318,19 @@ class MetadataApi extends BaseAPI$1 {
1231
1318
  return MetadataApiFp(this.configuration).getMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.metadataId, options).then((request) => request(this.axios, this.basePath));
1232
1319
  }
1233
1320
  /**
1234
- * Refresh shared metadata for a collection
1321
+ * Get a list of metadata by from the a given contract
1322
+ * @summary Get a list of metadata by from the a given contract
1323
+ * @param {MetadataApiListMetadataRequest} requestParameters Request parameters.
1324
+ * @param {*} [options] Override http request option.
1325
+ * @throws {RequiredError}
1326
+ * @memberof MetadataApi
1327
+ */
1328
+ listMetadata(requestParameters, options) {
1329
+ return MetadataApiFp(this.configuration).listMetadata(requestParameters.chainName, requestParameters.contractAddress, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1330
+ }
1331
+ /**
1332
+ * Refresh stacked metadata
1333
+ * @summary Refresh stacked metadata
1235
1334
  * @param {MetadataApiRefreshMetadataByIDRequest} requestParameters Request parameters.
1236
1335
  * @param {*} [options] Override http request option.
1237
1336
  * @throws {RequiredError}
@@ -1241,8 +1340,8 @@ class MetadataApi extends BaseAPI$1 {
1241
1340
  return MetadataApiFp(this.configuration).refreshMetadataByID(requestParameters.chainName, requestParameters.contractAddress, requestParameters.refreshMetadataByIDRequest, options).then((request) => request(this.axios, this.basePath));
1242
1341
  }
1243
1342
  /**
1244
- * refresh metadata of a list of nfts
1245
- * @summary refresh the metedata data of a list of nfts by token id
1343
+ * Refresh NFT metadata
1344
+ * @summary Refresh NFT metadata
1246
1345
  * @param {MetadataApiRefreshNFTMetadataByTokenIDRequest} requestParameters Request parameters.
1247
1346
  * @param {*} [options] Override http request option.
1248
1347
  * @throws {RequiredError}
@@ -1317,6 +1416,53 @@ const NftOwnersApiAxiosParamCreator = function (configuration) {
1317
1416
  options: localVarRequestOptions,
1318
1417
  };
1319
1418
  },
1419
+ /**
1420
+ * List owners by contract address
1421
+ * @summary List owners by contract address
1422
+ * @param {string} contractAddress The address of contract
1423
+ * @param {string} chainName The name of chain
1424
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1425
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1426
+ * @param {number} [pageSize] Maximum number of items to return
1427
+ * @param {*} [options] Override http request option.
1428
+ * @throws {RequiredError}
1429
+ */
1430
+ listOwnersByContractAddress: async (contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1431
+ // verify required parameter 'contractAddress' is not null or undefined
1432
+ assertParamExists$1('listOwnersByContractAddress', 'contractAddress', contractAddress);
1433
+ // verify required parameter 'chainName' is not null or undefined
1434
+ assertParamExists$1('listOwnersByContractAddress', 'chainName', chainName);
1435
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/owners`
1436
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
1437
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1438
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1439
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1440
+ let baseOptions;
1441
+ if (configuration) {
1442
+ baseOptions = configuration.baseOptions;
1443
+ }
1444
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1445
+ const localVarHeaderParameter = {};
1446
+ const localVarQueryParameter = {};
1447
+ if (fromUpdatedAt !== undefined) {
1448
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1449
+ fromUpdatedAt.toISOString() :
1450
+ fromUpdatedAt;
1451
+ }
1452
+ if (pageCursor !== undefined) {
1453
+ localVarQueryParameter['page_cursor'] = pageCursor;
1454
+ }
1455
+ if (pageSize !== undefined) {
1456
+ localVarQueryParameter['page_size'] = pageSize;
1457
+ }
1458
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1459
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1460
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1461
+ return {
1462
+ url: toPathString$1(localVarUrlObj),
1463
+ options: localVarRequestOptions,
1464
+ };
1465
+ },
1320
1466
  };
1321
1467
  };
1322
1468
  /**
@@ -1341,6 +1487,21 @@ const NftOwnersApiFp = function (configuration) {
1341
1487
  const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
1342
1488
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1343
1489
  },
1490
+ /**
1491
+ * List owners by contract address
1492
+ * @summary List owners by contract address
1493
+ * @param {string} contractAddress The address of contract
1494
+ * @param {string} chainName The name of chain
1495
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1496
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1497
+ * @param {number} [pageSize] Maximum number of items to return
1498
+ * @param {*} [options] Override http request option.
1499
+ * @throws {RequiredError}
1500
+ */
1501
+ async listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1502
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options);
1503
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1504
+ },
1344
1505
  };
1345
1506
  };
1346
1507
  /**
@@ -1364,6 +1525,20 @@ const NftOwnersApiFactory = function (configuration, basePath, axios) {
1364
1525
  listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
1365
1526
  return localVarFp.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1366
1527
  },
1528
+ /**
1529
+ * List owners by contract address
1530
+ * @summary List owners by contract address
1531
+ * @param {string} contractAddress The address of contract
1532
+ * @param {string} chainName The name of chain
1533
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1534
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1535
+ * @param {number} [pageSize] Maximum number of items to return
1536
+ * @param {*} [options] Override http request option.
1537
+ * @throws {RequiredError}
1538
+ */
1539
+ listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1540
+ return localVarFp.listOwnersByContractAddress(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1541
+ },
1367
1542
  };
1368
1543
  };
1369
1544
  /**
@@ -1384,6 +1559,17 @@ class NftOwnersApi extends BaseAPI$1 {
1384
1559
  listNFTOwners(requestParameters, options) {
1385
1560
  return NftOwnersApiFp(this.configuration).listNFTOwners(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1386
1561
  }
1562
+ /**
1563
+ * List owners by contract address
1564
+ * @summary List owners by contract address
1565
+ * @param {NftOwnersApiListOwnersByContractAddressRequest} requestParameters Request parameters.
1566
+ * @param {*} [options] Override http request option.
1567
+ * @throws {RequiredError}
1568
+ * @memberof NftOwnersApi
1569
+ */
1570
+ listOwnersByContractAddress(requestParameters, options) {
1571
+ return NftOwnersApiFp(this.configuration).listOwnersByContractAddress(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1572
+ }
1387
1573
  }
1388
1574
 
1389
1575
  /* tslint:disable */
@@ -1442,17 +1628,106 @@ const NftsApiAxiosParamCreator = function (configuration) {
1442
1628
  options: localVarRequestOptions,
1443
1629
  };
1444
1630
  },
1631
+ /**
1632
+ * List all NFT owners on a chain
1633
+ * @summary List all NFT owners
1634
+ * @param {string} chainName The name of chain
1635
+ * @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
1636
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1637
+ * @param {number} [pageSize] Maximum number of items to return
1638
+ * @param {*} [options] Override http request option.
1639
+ * @throws {RequiredError}
1640
+ */
1641
+ listAllNFTOwners: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1642
+ // verify required parameter 'chainName' is not null or undefined
1643
+ assertParamExists$1('listAllNFTOwners', 'chainName', chainName);
1644
+ // verify required parameter 'fromUpdatedAt' is not null or undefined
1645
+ assertParamExists$1('listAllNFTOwners', 'fromUpdatedAt', fromUpdatedAt);
1646
+ const localVarPath = `/v1/chains/{chain_name}/nft-owners`
1647
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1648
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1649
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1650
+ let baseOptions;
1651
+ if (configuration) {
1652
+ baseOptions = configuration.baseOptions;
1653
+ }
1654
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1655
+ const localVarHeaderParameter = {};
1656
+ const localVarQueryParameter = {};
1657
+ if (fromUpdatedAt !== undefined) {
1658
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1659
+ fromUpdatedAt.toISOString() :
1660
+ fromUpdatedAt;
1661
+ }
1662
+ if (pageCursor !== undefined) {
1663
+ localVarQueryParameter['page_cursor'] = pageCursor;
1664
+ }
1665
+ if (pageSize !== undefined) {
1666
+ localVarQueryParameter['page_size'] = pageSize;
1667
+ }
1668
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1669
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1670
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1671
+ return {
1672
+ url: toPathString$1(localVarUrlObj),
1673
+ options: localVarRequestOptions,
1674
+ };
1675
+ },
1676
+ /**
1677
+ * List all NFTs on a chain
1678
+ * @summary List all NFTs
1679
+ * @param {string} chainName The name of chain
1680
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1681
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1682
+ * @param {number} [pageSize] Maximum number of items to return
1683
+ * @param {*} [options] Override http request option.
1684
+ * @throws {RequiredError}
1685
+ */
1686
+ listAllNFTs: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1687
+ // verify required parameter 'chainName' is not null or undefined
1688
+ assertParamExists$1('listAllNFTs', 'chainName', chainName);
1689
+ const localVarPath = `/v1/chains/{chain_name}/nfts`
1690
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
1691
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1692
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
1693
+ let baseOptions;
1694
+ if (configuration) {
1695
+ baseOptions = configuration.baseOptions;
1696
+ }
1697
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1698
+ const localVarHeaderParameter = {};
1699
+ const localVarQueryParameter = {};
1700
+ if (fromUpdatedAt !== undefined) {
1701
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1702
+ fromUpdatedAt.toISOString() :
1703
+ fromUpdatedAt;
1704
+ }
1705
+ if (pageCursor !== undefined) {
1706
+ localVarQueryParameter['page_cursor'] = pageCursor;
1707
+ }
1708
+ if (pageSize !== undefined) {
1709
+ localVarQueryParameter['page_size'] = pageSize;
1710
+ }
1711
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
1712
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1713
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1714
+ return {
1715
+ url: toPathString$1(localVarUrlObj),
1716
+ options: localVarRequestOptions,
1717
+ };
1718
+ },
1445
1719
  /**
1446
1720
  * List NFTs by contract address
1447
1721
  * @summary List NFTs by contract address
1448
1722
  * @param {string} contractAddress Contract address
1449
1723
  * @param {string} chainName The name of chain
1724
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1450
1725
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1451
1726
  * @param {number} [pageSize] Maximum number of items to return
1452
1727
  * @param {*} [options] Override http request option.
1453
1728
  * @throws {RequiredError}
1454
1729
  */
1455
- listNFTs: async (contractAddress, chainName, pageCursor, pageSize, options = {}) => {
1730
+ listNFTs: async (contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
1456
1731
  // verify required parameter 'contractAddress' is not null or undefined
1457
1732
  assertParamExists$1('listNFTs', 'contractAddress', contractAddress);
1458
1733
  // verify required parameter 'chainName' is not null or undefined
@@ -1469,6 +1744,11 @@ const NftsApiAxiosParamCreator = function (configuration) {
1469
1744
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1470
1745
  const localVarHeaderParameter = {};
1471
1746
  const localVarQueryParameter = {};
1747
+ if (fromUpdatedAt !== undefined) {
1748
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
1749
+ fromUpdatedAt.toISOString() :
1750
+ fromUpdatedAt;
1751
+ }
1472
1752
  if (pageCursor !== undefined) {
1473
1753
  localVarQueryParameter['page_cursor'] = pageCursor;
1474
1754
  }
@@ -1550,18 +1830,47 @@ const NftsApiFp = function (configuration) {
1550
1830
  const localVarAxiosArgs = await localVarAxiosParamCreator.getNFT(contractAddress, tokenId, chainName, options);
1551
1831
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1552
1832
  },
1833
+ /**
1834
+ * List all NFT owners on a chain
1835
+ * @summary List all NFT owners
1836
+ * @param {string} chainName The name of chain
1837
+ * @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
1838
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1839
+ * @param {number} [pageSize] Maximum number of items to return
1840
+ * @param {*} [options] Override http request option.
1841
+ * @throws {RequiredError}
1842
+ */
1843
+ async listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1844
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options);
1845
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1846
+ },
1847
+ /**
1848
+ * List all NFTs on a chain
1849
+ * @summary List all NFTs
1850
+ * @param {string} chainName The name of chain
1851
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1852
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1853
+ * @param {number} [pageSize] Maximum number of items to return
1854
+ * @param {*} [options] Override http request option.
1855
+ * @throws {RequiredError}
1856
+ */
1857
+ async listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1858
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options);
1859
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1860
+ },
1553
1861
  /**
1554
1862
  * List NFTs by contract address
1555
1863
  * @summary List NFTs by contract address
1556
1864
  * @param {string} contractAddress Contract address
1557
1865
  * @param {string} chainName The name of chain
1866
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1558
1867
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1559
1868
  * @param {number} [pageSize] Maximum number of items to return
1560
1869
  * @param {*} [options] Override http request option.
1561
1870
  * @throws {RequiredError}
1562
1871
  */
1563
- async listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
1564
- const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, pageCursor, pageSize, options);
1872
+ async listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1873
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options);
1565
1874
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
1566
1875
  },
1567
1876
  /**
@@ -1600,18 +1909,45 @@ const NftsApiFactory = function (configuration, basePath, axios) {
1600
1909
  getNFT(contractAddress, tokenId, chainName, options) {
1601
1910
  return localVarFp.getNFT(contractAddress, tokenId, chainName, options).then((request) => request(axios, basePath));
1602
1911
  },
1912
+ /**
1913
+ * List all NFT owners on a chain
1914
+ * @summary List all NFT owners
1915
+ * @param {string} chainName The name of chain
1916
+ * @param {string} fromUpdatedAt Datetime to use as the oldest updated timestamp
1917
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1918
+ * @param {number} [pageSize] Maximum number of items to return
1919
+ * @param {*} [options] Override http request option.
1920
+ * @throws {RequiredError}
1921
+ */
1922
+ listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1923
+ return localVarFp.listAllNFTOwners(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1924
+ },
1925
+ /**
1926
+ * List all NFTs on a chain
1927
+ * @summary List all NFTs
1928
+ * @param {string} chainName The name of chain
1929
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1930
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1931
+ * @param {number} [pageSize] Maximum number of items to return
1932
+ * @param {*} [options] Override http request option.
1933
+ * @throws {RequiredError}
1934
+ */
1935
+ listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1936
+ return localVarFp.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1937
+ },
1603
1938
  /**
1604
1939
  * List NFTs by contract address
1605
1940
  * @summary List NFTs by contract address
1606
1941
  * @param {string} contractAddress Contract address
1607
1942
  * @param {string} chainName The name of chain
1943
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
1608
1944
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
1609
1945
  * @param {number} [pageSize] Maximum number of items to return
1610
1946
  * @param {*} [options] Override http request option.
1611
1947
  * @throws {RequiredError}
1612
1948
  */
1613
- listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
1614
- return localVarFp.listNFTs(contractAddress, chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1949
+ listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options) {
1950
+ return localVarFp.listNFTs(contractAddress, chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
1615
1951
  },
1616
1952
  /**
1617
1953
  * List NFTs by account address
@@ -1647,6 +1983,28 @@ class NftsApi extends BaseAPI$1 {
1647
1983
  getNFT(requestParameters, options) {
1648
1984
  return NftsApiFp(this.configuration).getNFT(requestParameters.contractAddress, requestParameters.tokenId, requestParameters.chainName, options).then((request) => request(this.axios, this.basePath));
1649
1985
  }
1986
+ /**
1987
+ * List all NFT owners on a chain
1988
+ * @summary List all NFT owners
1989
+ * @param {NftsApiListAllNFTOwnersRequest} requestParameters Request parameters.
1990
+ * @param {*} [options] Override http request option.
1991
+ * @throws {RequiredError}
1992
+ * @memberof NftsApi
1993
+ */
1994
+ listAllNFTOwners(requestParameters, options) {
1995
+ return NftsApiFp(this.configuration).listAllNFTOwners(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1996
+ }
1997
+ /**
1998
+ * List all NFTs on a chain
1999
+ * @summary List all NFTs
2000
+ * @param {NftsApiListAllNFTsRequest} requestParameters Request parameters.
2001
+ * @param {*} [options] Override http request option.
2002
+ * @throws {RequiredError}
2003
+ * @memberof NftsApi
2004
+ */
2005
+ listAllNFTs(requestParameters, options) {
2006
+ return NftsApiFp(this.configuration).listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2007
+ }
1650
2008
  /**
1651
2009
  * List NFTs by contract address
1652
2010
  * @summary List NFTs by contract address
@@ -1656,7 +2014,7 @@ class NftsApi extends BaseAPI$1 {
1656
2014
  * @memberof NftsApi
1657
2015
  */
1658
2016
  listNFTs(requestParameters, options) {
1659
- return NftsApiFp(this.configuration).listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2017
+ return NftsApiFp(this.configuration).listNFTs(requestParameters.contractAddress, requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
1660
2018
  }
1661
2019
  /**
1662
2020
  * List NFTs by account address
@@ -1690,6 +2048,40 @@ class NftsApi extends BaseAPI$1 {
1690
2048
  */
1691
2049
  const OrdersApiAxiosParamCreator = function (configuration) {
1692
2050
  return {
2051
+ /**
2052
+ * Cancel one or more orders
2053
+ * @summary Cancel one or more orders
2054
+ * @param {string} chainName
2055
+ * @param {CancelOrdersRequestBody} cancelOrdersRequestBody
2056
+ * @param {*} [options] Override http request option.
2057
+ * @throws {RequiredError}
2058
+ */
2059
+ cancelOrders: async (chainName, cancelOrdersRequestBody, options = {}) => {
2060
+ // verify required parameter 'chainName' is not null or undefined
2061
+ assertParamExists$1('cancelOrders', 'chainName', chainName);
2062
+ // verify required parameter 'cancelOrdersRequestBody' is not null or undefined
2063
+ assertParamExists$1('cancelOrders', 'cancelOrdersRequestBody', cancelOrdersRequestBody);
2064
+ const localVarPath = `/v1/chains/{chain_name}/orders/cancel`
2065
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
2066
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2067
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
2068
+ let baseOptions;
2069
+ if (configuration) {
2070
+ baseOptions = configuration.baseOptions;
2071
+ }
2072
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2073
+ const localVarHeaderParameter = {};
2074
+ const localVarQueryParameter = {};
2075
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2076
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
2077
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2078
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2079
+ localVarRequestOptions.data = serializeDataIfNeeded$1(cancelOrdersRequestBody, localVarRequestOptions, configuration);
2080
+ return {
2081
+ url: toPathString$1(localVarUrlObj),
2082
+ options: localVarRequestOptions,
2083
+ };
2084
+ },
1693
2085
  /**
1694
2086
  * Create a listing
1695
2087
  * @summary Create a listing
@@ -1943,6 +2335,18 @@ const OrdersApiAxiosParamCreator = function (configuration) {
1943
2335
  const OrdersApiFp = function (configuration) {
1944
2336
  const localVarAxiosParamCreator = OrdersApiAxiosParamCreator(configuration);
1945
2337
  return {
2338
+ /**
2339
+ * Cancel one or more orders
2340
+ * @summary Cancel one or more orders
2341
+ * @param {string} chainName
2342
+ * @param {CancelOrdersRequestBody} cancelOrdersRequestBody
2343
+ * @param {*} [options] Override http request option.
2344
+ * @throws {RequiredError}
2345
+ */
2346
+ async cancelOrders(chainName, cancelOrdersRequestBody, options) {
2347
+ const localVarAxiosArgs = await localVarAxiosParamCreator.cancelOrders(chainName, cancelOrdersRequestBody, options);
2348
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
2349
+ },
1946
2350
  /**
1947
2351
  * Create a listing
1948
2352
  * @summary Create a listing
@@ -2035,6 +2439,17 @@ const OrdersApiFp = function (configuration) {
2035
2439
  const OrdersApiFactory = function (configuration, basePath, axios) {
2036
2440
  const localVarFp = OrdersApiFp(configuration);
2037
2441
  return {
2442
+ /**
2443
+ * Cancel one or more orders
2444
+ * @summary Cancel one or more orders
2445
+ * @param {string} chainName
2446
+ * @param {CancelOrdersRequestBody} cancelOrdersRequestBody
2447
+ * @param {*} [options] Override http request option.
2448
+ * @throws {RequiredError}
2449
+ */
2450
+ cancelOrders(chainName, cancelOrdersRequestBody, options) {
2451
+ return localVarFp.cancelOrders(chainName, cancelOrdersRequestBody, options).then((request) => request(axios, basePath));
2452
+ },
2038
2453
  /**
2039
2454
  * Create a listing
2040
2455
  * @summary Create a listing
@@ -2121,6 +2536,17 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
2121
2536
  * @extends {BaseAPI}
2122
2537
  */
2123
2538
  class OrdersApi extends BaseAPI$1 {
2539
+ /**
2540
+ * Cancel one or more orders
2541
+ * @summary Cancel one or more orders
2542
+ * @param {OrdersApiCancelOrdersRequest} requestParameters Request parameters.
2543
+ * @param {*} [options] Override http request option.
2544
+ * @throws {RequiredError}
2545
+ * @memberof OrdersApi
2546
+ */
2547
+ cancelOrders(requestParameters, options) {
2548
+ return OrdersApiFp(this.configuration).cancelOrders(requestParameters.chainName, requestParameters.cancelOrdersRequestBody, options).then((request) => request(this.axios, this.basePath));
2549
+ }
2124
2550
  /**
2125
2551
  * Create a listing
2126
2552
  * @summary Create a listing
@@ -2422,12 +2848,13 @@ const TokensApiAxiosParamCreator = function (configuration) {
2422
2848
  * List ERC20 tokens
2423
2849
  * @summary List ERC20 tokens
2424
2850
  * @param {string} chainName The name of chain
2851
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
2425
2852
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2426
2853
  * @param {number} [pageSize] Maximum number of items to return
2427
2854
  * @param {*} [options] Override http request option.
2428
2855
  * @throws {RequiredError}
2429
2856
  */
2430
- listERC20Tokens: async (chainName, pageCursor, pageSize, options = {}) => {
2857
+ listERC20Tokens: async (chainName, fromUpdatedAt, pageCursor, pageSize, options = {}) => {
2431
2858
  // verify required parameter 'chainName' is not null or undefined
2432
2859
  assertParamExists$1('listERC20Tokens', 'chainName', chainName);
2433
2860
  const localVarPath = `/v1/chains/{chain_name}/tokens`
@@ -2441,6 +2868,11 @@ const TokensApiAxiosParamCreator = function (configuration) {
2441
2868
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2442
2869
  const localVarHeaderParameter = {};
2443
2870
  const localVarQueryParameter = {};
2871
+ if (fromUpdatedAt !== undefined) {
2872
+ localVarQueryParameter['from_updated_at'] = (fromUpdatedAt instanceof Date) ?
2873
+ fromUpdatedAt.toISOString() :
2874
+ fromUpdatedAt;
2875
+ }
2444
2876
  if (pageCursor !== undefined) {
2445
2877
  localVarQueryParameter['page_cursor'] = pageCursor;
2446
2878
  }
@@ -2480,13 +2912,14 @@ const TokensApiFp = function (configuration) {
2480
2912
  * List ERC20 tokens
2481
2913
  * @summary List ERC20 tokens
2482
2914
  * @param {string} chainName The name of chain
2915
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
2483
2916
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2484
2917
  * @param {number} [pageSize] Maximum number of items to return
2485
2918
  * @param {*} [options] Override http request option.
2486
2919
  * @throws {RequiredError}
2487
2920
  */
2488
- async listERC20Tokens(chainName, pageCursor, pageSize, options) {
2489
- const localVarAxiosArgs = await localVarAxiosParamCreator.listERC20Tokens(chainName, pageCursor, pageSize, options);
2921
+ async listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
2922
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options);
2490
2923
  return createRequestFunction$1(localVarAxiosArgs, globalAxios$1, BASE_PATH$1, configuration);
2491
2924
  },
2492
2925
  };
@@ -2513,13 +2946,14 @@ const TokensApiFactory = function (configuration, basePath, axios) {
2513
2946
  * List ERC20 tokens
2514
2947
  * @summary List ERC20 tokens
2515
2948
  * @param {string} chainName The name of chain
2949
+ * @param {string} [fromUpdatedAt] Datetime to use as the oldest updated timestamp
2516
2950
  * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
2517
2951
  * @param {number} [pageSize] Maximum number of items to return
2518
2952
  * @param {*} [options] Override http request option.
2519
2953
  * @throws {RequiredError}
2520
2954
  */
2521
- listERC20Tokens(chainName, pageCursor, pageSize, options) {
2522
- return localVarFp.listERC20Tokens(chainName, pageCursor, pageSize, options).then((request) => request(axios, basePath));
2955
+ listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options) {
2956
+ return localVarFp.listERC20Tokens(chainName, fromUpdatedAt, pageCursor, pageSize, options).then((request) => request(axios, basePath));
2523
2957
  },
2524
2958
  };
2525
2959
  };
@@ -2550,7 +2984,7 @@ class TokensApi extends BaseAPI$1 {
2550
2984
  * @memberof TokensApi
2551
2985
  */
2552
2986
  listERC20Tokens(requestParameters, options) {
2553
- return TokensApiFp(this.configuration).listERC20Tokens(requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2987
+ return TokensApiFp(this.configuration).listERC20Tokens(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
2554
2988
  }
2555
2989
  }
2556
2990
 
@@ -2744,6 +3178,23 @@ const APIError500AllOfCodeEnum = {
2744
3178
  InternalServerError: 'INTERNAL_SERVER_ERROR'
2745
3179
  };
2746
3180
 
3181
+ /* tslint:disable */
3182
+ /* eslint-disable */
3183
+ /**
3184
+ * Immutable zkEVM API
3185
+ * Immutable Multi Rollup API
3186
+ *
3187
+ * The version of the OpenAPI document: 1.0.0
3188
+ * Contact: support@immutable.com
3189
+ *
3190
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3191
+ * https://openapi-generator.tech
3192
+ * Do not edit the class manually.
3193
+ */
3194
+ const APIError501AllOfCodeEnum = {
3195
+ NotImplementedError: 'NOT_IMPLEMENTED_ERROR'
3196
+ };
3197
+
2747
3198
  /* tslint:disable */
2748
3199
  /* eslint-disable */
2749
3200
  /**
@@ -2771,6 +3222,23 @@ const ActivityType = {
2771
3222
  Withdrawal: 'withdrawal'
2772
3223
  };
2773
3224
 
3225
+ /* tslint:disable */
3226
+ /* eslint-disable */
3227
+ /**
3228
+ * Immutable zkEVM API
3229
+ * Immutable Multi Rollup API
3230
+ *
3231
+ * The version of the OpenAPI document: 1.0.0
3232
+ * Contact: support@immutable.com
3233
+ *
3234
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
3235
+ * https://openapi-generator.tech
3236
+ * Do not edit the class manually.
3237
+ */
3238
+ const CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum = {
3239
+ AlreadyFilled: 'ALREADY_FILLED'
3240
+ };
3241
+
2774
3242
  /* tslint:disable */
2775
3243
  /* eslint-disable */
2776
3244
  /**
@@ -2842,8 +3310,8 @@ const ERC721ItemItemTypeEnum = {
2842
3310
  */
2843
3311
  const FeeFeeTypeEnum = {
2844
3312
  Royalty: 'ROYALTY',
2845
- MakerMarketplace: 'MAKER_MARKETPLACE',
2846
- TakerMarketplace: 'TAKER_MARKETPLACE',
3313
+ MakerEcosystem: 'MAKER_ECOSYSTEM',
3314
+ TakerEcosystem: 'TAKER_ECOSYSTEM',
2847
3315
  Protocol: 'PROTOCOL'
2848
3316
  };
2849
3317
 
@@ -2904,7 +3372,7 @@ const NativeItemItemTypeEnum = {
2904
3372
  * @export
2905
3373
  * @enum {string}
2906
3374
  */
2907
- const OrderStatus$1 = {
3375
+ const OrderStatus = {
2908
3376
  Pending: 'PENDING',
2909
3377
  Active: 'ACTIVE',
2910
3378
  Inactive: 'INACTIVE',
@@ -2991,11 +3459,13 @@ var index = /*#__PURE__*/Object.freeze({
2991
3459
  APIError404AllOfCodeEnum: APIError404AllOfCodeEnum,
2992
3460
  APIError429AllOfCodeEnum: APIError429AllOfCodeEnum,
2993
3461
  APIError500AllOfCodeEnum: APIError500AllOfCodeEnum,
3462
+ APIError501AllOfCodeEnum: APIError501AllOfCodeEnum,
2994
3463
  ActivitiesApi: ActivitiesApi,
2995
3464
  ActivitiesApiAxiosParamCreator: ActivitiesApiAxiosParamCreator,
2996
3465
  ActivitiesApiFactory: ActivitiesApiFactory,
2997
3466
  ActivitiesApiFp: ActivitiesApiFp,
2998
3467
  ActivityType: ActivityType,
3468
+ CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum: CancelOrdersResultResultFailedCancellationsInnerReasonCodeEnum,
2999
3469
  ChainsApi: ChainsApi,
3000
3470
  ChainsApiAxiosParamCreator: ChainsApiAxiosParamCreator,
3001
3471
  ChainsApiFactory: ChainsApiFactory,
@@ -3023,7 +3493,7 @@ var index = /*#__PURE__*/Object.freeze({
3023
3493
  NftsApiAxiosParamCreator: NftsApiAxiosParamCreator,
3024
3494
  NftsApiFactory: NftsApiFactory,
3025
3495
  NftsApiFp: NftsApiFp,
3026
- OrderStatus: OrderStatus$1,
3496
+ OrderStatus: OrderStatus,
3027
3497
  OrdersApi: OrdersApi,
3028
3498
  OrdersApiAxiosParamCreator: OrdersApiAxiosParamCreator,
3029
3499
  OrdersApiFactory: OrdersApiFactory,
@@ -3063,7 +3533,7 @@ class MultiRollupApiClients {
3063
3533
  }
3064
3534
 
3065
3535
  // eslint-disable-next-line @typescript-eslint/naming-convention
3066
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.24.1' };
3536
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.26.0' };
3067
3537
  const createConfig = ({ basePath, headers, }) => {
3068
3538
  if (!basePath.trim()) {
3069
3539
  throw Error('basePath can not be empty');
@@ -3123,7 +3593,7 @@ class APIError extends Error {
3123
3593
 
3124
3594
  /* eslint-disable implicit-arrow-linebreak */
3125
3595
  const defaultHeaders = {
3126
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.24.1',
3596
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.26.0',
3127
3597
  };
3128
3598
  /**
3129
3599
  * createAPIConfiguration to create a custom Configuration
@@ -3356,6 +3826,20 @@ class BlockchainData {
3356
3826
  throw formatError(err);
3357
3827
  });
3358
3828
  }
3829
+ /**
3830
+ * List All NFTs on a chain
3831
+ * @param request - the request object containing the parameters to be provided in the API request
3832
+ * @returns a promise that resolves with a list of NFTs
3833
+ * @throws {@link index.APIError}
3834
+ */
3835
+ async listAllNFTs(request) {
3836
+ return await this.nfts
3837
+ .listAllNFTs(request)
3838
+ .then((res) => res.data)
3839
+ .catch((err) => {
3840
+ throw formatError(err);
3841
+ });
3842
+ }
3359
3843
  /**
3360
3844
  * List NFT owners by token ID
3361
3845
  * @param request - the request object containing the parameters to be provided in the API request
@@ -3370,6 +3854,34 @@ class BlockchainData {
3370
3854
  throw formatError(err);
3371
3855
  });
3372
3856
  }
3857
+ /**
3858
+ * List NFT owners by contract address
3859
+ * @param request - the request object containing the parameters to be provided in the API request
3860
+ * @returns a promise that resolves with a list of NFT owners
3861
+ * @throws {@link index.APIError}
3862
+ */
3863
+ async listNFTOwnersByContractAddress(request) {
3864
+ return await this.nftOwners
3865
+ .listOwnersByContractAddress(request)
3866
+ .then((res) => res.data)
3867
+ .catch((err) => {
3868
+ throw formatError(err);
3869
+ });
3870
+ }
3871
+ /**
3872
+ * List All NFT owners on a chain
3873
+ * @param request - the request object containing the parameters to be provided in the API request
3874
+ * @returns a promise that resolves with a list of NFT owners
3875
+ * @throws {@link index.APIError}
3876
+ */
3877
+ async listAllNFTOwners(request) {
3878
+ return await this.nfts
3879
+ .listAllNFTOwners(request)
3880
+ .then((res) => res.data)
3881
+ .catch((err) => {
3882
+ throw formatError(err);
3883
+ });
3884
+ }
3373
3885
  /**
3374
3886
  * List ERC20 Token contracts
3375
3887
  * @param request - the request object containing the parameters to be provided in the API request
@@ -3398,6 +3910,34 @@ class BlockchainData {
3398
3910
  throw formatError(err);
3399
3911
  });
3400
3912
  }
3913
+ /**
3914
+ * Get metadata by ID
3915
+ * @param request - the request object containing the parameters to be provided in the API request
3916
+ * @returns a promise that resolves with a single Metadata
3917
+ * @throws {@link index.APIError}
3918
+ */
3919
+ async getMetadata(request) {
3920
+ return await this.metadata
3921
+ .getMetadata(request)
3922
+ .then((res) => res.data)
3923
+ .catch((err) => {
3924
+ throw formatError(err);
3925
+ });
3926
+ }
3927
+ /**
3928
+ * List NFT Metadata by contract address
3929
+ * @param request - the request object containing the parameters to be provided in the API request
3930
+ * @returns a promise that resolves with a list of Metadata
3931
+ * @throws {@link index.APIError}
3932
+ */
3933
+ async listNFTMetadataByContractAddress(request) {
3934
+ return await this.metadata
3935
+ .listMetadata(request)
3936
+ .then((res) => res.data)
3937
+ .catch((err) => {
3938
+ throw formatError(err);
3939
+ });
3940
+ }
3401
3941
  /**
3402
3942
  * Refresh collection metadata
3403
3943
  * @param request - the request object containing the parameters to be provided in the API request
@@ -3457,7 +3997,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
3457
3997
  chainID,
3458
3998
  coreContractAddress,
3459
3999
  registrationContractAddress,
3460
- sdkVersion: 'ts-immutable-sdk-0.24.1',
4000
+ sdkVersion: 'ts-immutable-sdk-0.26.0',
3461
4001
  });
3462
4002
  /**
3463
4003
  * Sets `sdkVersion` at the time of build
@@ -10534,6 +11074,31 @@ class OrdersService {
10534
11074
  constructor(httpRequest) {
10535
11075
  this.httpRequest = httpRequest;
10536
11076
  }
11077
+ /**
11078
+ * Cancel one or more orders
11079
+ * Cancel one or more orders
11080
+ * @returns CancelOrdersResult Orders cancellation response.
11081
+ * @throws ApiError
11082
+ */
11083
+ cancelOrders({ chainName, requestBody, }) {
11084
+ return this.httpRequest.request({
11085
+ method: 'POST',
11086
+ url: '/v1/chains/{chain_name}/orders/cancel',
11087
+ path: {
11088
+ 'chain_name': chainName,
11089
+ },
11090
+ body: requestBody,
11091
+ mediaType: 'application/json',
11092
+ errors: {
11093
+ 400: `Bad Request (400)`,
11094
+ 401: `Unauthorised Request (401)`,
11095
+ 404: `The specified resource was not found (404)`,
11096
+ 429: `Too Many Requests (429)`,
11097
+ 500: `Internal Server Error (500)`,
11098
+ 501: `Not Implemented Error (501)`,
11099
+ },
11100
+ });
11101
+ }
10537
11102
  /**
10538
11103
  * List all listings
10539
11104
  * List all listings
@@ -10698,6 +11263,17 @@ class OrderBookClient {
10698
11263
  }
10699
11264
  }
10700
11265
 
11266
+ /* istanbul ignore file */
11267
+ /* tslint:disable */
11268
+ /* eslint-disable */
11269
+ var CancelledOrderStatus;
11270
+ (function (CancelledOrderStatus) {
11271
+ (function (cancellation_type) {
11272
+ cancellation_type["ON_CHAIN"] = "ON_CHAIN";
11273
+ cancellation_type["OFF_CHAIN"] = "OFF_CHAIN";
11274
+ })(CancelledOrderStatus.cancellation_type || (CancelledOrderStatus.cancellation_type = {}));
11275
+ })(CancelledOrderStatus || (CancelledOrderStatus = {}));
11276
+
10701
11277
  /* istanbul ignore file */
10702
11278
  /* tslint:disable */
10703
11279
  /* eslint-disable */
@@ -10717,15 +11293,15 @@ var Fee;
10717
11293
  /**
10718
11294
  * The Order status
10719
11295
  */
10720
- var OrderStatus;
10721
- (function (OrderStatus) {
10722
- OrderStatus["PENDING"] = "PENDING";
10723
- OrderStatus["ACTIVE"] = "ACTIVE";
10724
- OrderStatus["INACTIVE"] = "INACTIVE";
10725
- OrderStatus["FILLED"] = "FILLED";
10726
- OrderStatus["CANCELLED"] = "CANCELLED";
10727
- OrderStatus["EXPIRED"] = "EXPIRED";
10728
- })(OrderStatus || (OrderStatus = {}));
11296
+ var OrderStatusName;
11297
+ (function (OrderStatusName) {
11298
+ OrderStatusName["PENDING"] = "PENDING";
11299
+ OrderStatusName["ACTIVE"] = "ACTIVE";
11300
+ OrderStatusName["INACTIVE"] = "INACTIVE";
11301
+ OrderStatusName["FILLED"] = "FILLED";
11302
+ OrderStatusName["EXPIRED"] = "EXPIRED";
11303
+ OrderStatusName["CANCELLED"] = "CANCELLED";
11304
+ })(OrderStatusName || (OrderStatusName = {}));
10729
11305
 
10730
11306
  /* istanbul ignore file */
10731
11307
  /* tslint:disable */
@@ -11100,18 +11676,57 @@ class Seaport {
11100
11676
  buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
11101
11677
  purpose: TransactionPurpose.FULFILL_ORDER,
11102
11678
  });
11103
- // Expirtaion bytes in SIP7 extra data [21:29]
11104
- // In hex string -> [21 * 2 + 2 (0x) : 29 * 2]
11105
- // In JS slice (start, end_inclusive), (44,60)
11106
- // 8 bytes uint64 epoch time in seconds
11107
- const expirationHex = extraData.slice(44, 60);
11108
- const expirationInSeconds = parseInt(expirationHex, 16);
11109
11679
  return {
11110
11680
  actions: fulfillmentActions,
11111
- expiration: (new Date(expirationInSeconds * 1000)).toISOString(),
11681
+ expiration: Seaport.getExpirationISOTimeFromExtraData(extraData),
11112
11682
  order: mapFromOpenApiOrder(order),
11113
11683
  };
11114
11684
  }
11685
+ async fulfillBulkOrders(fulfillingOrders, account) {
11686
+ // TODO: this function right now does not handle errors from the seaport.js
11687
+ // we should figure out why orders are rejected and return a submission
11688
+ // transaction on best efforts basis
11689
+ const fulfillOrderDetails = fulfillingOrders.map((o) => {
11690
+ const { orderComponents, tips } = this.mapImmutableOrderToSeaportOrderComponents(o.order);
11691
+ return {
11692
+ order: {
11693
+ parameters: orderComponents,
11694
+ signature: o.order.signature,
11695
+ },
11696
+ extraData: o.extra_data,
11697
+ tips,
11698
+ };
11699
+ });
11700
+ const { actions: seaportActions } = await this.getSeaportLib().fulfillOrders({
11701
+ fulfillOrderDetails,
11702
+ accountAddress: account,
11703
+ });
11704
+ const fulfillmentActions = [];
11705
+ const approvalAction = seaportActions.find((action) => action.type === 'approval');
11706
+ if (approvalAction) {
11707
+ fulfillmentActions.push({
11708
+ type: ActionType.TRANSACTION,
11709
+ buildTransaction: prepareTransaction(approvalAction.transactionMethods),
11710
+ purpose: TransactionPurpose.APPROVAL,
11711
+ });
11712
+ }
11713
+ const fulfilOrderAction = seaportActions.find((action) => action.type === 'exchange');
11714
+ if (!fulfilOrderAction) {
11715
+ throw new Error('No exchange action found');
11716
+ }
11717
+ fulfillmentActions.push({
11718
+ type: ActionType.TRANSACTION,
11719
+ buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
11720
+ purpose: TransactionPurpose.FULFILL_ORDER,
11721
+ });
11722
+ return {
11723
+ actions: fulfillmentActions,
11724
+ // return the shortest expiration out of all extraData - they should be very close
11725
+ expiration: fulfillOrderDetails
11726
+ .map((d) => Seaport.getExpirationISOTimeFromExtraData(d.extraData))
11727
+ .reduce((p, c) => (new Date(p) < new Date(c) ? p : c)),
11728
+ };
11729
+ }
11115
11730
  async cancelOrder(order, account) {
11116
11731
  const { orderComponents } = this.mapImmutableOrderToSeaportOrderComponents(order);
11117
11732
  const seaportLib = this.getSeaportLib(order);
@@ -11135,9 +11750,7 @@ class Seaport {
11135
11750
  ],
11136
11751
  consideration: [
11137
11752
  {
11138
- token: considerationItem.type === 'ERC20'
11139
- ? considerationItem.contractAddress
11140
- : undefined,
11753
+ token: considerationItem.type === 'ERC20' ? considerationItem.contractAddress : undefined,
11141
11754
  amount: considerationItem.amount,
11142
11755
  recipient: offerer,
11143
11756
  },
@@ -11170,6 +11783,15 @@ class Seaport {
11170
11783
  // }
11171
11784
  return this.seaportLibFactory.create(seaportVersion, seaportAddress);
11172
11785
  }
11786
+ static getExpirationISOTimeFromExtraData(extraData) {
11787
+ // Expirtaion bytes in SIP7 extra data [21:29]
11788
+ // In hex string -> [21 * 2 + 2 (0x) : 29 * 2]
11789
+ // In JS slice (start, end_inclusive), (44,60)
11790
+ // 8 bytes uint64 epoch time in seconds
11791
+ const expirationHex = extraData.slice(44, 60);
11792
+ const expirationInSeconds = parseInt(expirationHex, 16);
11793
+ return new Date(expirationInSeconds * 1000).toISOString();
11794
+ }
11173
11795
  }
11174
11796
 
11175
11797
  class ImmutableApiClient {
@@ -11468,11 +12090,29 @@ class Orderbook {
11468
12090
  }
11469
12091
  const extraData = fulfillmentDataRes.result.fulfillable_orders[0].extra_data;
11470
12092
  const orderResult = fulfillmentDataRes.result.fulfillable_orders[0].order;
11471
- if (orderResult.status !== OrderStatus.ACTIVE) {
12093
+ if (orderResult.status.name !== OrderStatusName.ACTIVE) {
11472
12094
  throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.status}`);
11473
12095
  }
11474
12096
  return this.seaport.fulfillOrder(orderResult, takerAddress, extraData);
11475
12097
  }
12098
+ async fulfillBulkOrders(listings, takerAddress) {
12099
+ const fulfillmentDataRes = await this.apiClient.fulfillmentData(listings.map((listingRequest) => ({
12100
+ order_id: listingRequest.listingId,
12101
+ fees: listingRequest.takerFees.map((fee) => ({
12102
+ amount: fee.amount,
12103
+ fee_type: FeeType.TAKER_ECOSYSTEM,
12104
+ recipient: fee.recipient,
12105
+ })),
12106
+ })));
12107
+ return {
12108
+ ...(await this.seaport.fulfillBulkOrders(fulfillmentDataRes.result.fulfillable_orders, takerAddress)),
12109
+ fulfillableOrders: fulfillmentDataRes.result.fulfillable_orders.map((o) => mapFromOpenApiOrder(o.order)),
12110
+ unfulfillableOrders: fulfillmentDataRes.result.unfulfillable_orders.map((o) => ({
12111
+ orderId: o.order_id,
12112
+ reason: o.reason,
12113
+ })),
12114
+ };
12115
+ }
11476
12116
  /**
11477
12117
  * Get an unsigned cancel order transaction. Orders can only be cancelled by
11478
12118
  * the account that created them.
@@ -11482,9 +12122,9 @@ class Orderbook {
11482
12122
  */
11483
12123
  async cancelOrder(listingId, accountAddress) {
11484
12124
  const orderResult = await this.apiClient.getListing(listingId);
11485
- if (orderResult.result.status !== OrderStatus.ACTIVE
11486
- && orderResult.result.status !== OrderStatus.INACTIVE
11487
- && orderResult.result.status !== OrderStatus.PENDING) {
12125
+ if (orderResult.result.status.name !== OrderStatusName.ACTIVE
12126
+ && orderResult.result.status.name !== OrderStatusName.INACTIVE
12127
+ && orderResult.result.status.name !== OrderStatusName.PENDING) {
11488
12128
  throw new Error(`Cannot cancel order with status ${orderResult.result.status}`);
11489
12129
  }
11490
12130
  if (orderResult.result.account_address !== accountAddress.toLowerCase()) {
@@ -11507,7 +12147,7 @@ var orderbook = /*#__PURE__*/Object.freeze({
11507
12147
  __proto__: null,
11508
12148
  get ActionType () { return ActionType; },
11509
12149
  get FeeType () { return FeeType; },
11510
- get OrderStatus () { return OrderStatus; },
12150
+ get OrderStatusName () { return OrderStatusName; },
11511
12151
  Orderbook: Orderbook,
11512
12152
  get SignablePurpose () { return SignablePurpose; },
11513
12153
  get TransactionPurpose () { return TransactionPurpose; },
@@ -28278,6 +28918,11 @@ const $d85ad1457a3f1a83$var$ZKEVM_NATIVE_TOKEN = {
28278
28918
  decimals: $d85ad1457a3f1a83$export$903389470ba9433c,
28279
28919
  address: $d85ad1457a3f1a83$export$b80040cb173ba6e9
28280
28920
  };
28921
+ ({
28922
+ [$d85ad1457a3f1a83$export$7d3a9eeba384fa59]: "https://api.dev.immutable.com",
28923
+ [(Environment$1).SANDBOX]: "https://api.sandbox.immutable.com",
28924
+ [(Environment$1).PRODUCTION]: "https://api.immutable.com"
28925
+ });
28281
28926
  const $d85ad1457a3f1a83$export$161d4a74df65fc08 = {
28282
28927
  [$d85ad1457a3f1a83$export$7d3a9eeba384fa59]: "https://checkout-api.dev.immutable.com",
28283
28928
  [(Environment$1).SANDBOX]: "https://checkout-api.sandbox.immutable.com",
@@ -28670,6 +29315,7 @@ var $e055e79256bbc1dd$export$80f4da0d409a629d;
28670
29315
  CheckoutErrorType["BRIDGE_GAS_ESTIMATE_ERROR"] = "BRIDGE_GAS_ESTIMATE_ERROR";
28671
29316
  CheckoutErrorType["ORDER_FEE_ERROR"] = "ORDER_FEE_ERROR";
28672
29317
  CheckoutErrorType["ITEM_REQUIREMENTS_ERROR"] = "ITEM_REQUIREMENTS_ERROR";
29318
+ CheckoutErrorType["API_ERROR"] = "API_ERROR";
28673
29319
  })($a8bc256d81a5e2c1$export$e3dc0620abde7f5a || ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a = {}));
28674
29320
  class $a8bc256d81a5e2c1$export$b722478a3cbfa3bc extends Error {
28675
29321
  message;
@@ -28850,6 +29496,7 @@ async function $de192de6ef100f9f$export$b827d9418aeb5dbd(config, web3Provider, c
28850
29496
 
28851
29497
 
28852
29498
 
29499
+
28853
29500
  class $a492ee374ae7b613$export$d902b56530cd5f87 {
28854
29501
  isDevelopment;
28855
29502
  isProduction;
@@ -28864,9 +29511,9 @@ class $a492ee374ae7b613$export$d902b56530cd5f87 {
28864
29511
  try {
28865
29512
  response = await (0, globalAxios$1).get(url);
28866
29513
  } catch (error) {
28867
- throw new Error(`Error fetching from api: ${error.message}`);
29514
+ throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${error.message}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
28868
29515
  }
28869
- if (response.status !== 200) throw new Error(`Error fetching from api: ${response.status} ${response.statusText}`);
29516
+ if (response.status !== 200) throw new ($a8bc256d81a5e2c1$export$b722478a3cbfa3bc)(`Error fetching from api: ${response.status} ${response.statusText}`, ($a8bc256d81a5e2c1$export$e3dc0620abde7f5a).API_ERROR);
28870
29517
  return response;
28871
29518
  }
28872
29519
  getEndpoint = ()=>{
@@ -30402,17 +31049,23 @@ const $049bba630af05555$export$6946a1f17c2bbf26 = async (config, chainId, wallet
30402
31049
  try {
30403
31050
  const exchange = await $67fc622a2b913d5f$export$7cf6178417769841(chainId, config);
30404
31051
  const dexTransactionResponsePromises = [];
31052
+ const fromToken = [];
30405
31053
  // Create a quote for each swappable token
30406
- for (const swappableToken of swappableTokens)dexTransactionResponsePromises.push(exchange.getUnsignedSwapTxFromAmountOut(walletAddress, swappableToken, requiredToken.address, requiredToken.amount, slippagePercent));
31054
+ for (const swappableToken of swappableTokens){
31055
+ if (swappableToken === requiredToken.address) continue;
31056
+ dexTransactionResponsePromises.push(exchange.getUnsignedSwapTxFromAmountOut(walletAddress, swappableToken, requiredToken.address, requiredToken.amount, slippagePercent));
31057
+ fromToken.push(swappableToken);
31058
+ }
30407
31059
  // Resolve all the quotes and link them back to the swappable token
30408
31060
  // The swappable token array is in the same position in the array as the quote in the promise array
30409
- const dexTransactionResponse = await Promise.all(dexTransactionResponsePromises);
31061
+ const dexTransactionResponse = await Promise.allSettled(dexTransactionResponsePromises);
30410
31062
  dexTransactionResponse.forEach((response, index)=>{
30411
- const swappableToken = swappableTokens[index];
31063
+ if (response.status === "rejected") return; // Ignore any requests to dex that failed to resolve
31064
+ const swappableToken = fromToken[index];
30412
31065
  dexQuotes.set(swappableToken, {
30413
- quote: response.quote,
30414
- approval: response.approval?.gasFeeEstimate,
30415
- swap: response.swap.gasFeeEstimate
31066
+ quote: response.value.quote,
31067
+ approval: response.value.approval?.gasFeeEstimate,
31068
+ swap: response.value.swap.gasFeeEstimate
30416
31069
  });
30417
31070
  });
30418
31071
  return dexQuotes;
@@ -32285,7 +32938,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
32285
32938
  })($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
32286
32939
 
32287
32940
 
32288
- const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.24.1";
32941
+ const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.26.0";
32289
32942
  const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
32290
32943
  const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
32291
32944