github.com/InjectiveLabs/sdk-go@v1.53.0/proto/injective/insurance/v1beta1/query.proto (about)

     1  syntax = "proto3";
     2  package injective.insurance.v1beta1;
     3  
     4  import "google/api/annotations.proto";
     5  import "injective/insurance/v1beta1/insurance.proto";
     6  import "gogoproto/gogo.proto";
     7  import "cosmos/base/v1beta1/coin.proto";
     8  import "injective/insurance/v1beta1/genesis.proto";
     9  
    10  option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/insurance/types";
    11  
    12  // Query defines the gRPC querier service.
    13  service Query {
    14  
    15    // Retrieves insurance params
    16    rpc InsuranceParams(QueryInsuranceParamsRequest)
    17        returns (QueryInsuranceParamsResponse) {
    18      option (google.api.http).get = "/injective/insurance/v1beta1/params";
    19    }
    20  
    21    // Retrieves individual insurance fund information from market id
    22    rpc InsuranceFund(QueryInsuranceFundRequest)
    23        returns (QueryInsuranceFundResponse) {
    24      option (google.api.http).get =
    25          "/injective/insurance/v1beta1/insurance_fund/{market_id}";
    26    }
    27  
    28    // Retrieves all insurance funds
    29    rpc InsuranceFunds(QueryInsuranceFundsRequest)
    30        returns (QueryInsuranceFundsResponse) {
    31      option (google.api.http).get =
    32          "/injective/insurance/v1beta1/insurance_funds";
    33    }
    34  
    35    // Retrives the value of insurance fund share token at current price (not
    36    // pending redemption)
    37    rpc EstimatedRedemptions(QueryEstimatedRedemptionsRequest)
    38        returns (QueryEstimatedRedemptionsResponse) {
    39      option (google.api.http).get =
    40          "/injective/insurance/v1beta1/estimated_redemptions";
    41    }
    42  
    43    // Retrieves pending redemptions' share token at current price
    44    rpc PendingRedemptions(QueryPendingRedemptionsRequest)
    45        returns (QueryPendingRedemptionsResponse) {
    46      option (google.api.http).get =
    47          "/injective/insurance/v1beta1/pending_redemptions";
    48    }
    49  
    50    // Retrieves the entire insurance module's state
    51    rpc InsuranceModuleState(QueryModuleStateRequest)
    52        returns (QueryModuleStateResponse) {
    53      option (google.api.http).get = "/injective/insurance/v1beta1/module_state";
    54    }
    55  }
    56  
    57  // QueryInsuranceParamsRequest is the request type for the Query/InsuranceParams
    58  // RPC method.
    59  message QueryInsuranceParamsRequest {}
    60  
    61  // QueryInsuranceParamsRequest is the response type for the
    62  // Query/InsuranceParams RPC method.
    63  message QueryInsuranceParamsResponse {
    64    Params params = 1 [ (gogoproto.nullable) = false ];
    65  }
    66  
    67  // QueryInsuranceFundRequest is the request type for the Query/InsuranceFunds
    68  // RPC method.
    69  message QueryInsuranceFundRequest {
    70    // Market ID for the market
    71    string market_id = 1;
    72  }
    73  
    74  // QueryInsuranceFundResponse is the response type for the Query/InsuranceFund
    75  // RPC method.
    76  message QueryInsuranceFundResponse { InsuranceFund fund = 1; }
    77  
    78  // QueryInsuranceFundsRequest is the request type for the Query/InsuranceFunds
    79  // RPC method.
    80  message QueryInsuranceFundsRequest {}
    81  
    82  // QueryInsuranceFundsResponse is the response type for the Query/InsuranceFunds
    83  // RPC method.
    84  message QueryInsuranceFundsResponse {
    85    repeated InsuranceFund funds = 1 [ (gogoproto.nullable) = false ];
    86  }
    87  
    88  // QueryEstimatedRedemptionsRequest is the request type for the
    89  // Query/EstimatedRedemptions RPC method.
    90  message QueryEstimatedRedemptionsRequest {
    91    string marketId = 1;
    92    string address = 2;
    93  }
    94  
    95  // QueryEstimatedRedemptionsResponse is the response type for the
    96  // Query/EstimatedRedemptions RPC method.
    97  message QueryEstimatedRedemptionsResponse {
    98    repeated cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ];
    99  }
   100  
   101  // QueryPendingRedemptionsRequest is the request type for the
   102  // Query/PendingRedemptions RPC method.
   103  message QueryPendingRedemptionsRequest {
   104    string marketId = 1;
   105    string address = 2;
   106  }
   107  
   108  // QueryPendingRedemptionsResponse is the response type for the
   109  // Query/PendingRedemptions RPC method.
   110  message QueryPendingRedemptionsResponse {
   111    repeated cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ];
   112  }
   113  
   114  // QueryModuleStateRequest is the request type for the
   115  // Query/InsuranceModuleState RPC method.
   116  message QueryModuleStateRequest {}
   117  
   118  // QueryModuleStateResponse is the response type for the
   119  // Query/InsuranceModuleState RPC method.
   120  message QueryModuleStateResponse { GenesisState state = 1; }