@imtbl/sdk 1.10.0-alpha.1 → 1.11.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/checkout.js CHANGED
@@ -139,7 +139,7 @@ const flattenProperties$1 = (properties) => {
139
139
  };
140
140
 
141
141
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
142
- const SDK_VERSION$1 = '1.10.0-alpha.1';
142
+ const SDK_VERSION$1 = '1.11.0';
143
143
  const getReferrer$1 = () => {
144
144
  if (isNode$1()) {
145
145
  return '';
@@ -17479,7 +17479,7 @@ const flattenProperties = (properties) => {
17479
17479
  };
17480
17480
 
17481
17481
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
17482
- const SDK_VERSION = '1.10.0-alpha.1';
17482
+ const SDK_VERSION = '1.11.0';
17483
17483
  const getReferrer = () => {
17484
17484
  if (isNode()) {
17485
17485
  return '';
@@ -24948,6 +24948,85 @@ class NftOwnersApi extends BaseAPI {
24948
24948
  */
24949
24949
  const NftsApiAxiosParamCreator = function (configuration) {
24950
24950
  return {
24951
+ /**
24952
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
24953
+ * @summary [Experimental] Mint NFTs
24954
+ * @param {string} contractAddress The address of contract
24955
+ * @param {string} chainName The name of chain
24956
+ * @param {CreateMintRequestRequest} createMintRequestRequest the request body
24957
+ * @param {*} [options] Override http request option.
24958
+ * @throws {RequiredError}
24959
+ */
24960
+ createMintRequest: async (contractAddress, chainName, createMintRequestRequest, options = {}) => {
24961
+ // verify required parameter 'contractAddress' is not null or undefined
24962
+ assertParamExists('createMintRequest', 'contractAddress', contractAddress);
24963
+ // verify required parameter 'chainName' is not null or undefined
24964
+ assertParamExists('createMintRequest', 'chainName', chainName);
24965
+ // verify required parameter 'createMintRequestRequest' is not null or undefined
24966
+ assertParamExists('createMintRequest', 'createMintRequestRequest', createMintRequestRequest);
24967
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests`
24968
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
24969
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
24970
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
24971
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
24972
+ let baseOptions;
24973
+ if (configuration) {
24974
+ baseOptions = configuration.baseOptions;
24975
+ }
24976
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
24977
+ const localVarHeaderParameter = {};
24978
+ const localVarQueryParameter = {};
24979
+ // authentication ImmutableApiKey required
24980
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
24981
+ localVarHeaderParameter['Content-Type'] = 'application/json';
24982
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
24983
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
24984
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
24985
+ localVarRequestOptions.data = serializeDataIfNeeded(createMintRequestRequest, localVarRequestOptions, configuration);
24986
+ return {
24987
+ url: toPathString(localVarUrlObj),
24988
+ options: localVarRequestOptions,
24989
+ };
24990
+ },
24991
+ /**
24992
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
24993
+ * @summary [Experimental] Get mint request by reference ID
24994
+ * @param {string} contractAddress The address of contract
24995
+ * @param {string} chainName The name of chain
24996
+ * @param {string} referenceId The ID of the mint request
24997
+ * @param {*} [options] Override http request option.
24998
+ * @throws {RequiredError}
24999
+ */
25000
+ getMintRequest: async (contractAddress, chainName, referenceId, options = {}) => {
25001
+ // verify required parameter 'contractAddress' is not null or undefined
25002
+ assertParamExists('getMintRequest', 'contractAddress', contractAddress);
25003
+ // verify required parameter 'chainName' is not null or undefined
25004
+ assertParamExists('getMintRequest', 'chainName', chainName);
25005
+ // verify required parameter 'referenceId' is not null or undefined
25006
+ assertParamExists('getMintRequest', 'referenceId', referenceId);
25007
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests/{reference_id}`
25008
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
25009
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
25010
+ .replace(`{${"reference_id"}}`, encodeURIComponent(String(referenceId)));
25011
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25012
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25013
+ let baseOptions;
25014
+ if (configuration) {
25015
+ baseOptions = configuration.baseOptions;
25016
+ }
25017
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
25018
+ const localVarHeaderParameter = {};
25019
+ const localVarQueryParameter = {};
25020
+ // authentication ImmutableApiKey required
25021
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
25022
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25023
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25024
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
25025
+ return {
25026
+ url: toPathString(localVarUrlObj),
25027
+ options: localVarRequestOptions,
25028
+ };
25029
+ },
24951
25030
  /**
24952
25031
  * Get NFT by token ID
24953
25032
  * @summary Get NFT by token ID
@@ -25028,6 +25107,53 @@ const NftsApiAxiosParamCreator = function (configuration) {
25028
25107
  options: localVarRequestOptions,
25029
25108
  };
25030
25109
  },
25110
+ /**
25111
+ * [Experimental] Retrieve the status of all mints for a given contract address
25112
+ * @summary [Experimental] List mint requests
25113
+ * @param {string} contractAddress The address of contract
25114
+ * @param {string} chainName The name of chain
25115
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
25116
+ * @param {number} [pageSize] Maximum number of items to return
25117
+ * @param {MintRequestStatus} [status] The status of the mint request
25118
+ * @param {*} [options] Override http request option.
25119
+ * @throws {RequiredError}
25120
+ */
25121
+ listMintRequests: async (contractAddress, chainName, pageCursor, pageSize, status, options = {}) => {
25122
+ // verify required parameter 'contractAddress' is not null or undefined
25123
+ assertParamExists('listMintRequests', 'contractAddress', contractAddress);
25124
+ // verify required parameter 'chainName' is not null or undefined
25125
+ assertParamExists('listMintRequests', 'chainName', chainName);
25126
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests`
25127
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
25128
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
25129
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25130
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25131
+ let baseOptions;
25132
+ if (configuration) {
25133
+ baseOptions = configuration.baseOptions;
25134
+ }
25135
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
25136
+ const localVarHeaderParameter = {};
25137
+ const localVarQueryParameter = {};
25138
+ // authentication ImmutableApiKey required
25139
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
25140
+ if (pageCursor !== undefined) {
25141
+ localVarQueryParameter['page_cursor'] = pageCursor;
25142
+ }
25143
+ if (pageSize !== undefined) {
25144
+ localVarQueryParameter['page_size'] = pageSize;
25145
+ }
25146
+ if (status !== undefined) {
25147
+ localVarQueryParameter['status'] = status;
25148
+ }
25149
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25150
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25151
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
25152
+ return {
25153
+ url: toPathString(localVarUrlObj),
25154
+ options: localVarRequestOptions,
25155
+ };
25156
+ },
25031
25157
  /**
25032
25158
  * List NFTs by contract address
25033
25159
  * @summary List NFTs by contract address
@@ -25133,6 +25259,32 @@ const NftsApiAxiosParamCreator = function (configuration) {
25133
25259
  const NftsApiFp = function (configuration) {
25134
25260
  const localVarAxiosParamCreator = NftsApiAxiosParamCreator(configuration);
25135
25261
  return {
25262
+ /**
25263
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
25264
+ * @summary [Experimental] Mint NFTs
25265
+ * @param {string} contractAddress The address of contract
25266
+ * @param {string} chainName The name of chain
25267
+ * @param {CreateMintRequestRequest} createMintRequestRequest the request body
25268
+ * @param {*} [options] Override http request option.
25269
+ * @throws {RequiredError}
25270
+ */
25271
+ async createMintRequest(contractAddress, chainName, createMintRequestRequest, options) {
25272
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createMintRequest(contractAddress, chainName, createMintRequestRequest, options);
25273
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
25274
+ },
25275
+ /**
25276
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
25277
+ * @summary [Experimental] Get mint request by reference ID
25278
+ * @param {string} contractAddress The address of contract
25279
+ * @param {string} chainName The name of chain
25280
+ * @param {string} referenceId The ID of the mint request
25281
+ * @param {*} [options] Override http request option.
25282
+ * @throws {RequiredError}
25283
+ */
25284
+ async getMintRequest(contractAddress, chainName, referenceId, options) {
25285
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMintRequest(contractAddress, chainName, referenceId, options);
25286
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
25287
+ },
25136
25288
  /**
25137
25289
  * Get NFT by token ID
25138
25290
  * @summary Get NFT by token ID
@@ -25160,6 +25312,21 @@ const NftsApiFp = function (configuration) {
25160
25312
  const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options);
25161
25313
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
25162
25314
  },
25315
+ /**
25316
+ * [Experimental] Retrieve the status of all mints for a given contract address
25317
+ * @summary [Experimental] List mint requests
25318
+ * @param {string} contractAddress The address of contract
25319
+ * @param {string} chainName The name of chain
25320
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
25321
+ * @param {number} [pageSize] Maximum number of items to return
25322
+ * @param {MintRequestStatus} [status] The status of the mint request
25323
+ * @param {*} [options] Override http request option.
25324
+ * @throws {RequiredError}
25325
+ */
25326
+ async listMintRequests(contractAddress, chainName, pageCursor, pageSize, status, options) {
25327
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMintRequests(contractAddress, chainName, pageCursor, pageSize, status, options);
25328
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
25329
+ },
25163
25330
  /**
25164
25331
  * List NFTs by contract address
25165
25332
  * @summary List NFTs by contract address
@@ -25200,6 +25367,26 @@ const NftsApiFp = function (configuration) {
25200
25367
  const NftsApiFactory = function (configuration, basePath, axios) {
25201
25368
  const localVarFp = NftsApiFp(configuration);
25202
25369
  return {
25370
+ /**
25371
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
25372
+ * @summary [Experimental] Mint NFTs
25373
+ * @param {NftsApiCreateMintRequestRequest} requestParameters Request parameters.
25374
+ * @param {*} [options] Override http request option.
25375
+ * @throws {RequiredError}
25376
+ */
25377
+ createMintRequest(requestParameters, options) {
25378
+ return localVarFp.createMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.createMintRequestRequest, options).then((request) => request(axios, basePath));
25379
+ },
25380
+ /**
25381
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
25382
+ * @summary [Experimental] Get mint request by reference ID
25383
+ * @param {NftsApiGetMintRequestRequest} requestParameters Request parameters.
25384
+ * @param {*} [options] Override http request option.
25385
+ * @throws {RequiredError}
25386
+ */
25387
+ getMintRequest(requestParameters, options) {
25388
+ return localVarFp.getMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.referenceId, options).then((request) => request(axios, basePath));
25389
+ },
25203
25390
  /**
25204
25391
  * Get NFT by token ID
25205
25392
  * @summary Get NFT by token ID
@@ -25220,6 +25407,16 @@ const NftsApiFactory = function (configuration, basePath, axios) {
25220
25407
  listAllNFTs(requestParameters, options) {
25221
25408
  return localVarFp.listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
25222
25409
  },
25410
+ /**
25411
+ * [Experimental] Retrieve the status of all mints for a given contract address
25412
+ * @summary [Experimental] List mint requests
25413
+ * @param {NftsApiListMintRequestsRequest} requestParameters Request parameters.
25414
+ * @param {*} [options] Override http request option.
25415
+ * @throws {RequiredError}
25416
+ */
25417
+ listMintRequests(requestParameters, options) {
25418
+ return localVarFp.listMintRequests(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.status, options).then((request) => request(axios, basePath));
25419
+ },
25223
25420
  /**
25224
25421
  * List NFTs by contract address
25225
25422
  * @summary List NFTs by contract address
@@ -25249,6 +25446,28 @@ const NftsApiFactory = function (configuration, basePath, axios) {
25249
25446
  * @extends {BaseAPI}
25250
25447
  */
25251
25448
  class NftsApi extends BaseAPI {
25449
+ /**
25450
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
25451
+ * @summary [Experimental] Mint NFTs
25452
+ * @param {NftsApiCreateMintRequestRequest} requestParameters Request parameters.
25453
+ * @param {*} [options] Override http request option.
25454
+ * @throws {RequiredError}
25455
+ * @memberof NftsApi
25456
+ */
25457
+ createMintRequest(requestParameters, options) {
25458
+ return NftsApiFp(this.configuration).createMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.createMintRequestRequest, options).then((request) => request(this.axios, this.basePath));
25459
+ }
25460
+ /**
25461
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
25462
+ * @summary [Experimental] Get mint request by reference ID
25463
+ * @param {NftsApiGetMintRequestRequest} requestParameters Request parameters.
25464
+ * @param {*} [options] Override http request option.
25465
+ * @throws {RequiredError}
25466
+ * @memberof NftsApi
25467
+ */
25468
+ getMintRequest(requestParameters, options) {
25469
+ return NftsApiFp(this.configuration).getMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.referenceId, options).then((request) => request(this.axios, this.basePath));
25470
+ }
25252
25471
  /**
25253
25472
  * Get NFT by token ID
25254
25473
  * @summary Get NFT by token ID
@@ -25271,6 +25490,17 @@ class NftsApi extends BaseAPI {
25271
25490
  listAllNFTs(requestParameters, options) {
25272
25491
  return NftsApiFp(this.configuration).listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
25273
25492
  }
25493
+ /**
25494
+ * [Experimental] Retrieve the status of all mints for a given contract address
25495
+ * @summary [Experimental] List mint requests
25496
+ * @param {NftsApiListMintRequestsRequest} requestParameters Request parameters.
25497
+ * @param {*} [options] Override http request option.
25498
+ * @throws {RequiredError}
25499
+ * @memberof NftsApi
25500
+ */
25501
+ listMintRequests(requestParameters, options) {
25502
+ return NftsApiFp(this.configuration).listMintRequests(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
25503
+ }
25274
25504
  /**
25275
25505
  * List NFTs by contract address
25276
25506
  * @summary List NFTs by contract address
@@ -27725,7 +27955,7 @@ class APIError extends Error {
27725
27955
 
27726
27956
  /* eslint-disable implicit-arrow-linebreak */
27727
27957
  const defaultHeaders = {
27728
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.10.0-alpha.1',
27958
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.11.0',
27729
27959
  };
27730
27960
  /**
27731
27961
  * createAPIConfiguration to create a custom Configuration
@@ -27986,6 +28216,51 @@ class BlockchainData {
27986
28216
  throw formatError(err);
27987
28217
  });
27988
28218
  }
28219
+ /**
28220
+ * Create a mint request to mint a set of NFTs for a given collection
28221
+ * @experimental
28222
+ * @param request - the request object containing the parameters to be provided in the API request
28223
+ * @returns a promise that resolves with the remaining rate limits
28224
+ * @throws {@link index.APIError}
28225
+ */
28226
+ async createMintRequest(request) {
28227
+ return await this.nfts
28228
+ .createMintRequest(request)
28229
+ .then((res) => res.data)
28230
+ .catch((err) => {
28231
+ throw formatError(err);
28232
+ });
28233
+ }
28234
+ /**
28235
+ * List all mint requests for a given contract address
28236
+ * @experimental
28237
+ * @param request - the request object containing the parameters to be provided in the API request
28238
+ * @returns a promise that resolves with a list of mint requests
28239
+ * @throws {@link index.APIError}
28240
+ */
28241
+ async listMintRequests(request) {
28242
+ return await this.nfts
28243
+ .listMintRequests(request)
28244
+ .then((res) => res.data)
28245
+ .catch((err) => {
28246
+ throw formatError(err);
28247
+ });
28248
+ }
28249
+ /**
28250
+ * Retrieve the status of a single mint request identified by its reference ID
28251
+ * @experimental
28252
+ * @param request - the request object containing the parameters to be provided in the API request
28253
+ * @returns a promise that resolves with a single mint request
28254
+ * @throws {@link index.APIError}
28255
+ */
28256
+ async getMintRequest(request) {
28257
+ return await this.nfts
28258
+ .getMintRequest(request)
28259
+ .then((res) => res.data)
28260
+ .catch((err) => {
28261
+ throw formatError(err);
28262
+ });
28263
+ }
27989
28264
  /**
27990
28265
  * List NFT owners by token ID
27991
28266
  * @param request - the request object containing the parameters to be provided in the API request
@@ -29094,7 +29369,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
29094
29369
  maxPriorityFeePerGas: BigNumber$1.from(10e9),
29095
29370
  };
29096
29371
 
29097
- const SDK_VERSION_MARKER = '1.10.0-alpha.1';
29372
+ const SDK_VERSION_MARKER = '1.11.0';
29098
29373
  // This SDK version is replaced by the `yarn build` command ran on the root level
29099
29374
  const globalPackageVersion = () => SDK_VERSION_MARKER;
29100
29375
 
package/dist/config.js CHANGED
@@ -128,7 +128,7 @@ const flattenProperties = (properties) => {
128
128
  };
129
129
 
130
130
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
131
- const SDK_VERSION = '1.10.0-alpha.1';
131
+ const SDK_VERSION = '1.11.0';
132
132
  const getReferrer = () => {
133
133
  if (isNode()) {
134
134
  return '';