cosmos-sdk/proto/ibc/connection/query.proto
Aditya 4f9e31ea21
x/ibc: implement Height interface (#7211)
* change interfaces

* fix tendermint client interfaces

* fix other clients interfaces

* fix queries

* fix tendermint build

* fix builds of clients

* fix 02-build

* start fixing connection and make queries non-nullable

* fix connection keepers and queries

* fix connection build

* fix channel build

* fix all non-test files

* fix testing build

* cleanup

* lint

* fix timeout height interface

* fix tendermint tests

* fix rest of clients

* fix connection tests

* fix client tests

* fix channel tests

* fix all ibc tests

* fix transfer tests:

* docs

* fix connection query

* Apply suggestions from code review

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* wrap-up review

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-09-03 16:23:20 -04:00

162 lines
5.4 KiB
Protocol Buffer

syntax = "proto3";
package ibc.connection;
import "gogoproto/gogo.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "ibc/client/client.proto";
import "ibc/connection/connection.proto";
import "google/api/annotations.proto";
import "google/protobuf/any.proto";
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/03-connection/types";
// Query provides defines the gRPC querier service
service Query {
// Connection queries an IBC connection end.
rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) {
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}";
}
// Connections queries all the IBC connections of a chain.
rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) {
option (google.api.http).get = "/ibc/connection/v1beta1/connections";
}
// ClientConnections queries the connection paths associated with a client
// state.
rpc ClientConnections(QueryClientConnectionsRequest)
returns (QueryClientConnectionsResponse) {
option (google.api.http).get = "/ibc/connection/v1beta1/client_connections/{client_id}";
}
// ConnectionClientState queries the client state associated with the
// connection.
rpc ConnectionClientState(QueryConnectionClientStateRequest)
returns (QueryConnectionClientStateResponse) {
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/client_state";
}
// ConnectionConsensusState queries the consensus state associated with the
// connection.
rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest)
returns (QueryConnectionConsensusStateResponse) {
option (google.api.http).get = "/ibc/connection/v1beta1/connections/{connection_id}/consensus_state/epoch/{epoch_number}/height/{epoch_height}";
}
}
// QueryConnectionRequest is the request type for the Query/Connection RPC
// method
message QueryConnectionRequest {
// connection unique identifier
string connection_id = 1;
}
// QueryConnectionResponse is the response type for the Query/Connection RPC
// method. Besides the connection end, it includes a proof and the height from
// which the proof was retrieved.
message QueryConnectionResponse {
// connection associated with the request identifier
ibc.connection.ConnectionEnd connection = 1;
// merkle proof of existence
bytes proof = 2;
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [
(gogoproto.nullable) = false
];
}
// QueryConnectionsRequest is the request type for the Query/Connections RPC
// method
message QueryConnectionsRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
// QueryConnectionsResponse is the response type for the Query/Connections RPC
// method.
message QueryConnectionsResponse {
// list of stored connections of the chain.
repeated ibc.connection.IdentifiedConnection connections = 1;
// pagination response
cosmos.base.query.v1beta1.PageResponse pagination = 2;
// query block height
ibc.client.Height height = 3 [
(gogoproto.nullable) = false
];
}
// QueryClientConnectionsRequest is the request type for the
// Query/ClientConnections RPC method
message QueryClientConnectionsRequest {
// client identifier associated with a connection
string client_id = 1;
}
// QueryClientConnectionsResponse is the response type for the
// Query/ClientConnections RPC method
message QueryClientConnectionsResponse {
// slice of all the connection paths associated with a client.
repeated string connection_paths = 1;
// merkle proof of existence
bytes proof = 2;
// merkle proof path
string proof_path = 3;
// height at which the proof was generated
ibc.client.Height proof_height = 4 [
(gogoproto.nullable) = false
];
}
// QueryConnectionClientStateRequest is the request type for the
// Query/ConnectionClientState RPC method
message QueryConnectionClientStateRequest {
// connection identifier
string connection_id = 1 [
(gogoproto.moretags) = "yaml:\"connection_id\""
];
}
// QueryConnectionClientStateResponse is the response type for the
// Query/ConnectionClientState RPC method
message QueryConnectionClientStateResponse {
// client state associated with the channel
ibc.client.IdentifiedClientState identified_client_state = 1;
// merkle proof of existence
bytes proof = 2;
// merkle proof path
string proof_path = 3;
// height at which the proof was retrieved
ibc.client.Height proof_height = 4 [
(gogoproto.nullable) = false
];
}
// QueryConnectionConsensusStateRequest is the request type for the
// Query/ConnectionConsensusState RPC method
message QueryConnectionConsensusStateRequest {
// connection identifier
string connection_id = 1 [
(gogoproto.moretags) = "yaml:\"connection_id\""
];
uint64 epoch_number = 2;
uint64 epoch_height = 3;
}
// QueryConnectionConsensusStateResponse is the response type for the
// Query/ConnectionConsensusState RPC method
message QueryConnectionConsensusStateResponse {
// consensus state associated with the channel
google.protobuf.Any consensus_state = 1;
// client ID associated with the consensus state
string client_id = 2;
// merkle proof of existence
bytes proof = 3;
// merkle proof path
string proof_path = 4;
// height at which the proof was retrieved
ibc.client.Height proof_height = 5 [
(gogoproto.nullable) = false
];
}