@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/index.cjs CHANGED
@@ -174,7 +174,7 @@ const flattenProperties$1 = (properties) => {
174
174
  };
175
175
 
176
176
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
177
- const SDK_VERSION$1 = '1.10.0-alpha.1';
177
+ const SDK_VERSION$1 = '1.11.0';
178
178
  const getReferrer$1 = () => {
179
179
  if (isNode$1()) {
180
180
  return '';
@@ -8441,6 +8441,85 @@ class NftOwnersApi extends BaseAPI$2 {
8441
8441
  */
8442
8442
  const NftsApiAxiosParamCreator = function (configuration) {
8443
8443
  return {
8444
+ /**
8445
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
8446
+ * @summary [Experimental] Mint NFTs
8447
+ * @param {string} contractAddress The address of contract
8448
+ * @param {string} chainName The name of chain
8449
+ * @param {CreateMintRequestRequest} createMintRequestRequest the request body
8450
+ * @param {*} [options] Override http request option.
8451
+ * @throws {RequiredError}
8452
+ */
8453
+ createMintRequest: async (contractAddress, chainName, createMintRequestRequest, options = {}) => {
8454
+ // verify required parameter 'contractAddress' is not null or undefined
8455
+ assertParamExists$2('createMintRequest', 'contractAddress', contractAddress);
8456
+ // verify required parameter 'chainName' is not null or undefined
8457
+ assertParamExists$2('createMintRequest', 'chainName', chainName);
8458
+ // verify required parameter 'createMintRequestRequest' is not null or undefined
8459
+ assertParamExists$2('createMintRequest', 'createMintRequestRequest', createMintRequestRequest);
8460
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests`
8461
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
8462
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
8463
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8464
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$2);
8465
+ let baseOptions;
8466
+ if (configuration) {
8467
+ baseOptions = configuration.baseOptions;
8468
+ }
8469
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
8470
+ const localVarHeaderParameter = {};
8471
+ const localVarQueryParameter = {};
8472
+ // authentication ImmutableApiKey required
8473
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
8474
+ localVarHeaderParameter['Content-Type'] = 'application/json';
8475
+ setSearchParams$2(localVarUrlObj, localVarQueryParameter);
8476
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8477
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
8478
+ localVarRequestOptions.data = serializeDataIfNeeded$2(createMintRequestRequest, localVarRequestOptions, configuration);
8479
+ return {
8480
+ url: toPathString$2(localVarUrlObj),
8481
+ options: localVarRequestOptions,
8482
+ };
8483
+ },
8484
+ /**
8485
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
8486
+ * @summary [Experimental] Get mint request by reference ID
8487
+ * @param {string} contractAddress The address of contract
8488
+ * @param {string} chainName The name of chain
8489
+ * @param {string} referenceId The ID of the mint request
8490
+ * @param {*} [options] Override http request option.
8491
+ * @throws {RequiredError}
8492
+ */
8493
+ getMintRequest: async (contractAddress, chainName, referenceId, options = {}) => {
8494
+ // verify required parameter 'contractAddress' is not null or undefined
8495
+ assertParamExists$2('getMintRequest', 'contractAddress', contractAddress);
8496
+ // verify required parameter 'chainName' is not null or undefined
8497
+ assertParamExists$2('getMintRequest', 'chainName', chainName);
8498
+ // verify required parameter 'referenceId' is not null or undefined
8499
+ assertParamExists$2('getMintRequest', 'referenceId', referenceId);
8500
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests/{reference_id}`
8501
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
8502
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
8503
+ .replace(`{${"reference_id"}}`, encodeURIComponent(String(referenceId)));
8504
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8505
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$2);
8506
+ let baseOptions;
8507
+ if (configuration) {
8508
+ baseOptions = configuration.baseOptions;
8509
+ }
8510
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
8511
+ const localVarHeaderParameter = {};
8512
+ const localVarQueryParameter = {};
8513
+ // authentication ImmutableApiKey required
8514
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
8515
+ setSearchParams$2(localVarUrlObj, localVarQueryParameter);
8516
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8517
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
8518
+ return {
8519
+ url: toPathString$2(localVarUrlObj),
8520
+ options: localVarRequestOptions,
8521
+ };
8522
+ },
8444
8523
  /**
8445
8524
  * Get NFT by token ID
8446
8525
  * @summary Get NFT by token ID
@@ -8521,6 +8600,53 @@ const NftsApiAxiosParamCreator = function (configuration) {
8521
8600
  options: localVarRequestOptions,
8522
8601
  };
8523
8602
  },
8603
+ /**
8604
+ * [Experimental] Retrieve the status of all mints for a given contract address
8605
+ * @summary [Experimental] List mint requests
8606
+ * @param {string} contractAddress The address of contract
8607
+ * @param {string} chainName The name of chain
8608
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
8609
+ * @param {number} [pageSize] Maximum number of items to return
8610
+ * @param {MintRequestStatus} [status] The status of the mint request
8611
+ * @param {*} [options] Override http request option.
8612
+ * @throws {RequiredError}
8613
+ */
8614
+ listMintRequests: async (contractAddress, chainName, pageCursor, pageSize, status, options = {}) => {
8615
+ // verify required parameter 'contractAddress' is not null or undefined
8616
+ assertParamExists$2('listMintRequests', 'contractAddress', contractAddress);
8617
+ // verify required parameter 'chainName' is not null or undefined
8618
+ assertParamExists$2('listMintRequests', 'chainName', chainName);
8619
+ const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests`
8620
+ .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
8621
+ .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
8622
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
8623
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$2);
8624
+ let baseOptions;
8625
+ if (configuration) {
8626
+ baseOptions = configuration.baseOptions;
8627
+ }
8628
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
8629
+ const localVarHeaderParameter = {};
8630
+ const localVarQueryParameter = {};
8631
+ // authentication ImmutableApiKey required
8632
+ await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
8633
+ if (pageCursor !== undefined) {
8634
+ localVarQueryParameter['page_cursor'] = pageCursor;
8635
+ }
8636
+ if (pageSize !== undefined) {
8637
+ localVarQueryParameter['page_size'] = pageSize;
8638
+ }
8639
+ if (status !== undefined) {
8640
+ localVarQueryParameter['status'] = status;
8641
+ }
8642
+ setSearchParams$2(localVarUrlObj, localVarQueryParameter);
8643
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
8644
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
8645
+ return {
8646
+ url: toPathString$2(localVarUrlObj),
8647
+ options: localVarRequestOptions,
8648
+ };
8649
+ },
8524
8650
  /**
8525
8651
  * List NFTs by contract address
8526
8652
  * @summary List NFTs by contract address
@@ -8626,6 +8752,32 @@ const NftsApiAxiosParamCreator = function (configuration) {
8626
8752
  const NftsApiFp = function (configuration) {
8627
8753
  const localVarAxiosParamCreator = NftsApiAxiosParamCreator(configuration);
8628
8754
  return {
8755
+ /**
8756
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
8757
+ * @summary [Experimental] Mint NFTs
8758
+ * @param {string} contractAddress The address of contract
8759
+ * @param {string} chainName The name of chain
8760
+ * @param {CreateMintRequestRequest} createMintRequestRequest the request body
8761
+ * @param {*} [options] Override http request option.
8762
+ * @throws {RequiredError}
8763
+ */
8764
+ async createMintRequest(contractAddress, chainName, createMintRequestRequest, options) {
8765
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createMintRequest(contractAddress, chainName, createMintRequestRequest, options);
8766
+ return createRequestFunction$2(localVarAxiosArgs, globalAxios$1, BASE_PATH$2, configuration);
8767
+ },
8768
+ /**
8769
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
8770
+ * @summary [Experimental] Get mint request by reference ID
8771
+ * @param {string} contractAddress The address of contract
8772
+ * @param {string} chainName The name of chain
8773
+ * @param {string} referenceId The ID of the mint request
8774
+ * @param {*} [options] Override http request option.
8775
+ * @throws {RequiredError}
8776
+ */
8777
+ async getMintRequest(contractAddress, chainName, referenceId, options) {
8778
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getMintRequest(contractAddress, chainName, referenceId, options);
8779
+ return createRequestFunction$2(localVarAxiosArgs, globalAxios$1, BASE_PATH$2, configuration);
8780
+ },
8629
8781
  /**
8630
8782
  * Get NFT by token ID
8631
8783
  * @summary Get NFT by token ID
@@ -8653,6 +8805,21 @@ const NftsApiFp = function (configuration) {
8653
8805
  const localVarAxiosArgs = await localVarAxiosParamCreator.listAllNFTs(chainName, fromUpdatedAt, pageCursor, pageSize, options);
8654
8806
  return createRequestFunction$2(localVarAxiosArgs, globalAxios$1, BASE_PATH$2, configuration);
8655
8807
  },
8808
+ /**
8809
+ * [Experimental] Retrieve the status of all mints for a given contract address
8810
+ * @summary [Experimental] List mint requests
8811
+ * @param {string} contractAddress The address of contract
8812
+ * @param {string} chainName The name of chain
8813
+ * @param {string} [pageCursor] Encoded page cursor to retrieve previous or next page. Use the value returned in the response.
8814
+ * @param {number} [pageSize] Maximum number of items to return
8815
+ * @param {MintRequestStatus} [status] The status of the mint request
8816
+ * @param {*} [options] Override http request option.
8817
+ * @throws {RequiredError}
8818
+ */
8819
+ async listMintRequests(contractAddress, chainName, pageCursor, pageSize, status, options) {
8820
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listMintRequests(contractAddress, chainName, pageCursor, pageSize, status, options);
8821
+ return createRequestFunction$2(localVarAxiosArgs, globalAxios$1, BASE_PATH$2, configuration);
8822
+ },
8656
8823
  /**
8657
8824
  * List NFTs by contract address
8658
8825
  * @summary List NFTs by contract address
@@ -8693,6 +8860,26 @@ const NftsApiFp = function (configuration) {
8693
8860
  const NftsApiFactory = function (configuration, basePath, axios) {
8694
8861
  const localVarFp = NftsApiFp(configuration);
8695
8862
  return {
8863
+ /**
8864
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
8865
+ * @summary [Experimental] Mint NFTs
8866
+ * @param {NftsApiCreateMintRequestRequest} requestParameters Request parameters.
8867
+ * @param {*} [options] Override http request option.
8868
+ * @throws {RequiredError}
8869
+ */
8870
+ createMintRequest(requestParameters, options) {
8871
+ return localVarFp.createMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.createMintRequestRequest, options).then((request) => request(axios, basePath));
8872
+ },
8873
+ /**
8874
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
8875
+ * @summary [Experimental] Get mint request by reference ID
8876
+ * @param {NftsApiGetMintRequestRequest} requestParameters Request parameters.
8877
+ * @param {*} [options] Override http request option.
8878
+ * @throws {RequiredError}
8879
+ */
8880
+ getMintRequest(requestParameters, options) {
8881
+ return localVarFp.getMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.referenceId, options).then((request) => request(axios, basePath));
8882
+ },
8696
8883
  /**
8697
8884
  * Get NFT by token ID
8698
8885
  * @summary Get NFT by token ID
@@ -8713,6 +8900,16 @@ const NftsApiFactory = function (configuration, basePath, axios) {
8713
8900
  listAllNFTs(requestParameters, options) {
8714
8901
  return localVarFp.listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(axios, basePath));
8715
8902
  },
8903
+ /**
8904
+ * [Experimental] Retrieve the status of all mints for a given contract address
8905
+ * @summary [Experimental] List mint requests
8906
+ * @param {NftsApiListMintRequestsRequest} requestParameters Request parameters.
8907
+ * @param {*} [options] Override http request option.
8908
+ * @throws {RequiredError}
8909
+ */
8910
+ listMintRequests(requestParameters, options) {
8911
+ return localVarFp.listMintRequests(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.status, options).then((request) => request(axios, basePath));
8912
+ },
8716
8913
  /**
8717
8914
  * List NFTs by contract address
8718
8915
  * @summary List NFTs by contract address
@@ -8742,6 +8939,28 @@ const NftsApiFactory = function (configuration, basePath, axios) {
8742
8939
  * @extends {BaseAPI}
8743
8940
  */
8744
8941
  class NftsApi extends BaseAPI$2 {
8942
+ /**
8943
+ * [Experimental] Create a mint request to mint a set of NFTs for a given collection
8944
+ * @summary [Experimental] Mint NFTs
8945
+ * @param {NftsApiCreateMintRequestRequest} requestParameters Request parameters.
8946
+ * @param {*} [options] Override http request option.
8947
+ * @throws {RequiredError}
8948
+ * @memberof NftsApi
8949
+ */
8950
+ createMintRequest(requestParameters, options) {
8951
+ return NftsApiFp(this.configuration).createMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.createMintRequestRequest, options).then((request) => request(this.axios, this.basePath));
8952
+ }
8953
+ /**
8954
+ * [Experimental] Retrieve the status of a mint request identified by its reference_id
8955
+ * @summary [Experimental] Get mint request by reference ID
8956
+ * @param {NftsApiGetMintRequestRequest} requestParameters Request parameters.
8957
+ * @param {*} [options] Override http request option.
8958
+ * @throws {RequiredError}
8959
+ * @memberof NftsApi
8960
+ */
8961
+ getMintRequest(requestParameters, options) {
8962
+ return NftsApiFp(this.configuration).getMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.referenceId, options).then((request) => request(this.axios, this.basePath));
8963
+ }
8745
8964
  /**
8746
8965
  * Get NFT by token ID
8747
8966
  * @summary Get NFT by token ID
@@ -8764,6 +8983,17 @@ class NftsApi extends BaseAPI$2 {
8764
8983
  listAllNFTs(requestParameters, options) {
8765
8984
  return NftsApiFp(this.configuration).listAllNFTs(requestParameters.chainName, requestParameters.fromUpdatedAt, requestParameters.pageCursor, requestParameters.pageSize, options).then((request) => request(this.axios, this.basePath));
8766
8985
  }
8986
+ /**
8987
+ * [Experimental] Retrieve the status of all mints for a given contract address
8988
+ * @summary [Experimental] List mint requests
8989
+ * @param {NftsApiListMintRequestsRequest} requestParameters Request parameters.
8990
+ * @param {*} [options] Override http request option.
8991
+ * @throws {RequiredError}
8992
+ * @memberof NftsApi
8993
+ */
8994
+ listMintRequests(requestParameters, options) {
8995
+ return NftsApiFp(this.configuration).listMintRequests(requestParameters.contractAddress, requestParameters.chainName, requestParameters.pageCursor, requestParameters.pageSize, requestParameters.status, options).then((request) => request(this.axios, this.basePath));
8996
+ }
8767
8997
  /**
8768
8998
  * List NFTs by contract address
8769
8999
  * @summary List NFTs by contract address
@@ -11298,7 +11528,7 @@ class MultiRollupApiClients {
11298
11528
  }
11299
11529
 
11300
11530
  // eslint-disable-next-line @typescript-eslint/naming-convention
11301
- const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.10.0-alpha.1' };
11531
+ const defaultHeaders$1 = { 'x-sdk-version': 'ts-immutable-sdk-1.11.0' };
11302
11532
  const createConfig = ({ basePath, headers, }) => {
11303
11533
  if (!basePath.trim()) {
11304
11534
  throw Error('basePath can not be empty');
@@ -11370,7 +11600,7 @@ class APIError extends Error {
11370
11600
 
11371
11601
  /* eslint-disable implicit-arrow-linebreak */
11372
11602
  const defaultHeaders = {
11373
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.10.0-alpha.1',
11603
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.11.0',
11374
11604
  };
11375
11605
  /**
11376
11606
  * createAPIConfiguration to create a custom Configuration
@@ -11631,6 +11861,51 @@ class BlockchainData {
11631
11861
  throw formatError(err);
11632
11862
  });
11633
11863
  }
11864
+ /**
11865
+ * Create a mint request to mint a set of NFTs for a given collection
11866
+ * @experimental
11867
+ * @param request - the request object containing the parameters to be provided in the API request
11868
+ * @returns a promise that resolves with the remaining rate limits
11869
+ * @throws {@link index.APIError}
11870
+ */
11871
+ async createMintRequest(request) {
11872
+ return await this.nfts
11873
+ .createMintRequest(request)
11874
+ .then((res) => res.data)
11875
+ .catch((err) => {
11876
+ throw formatError(err);
11877
+ });
11878
+ }
11879
+ /**
11880
+ * List all mint requests for a given contract address
11881
+ * @experimental
11882
+ * @param request - the request object containing the parameters to be provided in the API request
11883
+ * @returns a promise that resolves with a list of mint requests
11884
+ * @throws {@link index.APIError}
11885
+ */
11886
+ async listMintRequests(request) {
11887
+ return await this.nfts
11888
+ .listMintRequests(request)
11889
+ .then((res) => res.data)
11890
+ .catch((err) => {
11891
+ throw formatError(err);
11892
+ });
11893
+ }
11894
+ /**
11895
+ * Retrieve the status of a single mint request identified by its reference ID
11896
+ * @experimental
11897
+ * @param request - the request object containing the parameters to be provided in the API request
11898
+ * @returns a promise that resolves with a single mint request
11899
+ * @throws {@link index.APIError}
11900
+ */
11901
+ async getMintRequest(request) {
11902
+ return await this.nfts
11903
+ .getMintRequest(request)
11904
+ .then((res) => res.data)
11905
+ .catch((err) => {
11906
+ throw formatError(err);
11907
+ });
11908
+ }
11634
11909
  /**
11635
11910
  * List NFT owners by token ID
11636
11911
  * @param request - the request object containing the parameters to be provided in the API request
@@ -11803,7 +12078,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
11803
12078
  chainID,
11804
12079
  coreContractAddress,
11805
12080
  registrationContractAddress,
11806
- sdkVersion: 'ts-immutable-sdk-1.10.0-alpha.1',
12081
+ sdkVersion: 'ts-immutable-sdk-1.11.0',
11807
12082
  });
11808
12083
  /**
11809
12084
  * Sets `sdkVersion` at the time of build
@@ -37485,7 +37760,7 @@ const flattenProperties = (properties) => {
37485
37760
  };
37486
37761
 
37487
37762
  // WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
37488
- const SDK_VERSION = '1.10.0-alpha.1';
37763
+ const SDK_VERSION = '1.11.0';
37489
37764
  const getReferrer = () => {
37490
37765
  if (isNode()) {
37491
37766
  return '';
@@ -42655,7 +42930,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
42655
42930
  maxPriorityFeePerGas: ethers.BigNumber.from(10e9),
42656
42931
  };
42657
42932
 
42658
- const SDK_VERSION_MARKER = '1.10.0-alpha.1';
42933
+ const SDK_VERSION_MARKER = '1.11.0';
42659
42934
  // This SDK version is replaced by the `yarn build` command ran on the root level
42660
42935
  const globalPackageVersion = () => SDK_VERSION_MARKER;
42661
42936