Skip to main content
logo

auth

The auth module is responsible for the authentication of accounts and transactions and specifies the base transaction and account types. It contains the middlewares, where all basic transaction validity checks (signatures, nonces, auxiliary fields) are performed, and exposes the account keeper, which allows other modules to read, write, and modify accounts.

For more information, visit https://docs.cosmos.network/main/modules/auth/

Queries

Query defines the gRPC querier service.

query.proto
Copy

_38
service Query {
_38
// Accounts returns all the existing accounts
_38
//
_38
// Since: cosmos-sdk 0.43
_38
rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts";
_38
}
_38
_38
// Account returns account details based on address.
_38
rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
_38
}
_38
_38
// Params queries all parameters.
_38
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/params";
_38
}
_38
_38
// ModuleAccounts returns all the existing module accounts.
_38
rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts";
_38
}
_38
_38
// Bech32 queries bech32Prefix
_38
rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32";
_38
}
_38
_38
// AddressBytesToString converts Account Address bytes to string
_38
rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}";
_38
}
_38
_38
// AddressStringToBytes converts Address string to bytes
_38
rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) {
_38
option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}";
_38
}
_38
}

QueryAccountsRequest

QueryAccountsRequest is the request type for the Query/Accounts RPC method.

Since: cosmos-sdk 0.43

query.proto
Copy

_4
message QueryAccountsRequest {
_4
// pagination defines an optional pagination for the request.
_4
cosmos.base.query.v1beta1.PageRequest pagination = 1;
_4
}

QueryAccountsResponse

QueryAccountsResponse is the response type for the Query/Accounts RPC method.

Since: cosmos-sdk 0.43

query.proto
Copy

_7
message QueryAccountsResponse {
_7
// accounts are the existing accounts
_7
repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"];
_7
_7
// pagination defines the pagination in the response.
_7
cosmos.base.query.v1beta1.PageResponse pagination = 2;
_7
}

QueryAccountRequest

QueryAccountRequest is the request type for the Query/Account RPC method.

query.proto
Copy

_7
message QueryAccountRequest {
_7
option (gogoproto.equal) = false;
_7
option (gogoproto.goproto_getters) = false;
_7
_7
// address defines the address to query for.
_7
string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
_7
}

QueryAccountResponse

QueryAccountResponse is the response type for the Query/Account RPC method.

query.proto
Copy

_4
message QueryAccountResponse {
_4
// account defines the account of the corresponding address.
_4
google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"];
_4
}

QueryParamsRequest

QueryParamsRequest is the request type for the Query/Params RPC method.

query.proto
Copy

_1
message QueryParamsRequest {}

QueryParamsResponse

QueryParamsResponse is the response type for the Query/Params RPC method.

query.proto
Copy

_4
message QueryParamsResponse {
_4
// params defines the parameters of the module.
_4
Params params = 1 [(gogoproto.nullable) = false];
_4
}

QueryModuleAccountsRequest

QueryModuleAccountsRequest is the request type for the Query/ModuleAccounts RPC method.

query.proto
Copy

_1
message QueryModuleAccountsRequest {}

QueryModuleAccountsResponse

QueryModuleAccountsResponse is the response type for the Query/ModuleAccounts RPC method.

query.proto
Copy

_3
message QueryModuleAccountsResponse {
_3
repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "ModuleAccountI"];
_3
}

Bech32PrefixRequest

Bech32PrefixRequest is the request type for Bech32Prefix rpc method.

query.proto
Copy

_1
message Bech32PrefixRequest {}

Bech32PrefixResponse

Bech32PrefixResponse is the response type for Bech32Prefix rpc method.

query.proto
Copy

_3
message Bech32PrefixResponse {
_3
string bech32_prefix = 1;
_3
}

AddressBytesToStringRequest

AddressBytesToStringRequest is the request type for AddressString rpc method.

query.proto
Copy

_3
message AddressBytesToStringRequest {
_3
bytes address_bytes = 1;
_3
}

AddressBytesToStringResponse

AddressBytesToStringResponse is the response type for AddressString rpc method.

query.proto
Copy

_3
message AddressBytesToStringResponse {
_3
string address_string = 1;
_3
}

AddressStringToBytesRequest

AddressStringToBytesRequest is the request type for AccountBytes rpc method.

query.proto
Copy

_3
message AddressStringToBytesRequest {
_3
string address_string = 1;
_3
}

AddressStringToBytesResponse

AddressStringToBytesResponse is the response type for AddressBytes rpc method.

query.proto
Copy

_3
message AddressStringToBytesResponse {
_3
bytes address_bytes = 1;
_3
}