github.com/Finschia/finschia-sdk@v0.48.1/proto/lbm/collection/v1/query.proto (about)

     1  syntax = "proto3";
     2  package lbm.collection.v1;
     3  
     4  import "cosmos/base/query/v1beta1/pagination.proto";
     5  import "google/api/annotations.proto";
     6  import "lbm/collection/v1/collection.proto";
     7  
     8  import "google/protobuf/any.proto";
     9  
    10  import "gogoproto/gogo.proto";
    11  
    12  option go_package = "github.com/Finschia/finschia-sdk/x/collection";
    13  
    14  // Query defines the gRPC querier service.
    15  service Query {
    16    // Balance queries the balance of a single token class for a single account.
    17    rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
    18      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/balances/{address}/{token_id}";
    19    }
    20  
    21    // AllBalances queries the balance of all token classes for a single account.
    22    rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) {
    23      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/balances/{address}";
    24    }
    25  
    26    // FTSupply queries the number of tokens from a given contract id and token id.
    27    rpc FTSupply(QueryFTSupplyRequest) returns (QueryFTSupplyResponse) {
    28      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/supply";
    29    }
    30  
    31    // FTMinted queries the number of minted tokens from a given contract id and token id.
    32    rpc FTMinted(QueryFTMintedRequest) returns (QueryFTMintedResponse) {
    33      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/minted";
    34    }
    35  
    36    // FTBurnt queries the number of burnt tokens from a given contract id and token id.
    37    rpc FTBurnt(QueryFTBurntRequest) returns (QueryFTBurntResponse) {
    38      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/burnt";
    39    }
    40  
    41    // NFTSupply queries the number of tokens from a given contract id and token type.
    42    rpc NFTSupply(QueryNFTSupplyRequest) returns (QueryNFTSupplyResponse) {
    43      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/supply";
    44    }
    45  
    46    // NFTMinted queries the number of minted tokens from a given contract id and token type.
    47    rpc NFTMinted(QueryNFTMintedRequest) returns (QueryNFTMintedResponse) {
    48      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/minted";
    49    }
    50  
    51    // NFTBurnt queries the number of burnt tokens from a given contract id and token type.
    52    rpc NFTBurnt(QueryNFTBurntRequest) returns (QueryNFTBurntResponse) {
    53      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/burnt";
    54    }
    55  
    56    // Contract queries a contract metadata based on its contract id.
    57    rpc Contract(QueryContractRequest) returns (QueryContractResponse) {
    58      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}";
    59    }
    60  
    61    // TokenClassTypeName queries the fully qualified message type name of a token class from its class id.
    62    //
    63    // Since: 0.46.0 (finschia)
    64    rpc TokenClassTypeName(QueryTokenClassTypeNameRequest) returns (QueryTokenClassTypeNameResponse) {
    65      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_classes/{class_id}/type_name";
    66    }
    67  
    68    // TokenType queries metadata of a token type.
    69    rpc TokenType(QueryTokenTypeRequest) returns (QueryTokenTypeResponse) {
    70      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}";
    71    }
    72  
    73    // Token queries a metadata of a token from its token id.
    74    rpc Token(QueryTokenRequest) returns (QueryTokenResponse) {
    75      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/tokens/{token_id}";
    76    }
    77  
    78    // Root queries the root of a given nft.
    79    rpc Root(QueryRootRequest) returns (QueryRootResponse) {
    80      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/root";
    81    }
    82  
    83    // HasParent queries whether a given nft has its parent.
    84    rpc HasParent(QueryHasParentRequest) returns (QueryHasParentResponse) {
    85      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/has_parent";
    86    }
    87  
    88    // Parent queries the parent of a given nft.
    89    rpc Parent(QueryParentRequest) returns (QueryParentResponse) {
    90      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/parent";
    91    }
    92  
    93    // Children queries the children of a given nft.
    94    rpc Children(QueryChildrenRequest) returns (QueryChildrenResponse) {
    95      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/children";
    96    }
    97  
    98    // GranteeGrants queries all permissions on a given grantee.
    99    rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) {
   100      option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/grants/{grantee}";
   101    }
   102  
   103    // IsOperatorFor queries whether the operator is authorized by the holder.
   104    rpc IsOperatorFor(QueryIsOperatorForRequest) returns (QueryIsOperatorForResponse) {}
   105  
   106    // HoldersByOperator queries holders of a given operator.
   107    rpc HoldersByOperator(QueryHoldersByOperatorRequest) returns (QueryHoldersByOperatorResponse) {}
   108  }
   109  
   110  // QueryBalanceRequest is the request type for the Query/Balance RPC method.
   111  message QueryBalanceRequest {
   112    // contract id associated with the contract.
   113    string contract_id = 1;
   114    // address is the address to query the balance for.
   115    string address = 2;
   116    // token id associated with the token.
   117    string token_id = 3;
   118  }
   119  
   120  // QueryBalanceResponse is the response type for the Query/Balance RPC method.
   121  message QueryBalanceResponse {
   122    // balance is the balance of the token.
   123    Coin balance = 1 [(gogoproto.nullable) = false];
   124  }
   125  
   126  // QueryAllBalancesRequest is the request type for the Query/AllBalances RPC method.
   127  message QueryAllBalancesRequest {
   128    // contract id associated with the contract.
   129    string contract_id = 1;
   130    // address is the address to query the balances for.
   131    string address = 2;
   132  
   133    // pagination defines an optional pagination for the request.
   134    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   135  }
   136  
   137  // QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method.
   138  message QueryAllBalancesResponse {
   139    // balances is the balalces of all the tokens.
   140    repeated Coin balances = 1 [(gogoproto.nullable) = false];
   141  
   142    // pagination defines the pagination in the response.
   143    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   144  }
   145  
   146  // QueryFTSupplyRequest is the request type for the Query/FTSupply RPC method.
   147  message QueryFTSupplyRequest {
   148    // contract id associated with the contract.
   149    string contract_id = 1;
   150    // token id associated with the fungible token.
   151    string token_id = 2;
   152  }
   153  
   154  // QueryFTSupplyResponse is the response type for the Query/FTSupply RPC method.
   155  message QueryFTSupplyResponse {
   156    // supply is the supply of the tokens.
   157    string supply = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   158  }
   159  
   160  // QueryFTMintedRequest is the request type for the Query/FTMinted RPC method.
   161  message QueryFTMintedRequest {
   162    // contract id associated with the contract.
   163    string contract_id = 1;
   164    // token id associated with the fungible token.
   165    string token_id = 2;
   166  }
   167  
   168  // QueryFTMintedResponse is the response type for the Query/FTMinted RPC method.
   169  message QueryFTMintedResponse {
   170    // minted is the amount of the minted tokens.
   171    string minted = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   172  }
   173  
   174  // QueryFTBurntRequest is the request type for the Query/FTBurnt RPC method.
   175  message QueryFTBurntRequest {
   176    // contract id associated with the contract.
   177    string contract_id = 1;
   178    // token id associated with the fungible token.
   179    string token_id = 2;
   180  }
   181  
   182  // QueryFTBurntResponse is the response type for the Query/FTBurnt RPC method.
   183  message QueryFTBurntResponse {
   184    // burnt is the amount of the burnt tokens.
   185    string burnt = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   186  }
   187  
   188  // QueryNFTSupplyRequest is the request type for the Query/NFTSupply RPC method.
   189  message QueryNFTSupplyRequest {
   190    // contract id associated with the contract.
   191    string contract_id = 1;
   192    // token type associated with the token type.
   193    // refer to TokenType for the definition.
   194    string token_type = 2;
   195  }
   196  
   197  // QueryNFTSupplyResponse is the response type for the Query/NFTSupply RPC method.
   198  message QueryNFTSupplyResponse {
   199    // supply is the supply of the non-fungible token.
   200    string supply = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   201  }
   202  
   203  // QueryNFTMintedRequest is the request type for the Query/NFTMinted RPC method.
   204  message QueryNFTMintedRequest {
   205    // contract id associated with the contract.
   206    string contract_id = 1;
   207    // token type associated with the token type.
   208    // refer to TokenType for the definition.
   209    string token_type = 2;
   210  }
   211  
   212  // QueryNFTMintedResponse is the response type for the Query/NFTMinted RPC method.
   213  message QueryNFTMintedResponse {
   214    // minted is the amount of minted tokens.
   215    string minted = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   216  }
   217  
   218  // QueryNFTBurntRequest is the request type for the Query/NFTBurnt RPC method.
   219  message QueryNFTBurntRequest {
   220    // contract id associated with the contract.
   221    string contract_id = 1;
   222    // token type associated with the token type.
   223    // refer to TokenType for the definition.
   224    string token_type = 2;
   225  }
   226  
   227  // QueryNFTBurntResponse is the response type for the Query/NFTBurnt RPC method.
   228  message QueryNFTBurntResponse {
   229    // burnt is the amount of the burnt tokens.
   230    string burnt = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   231  }
   232  
   233  // QueryContractRequest is the request type for the Query/Contract RPC method.
   234  message QueryContractRequest {
   235    // contract id associated with the contract.
   236    string contract_id = 1;
   237  }
   238  
   239  // QueryContractResponse is the response type for the Query/Contract RPC method.
   240  message QueryContractResponse {
   241    // contract is the information of the contract.
   242    Contract contract = 1 [(gogoproto.nullable) = false];
   243  }
   244  
   245  // QueryTokenClassTypeNameRequest is the request type for the Query/TokenClassTypeName RPC method.
   246  //
   247  // Since: 0.46.0 (finschia)
   248  message QueryTokenClassTypeNameRequest {
   249    // contract id associated with the contract.
   250    string contract_id = 1;
   251    // class id associated with the token class.
   252    string class_id = 2;
   253  }
   254  
   255  // QueryTokenClassTypeNameResponse is the response type for the Query/TokenClassTypeName RPC method.
   256  //
   257  // Since: 0.46.0 (finschia)
   258  message QueryTokenClassTypeNameResponse {
   259    // type name of the token class.
   260    string name = 1;
   261  }
   262  
   263  // QueryTokenTypeRequest is the request type for the Query/TokenType RPC method.
   264  message QueryTokenTypeRequest {
   265    // contract id associated with the contract.
   266    string contract_id = 1;
   267    // token type associated with the token type.
   268    // refer to TokenType for the definition.
   269    string token_type = 2;
   270  }
   271  
   272  // QueryTokenTypeResponse is the response type for the Query/TokenType RPC method.
   273  message QueryTokenTypeResponse {
   274    // token type is the information of the token type.
   275    TokenType token_type = 1 [(gogoproto.nullable) = false];
   276  }
   277  
   278  // QueryTokenRequest is the request type for the Query/Token RPC method.
   279  message QueryTokenRequest {
   280    // contract id associated with the contract.
   281    string contract_id = 1;
   282    // token id associated with the fungible token.
   283    string token_id = 2;
   284  }
   285  
   286  // QueryTokenResponse is the response type for the Query/Token RPC method.
   287  message QueryTokenResponse {
   288    // information of the token.
   289    google.protobuf.Any token = 1 [(gogoproto.nullable) = false];
   290  }
   291  
   292  // QueryRootRequest is the request type for the Query/Root RPC method.
   293  message QueryRootRequest {
   294    // contract id associated with the contract.
   295    string contract_id = 1;
   296    // token id associated with the non-fungible token.
   297    string token_id = 2;
   298  }
   299  
   300  // QueryRootResponse is the response type for the Query/Root RPC method.
   301  message QueryRootResponse {
   302    // root is the information of the root token.
   303    // it would return itself if it's the root token.
   304    NFT root = 1 [(gogoproto.nullable) = false];
   305  }
   306  
   307  // QueryHasParentRequest is the request type for the Query/HasParent RPC method.
   308  message QueryHasParentRequest {
   309    // contract id associated with the contract.
   310    string contract_id = 1;
   311    // token id associated wit the non-fungible token.
   312    string token_id = 2;
   313  }
   314  
   315  // QueryHasParentResponse is the response type for the Query/HasParent RPC method.
   316  message QueryHasParentResponse {
   317    // whether the token has its parent.
   318    bool has_parent = 1;
   319  }
   320  
   321  // QueryParentRequest is the request type for the Query/Parent RPC method.
   322  message QueryParentRequest {
   323    // contract id associated with the contract.
   324    string contract_id = 1;
   325    // token id associated wit the non-fungible token.
   326    string token_id = 2;
   327  }
   328  
   329  // QueryParentResponse is the response type for the Query/Parent RPC method.
   330  message QueryParentResponse {
   331    // parent is the information of the parent token.
   332    NFT parent = 1 [(gogoproto.nullable) = false];
   333  }
   334  
   335  // QueryChildrenRequest is the request type for the Query/Children RPC method.
   336  message QueryChildrenRequest {
   337    // contract id associated with the contract.
   338    string contract_id = 1;
   339    // token id associated with the non-fungible token.
   340    string token_id = 2;
   341  
   342    // pagination defines an optional pagination for the request.
   343    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   344  }
   345  
   346  // QueryChildrenResponse is the response type for the Query/Children RPC method.
   347  message QueryChildrenResponse {
   348    // children is the information of the child tokens.
   349    repeated NFT children = 1 [(gogoproto.nullable) = false];
   350  
   351    // pagination defines the pagination in the response.
   352    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   353  }
   354  
   355  // QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method.
   356  message QueryGranteeGrantsRequest {
   357    // contract id associated with the contract.
   358    string contract_id = 1;
   359    // the address of the grantee.
   360    string grantee = 2;
   361  
   362    // pagination defines an optional pagination for the request.
   363    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   364  }
   365  
   366  // QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method.
   367  message QueryGranteeGrantsResponse {
   368    repeated Grant grants = 1 [(gogoproto.nullable) = false];
   369  
   370    // pagination defines the pagination in the response.
   371    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   372  }
   373  
   374  // QueryIsOperatorForRequest is the request type for the Query/IsOperatorFor RPC method.
   375  message QueryIsOperatorForRequest {
   376    // contract id associated with the contract.
   377    string contract_id = 1;
   378    // the address of the operator.
   379    string operator = 2;
   380    // the address of the token holder.
   381    string holder = 3;
   382  }
   383  
   384  // QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method.
   385  message QueryIsOperatorForResponse {
   386    bool authorized = 1;
   387  }
   388  
   389  // QueryHoldersByOperatorRequest is the request type for the Query/HoldersByOperator RPC method.
   390  message QueryHoldersByOperatorRequest {
   391    // contract id associated with the contract.
   392    string contract_id = 1;
   393    // address of the operator.
   394    string operator = 2;
   395  
   396    // pagination defines an optional pagination for the request.
   397    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   398  }
   399  
   400  // QueryHoldersByOperatorResponse is the response type for the Query/HoldersByOperator RPC method.
   401  message QueryHoldersByOperatorResponse {
   402    repeated string holders = 1;
   403  
   404    // pagination defines the pagination in the response.
   405    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   406  }