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
service Query {
  // Accounts returns all the existing accounts
  //
  // Since: cosmos-sdk 0.43
  rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/accounts";
  }

  // Account returns account details based on address.
  rpc Account(QueryAccountRequest) returns (QueryAccountResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}";
  }

  // Params queries all parameters.
  rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/params";
  }

  // ModuleAccounts returns all the existing module accounts.
  rpc ModuleAccounts(QueryModuleAccountsRequest) returns (QueryModuleAccountsResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/module_accounts";
  }

  // Bech32 queries bech32Prefix
  rpc Bech32Prefix(Bech32PrefixRequest) returns (Bech32PrefixResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/bech32";
  }

  // AddressBytesToString converts Account Address bytes to string
  rpc AddressBytesToString(AddressBytesToStringRequest) returns (AddressBytesToStringResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_bytes}";
  }

  // AddressStringToBytes converts Address string to bytes
  rpc AddressStringToBytes(AddressStringToBytesRequest) returns (AddressStringToBytesResponse) {
    option (google.api.http).get = "/cosmos/auth/v1beta1/bech32/{address_string}";
  }
}

QueryAccountsRequest

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

Since: cosmos-sdk 0.43

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

QueryAccountsResponse

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

Since: cosmos-sdk 0.43

query.proto
message QueryAccountsResponse {
  // accounts are the existing accounts
  repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"];

  // pagination defines the pagination in the response.
  cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

QueryAccountRequest

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

query.proto
message QueryAccountRequest {
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // address defines the address to query for.
  string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

QueryAccountResponse

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

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

QueryParamsRequest

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

query.proto
message QueryParamsRequest {}

QueryParamsResponse

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

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

QueryModuleAccountsRequest

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

query.proto
message QueryModuleAccountsRequest {}

QueryModuleAccountsResponse

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

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

Bech32PrefixRequest

Bech32PrefixRequest is the request type for Bech32Prefix rpc method.

query.proto
message Bech32PrefixRequest {}

Bech32PrefixResponse

Bech32PrefixResponse is the response type for Bech32Prefix rpc method.

query.proto
message Bech32PrefixResponse {
  string bech32_prefix = 1;
}

AddressBytesToStringRequest

AddressBytesToStringRequest is the request type for AddressString rpc method.

query.proto
message AddressBytesToStringRequest {
  bytes address_bytes = 1;
}

AddressBytesToStringResponse

AddressBytesToStringResponse is the response type for AddressString rpc method.

query.proto
message AddressBytesToStringResponse {
  string address_string = 1;
}

AddressStringToBytesRequest

AddressStringToBytesRequest is the request type for AccountBytes rpc method.

query.proto
message AddressStringToBytesRequest {
  string address_string = 1;
}

AddressStringToBytesResponse

AddressStringToBytesResponse is the response type for AddressBytes rpc method.

query.proto
message AddressStringToBytesResponse {
  bytes address_bytes = 1;
}