2022-01-08 01:59:34 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.auth.v1beta1;
|
|
|
|
|
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
import "google/protobuf/any.proto";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
import "cosmos/auth/v1beta1/auth.proto";
|
|
|
|
import "cosmos_proto/cosmos.proto";
|
2024-02-06 22:54:10 +00:00
|
|
|
import "cosmos/query/v1/query.proto";
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types";
|
|
|
|
|
|
|
|
// Query defines the gRPC querier service.
|
|
|
|
service Query {
|
2024-02-06 22:54:10 +00:00
|
|
|
// Accounts returns all the existing accounts.
|
|
|
|
//
|
|
|
|
// When called from another module, this query might consume a high amount of
|
|
|
|
// gas if the pagination field is incorrectly set.
|
2022-01-08 01:59:34 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.43
|
|
|
|
rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
|
2024-02-06 22:54:10 +00:00
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts";
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Account returns account details based on address.
|
|
|
|
rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
|
2024-02-06 22:54:10 +00:00
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
2023-04-04 00:08:45 +00:00
|
|
|
// AccountAddressByID returns account address based on account number.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46.2
|
|
|
|
rpc AccountAddressByID(QueryAccountAddressByIDRequest) returns (QueryAccountAddressByIDResponse) {
|
2024-02-06 22:54:10 +00:00
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/address_by_id/{id}";
|
2023-04-04 00:08:45 +00:00
|
|
|
}
|
|
|
|
|
2022-01-08 01:59:34 +00:00
|
|
|
// Params queries all parameters.
|
|
|
|
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
2024-02-06 22:54:10 +00:00
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/params";
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
2023-04-04 00:08:45 +00:00
|
|
|
|
|
|
|
// ModuleAccounts returns all the existing module accounts.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) {
|
2024-02-06 22:54:10 +00:00
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts";
|
2023-04-04 00:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// ModuleAccountByName returns the module account info by module name
|
|
|
|
rpc ModuleAccountByName(QueryModuleAccountByNameRequest) returns (QueryModuleAccountByNameResponse) {
|
2024-02-06 22:54:10 +00:00
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts/{name}";
|
2023-04-04 00:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Bech32Prefix queries bech32Prefix
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32";
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddressBytesToString converts Account Address bytes to string
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}";
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddressStringToBytes converts Address string to bytes
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) {
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}";
|
|
|
|
}
|
2024-02-06 22:54:10 +00:00
|
|
|
|
|
|
|
// AccountInfo queries account info which is common to all account types.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.47
|
|
|
|
rpc AccountInfo(QueryAccountInfoRequest) returns (QueryAccountInfoResponse) {
|
|
|
|
option (cosmos.query.v1.module_query_safe) = true;
|
|
|
|
option (google.api.http).get = "/cosmos/auth/v1beta1/account_info/{address}";
|
|
|
|
}
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountsRequest is the request type for the Query/Accounts RPC method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.43
|
|
|
|
message QueryAccountsRequest {
|
|
|
|
// pagination defines an optional pagination for the request.
|
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountsResponse is the response type for the Query/Accounts RPC method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.43
|
|
|
|
message QueryAccountsResponse {
|
|
|
|
// accounts are the existing accounts
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.AccountI"];
|
2022-01-08 01:59:34 +00:00
|
|
|
|
|
|
|
// pagination defines the pagination in the response.
|
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountRequest is the request type for the Query/Account RPC method.
|
|
|
|
message QueryAccountRequest {
|
|
|
|
option (gogoproto.equal) = false;
|
|
|
|
option (gogoproto.goproto_getters) = false;
|
|
|
|
|
|
|
|
// address defines the address to query for.
|
2023-04-04 00:08:45 +00:00
|
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountResponse is the response type for the Query/Account RPC method.
|
|
|
|
message QueryAccountResponse {
|
|
|
|
// account defines the account of the corresponding address.
|
2024-02-06 22:54:10 +00:00
|
|
|
google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.AccountI"];
|
2022-01-08 01:59:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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];
|
|
|
|
}
|
2023-04-04 00:08:45 +00:00
|
|
|
|
|
|
|
// QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message QueryModuleAccountsRequest {}
|
|
|
|
|
|
|
|
// QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message QueryModuleAccountsResponse {
|
2024-02-06 22:54:10 +00:00
|
|
|
repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.ModuleAccountI"];
|
2023-04-04 00:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryModuleAccountByNameRequest is the request type for the Query/ModuleAccountByName RPC method.
|
|
|
|
message QueryModuleAccountByNameRequest {
|
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryModuleAccountByNameResponse is the response type for the Query/ModuleAccountByName RPC method.
|
|
|
|
message QueryModuleAccountByNameResponse {
|
2024-02-06 22:54:10 +00:00
|
|
|
google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "cosmos.auth.v1beta1.ModuleAccountI"];
|
2023-04-04 00:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Bech32PrefixRequest is the request type for Bech32Prefix rpc method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message Bech32PrefixRequest {}
|
|
|
|
|
|
|
|
// Bech32PrefixResponse is the response type for Bech32Prefix rpc method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message Bech32PrefixResponse {
|
|
|
|
string bech32_prefix = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddressBytesToStringRequest is the request type for AddressString rpc method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message AddressBytesToStringRequest {
|
|
|
|
bytes address_bytes = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddressBytesToStringResponse is the response type for AddressString rpc method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message AddressBytesToStringResponse {
|
|
|
|
string address_string = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddressStringToBytesRequest is the request type for AccountBytes rpc method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message AddressStringToBytesRequest {
|
|
|
|
string address_string = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AddressStringToBytesResponse is the response type for AddressBytes rpc method.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message AddressStringToBytesResponse {
|
|
|
|
bytes address_bytes = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountAddressByIDRequest is the request type for AccountAddressByID rpc method
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46.2
|
|
|
|
message QueryAccountAddressByIDRequest {
|
2024-02-06 22:54:10 +00:00
|
|
|
// Deprecated, use account_id instead
|
|
|
|
//
|
2023-04-04 00:08:45 +00:00
|
|
|
// id is the account number of the address to be queried. This field
|
|
|
|
// should have been an uint64 (like all account numbers), and will be
|
|
|
|
// updated to uint64 in a future version of the auth query.
|
2024-02-06 22:54:10 +00:00
|
|
|
int64 id = 1 [deprecated = true];
|
|
|
|
|
|
|
|
// account_id is the account number of the address to be queried.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.47
|
|
|
|
uint64 account_id = 2;
|
2023-04-04 00:08:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountAddressByIDResponse is the response type for AccountAddressByID rpc method
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46.2
|
|
|
|
message QueryAccountAddressByIDResponse {
|
|
|
|
string account_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
}
|
2024-02-06 22:54:10 +00:00
|
|
|
|
|
|
|
// QueryAccountInfoRequest is the Query/AccountInfo request type.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.47
|
|
|
|
message QueryAccountInfoRequest {
|
|
|
|
|
|
|
|
// address is the account address string.
|
|
|
|
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
|
|
|
}
|
|
|
|
|
|
|
|
// QueryAccountInfoResponse is the Query/AccountInfo response type.
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.47
|
|
|
|
message QueryAccountInfoResponse {
|
|
|
|
|
|
|
|
// info is the account info which is represented by BaseAccount.
|
|
|
|
BaseAccount info = 1;
|
|
|
|
}
|