diff --git a/src/Packages/ZkEvmApi/Documentation~/ChainWithDetails.md b/src/Packages/ZkEvmApi/Documentation~/ChainWithDetails.md index 20cef1c4..ffeda6f9 100644 --- a/src/Packages/ZkEvmApi/Documentation~/ChainWithDetails.md +++ b/src/Packages/ZkEvmApi/Documentation~/ChainWithDetails.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes **Id** | **string** | The id of chain | **Name** | **string** | The name of chain | **RpcUrl** | **string** | URL for RPC node | +**OperatorAllowlistAddress** | **string** | The address of the Operator Allowlist - https://docs.immutable.com/products/zkevm/minting/royalties/allowlist-spec/ | +**MinterAddress** | **string** | The address of the minter used in the Minting API - https://docs.immutable.com/products/zkEVM/minting/minting-api#minting-api-prerequisites | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/Packages/ZkEvmApi/Documentation~/Filter.md b/src/Packages/ZkEvmApi/Documentation~/Filter.md new file mode 100644 index 00000000..5f90a569 --- /dev/null +++ b/src/Packages/ZkEvmApi/Documentation~/Filter.md @@ -0,0 +1,12 @@ +# Immutable.Api.ZkEvm.Model.Filter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of trait | +**Values** | [**List<FilterValue>**](FilterValue.md) | List of 100 most common values for this trait sorted by number of associated NFTs | +**OmittedValuesCount** | **int** | Indicated how many more distinct values exist | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/src/Packages/ZkEvmApi/Documentation~/FilterResult.md b/src/Packages/ZkEvmApi/Documentation~/FilterResult.md new file mode 100644 index 00000000..5501ad89 --- /dev/null +++ b/src/Packages/ZkEvmApi/Documentation~/FilterResult.md @@ -0,0 +1,12 @@ +# Immutable.Api.ZkEvm.Model.FilterResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Chain** | [**Chain**](Chain.md) | | +**ContractAddress** | **string** | ETH Address of collection that the asset belongs to | +**Filters** | [**List<Filter>**](Filter.md) | List of all filters and the most common values | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/src/Packages/ZkEvmApi/Documentation~/FilterValue.md b/src/Packages/ZkEvmApi/Documentation~/FilterValue.md new file mode 100644 index 00000000..5ed3d175 --- /dev/null +++ b/src/Packages/ZkEvmApi/Documentation~/FilterValue.md @@ -0,0 +1,11 @@ +# Immutable.Api.ZkEvm.Model.FilterValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | **string** | | +**NftCount** | **string** | Number of NFTs that have this trait. Uint256 as string | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/src/Packages/ZkEvmApi/Documentation~/ListFiltersResult.md b/src/Packages/ZkEvmApi/Documentation~/ListFiltersResult.md new file mode 100644 index 00000000..3fefc4fa --- /dev/null +++ b/src/Packages/ZkEvmApi/Documentation~/ListFiltersResult.md @@ -0,0 +1,12 @@ +# Immutable.Api.ZkEvm.Model.ListFiltersResult +List filters result + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**FilterResult**](FilterResult.md) | | +**Page** | [**Page**](Page.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/src/Packages/ZkEvmApi/Documentation~/StacksApi.md b/src/Packages/ZkEvmApi/Documentation~/StacksApi.md index 97d5809b..d0a4342d 100644 --- a/src/Packages/ZkEvmApi/Documentation~/StacksApi.md +++ b/src/Packages/ZkEvmApi/Documentation~/StacksApi.md @@ -4,10 +4,110 @@ All URIs are relative to *https://api.sandbox.immutable.com* | Method | HTTP request | Description | |--------|--------------|-------------| +| [**ListFilters**](StacksApi.md#listfilters) | **GET** /experimental/chains/{chain_name}/search/filters/{contract_address} | Experimental: Get list of metadata attribute filters | | [**ListStacks**](StacksApi.md#liststacks) | **GET** /experimental/chains/{chain_name}/stacks | Experimental: List NFT stacks by stack_id | | [**SearchNFTs**](StacksApi.md#searchnfts) | **GET** /experimental/chains/{chain_name}/search/nfts | Experimental: Search NFTs | | [**SearchStacks**](StacksApi.md#searchstacks) | **GET** /experimental/chains/{chain_name}/search/stacks | Experimental: Search NFT stacks | + +# **ListFilters** +> ListFiltersResult ListFilters (string chainName, string contractAddress) + +Experimental: Get list of metadata attribute filters + +![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Immutable.Api.ZkEvm.Api; +using Immutable.Api.ZkEvm.Client; +using Immutable.Api.ZkEvm.Model; + +namespace Example +{ + public class ListFiltersExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://api.sandbox.immutable.com"; + var apiInstance = new StacksApi(config); + var chainName = imtbl-zkevm-testnet; // string | The name of chain + var contractAddress = 0xe9b00a87700f660e46b6f5deaa1232836bcc07d3; // string | Contract addresses for collection + + try + { + // Experimental: Get list of metadata attribute filters + ListFiltersResult result = apiInstance.ListFilters(chainName, contractAddress); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling StacksApi.ListFilters: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the ListFiltersWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Experimental: Get list of metadata attribute filters + ApiResponse response = apiInstance.ListFiltersWithHttpInfo(chainName, contractAddress); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling StacksApi.ListFiltersWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **chainName** | **string** | The name of chain | | +| **contractAddress** | **string** | Contract addresses for collection | | + +### Return type + +[**ListFiltersResult**](ListFiltersResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | 200 response | - | +| **400** | Bad Request (400) | - | +| **401** | Unauthorised Request (401) | - | +| **403** | Forbidden Request (403) | - | +| **404** | The specified resource was not found (404) | - | +| **429** | Too Many Requests (429) | * Retry-After -
| +| **500** | Internal Server Error (500) | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **ListStacks** > List<StackBundle> ListStacks (string chainName, List stackId) diff --git a/src/Packages/ZkEvmApi/Runtime/Api/StacksApi.cs b/src/Packages/ZkEvmApi/Runtime/Api/StacksApi.cs index c3362ca7..6d86aa4e 100644 --- a/src/Packages/ZkEvmApi/Runtime/Api/StacksApi.cs +++ b/src/Packages/ZkEvmApi/Runtime/Api/StacksApi.cs @@ -28,6 +28,29 @@ public interface IStacksApiSync : IApiAccessor { #region Synchronous Operations /// + /// Experimental: Get list of metadata attribute filters + /// + /// + /// ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// ListFiltersResult + ListFiltersResult ListFilters(string chainName, string contractAddress); + + /// + /// Experimental: Get list of metadata attribute filters + /// + /// + /// ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// ApiResponse of ListFiltersResult + ApiResponse ListFiltersWithHttpInfo(string chainName, string contractAddress); + /// /// Experimental: List NFT stacks by stack_id /// /// @@ -132,6 +155,31 @@ public interface IStacksApiAsync : IApiAccessor { #region Asynchronous Operations /// + /// Experimental: Get list of metadata attribute filters + /// + /// + /// ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// Cancellation Token to cancel the request. + /// Task of ListFiltersResult + System.Threading.Tasks.Task ListFiltersAsync(string chainName, string contractAddress, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Experimental: Get list of metadata attribute filters + /// + /// + /// ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListFiltersResult) + System.Threading.Tasks.Task> ListFiltersWithHttpInfoAsync(string chainName, string contractAddress, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// /// Experimental: List NFT stacks by stack_id /// /// @@ -376,6 +424,146 @@ public Immutable.Api.ZkEvm.Client.ExceptionFactory ExceptionFactory set { _exceptionFactory = value; } } + /// + /// Experimental: Get list of metadata attribute filters ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// ListFiltersResult + public ListFiltersResult ListFilters(string chainName, string contractAddress) + { + Immutable.Api.ZkEvm.Client.ApiResponse localVarResponse = ListFiltersWithHttpInfo(chainName, contractAddress); + return localVarResponse.Data; + } + + /// + /// Experimental: Get list of metadata attribute filters ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// ApiResponse of ListFiltersResult + public Immutable.Api.ZkEvm.Client.ApiResponse ListFiltersWithHttpInfo(string chainName, string contractAddress) + { + // verify the required parameter 'chainName' is set + if (chainName == null) + throw new Immutable.Api.ZkEvm.Client.ApiException(400, "Missing required parameter 'chainName' when calling StacksApi->ListFilters"); + + // verify the required parameter 'contractAddress' is set + if (contractAddress == null) + throw new Immutable.Api.ZkEvm.Client.ApiException(400, "Missing required parameter 'contractAddress' when calling StacksApi->ListFilters"); + + Immutable.Api.ZkEvm.Client.RequestOptions localVarRequestOptions = new Immutable.Api.ZkEvm.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Immutable.Api.ZkEvm.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Immutable.Api.ZkEvm.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("chain_name", Immutable.Api.ZkEvm.Client.ClientUtils.ParameterToString(chainName)); // path parameter + localVarRequestOptions.PathParameters.Add("contract_address", Immutable.Api.ZkEvm.Client.ClientUtils.ParameterToString(contractAddress)); // path parameter + + + // make the HTTP request + var localVarResponse = this.Client.Get("/experimental/chains/{chain_name}/search/filters/{contract_address}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListFilters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Experimental: Get list of metadata attribute filters ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// Cancellation Token to cancel the request. + /// Task of ListFiltersResult + public async System.Threading.Tasks.Task ListFiltersAsync(string chainName, string contractAddress, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var task = ListFiltersWithHttpInfoAsync(chainName, contractAddress, cancellationToken); +#if UNITY_EDITOR || !UNITY_WEBGL + Immutable.Api.ZkEvm.Client.ApiResponse localVarResponse = await task.ConfigureAwait(false); +#else + Immutable.Api.ZkEvm.Client.ApiResponse localVarResponse = await task; +#endif + return localVarResponse.Data; + } + + /// + /// Experimental: Get list of metadata attribute filters ![Experimental](https://img.shields.io/badge/status-experimental-yellow) Get list of metadata filters + /// + /// Thrown when fails to make API call + /// The name of chain + /// Contract addresses for collection + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ListFiltersResult) + public async System.Threading.Tasks.Task> ListFiltersWithHttpInfoAsync(string chainName, string contractAddress, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'chainName' is set + if (chainName == null) + throw new Immutable.Api.ZkEvm.Client.ApiException(400, "Missing required parameter 'chainName' when calling StacksApi->ListFilters"); + + // verify the required parameter 'contractAddress' is set + if (contractAddress == null) + throw new Immutable.Api.ZkEvm.Client.ApiException(400, "Missing required parameter 'contractAddress' when calling StacksApi->ListFilters"); + + + Immutable.Api.ZkEvm.Client.RequestOptions localVarRequestOptions = new Immutable.Api.ZkEvm.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + + var localVarContentType = Immutable.Api.ZkEvm.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Immutable.Api.ZkEvm.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("chain_name", Immutable.Api.ZkEvm.Client.ClientUtils.ParameterToString(chainName)); // path parameter + localVarRequestOptions.PathParameters.Add("contract_address", Immutable.Api.ZkEvm.Client.ClientUtils.ParameterToString(contractAddress)); // path parameter + + + // make the HTTP request + + var task = this.AsynchronousClient.GetAsync("/experimental/chains/{chain_name}/search/filters/{contract_address}", localVarRequestOptions, this.Configuration, cancellationToken); + +#if UNITY_EDITOR || !UNITY_WEBGL + var localVarResponse = await task.ConfigureAwait(false); +#else + var localVarResponse = await task; +#endif + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListFilters", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + /// /// Experimental: List NFT stacks by stack_id ![Experimental](https://img.shields.io/badge/status-experimental-yellow) NFT stacks /// diff --git a/src/Packages/ZkEvmApi/Runtime/Model/ChainWithDetails.cs b/src/Packages/ZkEvmApi/Runtime/Model/ChainWithDetails.cs index 90de1036..a7401967 100644 --- a/src/Packages/ZkEvmApi/Runtime/Model/ChainWithDetails.cs +++ b/src/Packages/ZkEvmApi/Runtime/Model/ChainWithDetails.cs @@ -42,7 +42,9 @@ protected ChainWithDetails() { } /// The id of chain (required). /// The name of chain (required). /// URL for RPC node (required). - public ChainWithDetails(string id = default(string), string name = default(string), string rpcUrl = default(string)) + /// The address of the Operator Allowlist - https://docs.immutable.com/products/zkevm/minting/royalties/allowlist-spec/ (required). + /// The address of the minter used in the Minting API - https://docs.immutable.com/products/zkEVM/minting/minting-api#minting-api-prerequisites (required). + public ChainWithDetails(string id = default(string), string name = default(string), string rpcUrl = default(string), string operatorAllowlistAddress = default(string), string minterAddress = default(string)) { // to ensure "id" is required (not null) if (id == null) @@ -62,6 +64,18 @@ protected ChainWithDetails() { } throw new ArgumentNullException("rpcUrl is a required property for ChainWithDetails and cannot be null"); } this.RpcUrl = rpcUrl; + // to ensure "operatorAllowlistAddress" is required (not null) + if (operatorAllowlistAddress == null) + { + throw new ArgumentNullException("operatorAllowlistAddress is a required property for ChainWithDetails and cannot be null"); + } + this.OperatorAllowlistAddress = operatorAllowlistAddress; + // to ensure "minterAddress" is required (not null) + if (minterAddress == null) + { + throw new ArgumentNullException("minterAddress is a required property for ChainWithDetails and cannot be null"); + } + this.MinterAddress = minterAddress; } /// @@ -87,6 +101,20 @@ protected ChainWithDetails() { } [DataMember(Name = "rpc_url", IsRequired = true, EmitDefaultValue = true)] public string RpcUrl { get; set; } + /// + /// The address of the Operator Allowlist - https://docs.immutable.com/products/zkevm/minting/royalties/allowlist-spec/ + /// + /// The address of the Operator Allowlist - https://docs.immutable.com/products/zkevm/minting/royalties/allowlist-spec/ + [DataMember(Name = "operator_allowlist_address", IsRequired = true, EmitDefaultValue = true)] + public string OperatorAllowlistAddress { get; set; } + + /// + /// The address of the minter used in the Minting API - https://docs.immutable.com/products/zkEVM/minting/minting-api#minting-api-prerequisites + /// + /// The address of the minter used in the Minting API - https://docs.immutable.com/products/zkEVM/minting/minting-api#minting-api-prerequisites + [DataMember(Name = "minter_address", IsRequired = true, EmitDefaultValue = true)] + public string MinterAddress { get; set; } + /// /// Returns the string presentation of the object /// @@ -98,6 +126,8 @@ public override string ToString() sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" Name: ").Append(Name).Append("\n"); sb.Append(" RpcUrl: ").Append(RpcUrl).Append("\n"); + sb.Append(" OperatorAllowlistAddress: ").Append(OperatorAllowlistAddress).Append("\n"); + sb.Append(" MinterAddress: ").Append(MinterAddress).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Packages/ZkEvmApi/Runtime/Model/Filter.cs b/src/Packages/ZkEvmApi/Runtime/Model/Filter.cs new file mode 100644 index 00000000..76850a3e --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/Filter.cs @@ -0,0 +1,111 @@ +/* + * Immutable zkEVM API + * + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Immutable.Api.ZkEvm.Client.OpenAPIDateConverter; + +namespace Immutable.Api.ZkEvm.Model +{ + /// + /// Filter + /// + [DataContract(Name = "Filter")] + public partial class Filter + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Filter() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of trait (required). + /// List of 100 most common values for this trait sorted by number of associated NFTs (required). + /// Indicated how many more distinct values exist (required). + public Filter(string name = default(string), List values = default(List), int omittedValuesCount = default(int)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new ArgumentNullException("name is a required property for Filter and cannot be null"); + } + this.Name = name; + // to ensure "values" is required (not null) + if (values == null) + { + throw new ArgumentNullException("values is a required property for Filter and cannot be null"); + } + this.Values = values; + this.OmittedValuesCount = omittedValuesCount; + } + + /// + /// Name of trait + /// + /// Name of trait + /// Rarity + [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] + public string Name { get; set; } + + /// + /// List of 100 most common values for this trait sorted by number of associated NFTs + /// + /// List of 100 most common values for this trait sorted by number of associated NFTs + [DataMember(Name = "values", IsRequired = true, EmitDefaultValue = true)] + public List Values { get; set; } + + /// + /// Indicated how many more distinct values exist + /// + /// Indicated how many more distinct values exist + /// 0 + [DataMember(Name = "omitted_values_count", IsRequired = true, EmitDefaultValue = true)] + public int OmittedValuesCount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Filter {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Values: ").Append(Values).Append("\n"); + sb.Append(" OmittedValuesCount: ").Append(OmittedValuesCount).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + } + +} diff --git a/src/Packages/ZkEvmApi/Runtime/Model/Filter.cs.meta b/src/Packages/ZkEvmApi/Runtime/Model/Filter.cs.meta new file mode 100644 index 00000000..398402c6 --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/Filter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b64ef0701e25ae3f8907f6fbc6673ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Packages/ZkEvmApi/Runtime/Model/FilterResult.cs b/src/Packages/ZkEvmApi/Runtime/Model/FilterResult.cs new file mode 100644 index 00000000..2c522d09 --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/FilterResult.cs @@ -0,0 +1,114 @@ +/* + * Immutable zkEVM API + * + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Immutable.Api.ZkEvm.Client.OpenAPIDateConverter; + +namespace Immutable.Api.ZkEvm.Model +{ + /// + /// FilterResult + /// + [DataContract(Name = "FilterResult")] + public partial class FilterResult + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FilterResult() { } + /// + /// Initializes a new instance of the class. + /// + /// chain (required). + /// ETH Address of collection that the asset belongs to (required). + /// List of all filters and the most common values (required). + public FilterResult(Chain chain = default(Chain), string contractAddress = default(string), List filters = default(List)) + { + // to ensure "chain" is required (not null) + if (chain == null) + { + throw new ArgumentNullException("chain is a required property for FilterResult and cannot be null"); + } + this.Chain = chain; + // to ensure "contractAddress" is required (not null) + if (contractAddress == null) + { + throw new ArgumentNullException("contractAddress is a required property for FilterResult and cannot be null"); + } + this.ContractAddress = contractAddress; + // to ensure "filters" is required (not null) + if (filters == null) + { + throw new ArgumentNullException("filters is a required property for FilterResult and cannot be null"); + } + this.Filters = filters; + } + + /// + /// Gets or Sets Chain + /// + [DataMember(Name = "chain", IsRequired = true, EmitDefaultValue = true)] + public Chain Chain { get; set; } + + /// + /// ETH Address of collection that the asset belongs to + /// + /// ETH Address of collection that the asset belongs to + /// 0xe9b00a87700f660e46b6f5deaa1232836bcc07d3 + [DataMember(Name = "contract_address", IsRequired = true, EmitDefaultValue = true)] + public string ContractAddress { get; set; } + + /// + /// List of all filters and the most common values + /// + /// List of all filters and the most common values + [DataMember(Name = "filters", IsRequired = true, EmitDefaultValue = true)] + public List Filters { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FilterResult {\n"); + sb.Append(" Chain: ").Append(Chain).Append("\n"); + sb.Append(" ContractAddress: ").Append(ContractAddress).Append("\n"); + sb.Append(" Filters: ").Append(Filters).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + } + +} diff --git a/src/Packages/ZkEvmApi/Runtime/Model/FilterResult.cs.meta b/src/Packages/ZkEvmApi/Runtime/Model/FilterResult.cs.meta new file mode 100644 index 00000000..6fb9f5d5 --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/FilterResult.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e64e7925783cbe3c97fb4070e6ca506 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Packages/ZkEvmApi/Runtime/Model/FilterValue.cs b/src/Packages/ZkEvmApi/Runtime/Model/FilterValue.cs new file mode 100644 index 00000000..5b8d8c7e --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/FilterValue.cs @@ -0,0 +1,98 @@ +/* + * Immutable zkEVM API + * + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Immutable.Api.ZkEvm.Client.OpenAPIDateConverter; + +namespace Immutable.Api.ZkEvm.Model +{ + /// + /// FilterValue + /// + [DataContract(Name = "FilterValue")] + public partial class FilterValue + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FilterValue() { } + /// + /// Initializes a new instance of the class. + /// + /// value (required). + /// Number of NFTs that have this trait. Uint256 as string (required). + public FilterValue(string value = default(string), string nftCount = default(string)) + { + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for FilterValue and cannot be null"); + } + this.Value = value; + // to ensure "nftCount" is required (not null) + if (nftCount == null) + { + throw new ArgumentNullException("nftCount is a required property for FilterValue and cannot be null"); + } + this.NftCount = nftCount; + } + + /// + /// Gets or Sets Value + /// + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } + + /// + /// Number of NFTs that have this trait. Uint256 as string + /// + /// Number of NFTs that have this trait. Uint256 as string + [DataMember(Name = "nft_count", IsRequired = true, EmitDefaultValue = true)] + public string NftCount { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FilterValue {\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" NftCount: ").Append(NftCount).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + } + +} diff --git a/src/Packages/ZkEvmApi/Runtime/Model/FilterValue.cs.meta b/src/Packages/ZkEvmApi/Runtime/Model/FilterValue.cs.meta new file mode 100644 index 00000000..20d4eef1 --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/FilterValue.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 965e8cbb5fd186463b5f4bb43275f6df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Packages/ZkEvmApi/Runtime/Model/ListFiltersResult.cs b/src/Packages/ZkEvmApi/Runtime/Model/ListFiltersResult.cs new file mode 100644 index 00000000..7496990a --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/ListFiltersResult.cs @@ -0,0 +1,97 @@ +/* + * Immutable zkEVM API + * + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using OpenAPIDateConverter = Immutable.Api.ZkEvm.Client.OpenAPIDateConverter; + +namespace Immutable.Api.ZkEvm.Model +{ + /// + /// List filters result + /// + [DataContract(Name = "ListFiltersResult")] + public partial class ListFiltersResult + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ListFiltersResult() { } + /// + /// Initializes a new instance of the class. + /// + /// result (required). + /// page (required). + public ListFiltersResult(FilterResult result = default(FilterResult), Page page = default(Page)) + { + // to ensure "result" is required (not null) + if (result == null) + { + throw new ArgumentNullException("result is a required property for ListFiltersResult and cannot be null"); + } + this.Result = result; + // to ensure "page" is required (not null) + if (page == null) + { + throw new ArgumentNullException("page is a required property for ListFiltersResult and cannot be null"); + } + this.Page = page; + } + + /// + /// Gets or Sets Result + /// + [DataMember(Name = "result", IsRequired = true, EmitDefaultValue = true)] + public FilterResult Result { get; set; } + + /// + /// Gets or Sets Page + /// + [DataMember(Name = "page", IsRequired = true, EmitDefaultValue = true)] + public Page Page { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListFiltersResult {\n"); + sb.Append(" Result: ").Append(Result).Append("\n"); + sb.Append(" Page: ").Append(Page).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + } + +} diff --git a/src/Packages/ZkEvmApi/Runtime/Model/ListFiltersResult.cs.meta b/src/Packages/ZkEvmApi/Runtime/Model/ListFiltersResult.cs.meta new file mode 100644 index 00000000..9171b6a1 --- /dev/null +++ b/src/Packages/ZkEvmApi/Runtime/Model/ListFiltersResult.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a460071042433d520824029c8c2c17e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/Packages/ZkEvmApi/api~/openapi.yaml b/src/Packages/ZkEvmApi/api~/openapi.yaml index 01ccd26b..20522623 100644 --- a/src/Packages/ZkEvmApi/api~/openapi.yaml +++ b/src/Packages/ZkEvmApi/api~/openapi.yaml @@ -3320,6 +3320,84 @@ paths: summary: Get all info for a Passport user tags: - passport profile + /experimental/chains/{chain_name}/search/filters/{contract_address}: + get: + description: "![Experimental](https://img.shields.io/badge/status-experimental-yellow)\ + \ Get list of metadata filters" + operationId: ListFilters + parameters: + - description: The name of chain + examples: + testnet: + summary: Immutable zkEVM Public Testnet + value: imtbl-zkevm-testnet + explode: false + in: path + name: chain_name + required: true + schema: + $ref: '#/components/schemas/ChainName' + style: simple + - description: Contract addresses for collection + explode: false + in: path + name: contract_address + required: true + schema: + example: 0xe9b00a87700f660e46b6f5deaa1232836bcc07d3 + pattern: "^0x[a-fA-F0-9]{40}$" + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListFiltersResult' + description: 200 response + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/APIError400' + description: Bad Request (400) + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/APIError401' + description: Unauthorised Request (401) + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/APIError403' + description: Forbidden Request (403) + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/APIError404' + description: The specified resource was not found (404) + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/APIError429' + description: Too Many Requests (429) + headers: + Retry-After: + $ref: '#/components/headers/RetryAfter' + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/APIError500' + description: Internal Server Error (500) + summary: "Experimental: Get list of metadata attribute filters" + tags: + - stacks + x-hide-from-sdk: true /experimental/chains/{chain_name}/search/nfts: get: description: "![Experimental](https://img.shields.io/badge/status-experimental-yellow)\ @@ -5641,13 +5719,25 @@ components: description: URL for RPC node nullable: true type: string + operator_allowlist_address: + description: The address of the Operator Allowlist - https://docs.immutable.com/products/zkevm/minting/royalties/allowlist-spec/ + nullable: true + type: string + minter_address: + description: The address of the minter used in the Minting API - https://docs.immutable.com/products/zkEVM/minting/minting-api#minting-api-prerequisites + nullable: true + type: string required: + - minter_address + - operator_allowlist_address - rpc_url type: object example: rpc_url: rpc_url name: imtbl-zkevm-testnet + minter_address: minter_address id: eip155:13372 + operator_allowlist_address: operator_allowlist_address Chain: description: The chain details example: @@ -5671,10 +5761,14 @@ components: result: - rpc_url: rpc_url name: imtbl-zkevm-testnet + minter_address: minter_address id: eip155:13372 + operator_allowlist_address: operator_allowlist_address - rpc_url: rpc_url name: imtbl-zkevm-testnet + minter_address: minter_address id: eip155:13372 + operator_allowlist_address: operator_allowlist_address page: previous_cursor: ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0= next_cursor: ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0= @@ -8680,6 +8774,144 @@ components: - linked_addresses - sub type: object + FilterValue: + example: + - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + properties: + value: + type: string + nft_count: + description: Number of NFTs that have this trait. Uint256 as string + type: string + required: + - nft_count + - value + type: object + Filter: + example: + omitted_values_count: 0 + values: + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + name: Rarity + properties: + name: + description: Name of trait + example: Rarity + type: string + values: + description: List of 100 most common values for this trait sorted by number + of associated NFTs + items: + $ref: '#/components/schemas/FilterValue' + type: array + omitted_values_count: + description: Indicated how many more distinct values exist + example: 0 + type: integer + required: + - name + - omitted_values_count + - values + type: object + FilterResult: + example: + chain: + name: imtbl-zkevm-testnet + id: eip155:13372 + filters: + - omitted_values_count: 0 + values: + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + name: Rarity + - omitted_values_count: 0 + values: + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + name: Rarity + contract_address: 0xe9b00a87700f660e46b6f5deaa1232836bcc07d3 + properties: + chain: + $ref: '#/components/schemas/Chain' + contract_address: + description: ETH Address of collection that the asset belongs to + example: 0xe9b00a87700f660e46b6f5deaa1232836bcc07d3 + type: string + filters: + description: List of all filters and the most common values + items: + $ref: '#/components/schemas/Filter' + type: array + required: + - chain + - contract_address + - filters + type: object + ListFiltersResult: + description: List filters result + example: + result: + chain: + name: imtbl-zkevm-testnet + id: eip155:13372 + filters: + - omitted_values_count: 0 + values: + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + name: Rarity + - omitted_values_count: 0 + values: + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + - - value: Common + nft_count: "42" + - value: Rare + nft_count: "17" + name: Rarity + contract_address: 0xe9b00a87700f660e46b6f5deaa1232836bcc07d3 + page: + previous_cursor: ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0= + next_cursor: ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0= + properties: + result: + $ref: '#/components/schemas/FilterResult' + page: + $ref: '#/components/schemas/Page' + required: + - page + - result + type: object MarketplaceContractType: description: The contract type for a collection enum: @@ -8929,6 +9161,7 @@ components: example: ETH: "0.0058079775" USD: "15.89" + nullable: true type: object Listing: example: @@ -8965,6 +9198,7 @@ components: example: ETH: "0.0058079775" USD: "15.89" + nullable: true type: object token_id: description: Token ID