forked from cerc-io/laconicd-deprecated
additions
This commit is contained in:
+20
-32
@@ -11,52 +11,40 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
|
||||
// for basic account functionality. Any custom account type should extend this
|
||||
// type for additional functionality (e.g. vesting).
|
||||
message BaseAccount {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
option (cosmos_proto.implements_interface) = "AccountI";
|
||||
|
||||
string address = 1;
|
||||
google.protobuf.Any pub_key = 2 [
|
||||
(gogoproto.jsontag) = "public_key,omitempty",
|
||||
(gogoproto.moretags) = "yaml:\"public_key\""
|
||||
];
|
||||
uint64 account_number = 3
|
||||
[ (gogoproto.moretags) = "yaml:\"account_number\"" ];
|
||||
uint64 sequence = 4;
|
||||
string address = 1;
|
||||
google.protobuf.Any pub_key = 2
|
||||
[(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""];
|
||||
uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""];
|
||||
uint64 sequence = 4;
|
||||
}
|
||||
|
||||
// ModuleAccount defines an account for modules that holds coins on a pool.
|
||||
message ModuleAccount {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (cosmos_proto.implements_interface) = "ModuleAccountI";
|
||||
|
||||
BaseAccount base_account = 1 [
|
||||
(gogoproto.embed) = true,
|
||||
(gogoproto.moretags) = "yaml:\"base_account\""
|
||||
];
|
||||
string name = 2;
|
||||
repeated string permissions = 3;
|
||||
BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""];
|
||||
string name = 2;
|
||||
repeated string permissions = 3;
|
||||
}
|
||||
|
||||
// Params defines the parameters for the auth module.
|
||||
message Params {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
uint64 max_memo_characters = 1
|
||||
[ (gogoproto.moretags) = "yaml:\"max_memo_characters\"" ];
|
||||
uint64 tx_sig_limit = 2 [ (gogoproto.moretags) = "yaml:\"tx_sig_limit\"" ];
|
||||
uint64 tx_size_cost_per_byte = 3
|
||||
[ (gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\"" ];
|
||||
uint64 sig_verify_cost_ed25519 = 4 [
|
||||
(gogoproto.customname) = "SigVerifyCostED25519",
|
||||
(gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""
|
||||
];
|
||||
uint64 sig_verify_cost_secp256k1 = 5 [
|
||||
(gogoproto.customname) = "SigVerifyCostSecp256k1",
|
||||
(gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""
|
||||
];
|
||||
uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""];
|
||||
uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""];
|
||||
uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""];
|
||||
uint64 sig_verify_cost_ed25519 = 4
|
||||
[(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""];
|
||||
uint64 sig_verify_cost_secp256k1 = 5
|
||||
[(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""];
|
||||
}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
|
||||
// GenesisState defines the auth module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// accounts are the accounts present at genesis.
|
||||
repeated google.protobuf.Any accounts = 2;
|
||||
|
||||
+3
-4
@@ -24,7 +24,7 @@ service Query {
|
||||
|
||||
// QueryAccountRequest is the request type for the Query/Account RPC method.
|
||||
message QueryAccountRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// address defines the address to query for.
|
||||
@@ -34,8 +34,7 @@ message QueryAccountRequest {
|
||||
// QueryAccountResponse is the response type for the Query/Account RPC method.
|
||||
message QueryAccountResponse {
|
||||
// account defines the account of the corresponding address.
|
||||
google.protobuf.Any account = 1
|
||||
[ (cosmos_proto.accepts_interface) = "AccountI" ];
|
||||
google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"];
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||
@@ -44,5 +43,5 @@ message QueryParamsRequest {}
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||
message QueryParamsResponse {
|
||||
// params defines the parameters of the module.
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.authz.v1beta1;
|
||||
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
||||
|
||||
// SendAuthorization allows the grantee to spend up to spend_limit coins from
|
||||
// the granter's account.
|
||||
message SendAuthorization {
|
||||
option (cosmos_proto.implements_interface) = "Authorization";
|
||||
|
||||
repeated cosmos.base.v1beta1.Coin spend_limit = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// GenericAuthorization gives the grantee unrestricted permissions to execute
|
||||
// the provided method on behalf of the granter's account.
|
||||
message GenericAuthorization {
|
||||
option (cosmos_proto.implements_interface) = "Authorization";
|
||||
|
||||
// method name to grant unrestricted permissions to execute
|
||||
// Note: MethodName() is already a method on `GenericAuthorization` type,
|
||||
// we need some custom naming here so using `MessageName`
|
||||
string method_name = 1 [(gogoproto.customname) = "MessageName"];
|
||||
}
|
||||
|
||||
// AuthorizationGrant gives permissions to execute
|
||||
// the provide method with expiration time.
|
||||
message AuthorizationGrant {
|
||||
google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"];
|
||||
google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.authz.v1beta1;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/authz/v1beta1/tx.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
||||
|
||||
// GenesisState defines the authz module's genesis state.
|
||||
message GenesisState {
|
||||
repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// GrantAuthorization defines the GenesisState/GrantAuthorization type.
|
||||
message GrantAuthorization {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
|
||||
google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"];
|
||||
google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.authz.v1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "cosmos/authz/v1beta1/authz.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
||||
|
||||
// Query defines the gRPC querier service.
|
||||
service Query {
|
||||
// Returns any `Authorization` (or `nil`), with the expiration time, granted to the grantee by the granter for the
|
||||
// provided msg type.
|
||||
rpc Authorization(QueryAuthorizationRequest) returns (QueryAuthorizationResponse) {
|
||||
option (google.api.http).get = "/cosmos/authz/v1beta1/granters/{granter}/grantees/{grantee}/grant";
|
||||
}
|
||||
|
||||
// Returns list of `Authorization`, granted to the grantee by the granter.
|
||||
rpc Authorizations(QueryAuthorizationsRequest) returns (QueryAuthorizationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/authz/v1beta1/granters/{granter}/grantees/{grantee}/grants";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryAuthorizationRequest is the request type for the Query/Authorization RPC method.
|
||||
message QueryAuthorizationRequest {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
string method_name = 3;
|
||||
}
|
||||
|
||||
// QueryAuthorizationResponse is the response type for the Query/Authorization RPC method.
|
||||
message QueryAuthorizationResponse {
|
||||
// authorization is a authorization granted for grantee by granter.
|
||||
cosmos.authz.v1beta1.AuthorizationGrant authorization = 1;
|
||||
}
|
||||
|
||||
// QueryAuthorizationsRequest is the request type for the Query/Authorizations RPC method.
|
||||
message QueryAuthorizationsRequest {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 3;
|
||||
}
|
||||
|
||||
// QueryAuthorizationsResponse is the response type for the Query/Authorizations RPC method.
|
||||
message QueryAuthorizationsResponse {
|
||||
// authorizations is a list of grants granted for grantee by granter.
|
||||
repeated cosmos.authz.v1beta1.AuthorizationGrant authorizations = 1;
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.authz.v1beta1;
|
||||
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "cosmos/base/abci/v1beta1/abci.proto";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/authz/types";
|
||||
|
||||
// Msg defines the authz Msg service.
|
||||
service Msg {
|
||||
// GrantAuthorization grants the provided authorization to the grantee on the granter's
|
||||
// account with the provided expiration time.
|
||||
rpc GrantAuthorization(MsgGrantAuthorizationRequest) returns (MsgGrantAuthorizationResponse);
|
||||
|
||||
// ExecAuthorized attempts to execute the provided messages using
|
||||
// authorizations granted to the grantee. Each message should have only
|
||||
// one signer corresponding to the granter of the authorization.
|
||||
rpc ExecAuthorized(MsgExecAuthorizedRequest) returns (MsgExecAuthorizedResponse);
|
||||
|
||||
// RevokeAuthorization revokes any authorization corresponding to the provided method name on the
|
||||
// granter's account that has been granted to the grantee.
|
||||
rpc RevokeAuthorization(MsgRevokeAuthorizationRequest) returns (MsgRevokeAuthorizationResponse);
|
||||
}
|
||||
|
||||
// MsgGrantAuthorizationRequest grants the provided authorization to the grantee on the granter's
|
||||
// account with the provided expiration time.
|
||||
message MsgGrantAuthorizationRequest {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
|
||||
google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"];
|
||||
google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
}
|
||||
|
||||
// MsgExecAuthorizedResponse defines the Msg/MsgExecAuthorizedResponse response type.
|
||||
message MsgExecAuthorizedResponse {
|
||||
cosmos.base.abci.v1beta1.Result result = 1;
|
||||
}
|
||||
|
||||
// MsgExecAuthorizedRequest attempts to execute the provided messages using
|
||||
// authorizations granted to the grantee. Each message should have only
|
||||
// one signer corresponding to the granter of the authorization.
|
||||
message MsgExecAuthorizedRequest {
|
||||
string grantee = 1;
|
||||
repeated google.protobuf.Any msgs = 2;
|
||||
}
|
||||
|
||||
// MsgGrantAuthorizationResponse defines the Msg/MsgGrantAuthorization response type.
|
||||
message MsgGrantAuthorizationResponse {}
|
||||
|
||||
// MsgRevokeAuthorizationRequest revokes any authorization with the provided sdk.Msg type on the
|
||||
// granter's account with that has been granted to the grantee.
|
||||
message MsgRevokeAuthorizationRequest {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
string method_name = 3;
|
||||
}
|
||||
|
||||
// MsgRevokeAuthorizationResponse defines the Msg/MsgRevokeAuthorizationResponse response type.
|
||||
message MsgRevokeAuthorizationResponse {}
|
||||
+19
-28
@@ -9,60 +9,51 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||
|
||||
// Params defines the parameters for the bank module.
|
||||
message Params {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
repeated SendEnabled send_enabled = 1
|
||||
[ (gogoproto.moretags) = "yaml:\"send_enabled,omitempty\"" ];
|
||||
bool default_send_enabled = 2
|
||||
[ (gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\"" ];
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""];
|
||||
bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""];
|
||||
}
|
||||
|
||||
// SendEnabled maps coin denom to a send_enabled status (whether a denom is
|
||||
// sendable).
|
||||
message SendEnabled {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
string denom = 1;
|
||||
bool enabled = 2;
|
||||
string denom = 1;
|
||||
bool enabled = 2;
|
||||
}
|
||||
|
||||
// Input models transaction input.
|
||||
message Input {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string address = 1;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
string address = 1;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// Output models transaction outputs.
|
||||
message Output {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string address = 1;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
string address = 1;
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// Supply represents a struct that passively keeps track of the total supply
|
||||
// amounts in the network.
|
||||
message Supply {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
option (cosmos_proto.implements_interface) =
|
||||
"*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
||||
option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/exported.SupplyI";
|
||||
|
||||
repeated cosmos.base.v1beta1.Coin total = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin total = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// DenomUnit represents a struct that describes a given
|
||||
|
||||
+8
-15
@@ -10,36 +10,29 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||
// GenesisState defines the bank module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// balances is an array containing the balances of all the accounts.
|
||||
repeated Balance balances = 2 [ (gogoproto.nullable) = false ];
|
||||
repeated Balance balances = 2 [(gogoproto.nullable) = false];
|
||||
|
||||
// supply represents the total supply.
|
||||
repeated cosmos.base.v1beta1.Coin supply = 3 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin supply = 3
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||
|
||||
// denom_metadata defines the metadata of the differents coins.
|
||||
repeated Metadata denom_metadata = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"denom_metadata\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Balance defines an account address and balance pair used in the bank module's
|
||||
// genesis state.
|
||||
message Balance {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// address is the address of the balance holder.
|
||||
string address = 1;
|
||||
|
||||
// coins defines the different coins this balance holds.
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin coins = 2
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
+48
-14
@@ -13,8 +13,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||
service Query {
|
||||
// Balance queries the balance of a single coin for a single account.
|
||||
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
|
||||
option (google.api.http).get =
|
||||
"/cosmos/bank/v1beta1/balances/{address}/{denom}";
|
||||
option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/{denom}";
|
||||
}
|
||||
|
||||
// AllBalances queries the balance of all coins for a single account.
|
||||
@@ -36,11 +35,21 @@ service Query {
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/bank/v1beta1/params";
|
||||
}
|
||||
|
||||
// DenomsMetadata queries the client metadata of a given coin denomination.
|
||||
rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) {
|
||||
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}";
|
||||
}
|
||||
|
||||
// DenomsMetadata queries the client metadata for all registered coin denominations.
|
||||
rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) {
|
||||
option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryBalanceRequest is the request type for the Query/Balance RPC method.
|
||||
message QueryBalanceRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// address is the address to query balances for.
|
||||
@@ -58,7 +67,7 @@ message QueryBalanceResponse {
|
||||
|
||||
// QueryBalanceRequest is the request type for the Query/AllBalances RPC method.
|
||||
message QueryAllBalancesRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// address is the address to query balances for.
|
||||
@@ -72,10 +81,8 @@ message QueryAllBalancesRequest {
|
||||
// method.
|
||||
message QueryAllBalancesResponse {
|
||||
// balances is the balances of all the coins.
|
||||
repeated cosmos.base.v1beta1.Coin balances = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin balances = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
@@ -89,10 +96,8 @@ message QueryTotalSupplyRequest {}
|
||||
// method
|
||||
message QueryTotalSupplyResponse {
|
||||
// supply is the supply of the coins
|
||||
repeated cosmos.base.v1beta1.Coin supply = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin supply = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method.
|
||||
@@ -104,7 +109,7 @@ message QuerySupplyOfRequest {
|
||||
// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method.
|
||||
message QuerySupplyOfResponse {
|
||||
// amount is the supply of the coin.
|
||||
cosmos.base.v1beta1.Coin amount = 1 [ (gogoproto.nullable) = false ];
|
||||
cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryParamsRequest defines the request type for querying x/bank parameters.
|
||||
@@ -112,5 +117,34 @@ message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse defines the response type for querying x/bank parameters.
|
||||
message QueryParamsResponse {
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method.
|
||||
message QueryDenomsMetadataRequest {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC
|
||||
// method.
|
||||
message QueryDenomsMetadataResponse {
|
||||
// metadata provides the client information for all the registered tokens.
|
||||
repeated Metadata metadatas = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method.
|
||||
message QueryDenomMetadataRequest {
|
||||
// denom is the coin denom to query the metadata for.
|
||||
string denom = 1;
|
||||
}
|
||||
|
||||
// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC
|
||||
// method.
|
||||
message QueryDenomMetadataResponse {
|
||||
// metadata describes and provides all the client information for the requested token.
|
||||
Metadata metadata = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
+22
-9
@@ -7,23 +7,36 @@ import "cosmos/bank/v1beta1/bank.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types";
|
||||
|
||||
// Msg defines the bank Msg service.
|
||||
service Msg {
|
||||
// Send defines a method for sending coins from one account to another account.
|
||||
rpc Send(MsgSend) returns (MsgSendResponse);
|
||||
|
||||
// MultiSend defines a method for sending coins from some accounts to other accounts.
|
||||
rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse);
|
||||
}
|
||||
|
||||
// MsgSend represents a message to send coins from one account to another.
|
||||
message MsgSend {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string from_address = 1 [ (gogoproto.moretags) = "yaml:\"from_address\"" ];
|
||||
string to_address = 2 [ (gogoproto.moretags) = "yaml:\"to_address\"" ];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""];
|
||||
string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// MsgSendResponse defines the Msg/Send response type.
|
||||
message MsgSendResponse {}
|
||||
|
||||
// MsgMultiSend represents an arbitrary multi-in, multi-out send message.
|
||||
message MsgMultiSend {
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
repeated Input inputs = 1 [ (gogoproto.nullable) = false ];
|
||||
repeated Output outputs = 2 [ (gogoproto.nullable) = false ];
|
||||
repeated Input inputs = 1 [(gogoproto.nullable) = false];
|
||||
repeated Output outputs = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgMultiSendResponse defines the Msg/MultiSend response type.
|
||||
message MsgMultiSendResponse {}
|
||||
|
||||
+17
-33
@@ -5,7 +5,7 @@ import "gogoproto/gogo.proto";
|
||||
import "tendermint/abci/types.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
|
||||
// TxResponse defines a structure containing relevant tx data and metadata. The
|
||||
@@ -15,7 +15,7 @@ message TxResponse {
|
||||
// The block height
|
||||
int64 height = 1;
|
||||
// The transaction hash.
|
||||
string txhash = 2 [ (gogoproto.customname) = "TxHash" ];
|
||||
string txhash = 2 [(gogoproto.customname) = "TxHash"];
|
||||
// Namespace for the Code
|
||||
string codespace = 3;
|
||||
// Response code.
|
||||
@@ -26,10 +26,7 @@ message TxResponse {
|
||||
// non-deterministic.
|
||||
string raw_log = 6;
|
||||
// The output of the application's logger (typed). May be non-deterministic.
|
||||
repeated ABCIMessageLog logs = 7 [
|
||||
(gogoproto.castrepeated) = "ABCIMessageLogs",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false];
|
||||
// Additional information. May be non-deterministic.
|
||||
string info = 8;
|
||||
// Amount of gas requested for transaction.
|
||||
@@ -49,14 +46,11 @@ message ABCIMessageLog {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
uint32 msg_index = 1;
|
||||
string log = 2;
|
||||
string log = 2;
|
||||
|
||||
// Events contains a slice of Event objects that were emitted during some
|
||||
// execution.
|
||||
repeated StringEvent events = 3 [
|
||||
(gogoproto.castrepeated) = "StringEvents",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// StringEvent defines en Event object wrapper where all the attributes
|
||||
@@ -64,24 +58,24 @@ message ABCIMessageLog {
|
||||
message StringEvent {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
string type = 1;
|
||||
repeated Attribute attributes = 2 [ (gogoproto.nullable) = false ];
|
||||
string type = 1;
|
||||
repeated Attribute attributes = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Attribute defines an attribute wrapper where the key and value are
|
||||
// strings instead of raw bytes.
|
||||
message Attribute {
|
||||
string key = 1;
|
||||
string key = 1;
|
||||
string value = 2;
|
||||
}
|
||||
|
||||
// GasInfo defines tx execution gas context.
|
||||
message GasInfo {
|
||||
// GasWanted is the maximum units of work we allow this tx to perform.
|
||||
uint64 gas_wanted = 1 [ (gogoproto.moretags) = "yaml:\"gas_wanted\"" ];
|
||||
uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""];
|
||||
|
||||
// GasUsed is the amount of gas actually consumed.
|
||||
uint64 gas_used = 2 [ (gogoproto.moretags) = "yaml:\"gas_used\"" ];
|
||||
uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""];
|
||||
}
|
||||
|
||||
// Result is the union of ResponseFormat and ResponseCheckTx.
|
||||
@@ -97,15 +91,14 @@ message Result {
|
||||
|
||||
// Events contains a slice of Event objects that were emitted during message
|
||||
// or handler execution.
|
||||
repeated tendermint.abci.Event events = 3 [ (gogoproto.nullable) = false ];
|
||||
repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SimulationResponse defines the response generated when a transaction is
|
||||
// successfully simulated.
|
||||
message SimulationResponse {
|
||||
GasInfo gas_info = 1
|
||||
[ (gogoproto.embed) = true, (gogoproto.nullable) = false ];
|
||||
Result result = 2;
|
||||
GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||
Result result = 2;
|
||||
}
|
||||
|
||||
// MsgData defines the data returned in a Result object during message
|
||||
@@ -114,7 +107,7 @@ message MsgData {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
string msg_type = 1;
|
||||
bytes data = 2;
|
||||
bytes data = 2;
|
||||
}
|
||||
|
||||
// TxMsgData defines a list of MsgData. A transaction will have a MsgData object
|
||||
@@ -130,22 +123,13 @@ message SearchTxsResult {
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
// Count of all txs
|
||||
uint64 total_count = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"total_count\"",
|
||||
(gogoproto.jsontag) = "total_count"
|
||||
];
|
||||
uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"];
|
||||
// Count of txs in current page
|
||||
uint64 count = 2;
|
||||
// Index of current page, start from 1
|
||||
uint64 page_number = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"page_number\"",
|
||||
(gogoproto.jsontag) = "page_number"
|
||||
];
|
||||
uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"];
|
||||
// Count of total pages
|
||||
uint64 page_total = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"page_total\"",
|
||||
(gogoproto.jsontag) = "page_total"
|
||||
];
|
||||
uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"];
|
||||
// Max count txs per page
|
||||
uint64 limit = 5;
|
||||
// List of txs in current page
|
||||
|
||||
+4
-2
@@ -6,10 +6,12 @@ import "gogoproto/gogo.proto";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/kv";
|
||||
|
||||
// Pairs defines a repeated slice of Pair objects.
|
||||
message Pairs { repeated Pair pairs = 1 [ (gogoproto.nullable) = false ]; }
|
||||
message Pairs {
|
||||
repeated Pair pairs = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Pair defines a key/value bytes tuple.
|
||||
message Pair {
|
||||
bytes key = 1;
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
@@ -9,15 +9,13 @@ option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection";
|
||||
service ReflectionService {
|
||||
// ListAllInterfaces lists all the interfaces registered in the interface
|
||||
// registry.
|
||||
rpc ListAllInterfaces(ListAllInterfacesRequest)
|
||||
returns (ListAllInterfacesResponse) {
|
||||
rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces";
|
||||
};
|
||||
|
||||
// ListImplementations list all the concrete types that implement a given
|
||||
// interface.
|
||||
rpc ListImplementations(ListImplementationsRequest)
|
||||
returns (ListImplementationsResponse) {
|
||||
rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/"
|
||||
"{interface_name}/implementations";
|
||||
};
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.simulate.v1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/abci/v1beta1/abci.proto";
|
||||
import "cosmos/tx/v1beta1/tx.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/simulate";
|
||||
|
||||
// SimulateService defines a gRPC service for simulating transactions.
|
||||
// It may also support querying and broadcasting in the future.
|
||||
service SimulateService {
|
||||
// Simulate simulates executing a transaction for estimating gas usage.
|
||||
rpc Simulate(SimulateRequest) returns (SimulateResponse) {
|
||||
option (google.api.http).post = "/cosmos/base/simulate/v1beta1/simulate";
|
||||
}
|
||||
}
|
||||
|
||||
// SimulateRequest is the request type for the SimulateServiceService.Simulate
|
||||
// RPC method.
|
||||
message SimulateRequest {
|
||||
// tx is the transaction to simulate.
|
||||
cosmos.tx.v1beta1.Tx tx = 1;
|
||||
}
|
||||
|
||||
// SimulateResponse is the response type for the
|
||||
// SimulateServiceService.SimulateRPC method.
|
||||
message SimulateResponse {
|
||||
// gas_info is the information about gas used in the simulation.
|
||||
cosmos.base.abci.v1beta1.GasInfo gas_info = 1;
|
||||
// result is the result of the simulation.
|
||||
cosmos.base.abci.v1beta1.Result result = 2;
|
||||
}
|
||||
@@ -7,11 +7,11 @@ option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types";
|
||||
|
||||
// Snapshot contains Tendermint state sync snapshot info.
|
||||
message Snapshot {
|
||||
uint64 height = 1;
|
||||
uint32 format = 2;
|
||||
uint32 chunks = 3;
|
||||
bytes hash = 4;
|
||||
Metadata metadata = 5 [ (gogoproto.nullable) = false ];
|
||||
uint64 height = 1;
|
||||
uint32 format = 2;
|
||||
uint32 chunks = 3;
|
||||
bytes hash = 4;
|
||||
Metadata metadata = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Metadata contains SDK-specific snapshot metadata.
|
||||
|
||||
@@ -8,15 +8,15 @@ option go_package = "github.com/cosmos/cosmos-sdk/store/types";
|
||||
// CommitInfo defines commit information used by the multi-store when committing
|
||||
// a version/height.
|
||||
message CommitInfo {
|
||||
int64 version = 1;
|
||||
repeated StoreInfo store_infos = 2 [ (gogoproto.nullable) = false ];
|
||||
int64 version = 1;
|
||||
repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// StoreInfo defines store-specific commit information. It contains a reference
|
||||
// between a store name and the commit ID.
|
||||
message StoreInfo {
|
||||
string name = 1;
|
||||
CommitID commit_id = 2 [ (gogoproto.nullable) = false ];
|
||||
string name = 1;
|
||||
CommitID commit_id = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// CommitID defines the committment information when a specific store is
|
||||
@@ -25,5 +25,5 @@ message CommitID {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 version = 1;
|
||||
bytes hash = 2;
|
||||
bytes hash = 2;
|
||||
}
|
||||
|
||||
@@ -10,17 +10,19 @@ message SnapshotItem {
|
||||
// item is the specific type of snapshot item.
|
||||
oneof item {
|
||||
SnapshotStoreItem store = 1;
|
||||
SnapshotIAVLItem iavl = 2 [ (gogoproto.customname) = "IAVL" ];
|
||||
SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"];
|
||||
}
|
||||
}
|
||||
|
||||
// SnapshotStoreItem contains metadata about a snapshotted store.
|
||||
message SnapshotStoreItem { string name = 1; }
|
||||
message SnapshotStoreItem {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// SnapshotIAVLItem is an exported IAVL node.
|
||||
message SnapshotIAVLItem {
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
int64 version = 3;
|
||||
int32 height = 4;
|
||||
int32 height = 4;
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.base.tendermint.v1beta1;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "tendermint/p2p/types.proto";
|
||||
import "tendermint/types/block.proto";
|
||||
import "tendermint/types/types.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice";
|
||||
|
||||
// Service defines the gRPC querier service for tendermint queries.
|
||||
service Service {
|
||||
// GetNodeInfo queries the current node info.
|
||||
rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info";
|
||||
}
|
||||
// GetSyncing queries node syncing.
|
||||
rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing";
|
||||
}
|
||||
// GetLatestBlock returns the latest block.
|
||||
rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest";
|
||||
}
|
||||
// GetBlockByHeight queries block for given height.
|
||||
rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}";
|
||||
}
|
||||
|
||||
// GetLatestValidatorSet queries latest validator-set.
|
||||
rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest";
|
||||
}
|
||||
// GetValidatorSetByHeight queries validator-set at a given height.
|
||||
rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) {
|
||||
option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}";
|
||||
}
|
||||
}
|
||||
|
||||
// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetValidatorSetByHeightRequest {
|
||||
int64 height = 1;
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetValidatorSetByHeightResponse {
|
||||
int64 block_height = 1;
|
||||
repeated Validator validators = 2;
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 3;
|
||||
}
|
||||
|
||||
// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetLatestValidatorSetRequest {
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method.
|
||||
message GetLatestValidatorSetResponse {
|
||||
int64 block_height = 1;
|
||||
repeated Validator validators = 2;
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 3;
|
||||
}
|
||||
|
||||
// Validator is the type for the validator-set.
|
||||
message Validator {
|
||||
string address = 1;
|
||||
google.protobuf.Any pub_key = 2;
|
||||
int64 voting_power = 3;
|
||||
int64 proposer_priority = 4;
|
||||
}
|
||||
|
||||
// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method.
|
||||
message GetBlockByHeightRequest {
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method.
|
||||
message GetBlockByHeightResponse {
|
||||
.tendermint.types.BlockID block_id = 1;
|
||||
.tendermint.types.Block block = 2;
|
||||
}
|
||||
|
||||
// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method.
|
||||
message GetLatestBlockRequest {}
|
||||
|
||||
// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method.
|
||||
message GetLatestBlockResponse {
|
||||
.tendermint.types.BlockID block_id = 1;
|
||||
.tendermint.types.Block block = 2;
|
||||
}
|
||||
|
||||
// GetSyncingRequest is the request type for the Query/GetSyncing RPC method.
|
||||
message GetSyncingRequest {}
|
||||
|
||||
// GetSyncingResponse is the response type for the Query/GetSyncing RPC method.
|
||||
message GetSyncingResponse {
|
||||
bool syncing = 1;
|
||||
}
|
||||
|
||||
// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method.
|
||||
message GetNodeInfoRequest {}
|
||||
|
||||
// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method.
|
||||
message GetNodeInfoResponse {
|
||||
.tendermint.p2p.DefaultNodeInfo default_node_info = 1;
|
||||
VersionInfo application_version = 2;
|
||||
}
|
||||
|
||||
// VersionInfo is the type for the GetNodeInfoResponse message.
|
||||
message VersionInfo {
|
||||
string name = 1;
|
||||
string app_name = 2;
|
||||
string version = 3;
|
||||
string git_commit = 4;
|
||||
string build_tags = 5;
|
||||
string go_version = 6;
|
||||
repeated Module build_deps = 7;
|
||||
}
|
||||
|
||||
// Module is the type for VersionInfo
|
||||
message Module {
|
||||
// module path
|
||||
string path = 1;
|
||||
// module version
|
||||
string version = 2;
|
||||
// checksum
|
||||
string sum = 3;
|
||||
}
|
||||
+8
-12
@@ -3,9 +3,9 @@ package cosmos.base.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
option (gogoproto.stringer_all) = false;
|
||||
option (gogoproto.stringer_all) = false;
|
||||
|
||||
// Coin defines a token with a denomination and an amount.
|
||||
//
|
||||
@@ -14,9 +14,8 @@ option (gogoproto.stringer_all) = false;
|
||||
message Coin {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string denom = 1;
|
||||
string amount = 2
|
||||
[ (gogoproto.customtype) = "Int", (gogoproto.nullable) = false ];
|
||||
string denom = 1;
|
||||
string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// DecCoin defines a token with a denomination and a decimal amount.
|
||||
@@ -26,19 +25,16 @@ message Coin {
|
||||
message DecCoin {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string denom = 1;
|
||||
string amount = 2
|
||||
[ (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false ];
|
||||
string denom = 1;
|
||||
string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// IntProto defines a Protobuf wrapper around an Int object.
|
||||
message IntProto {
|
||||
string int = 1
|
||||
[ (gogoproto.customtype) = "Int", (gogoproto.nullable) = false ];
|
||||
string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// DecProto defines a Protobuf wrapper around a Dec object.
|
||||
message DecProto {
|
||||
string dec = 1
|
||||
[ (gogoproto.customtype) = "Dec", (gogoproto.nullable) = false ];
|
||||
string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.capability.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
// Capability defines an implementation of an object capability. The index
|
||||
// provided to a Capability must be globally unique.
|
||||
message Capability {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
uint64 index = 1 [(gogoproto.moretags) = "yaml:\"index\""];
|
||||
}
|
||||
|
||||
// Owner defines a single capability owner. An owner is defined by the name of
|
||||
// capability and the module name.
|
||||
message Owner {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string module = 1 [(gogoproto.moretags) = "yaml:\"module\""];
|
||||
string name = 2 [(gogoproto.moretags) = "yaml:\"name\""];
|
||||
}
|
||||
|
||||
// CapabilityOwners defines a set of owners of a single Capability. The set of
|
||||
// owners must be unique.
|
||||
message CapabilityOwners {
|
||||
repeated Owner owners = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.capability.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/capability/v1beta1/capability.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types";
|
||||
|
||||
// GenesisOwners defines the capability owners with their corresponding index.
|
||||
message GenesisOwners {
|
||||
// index is the index of the capability owner.
|
||||
uint64 index = 1;
|
||||
|
||||
// index_owners are the owners at the given index.
|
||||
CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""];
|
||||
}
|
||||
|
||||
// GenesisState defines the capability module's genesis state.
|
||||
message GenesisState {
|
||||
// index is the capability global index.
|
||||
uint64 index = 1;
|
||||
|
||||
// owners represents a map from index to owners of the capability index
|
||||
// index key is string to allow amino marshalling.
|
||||
repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.crisis.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
// GenesisState defines the crisis module's genesis state.
|
||||
message GenesisState {
|
||||
// constant_fee is the fee used to verify the invariant in the crisis
|
||||
// module.
|
||||
cosmos.base.v1beta1.Coin constant_fee = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.crisis.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
// Msg defines the bank Msg service.
|
||||
service Msg {
|
||||
// VerifyInvariant defines a method to verify a particular invariance.
|
||||
rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse);
|
||||
}
|
||||
|
||||
// MsgVerifyInvariant represents a message to verify a particular invariance.
|
||||
message MsgVerifyInvariant {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string sender = 1;
|
||||
string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""];
|
||||
string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""];
|
||||
}
|
||||
|
||||
// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type.
|
||||
message MsgVerifyInvariantResponse {}
|
||||
+8
-6
@@ -6,15 +6,17 @@ import "gogoproto/gogo.proto";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519";
|
||||
|
||||
// PubKey defines a ed25519 public key
|
||||
// Key is the compressed form of the pubkey. The first byte depends is a 0x02
|
||||
// byte if the y-coordinate is the lexicographically largest of the two
|
||||
// associated with the x-coordinate. Otherwise the first byte is a 0x03. This
|
||||
// prefix is followed with the x-coordinate.
|
||||
// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
|
||||
// if the y-coordinate is the lexicographically largest of the two associated with
|
||||
// the x-coordinate. Otherwise the first byte is a 0x03.
|
||||
// This prefix is followed with the x-coordinate.
|
||||
message PubKey {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
bytes key = 1;
|
||||
bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"];
|
||||
}
|
||||
|
||||
// PrivKey defines a ed25519 private key.
|
||||
message PrivKey { bytes key = 1; }
|
||||
message PrivKey {
|
||||
bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"];
|
||||
}
|
||||
|
||||
+3
-5
@@ -12,9 +12,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig";
|
||||
message LegacyAminoPubKey {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
uint32 threshold = 1 [ (gogoproto.moretags) = "yaml:\"threshold\"" ];
|
||||
repeated google.protobuf.Any public_keys = 2 [
|
||||
(gogoproto.customname) = "PubKeys",
|
||||
(gogoproto.moretags) = "yaml:\"pubkeys\""
|
||||
];
|
||||
uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""];
|
||||
repeated google.protobuf.Any public_keys = 2
|
||||
[(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""];
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/crypto/types";
|
||||
// signed and with which modes.
|
||||
message MultiSignature {
|
||||
option (gogoproto.goproto_unrecognized) = true;
|
||||
repeated bytes signatures = 1;
|
||||
repeated bytes signatures = 1;
|
||||
}
|
||||
|
||||
// CompactBitArray is an implementation of a space efficient bit array.
|
||||
@@ -21,5 +21,5 @@ message CompactBitArray {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
uint32 extra_bits_stored = 1;
|
||||
bytes elems = 2;
|
||||
bytes elems = 2;
|
||||
}
|
||||
|
||||
+7
-5
@@ -6,10 +6,10 @@ import "gogoproto/gogo.proto";
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1";
|
||||
|
||||
// PubKey defines a secp256k1 public key
|
||||
// Key is the compressed form of the pubkey. The first byte depends is a 0x02
|
||||
// byte if the y-coordinate is the lexicographically largest of the two
|
||||
// associated with the x-coordinate. Otherwise the first byte is a 0x03. This
|
||||
// prefix is followed with the x-coordinate.
|
||||
// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte
|
||||
// if the y-coordinate is the lexicographically largest of the two associated with
|
||||
// the x-coordinate. Otherwise the first byte is a 0x03.
|
||||
// This prefix is followed with the x-coordinate.
|
||||
message PubKey {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
@@ -17,4 +17,6 @@ message PubKey {
|
||||
}
|
||||
|
||||
// PrivKey defines a secp256k1 private key.
|
||||
message PrivKey { bytes key = 1; }
|
||||
message PrivKey {
|
||||
bytes key = 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.distribution.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
// Params defines the set of params for the distribution module.
|
||||
message Params {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
string community_tax = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"community_tax\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string base_proposer_reward = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"base_proposer_reward\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string bonus_proposer_reward = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"bonus_proposer_reward\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bool withdraw_addr_enabled = 4 [(gogoproto.moretags) = "yaml:\"withdraw_addr_enabled\""];
|
||||
}
|
||||
|
||||
// ValidatorHistoricalRewards represents historical rewards for a validator.
|
||||
// Height is implicit within the store key.
|
||||
// Cumulative reward ratio is the sum from the zeroeth period
|
||||
// until this period of rewards / tokens, per the spec.
|
||||
// The reference count indicates the number of objects
|
||||
// which might need to reference this historical entry at any point.
|
||||
// ReferenceCount =
|
||||
// number of outstanding delegations which ended the associated period (and
|
||||
// might need to read that record)
|
||||
// + number of slashes which ended the associated period (and might need to
|
||||
// read that record)
|
||||
// + one per validator for the zeroeth period, set on initialization
|
||||
message ValidatorHistoricalRewards {
|
||||
repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"cumulative_reward_ratio\"",
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
uint32 reference_count = 2 [(gogoproto.moretags) = "yaml:\"reference_count\""];
|
||||
}
|
||||
|
||||
// ValidatorCurrentRewards represents current rewards and current
|
||||
// period for a validator kept as a running counter and incremented
|
||||
// each block as long as the validator's tokens remain constant.
|
||||
message ValidatorCurrentRewards {
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
uint64 period = 2;
|
||||
}
|
||||
|
||||
// ValidatorAccumulatedCommission represents accumulated commission
|
||||
// for a validator kept as a running counter, can be withdrawn at any time.
|
||||
message ValidatorAccumulatedCommission {
|
||||
repeated cosmos.base.v1beta1.DecCoin commission = 1
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
|
||||
// for a validator inexpensive to track, allows simple sanity checks.
|
||||
message ValidatorOutstandingRewards {
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1 [
|
||||
(gogoproto.moretags) = "yaml:\"rewards\"",
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
// ValidatorSlashEvent represents a validator slash event.
|
||||
// Height is implicit within the store key.
|
||||
// This is needed to calculate appropriate amount of staking tokens
|
||||
// for delegations which are withdrawn after a slash has occurred.
|
||||
message ValidatorSlashEvent {
|
||||
uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""];
|
||||
string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages.
|
||||
message ValidatorSlashEvents {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
repeated ValidatorSlashEvent validator_slash_events = 1
|
||||
[(gogoproto.moretags) = "yaml:\"validator_slash_events\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// FeePool is the global fee pool for distribution.
|
||||
message FeePool {
|
||||
repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.moretags) = "yaml:\"community_pool\""
|
||||
];
|
||||
}
|
||||
|
||||
// CommunityPoolSpendProposal details a proposal for use of community funds,
|
||||
// together with how many coins are proposed to be spent, and to which
|
||||
// recipient account.
|
||||
message CommunityPoolSpendProposal {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string title = 1;
|
||||
string description = 2;
|
||||
string recipient = 3;
|
||||
repeated cosmos.base.v1beta1.Coin amount = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// DelegatorStartingInfo represents the starting info for a delegator reward
|
||||
// period. It tracks the previous validator period, the delegation's amount of
|
||||
// staking token, and the creation height (to check later on if any slashes have
|
||||
// occurred). NOTE: Even though validators are slashed to whole staking tokens,
|
||||
// the delegators within the validator may be left with less than a full token,
|
||||
// thus sdk.Dec is used.
|
||||
message DelegatorStartingInfo {
|
||||
uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""];
|
||||
string stake = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"stake\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"];
|
||||
}
|
||||
|
||||
// DelegationDelegatorReward represents the properties
|
||||
// of a delegator's delegation reward.
|
||||
message DelegationDelegatorReward {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = true;
|
||||
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
|
||||
repeated cosmos.base.v1beta1.DecCoin reward = 2
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal
|
||||
// with a deposit
|
||||
message CommunityPoolSpendProposalWithDeposit {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = true;
|
||||
|
||||
string title = 1 [(gogoproto.moretags) = "yaml:\"title\""];
|
||||
string description = 2 [(gogoproto.moretags) = "yaml:\"description\""];
|
||||
string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""];
|
||||
string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""];
|
||||
string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""];
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.distribution.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos/distribution/v1beta1/distribution.proto";
|
||||
|
||||
// DelegatorWithdrawInfo is the address for where distributions rewards are
|
||||
// withdrawn to by default this struct is only used at genesis to feed in
|
||||
// default withdraw addresses.
|
||||
message DelegatorWithdrawInfo {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_address is the address of the delegator.
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
|
||||
// withdraw_address is the address to withdraw the delegation rewards to.
|
||||
string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""];
|
||||
}
|
||||
|
||||
// ValidatorOutstandingRewardsRecord is used for import/export via genesis json.
|
||||
message ValidatorOutstandingRewardsRecord {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// validator_address is the address of the validator.
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
|
||||
// outstanding_rewards represents the oustanding rewards of a validator.
|
||||
repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"outstanding_rewards\""
|
||||
];
|
||||
}
|
||||
|
||||
// ValidatorAccumulatedCommissionRecord is used for import / export via genesis
|
||||
// json.
|
||||
message ValidatorAccumulatedCommissionRecord {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// validator_address is the address of the validator.
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
|
||||
// accumulated is the accumulated commission of a validator.
|
||||
ValidatorAccumulatedCommission accumulated = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""];
|
||||
}
|
||||
|
||||
// ValidatorHistoricalRewardsRecord is used for import / export via genesis
|
||||
// json.
|
||||
message ValidatorHistoricalRewardsRecord {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// validator_address is the address of the validator.
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
|
||||
// period defines the period the historical rewards apply to.
|
||||
uint64 period = 2;
|
||||
|
||||
// rewards defines the historical rewards of a validator.
|
||||
ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""];
|
||||
}
|
||||
|
||||
// ValidatorCurrentRewardsRecord is used for import / export via genesis json.
|
||||
message ValidatorCurrentRewardsRecord {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// validator_address is the address of the validator.
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
|
||||
// rewards defines the current rewards of a validator.
|
||||
ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""];
|
||||
}
|
||||
|
||||
// DelegatorStartingInfoRecord used for import / export via genesis json.
|
||||
message DelegatorStartingInfoRecord {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_address is the address of the delegator.
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
|
||||
// validator_address is the address of the validator.
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
|
||||
// starting_info defines the starting info of a delegator.
|
||||
DelegatorStartingInfo starting_info = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""];
|
||||
}
|
||||
|
||||
// ValidatorSlashEventRecord is used for import / export via genesis json.
|
||||
message ValidatorSlashEventRecord {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// validator_address is the address of the validator.
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
// height defines the block height at which the slash event occured.
|
||||
uint64 height = 2;
|
||||
// period is the period of the slash event.
|
||||
uint64 period = 3;
|
||||
// validator_slash_event describes the slash event.
|
||||
ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""];
|
||||
}
|
||||
|
||||
// GenesisState defines the distribution module's genesis state.
|
||||
message GenesisState {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""];
|
||||
|
||||
// fee_pool defines the fee pool at genesis.
|
||||
FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""];
|
||||
|
||||
// fee_pool defines the delegator withdraw infos at genesis.
|
||||
repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""];
|
||||
|
||||
// fee_pool defines the previous proposer at genesis.
|
||||
string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""];
|
||||
|
||||
// fee_pool defines the outstanding rewards of all validators at genesis.
|
||||
repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""];
|
||||
|
||||
// fee_pool defines the accumulated commisions of all validators at genesis.
|
||||
repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""];
|
||||
|
||||
// fee_pool defines the historical rewards of all validators at genesis.
|
||||
repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""];
|
||||
|
||||
// fee_pool defines the current rewards of all validators at genesis.
|
||||
repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""];
|
||||
|
||||
// fee_pool defines the delegator starting infos at genesis.
|
||||
repeated DelegatorStartingInfoRecord delegator_starting_infos = 9
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""];
|
||||
|
||||
// fee_pool defines the validator slash events at genesis.
|
||||
repeated ValidatorSlashEventRecord validator_slash_events = 10
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""];
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.distribution.v1beta1;
|
||||
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos/distribution/v1beta1/distribution.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
|
||||
|
||||
// Query defines the gRPC querier service for distribution module.
|
||||
service Query {
|
||||
// Params queries params of the distribution module.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/params";
|
||||
}
|
||||
|
||||
// ValidatorOutstandingRewards queries rewards of a validator address.
|
||||
rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest)
|
||||
returns (QueryValidatorOutstandingRewardsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/"
|
||||
"{validator_address}/outstanding_rewards";
|
||||
}
|
||||
|
||||
// ValidatorCommission queries accumulated commission for a validator.
|
||||
rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/"
|
||||
"{validator_address}/commission";
|
||||
}
|
||||
|
||||
// ValidatorSlashes queries slash events of a validator.
|
||||
rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes";
|
||||
}
|
||||
|
||||
// DelegationRewards queries the total rewards accrued by a delegation.
|
||||
rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/"
|
||||
"{validator_address}";
|
||||
}
|
||||
|
||||
// DelegationTotalRewards queries the total rewards accrued by a each
|
||||
// validator.
|
||||
rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards";
|
||||
}
|
||||
|
||||
// DelegatorValidators queries the validators of a delegator.
|
||||
rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/"
|
||||
"{delegator_address}/validators";
|
||||
}
|
||||
|
||||
// DelegatorWithdrawAddress queries withdraw address of a delegator.
|
||||
rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/"
|
||||
"{delegator_address}/withdraw_address";
|
||||
}
|
||||
|
||||
// CommunityPool queries the community pool coins.
|
||||
rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) {
|
||||
option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||
message QueryParamsResponse {
|
||||
// params defines the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryValidatorOutstandingRewardsRequest is the request type for the
|
||||
// Query/ValidatorOutstandingRewards RPC method.
|
||||
message QueryValidatorOutstandingRewardsRequest {
|
||||
// validator_address defines the validator address to query for.
|
||||
string validator_address = 1;
|
||||
}
|
||||
|
||||
// QueryValidatorOutstandingRewardsResponse is the response type for the
|
||||
// Query/ValidatorOutstandingRewards RPC method.
|
||||
message QueryValidatorOutstandingRewardsResponse {
|
||||
ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryValidatorCommissionRequest is the request type for the
|
||||
// Query/ValidatorCommission RPC method
|
||||
message QueryValidatorCommissionRequest {
|
||||
// validator_address defines the validator address to query for.
|
||||
string validator_address = 1;
|
||||
}
|
||||
|
||||
// QueryValidatorCommissionResponse is the response type for the
|
||||
// Query/ValidatorCommission RPC method
|
||||
message QueryValidatorCommissionResponse {
|
||||
// commission defines the commision the validator received.
|
||||
ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryValidatorSlashesRequest is the request type for the
|
||||
// Query/ValidatorSlashes RPC method
|
||||
message QueryValidatorSlashesRequest {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = true;
|
||||
|
||||
// validator_address defines the validator address to query for.
|
||||
string validator_address = 1;
|
||||
// starting_height defines the optional starting height to query the slashes.
|
||||
uint64 starting_height = 2;
|
||||
// starting_height defines the optional ending height to query the slashes.
|
||||
uint64 ending_height = 3;
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 4;
|
||||
}
|
||||
|
||||
// QueryValidatorSlashesResponse is the response type for the
|
||||
// Query/ValidatorSlashes RPC method.
|
||||
message QueryValidatorSlashesResponse {
|
||||
// slashes defines the slashes the validator received.
|
||||
repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationRewardsRequest is the request type for the
|
||||
// Query/DelegationRewards RPC method.
|
||||
message QueryDelegationRewardsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_address defines the delegator address to query for.
|
||||
string delegator_address = 1;
|
||||
// validator_address defines the validator address to query for.
|
||||
string validator_address = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationRewardsResponse is the response type for the
|
||||
// Query/DelegationRewards RPC method.
|
||||
message QueryDelegationRewardsResponse {
|
||||
// rewards defines the rewards accrued by a delegation.
|
||||
repeated cosmos.base.v1beta1.DecCoin rewards = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
|
||||
}
|
||||
|
||||
// QueryDelegationTotalRewardsRequest is the request type for the
|
||||
// Query/DelegationTotalRewards RPC method.
|
||||
message QueryDelegationTotalRewardsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
// delegator_address defines the delegator address to query for.
|
||||
string delegator_address = 1;
|
||||
}
|
||||
|
||||
// QueryDelegationTotalRewardsResponse is the response type for the
|
||||
// Query/DelegationTotalRewards RPC method.
|
||||
message QueryDelegationTotalRewardsResponse {
|
||||
// rewards defines all the rewards accrued by a delegator.
|
||||
repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false];
|
||||
// total defines the sum of all the rewards.
|
||||
repeated cosmos.base.v1beta1.DecCoin total = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"];
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsRequest is the request type for the
|
||||
// Query/DelegatorValidators RPC method.
|
||||
message QueryDelegatorValidatorsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_address defines the delegator address to query for.
|
||||
string delegator_address = 1;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsResponse is the response type for the
|
||||
// Query/DelegatorValidators RPC method.
|
||||
message QueryDelegatorValidatorsResponse {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// validators defines the validators a delegator is delegating for.
|
||||
repeated string validators = 1;
|
||||
}
|
||||
|
||||
// QueryDelegatorWithdrawAddressRequest is the request type for the
|
||||
// Query/DelegatorWithdrawAddress RPC method.
|
||||
message QueryDelegatorWithdrawAddressRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_address defines the delegator address to query for.
|
||||
string delegator_address = 1;
|
||||
}
|
||||
|
||||
// QueryDelegatorWithdrawAddressResponse is the response type for the
|
||||
// Query/DelegatorWithdrawAddress RPC method.
|
||||
message QueryDelegatorWithdrawAddressResponse {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// withdraw_address defines the delegator address to query for.
|
||||
string withdraw_address = 1;
|
||||
}
|
||||
|
||||
// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC
|
||||
// method.
|
||||
message QueryCommunityPoolRequest {}
|
||||
|
||||
// QueryCommunityPoolResponse is the response type for the Query/CommunityPool
|
||||
// RPC method.
|
||||
message QueryCommunityPoolResponse {
|
||||
// pool defines community pool's coins.
|
||||
repeated cosmos.base.v1beta1.DecCoin pool = 1
|
||||
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.distribution.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
// Msg defines the distribution Msg service.
|
||||
service Msg {
|
||||
// SetWithdrawAddress defines a method to change the withdraw address
|
||||
// for a delegator (or validator self-delegation).
|
||||
rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse);
|
||||
|
||||
// WithdrawDelegatorReward defines a method to withdraw rewards of delegator
|
||||
// from a single validator.
|
||||
rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse);
|
||||
|
||||
// WithdrawValidatorCommission defines a method to withdraw the
|
||||
// full commission to the validator address.
|
||||
rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse);
|
||||
|
||||
// FundCommunityPool defines a method to allow an account to directly
|
||||
// fund the community pool.
|
||||
rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse);
|
||||
}
|
||||
|
||||
// MsgSetWithdrawAddress sets the withdraw address for
|
||||
// a delegator (or validator self-delegation).
|
||||
message MsgSetWithdrawAddress {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""];
|
||||
}
|
||||
|
||||
// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type.
|
||||
message MsgSetWithdrawAddressResponse {}
|
||||
|
||||
// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator
|
||||
// from a single validator.
|
||||
message MsgWithdrawDelegatorReward {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
}
|
||||
|
||||
// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type.
|
||||
message MsgWithdrawDelegatorRewardResponse {}
|
||||
|
||||
// MsgWithdrawValidatorCommission withdraws the full commission to the validator
|
||||
// address.
|
||||
message MsgWithdrawValidatorCommission {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
}
|
||||
|
||||
// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type.
|
||||
message MsgWithdrawValidatorCommissionResponse {}
|
||||
|
||||
// MsgFundCommunityPool allows an account to directly
|
||||
// fund the community pool.
|
||||
message MsgFundCommunityPool {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
repeated cosmos.base.v1beta1.Coin amount = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
string depositor = 2;
|
||||
}
|
||||
|
||||
// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type.
|
||||
message MsgFundCommunityPoolResponse {}
|
||||
@@ -0,0 +1,21 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.evidence.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// Equivocation implements the Evidence interface and defines evidence of double
|
||||
// signing misbehavior.
|
||||
message Equivocation {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
int64 height = 1;
|
||||
google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
int64 power = 3;
|
||||
string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.evidence.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types";
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
// GenesisState defines the evidence module's genesis state.
|
||||
message GenesisState {
|
||||
// evidence defines all the evidence at genesis.
|
||||
repeated google.protobuf.Any evidence = 1;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.evidence.v1beta1;
|
||||
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types";
|
||||
|
||||
// Query defines the gRPC querier service.
|
||||
service Query {
|
||||
// Evidence queries evidence based on evidence hash.
|
||||
rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) {
|
||||
option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}";
|
||||
}
|
||||
|
||||
// AllEvidence queries all evidence.
|
||||
rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) {
|
||||
option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryEvidenceRequest is the request type for the Query/Evidence RPC method.
|
||||
message QueryEvidenceRequest {
|
||||
// evidence_hash defines the hash of the requested evidence.
|
||||
bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"];
|
||||
}
|
||||
|
||||
// QueryEvidenceResponse is the response type for the Query/Evidence RPC method.
|
||||
message QueryEvidenceResponse {
|
||||
// evidence returns the requested evidence.
|
||||
google.protobuf.Any evidence = 1;
|
||||
}
|
||||
|
||||
// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC
|
||||
// method.
|
||||
message QueryAllEvidenceRequest {
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC
|
||||
// method.
|
||||
message QueryAllEvidenceResponse {
|
||||
// evidence returns all evidences.
|
||||
repeated google.protobuf.Any evidence = 1;
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.evidence.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
// Msg defines the evidence Msg service.
|
||||
service Msg {
|
||||
// SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or
|
||||
// counterfactual signing.
|
||||
rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse);
|
||||
}
|
||||
|
||||
// MsgSubmitEvidence represents a message that supports submitting arbitrary
|
||||
// Evidence of misbehavior such as equivocation or counterfactual signing.
|
||||
message MsgSubmitEvidence {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string submitter = 1;
|
||||
google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"];
|
||||
}
|
||||
|
||||
// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type.
|
||||
message MsgSubmitEvidenceResponse {
|
||||
// hash defines the hash of the evidence.
|
||||
bytes hash = 4;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.feegrant.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
||||
|
||||
// BasicFeeAllowance implements FeeAllowance with a one-time grant of tokens
|
||||
// that optionally expires. The delegatee can use up to SpendLimit to cover fees.
|
||||
message BasicFeeAllowance {
|
||||
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
||||
|
||||
// spend_limit specifies the maximum amount of tokens that can be spent
|
||||
// by this allowance and will be updated as tokens are spent. If it is
|
||||
// empty, there is no spend limit and any amount of coins can be spent.
|
||||
repeated cosmos.base.v1beta1.Coin spend_limit = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// expiration specifies an optional time when this allowance expires
|
||||
ExpiresAt expiration = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// PeriodicFeeAllowance extends FeeAllowance to allow for both a maximum cap,
|
||||
// as well as a limit per time period.
|
||||
message PeriodicFeeAllowance {
|
||||
option (cosmos_proto.implements_interface) = "FeeAllowanceI";
|
||||
|
||||
// basic specifies a struct of `BasicFeeAllowance`
|
||||
BasicFeeAllowance basic = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// period specifies the time duration in which period_spend_limit coins can
|
||||
// be spent before that allowance is reset
|
||||
Duration period = 2 [(gogoproto.nullable) = false];
|
||||
|
||||
// period_spend_limit specifies the maximum number of coins that can be spent
|
||||
// in the period
|
||||
repeated cosmos.base.v1beta1.Coin period_spend_limit = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// period_can_spend is the number of coins left to be spent before the period_reset time
|
||||
repeated cosmos.base.v1beta1.Coin period_can_spend = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// period_reset is the time at which this period resets and a new one begins,
|
||||
// it is calculated from the start time of the first transaction after the
|
||||
// last period ended
|
||||
ExpiresAt period_reset = 5 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Duration is a span of a clock time or number of blocks.
|
||||
// This is designed to be added to an ExpiresAt struct.
|
||||
message Duration {
|
||||
// sum is the oneof that represents either duration or block
|
||||
oneof sum {
|
||||
google.protobuf.Duration duration = 1 [(gogoproto.stdduration) = true];
|
||||
uint64 blocks = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// ExpiresAt is a point in time where something expires.
|
||||
// It may be *either* block time or block height
|
||||
message ExpiresAt {
|
||||
// sum is the oneof that represents either time or height
|
||||
oneof sum {
|
||||
google.protobuf.Timestamp time = 1 [(gogoproto.stdtime) = true];
|
||||
int64 height = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// FeeAllowanceGrant is stored in the KVStore to record a grant with full context
|
||||
message FeeAllowanceGrant {
|
||||
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.feegrant.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/feegrant/v1beta1/feegrant.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
||||
|
||||
// GenesisState contains a set of fee allowances, persisted from the store
|
||||
message GenesisState {
|
||||
repeated FeeAllowanceGrant fee_allowances = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.feegrant.v1beta1;
|
||||
|
||||
import "cosmos/feegrant/v1beta1/feegrant.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
||||
|
||||
// Query defines the gRPC querier service.
|
||||
service Query {
|
||||
|
||||
// FeeAllowance returns fee granted to the grantee by the granter.
|
||||
rpc FeeAllowance(QueryFeeAllowanceRequest) returns (QueryFeeAllowanceResponse) {
|
||||
option (google.api.http).get = "/cosmos/feegrant/v1beta1/fee_allowance/{granter}/{grantee}";
|
||||
}
|
||||
|
||||
// FeeAllowances returns all the grants for address.
|
||||
rpc FeeAllowances(QueryFeeAllowancesRequest) returns (QueryFeeAllowancesResponse) {
|
||||
option (google.api.http).get = "/cosmos/feegrant/v1beta1/fee_allowances/{grantee}";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryFeeAllowanceRequest is the request type for the Query/FeeAllowance RPC method.
|
||||
message QueryFeeAllowanceRequest {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
}
|
||||
|
||||
// QueryFeeAllowanceResponse is the response type for the Query/FeeAllowance RPC method.
|
||||
message QueryFeeAllowanceResponse {
|
||||
// fee_allowance is a fee_allowance granted for grantee by granter.
|
||||
cosmos.feegrant.v1beta1.FeeAllowanceGrant fee_allowance = 1;
|
||||
}
|
||||
|
||||
// QueryFeeAllowancesRequest is the request type for the Query/FeeAllowances RPC method.
|
||||
message QueryFeeAllowancesRequest {
|
||||
string grantee = 1;
|
||||
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryFeeAllowancesResponse is the response type for the Query/FeeAllowances RPC method.
|
||||
message QueryFeeAllowancesResponse {
|
||||
// fee_allowances are fee_allowance's granted for grantee by granter.
|
||||
repeated cosmos.feegrant.v1beta1.FeeAllowanceGrant fee_allowances = 1;
|
||||
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.feegrant.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant/types";
|
||||
|
||||
// Msg defines the feegrant msg service.
|
||||
service Msg {
|
||||
|
||||
// GrantFeeAllowance grants fee allowance to the grantee on the granter's
|
||||
// account with the provided expiration time.
|
||||
rpc GrantFeeAllowance(MsgGrantFeeAllowance) returns (MsgGrantFeeAllowanceResponse);
|
||||
|
||||
// RevokeFeeAllowance revokes any fee allowance of granter's account that
|
||||
// has been granted to the grantee.
|
||||
rpc RevokeFeeAllowance(MsgRevokeFeeAllowance) returns (MsgRevokeFeeAllowanceResponse);
|
||||
}
|
||||
|
||||
// MsgGrantFeeAllowance adds permission for Grantee to spend up to Allowance
|
||||
// of fees from the account of Granter.
|
||||
message MsgGrantFeeAllowance {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"];
|
||||
}
|
||||
|
||||
// MsgGrantFeeAllowanceResponse defines the Msg/GrantFeeAllowanceResponse response type.
|
||||
message MsgGrantFeeAllowanceResponse {}
|
||||
|
||||
// MsgRevokeFeeAllowance removes any existing FeeAllowance from Granter to Grantee.
|
||||
message MsgRevokeFeeAllowance {
|
||||
string granter = 1;
|
||||
string grantee = 2;
|
||||
}
|
||||
|
||||
// MsgRevokeFeeAllowanceResponse defines the Msg/RevokeFeeAllowanceResponse response type.
|
||||
message MsgRevokeFeeAllowanceResponse {}
|
||||
+1
-1
@@ -10,7 +10,7 @@ message GenesisState {
|
||||
// gen_txs defines the genesis transactions.
|
||||
repeated bytes gen_txs = 1 [
|
||||
(gogoproto.casttype) = "encoding/json.RawMessage",
|
||||
(gogoproto.jsontag) = "gentxs",
|
||||
(gogoproto.jsontag) = "gentxs",
|
||||
(gogoproto.moretags) = "yaml:\"gentxs\""
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package cosmos.gov.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/gov/v1beta1/gov.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
|
||||
|
||||
// GenesisState defines the gov module's genesis state.
|
||||
message GenesisState {
|
||||
// starting_proposal_id is the ID of the starting proposal.
|
||||
uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""];
|
||||
// deposits defines all the deposits present at genesis.
|
||||
repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false];
|
||||
// votes defines all the votes present at genesis.
|
||||
repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false];
|
||||
// proposals defines all the proposals present at genesis.
|
||||
repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false];
|
||||
// params defines all the paramaters of related to deposit.
|
||||
DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""];
|
||||
// params defines all the paramaters of related to voting.
|
||||
VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""];
|
||||
// params defines all the paramaters of related to tally.
|
||||
TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""];
|
||||
}
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.gov.v1beta1;
|
||||
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
option (gogoproto.stringer_all) = false;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// VoteOption enumerates the valid vote options for a given governance proposal.
|
||||
enum VoteOption {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
// VOTE_OPTION_UNSPECIFIED defines a no-op vote option.
|
||||
VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"];
|
||||
// VOTE_OPTION_YES defines a yes vote option.
|
||||
VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"];
|
||||
// VOTE_OPTION_ABSTAIN defines an abstain vote option.
|
||||
VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"];
|
||||
// VOTE_OPTION_NO defines a no vote option.
|
||||
VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"];
|
||||
// VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option.
|
||||
VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"];
|
||||
}
|
||||
|
||||
// TextProposal defines a standard text proposal whose changes need to be
|
||||
// manually updated in case of approval.
|
||||
message TextProposal {
|
||||
option (cosmos_proto.implements_interface) = "Content";
|
||||
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string title = 1;
|
||||
string description = 2;
|
||||
}
|
||||
|
||||
// Deposit defines an amount deposited by an account address to an active
|
||||
// proposal.
|
||||
message Deposit {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
string depositor = 2;
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// Proposal defines the core field members of a governance proposal.
|
||||
message Proposal {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""];
|
||||
google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"];
|
||||
ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""];
|
||||
TallyResult final_tally_result = 4
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""];
|
||||
google.protobuf.Timestamp submit_time = 5
|
||||
[(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""];
|
||||
google.protobuf.Timestamp deposit_end_time = 6
|
||||
[(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""];
|
||||
repeated cosmos.base.v1beta1.Coin total_deposit = 7 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"total_deposit\""
|
||||
];
|
||||
google.protobuf.Timestamp voting_start_time = 8
|
||||
[(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""];
|
||||
google.protobuf.Timestamp voting_end_time = 9
|
||||
[(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""];
|
||||
}
|
||||
|
||||
// ProposalStatus enumerates the valid statuses of a proposal.
|
||||
enum ProposalStatus {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
// PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status.
|
||||
PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"];
|
||||
// PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit
|
||||
// period.
|
||||
PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"];
|
||||
// PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting
|
||||
// period.
|
||||
PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"];
|
||||
// PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has
|
||||
// passed.
|
||||
PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"];
|
||||
// PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has
|
||||
// been rejected.
|
||||
PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"];
|
||||
// PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has
|
||||
// failed.
|
||||
PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"];
|
||||
}
|
||||
|
||||
// TallyResult defines a standard tally for a governance proposal.
|
||||
message TallyResult {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string no_with_veto = 4 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"no_with_veto\""
|
||||
];
|
||||
}
|
||||
|
||||
// Vote defines a vote on a governance proposal.
|
||||
// A Vote consists of a proposal ID, the voter, and the vote option.
|
||||
message Vote {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
string voter = 2;
|
||||
VoteOption option = 3;
|
||||
}
|
||||
|
||||
// DepositParams defines the params for deposits on governance proposals.
|
||||
message DepositParams {
|
||||
// Minimum deposit for a proposal to enter voting period.
|
||||
repeated cosmos.base.v1beta1.Coin min_deposit = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"min_deposit\"",
|
||||
(gogoproto.jsontag) = "min_deposit,omitempty"
|
||||
];
|
||||
|
||||
// Maximum period for Atom holders to deposit on a proposal. Initial value: 2
|
||||
// months.
|
||||
google.protobuf.Duration max_deposit_period = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.jsontag) = "max_deposit_period,omitempty",
|
||||
(gogoproto.moretags) = "yaml:\"max_deposit_period\""
|
||||
];
|
||||
}
|
||||
|
||||
// VotingParams defines the params for voting on governance proposals.
|
||||
message VotingParams {
|
||||
// Length of the voting period.
|
||||
google.protobuf.Duration voting_period = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.jsontag) = "voting_period,omitempty",
|
||||
(gogoproto.moretags) = "yaml:\"voting_period\""
|
||||
];
|
||||
}
|
||||
|
||||
// TallyParams defines the params for tallying votes on governance proposals.
|
||||
message TallyParams {
|
||||
// Minimum percentage of total stake needed to vote for a result to be
|
||||
// considered valid.
|
||||
bytes quorum = 1 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.jsontag) = "quorum,omitempty"
|
||||
];
|
||||
|
||||
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.5.
|
||||
bytes threshold = 2 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.jsontag) = "threshold,omitempty"
|
||||
];
|
||||
|
||||
// Minimum value of Veto votes to Total votes ratio for proposal to be
|
||||
// vetoed. Default value: 1/3.
|
||||
bytes veto_threshold = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.jsontag) = "veto_threshold,omitempty",
|
||||
(gogoproto.moretags) = "yaml:\"veto_threshold\""
|
||||
];
|
||||
}
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.gov.v1beta1;
|
||||
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/gov/v1beta1/gov.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
|
||||
|
||||
// Query defines the gRPC querier service for gov module
|
||||
service Query {
|
||||
// Proposal queries proposal details based on ProposalID.
|
||||
rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}";
|
||||
}
|
||||
|
||||
// Proposals queries all proposals based on given status.
|
||||
rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals";
|
||||
}
|
||||
|
||||
// Vote queries voted information based on proposalID, voterAddr.
|
||||
rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}";
|
||||
}
|
||||
|
||||
// Votes queries votes of a given proposal.
|
||||
rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes";
|
||||
}
|
||||
|
||||
// Params queries all parameters of the gov module.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}";
|
||||
}
|
||||
|
||||
// Deposit queries single deposit information based proposalID, depositAddr.
|
||||
rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}";
|
||||
}
|
||||
|
||||
// Deposits queries all deposits of a single proposal.
|
||||
rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits";
|
||||
}
|
||||
|
||||
// TallyResult queries the tally of a proposal vote.
|
||||
rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) {
|
||||
option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryProposalRequest is the request type for the Query/Proposal RPC method.
|
||||
message QueryProposalRequest {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
}
|
||||
|
||||
// QueryProposalResponse is the response type for the Query/Proposal RPC method.
|
||||
message QueryProposalResponse {
|
||||
Proposal proposal = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryProposalsRequest is the request type for the Query/Proposals RPC method.
|
||||
message QueryProposalsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// proposal_status defines the status of the proposals.
|
||||
ProposalStatus proposal_status = 1;
|
||||
|
||||
// voter defines the voter address for the proposals.
|
||||
string voter = 2;
|
||||
|
||||
// depositor defines the deposit addresses from the proposals.
|
||||
string depositor = 3;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 4;
|
||||
}
|
||||
|
||||
// QueryProposalsResponse is the response type for the Query/Proposals RPC
|
||||
// method.
|
||||
message QueryProposalsResponse {
|
||||
repeated Proposal proposals = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryVoteRequest is the request type for the Query/Vote RPC method.
|
||||
message QueryVoteRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
// voter defines the oter address for the proposals.
|
||||
string voter = 2;
|
||||
}
|
||||
|
||||
// QueryVoteResponse is the response type for the Query/Vote RPC method.
|
||||
message QueryVoteResponse {
|
||||
// vote defined the queried vote.
|
||||
Vote vote = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryVotesRequest is the request type for the Query/Votes RPC method.
|
||||
message QueryVotesRequest {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryVotesResponse is the response type for the Query/Votes RPC method.
|
||||
message QueryVotesResponse {
|
||||
// votes defined the queried votes.
|
||||
repeated Vote votes = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||
message QueryParamsRequest {
|
||||
// params_type defines which parameters to query for, can be one of "voting",
|
||||
// "tallying" or "deposit".
|
||||
string params_type = 1;
|
||||
}
|
||||
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||
message QueryParamsResponse {
|
||||
// voting_params defines the parameters related to voting.
|
||||
VotingParams voting_params = 1 [(gogoproto.nullable) = false];
|
||||
// deposit_params defines the parameters related to deposit.
|
||||
DepositParams deposit_params = 2 [(gogoproto.nullable) = false];
|
||||
// tally_params defines the parameters related to tally.
|
||||
TallyParams tally_params = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryDepositRequest is the request type for the Query/Deposit RPC method.
|
||||
message QueryDepositRequest {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
// depositor defines the deposit addresses from the proposals.
|
||||
string depositor = 2;
|
||||
}
|
||||
|
||||
// QueryDepositResponse is the response type for the Query/Deposit RPC method.
|
||||
message QueryDepositResponse {
|
||||
// deposit defines the requested deposit.
|
||||
Deposit deposit = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryDepositsRequest is the request type for the Query/Deposits RPC method.
|
||||
message QueryDepositsRequest {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDepositsResponse is the response type for the Query/Deposits RPC method.
|
||||
message QueryDepositsResponse {
|
||||
repeated Deposit deposits = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryTallyResultRequest is the request type for the Query/Tally RPC method.
|
||||
message QueryTallyResultRequest {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
uint64 proposal_id = 1;
|
||||
}
|
||||
|
||||
// QueryTallyResultResponse is the response type for the Query/Tally RPC method.
|
||||
message QueryTallyResultResponse {
|
||||
// tally defines the requested tally.
|
||||
TallyResult tally = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.gov.v1beta1;
|
||||
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos/gov/v1beta1/gov.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types";
|
||||
|
||||
// Msg defines the bank Msg service.
|
||||
service Msg {
|
||||
// SubmitProposal defines a method to create new proposal given a content.
|
||||
rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse);
|
||||
|
||||
// Vote defines a method to add a vote on a specific proposal.
|
||||
rpc Vote(MsgVote) returns (MsgVoteResponse);
|
||||
|
||||
// Deposit defines a method to add deposit on a specific proposal.
|
||||
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
|
||||
}
|
||||
|
||||
// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary
|
||||
// proposal Content.
|
||||
message MsgSubmitProposal {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"];
|
||||
repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"initial_deposit\""
|
||||
];
|
||||
string proposer = 3;
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
message MsgSubmitProposalResponse {
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
}
|
||||
|
||||
// MsgVote defines a message to cast a vote.
|
||||
message MsgVote {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
string voter = 2;
|
||||
VoteOption option = 3;
|
||||
}
|
||||
|
||||
// MsgVoteResponse defines the Msg/Vote response type.
|
||||
message MsgVoteResponse {}
|
||||
|
||||
// MsgDeposit defines a message to submit a deposit to an existing proposal.
|
||||
message MsgDeposit {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""];
|
||||
string depositor = 2;
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// MsgDepositResponse defines the Msg/Deposit response type.
|
||||
message MsgDepositResponse {}
|
||||
@@ -0,0 +1,16 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.mint.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/mint/v1beta1/mint.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
|
||||
|
||||
// GenesisState defines the mint module's genesis state.
|
||||
message GenesisState {
|
||||
// minter is a space for holding current inflation information.
|
||||
Minter minter = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// params defines all the paramaters of the module.
|
||||
Params params = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.mint.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
// Minter represents the minting state.
|
||||
message Minter {
|
||||
// current annual inflation rate
|
||||
string inflation = 1
|
||||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
// current annual expected provisions
|
||||
string annual_provisions = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"annual_provisions\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
// Params holds parameters for the mint module.
|
||||
message Params {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
// type of coin to mint
|
||||
string mint_denom = 1;
|
||||
// maximum annual change in inflation rate
|
||||
string inflation_rate_change = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"inflation_rate_change\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
// maximum inflation rate
|
||||
string inflation_max = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"inflation_max\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
// minimum inflation rate
|
||||
string inflation_min = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"inflation_min\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
// goal of percent bonded atoms
|
||||
string goal_bonded = 5 [
|
||||
(gogoproto.moretags) = "yaml:\"goal_bonded\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
// expected blocks per year
|
||||
uint64 blocks_per_year = 6 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""];
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.mint.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/mint/v1beta1/mint.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types";
|
||||
|
||||
// Query provides defines the gRPC querier service.
|
||||
service Query {
|
||||
// Params returns the total set of minting parameters.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/mint/v1beta1/params";
|
||||
}
|
||||
|
||||
// Inflation returns the current minting inflation value.
|
||||
rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) {
|
||||
option (google.api.http).get = "/cosmos/mint/v1beta1/inflation";
|
||||
}
|
||||
|
||||
// AnnualProvisions current minting annual provisions value.
|
||||
rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) {
|
||||
option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||
message QueryParamsResponse {
|
||||
// params defines the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryInflationRequest is the request type for the Query/Inflation RPC method.
|
||||
message QueryInflationRequest {}
|
||||
|
||||
// QueryInflationResponse is the response type for the Query/Inflation RPC
|
||||
// method.
|
||||
message QueryInflationResponse {
|
||||
// inflation is the current minting inflation value.
|
||||
bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryAnnualProvisionsRequest is the request type for the
|
||||
// Query/AnnualProvisions RPC method.
|
||||
message QueryAnnualProvisionsRequest {}
|
||||
|
||||
// QueryAnnualProvisionsResponse is the response type for the
|
||||
// Query/AnnualProvisions RPC method.
|
||||
message QueryAnnualProvisionsResponse {
|
||||
// annual_provisions is the current minting annual provisions value.
|
||||
bytes annual_provisions = 1
|
||||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.params.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
// ParameterChangeProposal defines a proposal to change one or more parameters.
|
||||
message ParameterChangeProposal {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string title = 1;
|
||||
string description = 2;
|
||||
repeated ParamChange changes = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// ParamChange defines an individual parameter change, for use in
|
||||
// ParameterChangeProposal.
|
||||
message ParamChange {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string subspace = 1;
|
||||
string key = 2;
|
||||
string value = 3;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.params.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/params/v1beta1/params.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal";
|
||||
|
||||
// Query defines the gRPC querier service.
|
||||
service Query {
|
||||
// Params queries a specific parameter of a module, given its subspace and
|
||||
// key.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/params/v1beta1/params";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is request type for the Query/Params RPC method.
|
||||
message QueryParamsRequest {
|
||||
// subspace defines the module to query the parameter for.
|
||||
string subspace = 1;
|
||||
|
||||
// key defines the key of the parameter in the subspace.
|
||||
string key = 2;
|
||||
}
|
||||
|
||||
// QueryParamsResponse is response type for the Query/Params RPC method.
|
||||
message QueryParamsResponse {
|
||||
// param defines the queried parameter.
|
||||
ParamChange param = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.slashing.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/slashing/v1beta1/slashing.proto";
|
||||
|
||||
// GenesisState defines the slashing module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of related to deposit.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// signing_infos represents a map between validator addresses and their
|
||||
// signing infos.
|
||||
repeated SigningInfo signing_infos = 2
|
||||
[(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false];
|
||||
|
||||
// signing_infos represents a map between validator addresses and their
|
||||
// missed blocks.
|
||||
repeated ValidatorMissedBlocks missed_blocks = 3
|
||||
[(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// SigningInfo stores validator signing info of corresponding address.
|
||||
message SigningInfo {
|
||||
// address is the validator address.
|
||||
string address = 1;
|
||||
// validator_signing_info represents the signing info of this validator.
|
||||
ValidatorSigningInfo validator_signing_info = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""];
|
||||
}
|
||||
|
||||
// ValidatorMissedBlocks contains array of missed blocks of corresponding
|
||||
// address.
|
||||
message ValidatorMissedBlocks {
|
||||
// address is the validator address.
|
||||
string address = 1;
|
||||
// missed_blocks is an array of missed blocks by the validator.
|
||||
repeated MissedBlock missed_blocks = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""];
|
||||
}
|
||||
|
||||
// MissedBlock contains height and missed status as boolean.
|
||||
message MissedBlock {
|
||||
// index is the height at which the block was missed.
|
||||
int64 index = 1;
|
||||
// missed is the missed status.
|
||||
bool missed = 2;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.slashing.v1beta1;
|
||||
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/slashing/v1beta1/slashing.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types";
|
||||
|
||||
// Query provides defines the gRPC querier service
|
||||
service Query {
|
||||
// Params queries the parameters of slashing module
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/slashing/v1beta1/params";
|
||||
}
|
||||
|
||||
// SigningInfo queries the signing info of given cons address
|
||||
rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) {
|
||||
option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}";
|
||||
}
|
||||
|
||||
// SigningInfos queries signing info of all validators
|
||||
rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) {
|
||||
option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method
|
||||
message QueryParamsRequest {}
|
||||
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method
|
||||
message QueryParamsResponse {
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC
|
||||
// method
|
||||
message QuerySigningInfoRequest {
|
||||
// cons_address is the address to query signing info of
|
||||
string cons_address = 1;
|
||||
}
|
||||
|
||||
// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC
|
||||
// method
|
||||
message QuerySigningInfoResponse {
|
||||
// val_signing_info is the signing info of requested val cons address
|
||||
ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC
|
||||
// method
|
||||
message QuerySigningInfosRequest {
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC
|
||||
// method
|
||||
message QuerySigningInfosResponse {
|
||||
// info is the signing info of all validators
|
||||
repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false];
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.slashing.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
// ValidatorSigningInfo defines a validator's signing info for monitoring their
|
||||
// liveness activity.
|
||||
message ValidatorSigningInfo {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string address = 1;
|
||||
// Height at which validator was first a candidate OR was unjailed
|
||||
int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""];
|
||||
// Index which is incremented each time the validator was a bonded
|
||||
// in a block and may have signed a precommit or not. This in conjunction with the
|
||||
// `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`.
|
||||
int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""];
|
||||
// Timestamp until which the validator is jailed due to liveness downtime.
|
||||
google.protobuf.Timestamp jailed_until = 4
|
||||
[(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
// Whether or not a validator has been tombstoned (killed out of validator set). It is set
|
||||
// once the validator commits an equivocation or for any other configured misbehiavor.
|
||||
bool tombstoned = 5;
|
||||
// A counter kept to avoid unnecessary array reads.
|
||||
// Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`.
|
||||
int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""];
|
||||
}
|
||||
|
||||
// Params represents the parameters used for by the slashing module.
|
||||
message Params {
|
||||
int64 signed_blocks_window = 1 [(gogoproto.moretags) = "yaml:\"signed_blocks_window\""];
|
||||
bytes min_signed_per_window = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"min_signed_per_window\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
google.protobuf.Duration downtime_jail_duration = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.stdduration) = true,
|
||||
(gogoproto.moretags) = "yaml:\"downtime_jail_duration\""
|
||||
];
|
||||
bytes slash_fraction_double_sign = 4 [
|
||||
(gogoproto.moretags) = "yaml:\"slash_fraction_double_sign\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
bytes slash_fraction_downtime = 5 [
|
||||
(gogoproto.moretags) = "yaml:\"slash_fraction_downtime\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.slashing.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types";
|
||||
option (gogoproto.equal_all) = true;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
// Msg defines the slashing Msg service.
|
||||
service Msg {
|
||||
// Unjail defines a method for unjailing a jailed validator, thus returning
|
||||
// them into the bonded validator set, so they can begin receiving provisions
|
||||
// and rewards again.
|
||||
rpc Unjail(MsgUnjail) returns (MsgUnjailResponse);
|
||||
}
|
||||
|
||||
// MsgUnjail defines the Msg/Unjail request type
|
||||
message MsgUnjail {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = true;
|
||||
|
||||
string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"];
|
||||
}
|
||||
|
||||
// MsgUnjailResponse defines the Msg/Unjail response type
|
||||
message MsgUnjailResponse {}
|
||||
@@ -0,0 +1,53 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.staking.v1beta1;
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/staking/v1beta1/staking.proto";
|
||||
|
||||
// GenesisState defines the staking module's genesis state.
|
||||
message GenesisState {
|
||||
// params defines all the paramaters of related to deposit.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// last_total_power tracks the total amounts of bonded tokens recorded during
|
||||
// the previous end block.
|
||||
bytes last_total_power = 2 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.moretags) = "yaml:\"last_total_power\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
|
||||
// last_validator_powers is a special index that provides a historical list
|
||||
// of the last-block's bonded validators.
|
||||
repeated LastValidatorPower last_validator_powers = 3
|
||||
[(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false];
|
||||
|
||||
// delegations defines the validator set at genesis.
|
||||
repeated Validator validators = 4 [(gogoproto.nullable) = false];
|
||||
|
||||
// delegations defines the delegations active at genesis.
|
||||
repeated Delegation delegations = 5 [(gogoproto.nullable) = false];
|
||||
|
||||
// unbonding_delegations defines the unbonding delegations active at genesis.
|
||||
repeated UnbondingDelegation unbonding_delegations = 6
|
||||
[(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false];
|
||||
|
||||
// redelegations defines the redelegations active at genesis.
|
||||
repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false];
|
||||
|
||||
bool exported = 8;
|
||||
}
|
||||
|
||||
// LastValidatorPower required for validator set update logic.
|
||||
message LastValidatorPower {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// address is the address of the validator.
|
||||
string address = 1;
|
||||
|
||||
// power defines the power of the validator.
|
||||
int64 power = 2;
|
||||
}
|
||||
@@ -0,0 +1,348 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.staking.v1beta1;
|
||||
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/staking/v1beta1/staking.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
|
||||
|
||||
// Query defines the gRPC querier service.
|
||||
service Query {
|
||||
// Validators queries all validators that match the given status.
|
||||
rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators";
|
||||
}
|
||||
|
||||
// Validator queries validator info for given validator address.
|
||||
rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}";
|
||||
}
|
||||
|
||||
// ValidatorDelegations queries delegate info for given validator.
|
||||
rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations";
|
||||
}
|
||||
|
||||
// ValidatorUnbondingDelegations queries unbonding delegations of a validator.
|
||||
rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest)
|
||||
returns (QueryValidatorUnbondingDelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/"
|
||||
"{validator_addr}/unbonding_delegations";
|
||||
}
|
||||
|
||||
// Delegation queries delegate info for given validator delegator pair.
|
||||
rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
|
||||
"{delegator_addr}";
|
||||
}
|
||||
|
||||
// UnbondingDelegation queries unbonding info for given validator delegator
|
||||
// pair.
|
||||
rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/"
|
||||
"{delegator_addr}/unbonding_delegation";
|
||||
}
|
||||
|
||||
// DelegatorDelegations queries all delegations of a given delegator address.
|
||||
rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}";
|
||||
}
|
||||
|
||||
// DelegatorUnbondingDelegations queries all unbonding delegations of a given
|
||||
// delegator address.
|
||||
rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest)
|
||||
returns (QueryDelegatorUnbondingDelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/"
|
||||
"{delegator_addr}/unbonding_delegations";
|
||||
}
|
||||
|
||||
// Redelegations queries redelegations of given address.
|
||||
rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations";
|
||||
}
|
||||
|
||||
// DelegatorValidators queries all validators info for given delegator
|
||||
// address.
|
||||
rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators";
|
||||
}
|
||||
|
||||
// DelegatorValidator queries validator info for given delegator validator
|
||||
// pair.
|
||||
rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/"
|
||||
"{validator_addr}";
|
||||
}
|
||||
|
||||
// HistoricalInfo queries the historical info for given height.
|
||||
rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}";
|
||||
}
|
||||
|
||||
// Pool queries the pool info.
|
||||
rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/pool";
|
||||
}
|
||||
|
||||
// Parameters queries the staking parameters.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/cosmos/staking/v1beta1/params";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryValidatorsRequest is request type for Query/Validators RPC method.
|
||||
message QueryValidatorsRequest {
|
||||
// status enables to query for validators matching a given status.
|
||||
string status = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorsResponse is response type for the Query/Validators RPC method
|
||||
message QueryValidatorsResponse {
|
||||
// validators contains all the queried validators.
|
||||
repeated Validator validators = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorRequest is response type for the Query/Validator RPC method
|
||||
message QueryValidatorRequest {
|
||||
// validator_addr defines the validator address to query for.
|
||||
string validator_addr = 1;
|
||||
}
|
||||
|
||||
// QueryValidatorResponse is response type for the Query/Validator RPC method
|
||||
message QueryValidatorResponse {
|
||||
// validator defines the the validator info.
|
||||
Validator validator = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryValidatorDelegationsRequest is request type for the
|
||||
// Query/ValidatorDelegations RPC method
|
||||
message QueryValidatorDelegationsRequest {
|
||||
// validator_addr defines the validator address to query for.
|
||||
string validator_addr = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorDelegationsResponse is response type for the
|
||||
// Query/ValidatorDelegations RPC method
|
||||
message QueryValidatorDelegationsResponse {
|
||||
repeated DelegationResponse delegation_responses = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorUnbondingDelegationsRequest is required type for the
|
||||
// Query/ValidatorUnbondingDelegations RPC method
|
||||
message QueryValidatorUnbondingDelegationsRequest {
|
||||
// validator_addr defines the validator address to query for.
|
||||
string validator_addr = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryValidatorUnbondingDelegationsResponse is response type for the
|
||||
// Query/ValidatorUnbondingDelegations RPC method.
|
||||
message QueryValidatorUnbondingDelegationsResponse {
|
||||
repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationRequest is request type for the Query/Delegation RPC method.
|
||||
message QueryDelegationRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// validator_addr defines the validator address to query for.
|
||||
string validator_addr = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationResponse is response type for the Query/Delegation RPC method.
|
||||
message QueryDelegationResponse {
|
||||
// delegation_responses defines the delegation info of a delegation.
|
||||
DelegationResponse delegation_response = 1;
|
||||
}
|
||||
|
||||
// QueryUnbondingDelegationRequest is request type for the
|
||||
// Query/UnbondingDelegation RPC method.
|
||||
message QueryUnbondingDelegationRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// validator_addr defines the validator address to query for.
|
||||
string validator_addr = 2;
|
||||
}
|
||||
|
||||
// QueryDelegationResponse is response type for the Query/UnbondingDelegation
|
||||
// RPC method.
|
||||
message QueryUnbondingDelegationResponse {
|
||||
// unbond defines the unbonding information of a delegation.
|
||||
UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryDelegatorDelegationsRequest is request type for the
|
||||
// Query/DelegatorDelegations RPC method.
|
||||
message QueryDelegatorDelegationsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorDelegationsResponse is response type for the
|
||||
// Query/DelegatorDelegations RPC method.
|
||||
message QueryDelegatorDelegationsResponse {
|
||||
// delegation_responses defines all the delegations' info of a delegator.
|
||||
repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorUnbondingDelegationsRequest is request type for the
|
||||
// Query/DelegatorUnbondingDelegations RPC method.
|
||||
message QueryDelegatorUnbondingDelegationsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryUnbondingDelegatorDelegationsResponse is response type for the
|
||||
// Query/UnbondingDelegatorDelegations RPC method.
|
||||
message QueryDelegatorUnbondingDelegationsResponse {
|
||||
repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryRedelegationsRequest is request type for the Query/Redelegations RPC
|
||||
// method.
|
||||
message QueryRedelegationsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// src_validator_addr defines the validator address to redelegate from.
|
||||
string src_validator_addr = 2;
|
||||
|
||||
// dst_validator_addr defines the validator address to redelegate to.
|
||||
string dst_validator_addr = 3;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 4;
|
||||
}
|
||||
|
||||
// QueryRedelegationsResponse is response type for the Query/Redelegations RPC
|
||||
// method.
|
||||
message QueryRedelegationsResponse {
|
||||
repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsRequest is request type for the
|
||||
// Query/DelegatorValidators RPC method.
|
||||
message QueryDelegatorValidatorsRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// pagination defines an optional pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorsResponse is response type for the
|
||||
// Query/DelegatorValidators RPC method.
|
||||
message QueryDelegatorValidatorsResponse {
|
||||
// validators defines the the validators' info of a delegator.
|
||||
repeated Validator validators = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorRequest is request type for the
|
||||
// Query/DelegatorValidator RPC method.
|
||||
message QueryDelegatorValidatorRequest {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
// delegator_addr defines the delegator address to query for.
|
||||
string delegator_addr = 1;
|
||||
|
||||
// validator_addr defines the validator address to query for.
|
||||
string validator_addr = 2;
|
||||
}
|
||||
|
||||
// QueryDelegatorValidatorResponse response type for the
|
||||
// Query/DelegatorValidator RPC method.
|
||||
message QueryDelegatorValidatorResponse {
|
||||
// validator defines the the validator info.
|
||||
Validator validator = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
|
||||
// method.
|
||||
message QueryHistoricalInfoRequest {
|
||||
// height defines at which height to query the historical info.
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
|
||||
// method.
|
||||
message QueryHistoricalInfoResponse {
|
||||
// hist defines the historical info at the given height.
|
||||
HistoricalInfo hist = 1;
|
||||
}
|
||||
|
||||
// QueryPoolRequest is request type for the Query/Pool RPC method.
|
||||
message QueryPoolRequest {}
|
||||
|
||||
// QueryPoolResponse is response type for the Query/Pool RPC method.
|
||||
message QueryPoolResponse {
|
||||
// pool defines the pool info.
|
||||
Pool pool = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// 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];
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.staking.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/duration.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "tendermint/types/types.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
|
||||
|
||||
// HistoricalInfo contains header and validator information for a given block.
|
||||
// It is stored as part of staking module's state, which persists the `n` most
|
||||
// recent HistoricalInfo
|
||||
// (`n` is set by the staking module's `historical_entries` parameter).
|
||||
message HistoricalInfo {
|
||||
tendermint.types.Header header = 1 [(gogoproto.nullable) = false];
|
||||
repeated Validator valset = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// CommissionRates defines the initial commission rates to be used for creating
|
||||
// a validator.
|
||||
message CommissionRates {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
string max_rate = 2 [
|
||||
(gogoproto.moretags) = "yaml:\"max_rate\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string max_change_rate = 3 [
|
||||
(gogoproto.moretags) = "yaml:\"max_change_rate\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
// Commission defines commission parameters for a given validator.
|
||||
message Commission {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false];
|
||||
google.protobuf.Timestamp update_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""];
|
||||
}
|
||||
|
||||
// Description defines a validator description.
|
||||
message Description {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string moniker = 1;
|
||||
string identity = 2;
|
||||
string website = 3;
|
||||
string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""];
|
||||
string details = 5;
|
||||
}
|
||||
|
||||
// Validator defines a validator, together with the total amount of the
|
||||
// Validator's bond shares and their exchange rate to coins. Slashing results in
|
||||
// a decrease in the exchange rate, allowing correct calculation of future
|
||||
// undelegations without iterating over delegators. When coins are delegated to
|
||||
// this validator, the validator is credited with a delegation whose number of
|
||||
// bond shares is based on the amount of coins delegated divided by the current
|
||||
// exchange rate. Voting power can be calculated as total bonded shares
|
||||
// multiplied by exchange rate.
|
||||
message Validator {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""];
|
||||
google.protobuf.Any consensus_pubkey = 2
|
||||
[(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""];
|
||||
bool jailed = 3;
|
||||
BondStatus status = 4;
|
||||
string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
string delegator_shares = 6 [
|
||||
(gogoproto.moretags) = "yaml:\"delegator_shares\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
Description description = 7 [(gogoproto.nullable) = false];
|
||||
int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""];
|
||||
google.protobuf.Timestamp unbonding_time = 9
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
||||
Commission commission = 10 [(gogoproto.nullable) = false];
|
||||
string min_self_delegation = 11 [
|
||||
(gogoproto.moretags) = "yaml:\"min_self_delegation\"",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
}
|
||||
|
||||
// BondStatus is the status of a validator.
|
||||
enum BondStatus {
|
||||
option (gogoproto.goproto_enum_prefix) = false;
|
||||
|
||||
// UNSPECIFIED defines an invalid validator status.
|
||||
BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"];
|
||||
// UNBONDED defines a validator that is not bonded.
|
||||
BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"];
|
||||
// UNBONDING defines a validator that is unbonding.
|
||||
BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"];
|
||||
// BONDED defines a validator that is bonded.
|
||||
BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"];
|
||||
}
|
||||
|
||||
// ValAddresses defines a repeated set of validator addresses.
|
||||
message ValAddresses {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
option (gogoproto.stringer) = true;
|
||||
|
||||
repeated string addresses = 1;
|
||||
}
|
||||
|
||||
// DVPair is struct that just has a delegator-validator pair with no other data.
|
||||
// It is intended to be used as a marshalable pointer. For example, a DVPair can
|
||||
// be used to construct the key to getting an UnbondingDelegation from state.
|
||||
message DVPair {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
}
|
||||
|
||||
// DVPairs defines an array of DVPair objects.
|
||||
message DVPairs {
|
||||
repeated DVPair pairs = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// DVVTriplet is struct that just has a delegator-validator-validator triplet
|
||||
// with no other data. It is intended to be used as a marshalable pointer. For
|
||||
// example, a DVVTriplet can be used to construct the key to getting a
|
||||
// Redelegation from state.
|
||||
message DVVTriplet {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""];
|
||||
string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""];
|
||||
}
|
||||
|
||||
// DVVTriplets defines an array of DVVTriplet objects.
|
||||
message DVVTriplets {
|
||||
repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Delegation represents the bond with tokens held by an account. It is
|
||||
// owned by one delegator, and is associated with the voting power of one
|
||||
// validator.
|
||||
message Delegation {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// UnbondingDelegation stores all of a single delegator's unbonding bonds
|
||||
// for a single validator in an time-ordered list.
|
||||
message UnbondingDelegation {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries
|
||||
}
|
||||
|
||||
// UnbondingDelegationEntry defines an unbonding object with relevant metadata.
|
||||
message UnbondingDelegationEntry {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
||||
google.protobuf.Timestamp completion_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
||||
string initial_balance = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
||||
];
|
||||
string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// RedelegationEntry defines a redelegation object with relevant metadata.
|
||||
message RedelegationEntry {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""];
|
||||
google.protobuf.Timestamp completion_time = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""];
|
||||
string initial_balance = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"initial_balance\""
|
||||
];
|
||||
string shares_dst = 4
|
||||
[(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Redelegation contains the list of a particular delegator's redelegating bonds
|
||||
// from a particular source validator to a particular destination validator.
|
||||
message Redelegation {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""];
|
||||
string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""];
|
||||
repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries
|
||||
}
|
||||
|
||||
// Params defines the parameters for the staking module.
|
||||
message Params {
|
||||
option (gogoproto.equal) = true;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
google.protobuf.Duration unbonding_time = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""];
|
||||
uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""];
|
||||
uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""];
|
||||
uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""];
|
||||
string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""];
|
||||
}
|
||||
|
||||
// DelegationResponse is equivalent to Delegation except that it contains a
|
||||
// balance in addition to shares which is more suitable for client responses.
|
||||
message DelegationResponse {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
Delegation delegation = 1 [(gogoproto.nullable) = false];
|
||||
|
||||
cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it
|
||||
// contains a balance in addition to shares which is more suitable for client
|
||||
// responses.
|
||||
message RedelegationEntryResponse {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false];
|
||||
string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// RedelegationResponse is equivalent to a Redelegation except that its entries
|
||||
// contain a balance in addition to shares which is more suitable for client
|
||||
// responses.
|
||||
message RedelegationResponse {
|
||||
option (gogoproto.equal) = false;
|
||||
|
||||
Redelegation redelegation = 1 [(gogoproto.nullable) = false];
|
||||
repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// Pool is used for tracking bonded and not-bonded token supply of the bond
|
||||
// denomination.
|
||||
message Pool {
|
||||
option (gogoproto.description) = true;
|
||||
option (gogoproto.equal) = true;
|
||||
string not_bonded_tokens = 1 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.jsontag) = "not_bonded_tokens",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string bonded_tokens = 2 [
|
||||
(gogoproto.jsontag) = "bonded_tokens",
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.moretags) = "yaml:\"bonded_tokens\""
|
||||
];
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.staking.v1beta1;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos/staking/v1beta1/staking.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types";
|
||||
|
||||
// Msg defines the staking Msg service.
|
||||
service Msg {
|
||||
// CreateValidator defines a method for creating a new validator.
|
||||
rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse);
|
||||
|
||||
// EditValidator defines a method for editing an existing validator.
|
||||
rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse);
|
||||
|
||||
// Delegate defines a method for performing a delegation of coins
|
||||
// from a delegator to a validator.
|
||||
rpc Delegate(MsgDelegate) returns (MsgDelegateResponse);
|
||||
|
||||
// BeginRedelegate defines a method for performing a redelegation
|
||||
// of coins from a delegator and source validator to a destination validator.
|
||||
rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse);
|
||||
|
||||
// Undelegate defines a method for performing an undelegation from a
|
||||
// delegate and a validator.
|
||||
rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse);
|
||||
}
|
||||
|
||||
// MsgCreateValidator defines a SDK message for creating a new validator.
|
||||
message MsgCreateValidator {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
Description description = 1 [(gogoproto.nullable) = false];
|
||||
CommissionRates commission = 2 [(gogoproto.nullable) = false];
|
||||
string min_self_delegation = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.moretags) = "yaml:\"min_self_delegation\"",
|
||||
(gogoproto.nullable) = false
|
||||
];
|
||||
string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"];
|
||||
cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgCreateValidatorResponse defines the Msg/CreateValidator response type.
|
||||
message MsgCreateValidatorResponse {}
|
||||
|
||||
// MsgEditValidator defines a SDK message for editing an existing validator.
|
||||
message MsgEditValidator {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
Description description = 1 [(gogoproto.nullable) = false];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""];
|
||||
|
||||
// We pass a reference to the new commission rate and min self delegation as
|
||||
// it's not mandatory to update. If not updated, the deserialized rate will be
|
||||
// zero with no way to distinguish if an update was intended.
|
||||
// REF: #2373
|
||||
string commission_rate = 3 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
|
||||
(gogoproto.moretags) = "yaml:\"commission_rate\""
|
||||
];
|
||||
string min_self_delegation = 4 [
|
||||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
|
||||
(gogoproto.moretags) = "yaml:\"min_self_delegation\""
|
||||
];
|
||||
}
|
||||
|
||||
// MsgEditValidatorResponse defines the Msg/EditValidator response type.
|
||||
message MsgEditValidatorResponse {}
|
||||
|
||||
// MsgDelegate defines a SDK message for performing a delegation of coins
|
||||
// from a delegator to a validator.
|
||||
message MsgDelegate {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgDelegateResponse defines the Msg/Delegate response type.
|
||||
message MsgDelegateResponse {}
|
||||
|
||||
// MsgBeginRedelegate defines a SDK message for performing a redelegation
|
||||
// of coins from a delegator and source validator to a destination validator.
|
||||
message MsgBeginRedelegate {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""];
|
||||
string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""];
|
||||
cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type.
|
||||
message MsgBeginRedelegateResponse {
|
||||
google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
}
|
||||
|
||||
// MsgUndelegate defines a SDK message for performing an undelegation from a
|
||||
// delegate and a validator.
|
||||
message MsgUndelegate {
|
||||
option (gogoproto.equal) = false;
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
|
||||
string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""];
|
||||
string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""];
|
||||
cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// MsgUndelegateResponse defines the Msg/Undelegate response type.
|
||||
message MsgUndelegateResponse {
|
||||
google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true];
|
||||
}
|
||||
@@ -43,14 +43,13 @@ message SignatureDescriptor {
|
||||
Data data = 2;
|
||||
|
||||
// sequence is the sequence of the account, which describes the
|
||||
// number of committed transactions signed by a given address. It is used to
|
||||
// prevent replay attacks.
|
||||
// number of committed transactions signed by a given address. It is used to prevent
|
||||
// replay attacks.
|
||||
uint64 sequence = 3;
|
||||
|
||||
// Data represents signature data
|
||||
message Data {
|
||||
// sum is the oneof that specifies whether this represents single or
|
||||
// multi-signature data
|
||||
// sum is the oneof that specifies whether this represents single or multi-signature data
|
||||
oneof sum {
|
||||
// single represents a single signer
|
||||
Single single = 1;
|
||||
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.tx.v1beta1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/base/abci/v1beta1/abci.proto";
|
||||
import "cosmos/tx/v1beta1/tx.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/query/v1beta1/pagination.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/types/tx";
|
||||
|
||||
// Service defines a gRPC service for interacting with transactions.
|
||||
service Service {
|
||||
// Simulate simulates executing a transaction for estimating gas usage.
|
||||
rpc Simulate(SimulateRequest) returns (SimulateResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/cosmos/tx/v1beta1/simulate"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// GetTx fetches a tx by hash.
|
||||
rpc GetTx(GetTxRequest) returns (GetTxResponse) {
|
||||
option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}";
|
||||
}
|
||||
// BroadcastTx broadcast transaction.
|
||||
rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/cosmos/tx/v1beta1/txs"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// GetTxsEvent fetches txs by event.
|
||||
rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) {
|
||||
option (google.api.http).get = "/cosmos/tx/v1beta1/txs";
|
||||
}
|
||||
}
|
||||
|
||||
// GetTxsEventRequest is the request type for the Service.TxsByEvents
|
||||
// RPC method.
|
||||
message GetTxsEventRequest {
|
||||
// events is the list of transaction event type.
|
||||
repeated string events = 1;
|
||||
// pagination defines an pagination for the request.
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 2;
|
||||
}
|
||||
|
||||
// GetTxsEventResponse is the response type for the Service.TxsByEvents
|
||||
// RPC method.
|
||||
message GetTxsEventResponse {
|
||||
// txs is the list of queried transactions.
|
||||
repeated cosmos.tx.v1beta1.Tx txs = 1;
|
||||
// tx_responses is the list of queried TxResponses.
|
||||
repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2;
|
||||
// pagination defines an pagination for the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 3;
|
||||
}
|
||||
|
||||
// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest
|
||||
// RPC method.
|
||||
message BroadcastTxRequest {
|
||||
// tx_bytes is the raw transaction.
|
||||
bytes tx_bytes = 1;
|
||||
BroadcastMode mode = 2;
|
||||
}
|
||||
|
||||
// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method.
|
||||
enum BroadcastMode {
|
||||
// zero-value for mode ordering
|
||||
BROADCAST_MODE_UNSPECIFIED = 0;
|
||||
// BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for
|
||||
// the tx to be committed in a block.
|
||||
BROADCAST_MODE_BLOCK = 1;
|
||||
// BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for
|
||||
// a CheckTx execution response only.
|
||||
BROADCAST_MODE_SYNC = 2;
|
||||
// BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns
|
||||
// immediately.
|
||||
BROADCAST_MODE_ASYNC = 3;
|
||||
}
|
||||
|
||||
// BroadcastTxResponse is the response type for the
|
||||
// Service.BroadcastTx method.
|
||||
message BroadcastTxResponse {
|
||||
// tx_response is the queried TxResponses.
|
||||
cosmos.base.abci.v1beta1.TxResponse tx_response = 1;
|
||||
}
|
||||
|
||||
// SimulateRequest is the request type for the Service.Simulate
|
||||
// RPC method.
|
||||
message SimulateRequest {
|
||||
// tx is the transaction to simulate.
|
||||
cosmos.tx.v1beta1.Tx tx = 1;
|
||||
}
|
||||
|
||||
// SimulateResponse is the response type for the
|
||||
// Service.SimulateRPC method.
|
||||
message SimulateResponse {
|
||||
// gas_info is the information about gas used in the simulation.
|
||||
cosmos.base.abci.v1beta1.GasInfo gas_info = 1;
|
||||
// result is the result of the simulation.
|
||||
cosmos.base.abci.v1beta1.Result result = 2;
|
||||
}
|
||||
|
||||
// GetTxRequest is the request type for the Service.GetTx
|
||||
// RPC method.
|
||||
message GetTxRequest {
|
||||
// hash is the tx hash to query, encoded as a hex string.
|
||||
string hash = 1;
|
||||
}
|
||||
|
||||
// GetTxResponse is the response type for the Service.GetTx method.
|
||||
message GetTxResponse {
|
||||
// tx is the queried transaction.
|
||||
cosmos.tx.v1beta1.Tx tx = 1;
|
||||
// tx_response is the queried TxResponses.
|
||||
cosmos.base.abci.v1beta1.TxResponse tx_response = 2;
|
||||
}
|
||||
+8
-13
@@ -69,7 +69,6 @@ message TxBody {
|
||||
// those messages define the number and order of elements in AuthInfo's
|
||||
// signer_infos and Tx's signatures. Each required signer address is added to
|
||||
// the list only the first time it occurs.
|
||||
//
|
||||
// By convention, the first required signer (usually from the first message)
|
||||
// is referred to as the primary signer and pays the fee for the whole
|
||||
// transaction.
|
||||
@@ -163,24 +162,20 @@ message ModeInfo {
|
||||
// which must be above some miminum to be accepted into the mempool.
|
||||
message Fee {
|
||||
// amount is the amount of coins to be paid as a fee
|
||||
repeated cosmos.base.v1beta1.Coin amount = 1 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// gas_limit is the maximum gas that can be used in transaction processing
|
||||
// before an out of gas error occurs
|
||||
uint64 gas_limit = 2;
|
||||
|
||||
// if unset, the first signer is responsible for paying the fees. If set, the
|
||||
// specified account must pay the fees. the payer must be a tx signer (and
|
||||
// thus have signed this field in AuthInfo). setting this field does *not*
|
||||
// change the ordering of required signers for the transaction.
|
||||
// if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees.
|
||||
// the payer must be a tx signer (and thus have signed this field in AuthInfo).
|
||||
// setting this field does *not* change the ordering of required signers for the transaction.
|
||||
string payer = 3;
|
||||
|
||||
// if set, the fee payer (either the first signer or the value of the payer
|
||||
// field) requests that a fee grant be used to pay fees instead of the fee
|
||||
// payer's own balance. If an appropriate fee grant does not exist or the
|
||||
// chain does not support fee grants, this will fail
|
||||
// if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used
|
||||
// to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does
|
||||
// not support fee grants, this will fail
|
||||
string granter = 4;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.upgrade.v1beta1;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "cosmos/upgrade/v1beta1/upgrade.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
|
||||
|
||||
// Query defines the gRPC upgrade querier service.
|
||||
service Query {
|
||||
// CurrentPlan queries the current upgrade plan.
|
||||
rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) {
|
||||
option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan";
|
||||
}
|
||||
|
||||
// AppliedPlan queries a previously applied upgrade plan by its name.
|
||||
rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) {
|
||||
option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}";
|
||||
}
|
||||
|
||||
// UpgradedConsensusState queries the consensus state that will serve
|
||||
// as a trusted kernel for the next version of this chain. It will only be
|
||||
// stored at the last height of this chain.
|
||||
// UpgradedConsensusState RPC not supported with legacy querier
|
||||
rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) {
|
||||
option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC
|
||||
// method.
|
||||
message QueryCurrentPlanRequest {}
|
||||
|
||||
// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC
|
||||
// method.
|
||||
message QueryCurrentPlanResponse {
|
||||
// plan is the current upgrade plan.
|
||||
Plan plan = 1;
|
||||
}
|
||||
|
||||
// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC
|
||||
// method.
|
||||
message QueryAppliedPlanRequest {
|
||||
// name is the name of the applied plan to query for.
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC
|
||||
// method.
|
||||
message QueryAppliedPlanResponse {
|
||||
// height is the block height at which the plan was applied.
|
||||
int64 height = 1;
|
||||
}
|
||||
|
||||
// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState
|
||||
// RPC method.
|
||||
message QueryUpgradedConsensusStateRequest {
|
||||
// last height of the current chain must be sent in request
|
||||
// as this is the height under which next consensus state is stored
|
||||
int64 last_height = 1;
|
||||
}
|
||||
|
||||
// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState
|
||||
// RPC method.
|
||||
message QueryUpgradedConsensusStateResponse {
|
||||
google.protobuf.Any upgraded_consensus_state = 1;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.upgrade.v1beta1;
|
||||
|
||||
import "google/protobuf/any.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types";
|
||||
option (gogoproto.goproto_stringer_all) = false;
|
||||
option (gogoproto.goproto_getters_all) = false;
|
||||
|
||||
// Plan specifies information about a planned upgrade and when it should occur.
|
||||
message Plan {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
// Sets the name for the upgrade. This name will be used by the upgraded
|
||||
// version of the software to apply any special "on-upgrade" commands during
|
||||
// the first BeginBlock method after the upgrade is applied. It is also used
|
||||
// to detect whether a software version can handle a given upgrade. If no
|
||||
// upgrade handler with this name has been set in the software, it will be
|
||||
// assumed that the software is out-of-date when the upgrade Time or Height is
|
||||
// reached and the software will exit.
|
||||
string name = 1;
|
||||
|
||||
// The time after which the upgrade must be performed.
|
||||
// Leave set to its zero value to use a pre-defined Height instead.
|
||||
google.protobuf.Timestamp time = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
|
||||
// The height at which the upgrade must be performed.
|
||||
// Only used if Time is not set.
|
||||
int64 height = 3;
|
||||
|
||||
// Any application specific upgrade info to be included on-chain
|
||||
// such as a git commit that validators could automatically upgrade to
|
||||
string info = 4;
|
||||
|
||||
// IBC-enabled chains can opt-in to including the upgraded client state in its upgrade plan
|
||||
// This will make the chain commit to the correct upgraded (self) client state before the upgrade occurs,
|
||||
// so that connecting chains can verify that the new upgraded client is valid by verifying a proof on the
|
||||
// previous version of the chain.
|
||||
// This will allow IBC connections to persist smoothly across planned chain upgrades
|
||||
google.protobuf.Any upgraded_client_state = 5 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""];
|
||||
}
|
||||
|
||||
// SoftwareUpgradeProposal is a gov Content type for initiating a software
|
||||
// upgrade.
|
||||
message SoftwareUpgradeProposal {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string title = 1;
|
||||
string description = 2;
|
||||
Plan plan = 3 [(gogoproto.nullable) = false];
|
||||
}
|
||||
|
||||
// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
|
||||
// upgrade.
|
||||
message CancelSoftwareUpgradeProposal {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string title = 1;
|
||||
string description = 2;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.vesting.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types";
|
||||
|
||||
// Msg defines the bank Msg service.
|
||||
service Msg {
|
||||
// CreateVestingAccount defines a method that enables creating a vesting
|
||||
// account.
|
||||
rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse);
|
||||
}
|
||||
|
||||
// MsgCreateVestingAccount defines a message that enables creating a vesting
|
||||
// account.
|
||||
message MsgCreateVestingAccount {
|
||||
option (gogoproto.equal) = true;
|
||||
|
||||
string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""];
|
||||
string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""];
|
||||
repeated cosmos.base.v1beta1.Coin amount = 3
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
int64 end_time = 4 [(gogoproto.moretags) = "yaml:\"end_time\""];
|
||||
bool delayed = 5;
|
||||
}
|
||||
|
||||
// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type.
|
||||
message MsgCreateVestingAccountResponse {}
|
||||
@@ -0,0 +1,73 @@
|
||||
syntax = "proto3";
|
||||
package cosmos.vesting.v1beta1;
|
||||
|
||||
import "gogoproto/gogo.proto";
|
||||
import "cosmos/base/v1beta1/coin.proto";
|
||||
import "cosmos/auth/v1beta1/auth.proto";
|
||||
|
||||
option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types";
|
||||
|
||||
// BaseVestingAccount implements the VestingAccount interface. It contains all
|
||||
// the necessary fields needed for any vesting account implementation.
|
||||
message BaseVestingAccount {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true];
|
||||
repeated cosmos.base.v1beta1.Coin original_vesting = 2 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"original_vesting\""
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin delegated_free = 3 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"delegated_free\""
|
||||
];
|
||||
repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [
|
||||
(gogoproto.nullable) = false,
|
||||
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
|
||||
(gogoproto.moretags) = "yaml:\"delegated_vesting\""
|
||||
];
|
||||
int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""];
|
||||
}
|
||||
|
||||
// ContinuousVestingAccount implements the VestingAccount interface. It
|
||||
// continuously vests by unlocking coins linearly with respect to time.
|
||||
message ContinuousVestingAccount {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true];
|
||||
int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""];
|
||||
}
|
||||
|
||||
// DelayedVestingAccount implements the VestingAccount interface. It vests all
|
||||
// coins after a specific time, but non prior. In other words, it keeps them
|
||||
// locked until a specified time.
|
||||
message DelayedVestingAccount {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true];
|
||||
}
|
||||
|
||||
// Period defines a length of time and amount of coins that will vest.
|
||||
message Period {
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
int64 length = 1;
|
||||
repeated cosmos.base.v1beta1.Coin amount = 2
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
}
|
||||
|
||||
// PeriodicVestingAccount implements the VestingAccount interface. It
|
||||
// periodically vests by unlocking coins during each specified period.
|
||||
message PeriodicVestingAccount {
|
||||
option (gogoproto.goproto_getters) = false;
|
||||
option (gogoproto.goproto_stringer) = false;
|
||||
|
||||
BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true];
|
||||
int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""];
|
||||
repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false];
|
||||
}
|
||||
Reference in New Issue
Block a user