mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00

* feat: add QueryActiveTrustAnchorCount --------- Signed-off-by: Lorenz Herzberger <lorenzherzberger@gmail.com>
113 lines
3.3 KiB
Protocol Buffer
113 lines
3.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package planetmintgo.machine;
|
|
|
|
import "gogoproto/gogo.proto";
|
|
import "google/api/annotations.proto";
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
import "planetmintgo/machine/params.proto";
|
|
import "planetmintgo/machine/machine.proto";
|
|
import "planetmintgo/machine/liquid_asset.proto";
|
|
|
|
option go_package = "github.com/planetmint/planetmint-go/x/machine/types";
|
|
|
|
// Query defines the gRPC querier service.
|
|
service Query {
|
|
|
|
// Parameters queries the parameters of the module.
|
|
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/params";
|
|
|
|
}
|
|
|
|
// Queries a list of GetMachineByPublicKey items.
|
|
rpc GetMachineByPublicKey (QueryGetMachineByPublicKeyRequest) returns (QueryGetMachineByPublicKeyResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/public_key/{publicKey}";
|
|
|
|
}
|
|
|
|
// Queries a list of GetTrustAnchorStatus items.
|
|
rpc GetTrustAnchorStatus (QueryGetTrustAnchorStatusRequest) returns (QueryGetTrustAnchorStatusResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/trust_anchor/status/{machineid}";
|
|
|
|
}
|
|
|
|
// Queries a list of GetMachineByAddress items.
|
|
rpc GetMachineByAddress (QueryGetMachineByAddressRequest) returns (QueryGetMachineByAddressResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/address/{address}";
|
|
|
|
}
|
|
|
|
// Queries a list of GetLiquidAssetsByMachineid items.
|
|
rpc GetLiquidAssetsByMachineid (QueryGetLiquidAssetsByMachineidRequest) returns (QueryGetLiquidAssetsByMachineidResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/liquid_assets/{machineID}";
|
|
|
|
}
|
|
|
|
// Queries a list of ActiveTrustAnchorCount items.
|
|
rpc ActiveTrustAnchorCount (QueryActiveTrustAnchorCountRequest) returns (QueryActiveTrustAnchorCountResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/active_trust_anchor_count";
|
|
}
|
|
|
|
// Queries a list of ActivatedTrustAnchorCount items.
|
|
rpc ActivatedTrustAnchorCount (QueryActivatedTrustAnchorCountRequest) returns (QueryActivatedTrustAnchorCountResponse) {
|
|
option (google.api.http).get = "/planetmint/machine/activated_trust_anchor_count";
|
|
|
|
}
|
|
}
|
|
// QueryParamsRequest is request type for the Query/Params RPC method.
|
|
message QueryParamsRequest {}
|
|
|
|
// QueryParamsResponse is response type for the Query/Params RPC method.
|
|
message QueryParamsResponse {
|
|
|
|
// params holds all the parameters of this module.
|
|
Params params = 1 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message QueryGetMachineByPublicKeyRequest {
|
|
string publicKey = 1;
|
|
}
|
|
|
|
message QueryGetMachineByPublicKeyResponse {
|
|
Machine machine = 1;
|
|
}
|
|
|
|
message QueryGetTrustAnchorStatusRequest {
|
|
string machineid = 1;
|
|
}
|
|
|
|
message QueryGetTrustAnchorStatusResponse {
|
|
string machineid = 1;
|
|
bool isactivated = 2;
|
|
}
|
|
|
|
message QueryGetMachineByAddressRequest {
|
|
string address = 1;
|
|
}
|
|
|
|
message QueryGetMachineByAddressResponse {
|
|
Machine machine = 1;
|
|
}
|
|
|
|
message QueryGetLiquidAssetsByMachineidRequest {
|
|
string machineID = 1;
|
|
}
|
|
|
|
message QueryGetLiquidAssetsByMachineidResponse {
|
|
LiquidAsset liquidAssetEntry = 1;
|
|
}
|
|
|
|
message QueryActiveTrustAnchorCountRequest {}
|
|
|
|
message QueryActiveTrustAnchorCountResponse {
|
|
uint64 count = 1;
|
|
}
|
|
|
|
message QueryActivatedTrustAnchorCountRequest {}
|
|
|
|
message QueryActivatedTrustAnchorCountResponse {
|
|
uint64 count = 1;
|
|
}
|
|
|