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

     1  syntax = "proto3";
     2  package lbm.token.v1;
     3  
     4  import "cosmos/base/query/v1beta1/pagination.proto";
     5  import "google/api/annotations.proto";
     6  import "lbm/token/v1/token.proto";
     7  
     8  import "gogoproto/gogo.proto";
     9  
    10  option go_package = "github.com/Finschia/finschia-sdk/x/token";
    11  
    12  // Query defines the gRPC querier service.
    13  service Query {
    14    // Balance queries the number of tokens of a given contract owned by the address.
    15    rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
    16      option (google.api.http).get = "/lbm/token/v1/token_classes/{contract_id}/balances/{address}";
    17    }
    18  
    19    // Supply queries the number of tokens from the given contract id.
    20    rpc Supply(QuerySupplyRequest) returns (QuerySupplyResponse) {
    21      option (google.api.http).get = "/lbm/token/v1/token_classes/{contract_id}/supply";
    22    }
    23  
    24    // Minted queries the number of minted tokens from the given contract id.
    25    rpc Minted(QueryMintedRequest) returns (QueryMintedResponse) {
    26      option (google.api.http).get = "/lbm/token/v1/token_classes/{contract_id}/minted";
    27    }
    28  
    29    // Burnt queries the number of burnt tokens from the given contract id.
    30    rpc Burnt(QueryBurntRequest) returns (QueryBurntResponse) {
    31      option (google.api.http).get = "/lbm/token/v1/token_classes/{contract_id}/burnt";
    32    }
    33  
    34    // Contract queries an token metadata based on its contract id.
    35    rpc Contract(QueryContractRequest) returns (QueryContractResponse) {
    36      option (google.api.http).get = "/lbm/token/v1/token_classes/{contract_id}";
    37    }
    38  
    39    // GranteeGrants queries permissions on a given grantee.
    40    rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) {
    41      option (google.api.http).get = "/lbm/token/v1/token_classes/{contract_id}/grants/{grantee}";
    42    }
    43  
    44    // IsOperatorFor queries authorization on a given operator holder pair.
    45    rpc IsOperatorFor(QueryIsOperatorForRequest) returns (QueryIsOperatorForResponse) {}
    46  
    47    // HoldersByOperator queries holders on a given operator.
    48    rpc HoldersByOperator(QueryHoldersByOperatorRequest) returns (QueryHoldersByOperatorResponse) {}
    49  }
    50  
    51  // QueryBalanceRequest is the request type for the Query/Balance RPC method
    52  message QueryBalanceRequest {
    53    // contract id associated with the contract.
    54    string contract_id = 1;
    55    // address is the address to query balance for.
    56    string address = 2;
    57  }
    58  
    59  // QueryBalanceResponse is the response type for the Query/Balance RPC method
    60  message QueryBalanceResponse {
    61    // the balance of the tokens.
    62    string amount = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
    63  }
    64  
    65  // QuerySupplyRequest is the request type for the Query/Supply RPC method
    66  message QuerySupplyRequest {
    67    // contract id associated with the contract.
    68    string contract_id = 1;
    69  }
    70  
    71  // QuerySupplyResponse is the response type for the Query/Supply RPC method
    72  message QuerySupplyResponse {
    73    // the supply of the tokens.
    74    string amount = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
    75  }
    76  
    77  // QueryMintedRequest is the request type for the Query/Minted RPC method
    78  message QueryMintedRequest {
    79    // contract id associated with the contract.
    80    string contract_id = 1;
    81  }
    82  
    83  // QueryMintedResponse is the response type for the Query/Minted RPC method
    84  message QueryMintedResponse {
    85    // the amount of the minted tokens.
    86    string amount = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
    87  }
    88  
    89  // QueryBurntRequest is the request type for the Query/Burnt RPC method
    90  message QueryBurntRequest {
    91    // contract id associated with the contract.
    92    string contract_id = 1;
    93  }
    94  
    95  // QueryBurntResponse is the response type for the Query/Burnt RPC method
    96  message QueryBurntResponse {
    97    // the amount of the burnt tokens.
    98    string amount = 1 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
    99  }
   100  
   101  // QueryContractRequest is the request type for the Query/Contract RPC method
   102  message QueryContractRequest {
   103    // contract id associated with the contract.
   104    string contract_id = 1;
   105  }
   106  
   107  // QueryContractResponse is the response type for the Query/Contract RPC method
   108  message QueryContractResponse {
   109    Contract contract = 1 [(gogoproto.nullable) = false];
   110  }
   111  
   112  // QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method
   113  message QueryGranteeGrantsRequest {
   114    // contract id associated with the contract.
   115    string contract_id = 1;
   116    // grantee which has permissions on the contract.
   117    string grantee = 2;
   118  
   119    // pagination defines an optional pagination for the request.
   120    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   121  }
   122  
   123  // QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method
   124  message QueryGranteeGrantsResponse {
   125    // all the grants on the grantee.
   126    repeated Grant grants = 1 [(gogoproto.nullable) = false];
   127    // pagination defines the pagination in the response.
   128    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   129  }
   130  
   131  // QueryIsOperatorForRequest is the request type for the Query/IsOperatorFor RPC method
   132  message QueryIsOperatorForRequest {
   133    // contract id associated with the contract.
   134    string contract_id = 1;
   135    // address of the operator which the authorization is granted to.
   136    string operator = 2;
   137    // address of the holder of the authorization.
   138    string holder = 3;
   139  }
   140  
   141  // QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method
   142  message QueryIsOperatorForResponse {
   143    bool authorized = 1;
   144  }
   145  
   146  // QueryHoldersByOperatorRequest is the request type for the Query/HoldersByOperator RPC method
   147  message QueryHoldersByOperatorRequest {
   148    // contract id associated with the contract.
   149    string contract_id = 1;
   150    // address of the operator which the authorization is granted to.
   151    string operator = 2;
   152  
   153    // pagination defines an optional pagination for the request.
   154    cosmos.base.query.v1beta1.PageRequest pagination = 3;
   155  }
   156  
   157  // QueryHoldersByOperatorResponse is the response type for the Query/HoldersByOperator RPC method
   158  message QueryHoldersByOperatorResponse {
   159    // holder addresses
   160    repeated string holders = 1;
   161    // pagination defines the pagination in the response.
   162    cosmos.base.query.v1beta1.PageResponse pagination = 2;
   163  }