@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/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, "
|
|
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
|
|
1008
|
-
* @summary Get
|
|
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
|
-
*
|
|
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, "
|
|
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
|
-
*
|
|
1084
|
-
* @summary
|
|
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, "
|
|
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
|
|
1133
|
-
* @summary Get
|
|
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
|
-
*
|
|
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
|
-
*
|
|
1158
|
-
* @summary
|
|
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
|
|
1180
|
-
* @summary Get
|
|
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
|
-
*
|
|
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
|
-
*
|
|
1203
|
-
* @summary
|
|
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
|
|
1224
|
-
* @summary Get
|
|
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
|
-
*
|
|
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
|
-
*
|
|
1245
|
-
* @summary
|
|
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
|
-
|
|
2846
|
-
|
|
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
|
|
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
|
|
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.
|
|
3536
|
+
const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-0.25.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.
|
|
3596
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.25.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,20 @@ class BlockchainData {
|
|
|
3398
3910
|
throw formatError(err);
|
|
3399
3911
|
});
|
|
3400
3912
|
}
|
|
3913
|
+
/**
|
|
3914
|
+
* List NFT Metadata by contract address
|
|
3915
|
+
* @param request - the request object containing the parameters to be provided in the API request
|
|
3916
|
+
* @returns a promise that resolves with a list of Metadata
|
|
3917
|
+
* @throws {@link index.APIError}
|
|
3918
|
+
*/
|
|
3919
|
+
async listNFTMetadataByContractAddress(request) {
|
|
3920
|
+
return await this.metadata
|
|
3921
|
+
.listMetadata(request)
|
|
3922
|
+
.then((res) => res.data)
|
|
3923
|
+
.catch((err) => {
|
|
3924
|
+
throw formatError(err);
|
|
3925
|
+
});
|
|
3926
|
+
}
|
|
3401
3927
|
/**
|
|
3402
3928
|
* Refresh collection metadata
|
|
3403
3929
|
* @param request - the request object containing the parameters to be provided in the API request
|
|
@@ -3457,7 +3983,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
|
|
|
3457
3983
|
chainID,
|
|
3458
3984
|
coreContractAddress,
|
|
3459
3985
|
registrationContractAddress,
|
|
3460
|
-
sdkVersion: 'ts-immutable-sdk-0.
|
|
3986
|
+
sdkVersion: 'ts-immutable-sdk-0.25.0',
|
|
3461
3987
|
});
|
|
3462
3988
|
/**
|
|
3463
3989
|
* Sets `sdkVersion` at the time of build
|
|
@@ -10534,6 +11060,31 @@ class OrdersService {
|
|
|
10534
11060
|
constructor(httpRequest) {
|
|
10535
11061
|
this.httpRequest = httpRequest;
|
|
10536
11062
|
}
|
|
11063
|
+
/**
|
|
11064
|
+
* Cancel one or more orders
|
|
11065
|
+
* Cancel one or more orders
|
|
11066
|
+
* @returns CancelOrdersResult Orders cancellation response.
|
|
11067
|
+
* @throws ApiError
|
|
11068
|
+
*/
|
|
11069
|
+
cancelOrders({ chainName, requestBody, }) {
|
|
11070
|
+
return this.httpRequest.request({
|
|
11071
|
+
method: 'POST',
|
|
11072
|
+
url: '/v1/chains/{chain_name}/orders/cancel',
|
|
11073
|
+
path: {
|
|
11074
|
+
'chain_name': chainName,
|
|
11075
|
+
},
|
|
11076
|
+
body: requestBody,
|
|
11077
|
+
mediaType: 'application/json',
|
|
11078
|
+
errors: {
|
|
11079
|
+
400: `Bad Request (400)`,
|
|
11080
|
+
401: `Unauthorised Request (401)`,
|
|
11081
|
+
404: `The specified resource was not found (404)`,
|
|
11082
|
+
429: `Too Many Requests (429)`,
|
|
11083
|
+
500: `Internal Server Error (500)`,
|
|
11084
|
+
501: `Not Implemented Error (501)`,
|
|
11085
|
+
},
|
|
11086
|
+
});
|
|
11087
|
+
}
|
|
10537
11088
|
/**
|
|
10538
11089
|
* List all listings
|
|
10539
11090
|
* List all listings
|
|
@@ -10698,6 +11249,17 @@ class OrderBookClient {
|
|
|
10698
11249
|
}
|
|
10699
11250
|
}
|
|
10700
11251
|
|
|
11252
|
+
/* istanbul ignore file */
|
|
11253
|
+
/* tslint:disable */
|
|
11254
|
+
/* eslint-disable */
|
|
11255
|
+
var CancelledOrderStatus;
|
|
11256
|
+
(function (CancelledOrderStatus) {
|
|
11257
|
+
(function (cancellation_type) {
|
|
11258
|
+
cancellation_type["ON_CHAIN"] = "ON_CHAIN";
|
|
11259
|
+
cancellation_type["OFF_CHAIN"] = "OFF_CHAIN";
|
|
11260
|
+
})(CancelledOrderStatus.cancellation_type || (CancelledOrderStatus.cancellation_type = {}));
|
|
11261
|
+
})(CancelledOrderStatus || (CancelledOrderStatus = {}));
|
|
11262
|
+
|
|
10701
11263
|
/* istanbul ignore file */
|
|
10702
11264
|
/* tslint:disable */
|
|
10703
11265
|
/* eslint-disable */
|
|
@@ -10717,15 +11279,15 @@ var Fee;
|
|
|
10717
11279
|
/**
|
|
10718
11280
|
* The Order status
|
|
10719
11281
|
*/
|
|
10720
|
-
var
|
|
10721
|
-
(function (
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
})(
|
|
11282
|
+
var OrderStatusName;
|
|
11283
|
+
(function (OrderStatusName) {
|
|
11284
|
+
OrderStatusName["PENDING"] = "PENDING";
|
|
11285
|
+
OrderStatusName["ACTIVE"] = "ACTIVE";
|
|
11286
|
+
OrderStatusName["INACTIVE"] = "INACTIVE";
|
|
11287
|
+
OrderStatusName["FILLED"] = "FILLED";
|
|
11288
|
+
OrderStatusName["EXPIRED"] = "EXPIRED";
|
|
11289
|
+
OrderStatusName["CANCELLED"] = "CANCELLED";
|
|
11290
|
+
})(OrderStatusName || (OrderStatusName = {}));
|
|
10729
11291
|
|
|
10730
11292
|
/* istanbul ignore file */
|
|
10731
11293
|
/* tslint:disable */
|
|
@@ -11100,18 +11662,57 @@ class Seaport {
|
|
|
11100
11662
|
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
|
|
11101
11663
|
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
11102
11664
|
});
|
|
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
11665
|
return {
|
|
11110
11666
|
actions: fulfillmentActions,
|
|
11111
|
-
expiration:
|
|
11667
|
+
expiration: Seaport.getExpirationISOTimeFromExtraData(extraData),
|
|
11112
11668
|
order: mapFromOpenApiOrder(order),
|
|
11113
11669
|
};
|
|
11114
11670
|
}
|
|
11671
|
+
async fulfillBulkOrders(fulfillingOrders, account) {
|
|
11672
|
+
// TODO: this function right now does not handle errors from the seaport.js
|
|
11673
|
+
// we should figure out why orders are rejected and return a submission
|
|
11674
|
+
// transaction on best efforts basis
|
|
11675
|
+
const fulfillOrderDetails = fulfillingOrders.map((o) => {
|
|
11676
|
+
const { orderComponents, tips } = this.mapImmutableOrderToSeaportOrderComponents(o.order);
|
|
11677
|
+
return {
|
|
11678
|
+
order: {
|
|
11679
|
+
parameters: orderComponents,
|
|
11680
|
+
signature: o.order.signature,
|
|
11681
|
+
},
|
|
11682
|
+
extraData: o.extra_data,
|
|
11683
|
+
tips,
|
|
11684
|
+
};
|
|
11685
|
+
});
|
|
11686
|
+
const { actions: seaportActions } = await this.getSeaportLib().fulfillOrders({
|
|
11687
|
+
fulfillOrderDetails,
|
|
11688
|
+
accountAddress: account,
|
|
11689
|
+
});
|
|
11690
|
+
const fulfillmentActions = [];
|
|
11691
|
+
const approvalAction = seaportActions.find((action) => action.type === 'approval');
|
|
11692
|
+
if (approvalAction) {
|
|
11693
|
+
fulfillmentActions.push({
|
|
11694
|
+
type: ActionType.TRANSACTION,
|
|
11695
|
+
buildTransaction: prepareTransaction(approvalAction.transactionMethods),
|
|
11696
|
+
purpose: TransactionPurpose.APPROVAL,
|
|
11697
|
+
});
|
|
11698
|
+
}
|
|
11699
|
+
const fulfilOrderAction = seaportActions.find((action) => action.type === 'exchange');
|
|
11700
|
+
if (!fulfilOrderAction) {
|
|
11701
|
+
throw new Error('No exchange action found');
|
|
11702
|
+
}
|
|
11703
|
+
fulfillmentActions.push({
|
|
11704
|
+
type: ActionType.TRANSACTION,
|
|
11705
|
+
buildTransaction: prepareTransaction(fulfilOrderAction.transactionMethods),
|
|
11706
|
+
purpose: TransactionPurpose.FULFILL_ORDER,
|
|
11707
|
+
});
|
|
11708
|
+
return {
|
|
11709
|
+
actions: fulfillmentActions,
|
|
11710
|
+
// return the shortest expiration out of all extraData - they should be very close
|
|
11711
|
+
expiration: fulfillOrderDetails
|
|
11712
|
+
.map((d) => Seaport.getExpirationISOTimeFromExtraData(d.extraData))
|
|
11713
|
+
.reduce((p, c) => (new Date(p) < new Date(c) ? p : c)),
|
|
11714
|
+
};
|
|
11715
|
+
}
|
|
11115
11716
|
async cancelOrder(order, account) {
|
|
11116
11717
|
const { orderComponents } = this.mapImmutableOrderToSeaportOrderComponents(order);
|
|
11117
11718
|
const seaportLib = this.getSeaportLib(order);
|
|
@@ -11135,9 +11736,7 @@ class Seaport {
|
|
|
11135
11736
|
],
|
|
11136
11737
|
consideration: [
|
|
11137
11738
|
{
|
|
11138
|
-
token: considerationItem.type === 'ERC20'
|
|
11139
|
-
? considerationItem.contractAddress
|
|
11140
|
-
: undefined,
|
|
11739
|
+
token: considerationItem.type === 'ERC20' ? considerationItem.contractAddress : undefined,
|
|
11141
11740
|
amount: considerationItem.amount,
|
|
11142
11741
|
recipient: offerer,
|
|
11143
11742
|
},
|
|
@@ -11170,6 +11769,15 @@ class Seaport {
|
|
|
11170
11769
|
// }
|
|
11171
11770
|
return this.seaportLibFactory.create(seaportVersion, seaportAddress);
|
|
11172
11771
|
}
|
|
11772
|
+
static getExpirationISOTimeFromExtraData(extraData) {
|
|
11773
|
+
// Expirtaion bytes in SIP7 extra data [21:29]
|
|
11774
|
+
// In hex string -> [21 * 2 + 2 (0x) : 29 * 2]
|
|
11775
|
+
// In JS slice (start, end_inclusive), (44,60)
|
|
11776
|
+
// 8 bytes uint64 epoch time in seconds
|
|
11777
|
+
const expirationHex = extraData.slice(44, 60);
|
|
11778
|
+
const expirationInSeconds = parseInt(expirationHex, 16);
|
|
11779
|
+
return new Date(expirationInSeconds * 1000).toISOString();
|
|
11780
|
+
}
|
|
11173
11781
|
}
|
|
11174
11782
|
|
|
11175
11783
|
class ImmutableApiClient {
|
|
@@ -11468,11 +12076,29 @@ class Orderbook {
|
|
|
11468
12076
|
}
|
|
11469
12077
|
const extraData = fulfillmentDataRes.result.fulfillable_orders[0].extra_data;
|
|
11470
12078
|
const orderResult = fulfillmentDataRes.result.fulfillable_orders[0].order;
|
|
11471
|
-
if (orderResult.status !==
|
|
12079
|
+
if (orderResult.status.name !== OrderStatusName.ACTIVE) {
|
|
11472
12080
|
throw new Error(`Cannot fulfil order that is not active. Current status: ${orderResult.status}`);
|
|
11473
12081
|
}
|
|
11474
12082
|
return this.seaport.fulfillOrder(orderResult, takerAddress, extraData);
|
|
11475
12083
|
}
|
|
12084
|
+
async fulfillBulkOrders(listings, takerAddress) {
|
|
12085
|
+
const fulfillmentDataRes = await this.apiClient.fulfillmentData(listings.map((listingRequest) => ({
|
|
12086
|
+
order_id: listingRequest.listingId,
|
|
12087
|
+
fees: listingRequest.takerFees.map((fee) => ({
|
|
12088
|
+
amount: fee.amount,
|
|
12089
|
+
fee_type: FeeType.TAKER_ECOSYSTEM,
|
|
12090
|
+
recipient: fee.recipient,
|
|
12091
|
+
})),
|
|
12092
|
+
})));
|
|
12093
|
+
return {
|
|
12094
|
+
...(await this.seaport.fulfillBulkOrders(fulfillmentDataRes.result.fulfillable_orders, takerAddress)),
|
|
12095
|
+
fulfillableOrders: fulfillmentDataRes.result.fulfillable_orders.map((o) => mapFromOpenApiOrder(o.order)),
|
|
12096
|
+
unfulfillableOrders: fulfillmentDataRes.result.unfulfillable_orders.map((o) => ({
|
|
12097
|
+
orderId: o.order_id,
|
|
12098
|
+
reason: o.reason,
|
|
12099
|
+
})),
|
|
12100
|
+
};
|
|
12101
|
+
}
|
|
11476
12102
|
/**
|
|
11477
12103
|
* Get an unsigned cancel order transaction. Orders can only be cancelled by
|
|
11478
12104
|
* the account that created them.
|
|
@@ -11482,9 +12108,9 @@ class Orderbook {
|
|
|
11482
12108
|
*/
|
|
11483
12109
|
async cancelOrder(listingId, accountAddress) {
|
|
11484
12110
|
const orderResult = await this.apiClient.getListing(listingId);
|
|
11485
|
-
if (orderResult.result.status !==
|
|
11486
|
-
&& orderResult.result.status !==
|
|
11487
|
-
&& orderResult.result.status !==
|
|
12111
|
+
if (orderResult.result.status.name !== OrderStatusName.ACTIVE
|
|
12112
|
+
&& orderResult.result.status.name !== OrderStatusName.INACTIVE
|
|
12113
|
+
&& orderResult.result.status.name !== OrderStatusName.PENDING) {
|
|
11488
12114
|
throw new Error(`Cannot cancel order with status ${orderResult.result.status}`);
|
|
11489
12115
|
}
|
|
11490
12116
|
if (orderResult.result.account_address !== accountAddress.toLowerCase()) {
|
|
@@ -11507,7 +12133,7 @@ var orderbook = /*#__PURE__*/Object.freeze({
|
|
|
11507
12133
|
__proto__: null,
|
|
11508
12134
|
get ActionType () { return ActionType; },
|
|
11509
12135
|
get FeeType () { return FeeType; },
|
|
11510
|
-
get
|
|
12136
|
+
get OrderStatusName () { return OrderStatusName; },
|
|
11511
12137
|
Orderbook: Orderbook,
|
|
11512
12138
|
get SignablePurpose () { return SignablePurpose; },
|
|
11513
12139
|
get TransactionPurpose () { return TransactionPurpose; },
|
|
@@ -32285,7 +32911,7 @@ var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
|
32285
32911
|
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
32286
32912
|
|
|
32287
32913
|
|
|
32288
|
-
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.
|
|
32914
|
+
const $d663162fd5a0853f$export$38a083d9fb5551ca = "0.25.0";
|
|
32289
32915
|
const $d663162fd5a0853f$export$83bf90b30cdfd29f = ()=>false;
|
|
32290
32916
|
const $d663162fd5a0853f$export$1169f5475725171b = ()=>$d663162fd5a0853f$export$38a083d9fb5551ca;
|
|
32291
32917
|
|