Skip to main content
Generated from cosmos/cosmos-sdk@c1126e4e5460 on ref main.

Queries

A node exposes only the services its application registers:
  • gRPC on port 9090
  • REST on port 1317, if the method has an HTTP binding
Run grpcurl -plaintext localhost:9090 list to see what a node serves. Queries are read-only and never pass through consensus. See Queries. Replace <string> placeholders with real values and omit unused filters. Payloads use protobuf JSON, and some string fields accept enum constants listed under Types. Field tables give the encoding each value takes. Examples assume a local node. For TLS endpoints, use port 443 and omit -plaintext. See gRPC services for reflection, address formats, and decimal encoding.

GranteeGrants

GranteeGrants returns a list of GrantAuthorization by grantee. Request QueryGranteeGrantsRequest: Response QueryGranteeGrantsResponse:

GranterGrants

GranterGrants returns list of GrantAuthorization, granted by granter. Request QueryGranterGrantsRequest: Response QueryGranterGrantsResponse:

Grants

Returns list of Authorization, granted to the grantee by the granter. Request QueryGrantsRequest: Response QueryGrantsResponse:

Transaction messages

These messages are included in signed transactions, not called as endpoints. See Transactions for the execution model, and Sending transactions for the envelope they go into. Examples use CLI transaction JSON. Decimal fields use values such as "0.05", even when their proto type is bytes. The gRPC TxEncode method instead requires the scaled value "50000000000000000". See scalar encodings.
  • Handler: Generated client method
  • Signer: Account that must sign
  • Amino name: Legacy identifier used by hardware wallets and other Amino signers

Exec

Exec 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. In a transaction:
Response MsgExecResponse:

Grant

Grant grants the provided authorization to the grantee on the granter’s account with the provided expiration time. If there is already a grant for the given (granter, grantee, Authorization) triple, then the grant will be overwritten. In a transaction:
Response MsgGrantResponse: This message has no fields.

Revoke

Revoke revokes any authorization corresponding to the provided method name on the granter’s account that has been granted to the grantee. In a transaction:
Response MsgRevokeResponse: This message has no fields.

Types

Messages referenced by the fields above. Protocol buffers version 3 has no required fields, so every field is optional on the wire, and a [] suffix marks a repeated field.

cosmos.authz.v1beta1.Grant

Grant gives permissions to execute the provide method with expiration time.

cosmos.authz.v1beta1.GrantAuthorization

GrantAuthorization extends a grant with both the addresses of the grantee and granter. It is used in genesis.proto and query.proto

cosmos.base.query.v1beta1.PageRequest

PageRequest is to be embedded in gRPC request messages for efficient pagination. Ex: message SomeRequest { Foo some_parameter = 1; PageRequest pagination = 2; }

cosmos.base.query.v1beta1.PageResponse

PageResponse is to be embedded in gRPC response messages where the corresponding request message has used PageRequest. message SomeResponse { repeated Bar results = 1; PageResponse page = 2; }