2020-07-06 12:35:35 -07:00
|
|
|
syntax = "proto3";
|
2020-10-01 12:23:29 -07:00
|
|
|
package ibc.core.connection.v1;
|
2020-07-06 12:35:35 -07:00
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
2020-08-11 04:49:45 -07:00
|
|
|
import "cosmos/base/query/v1beta1/pagination.proto";
|
2020-10-01 12:23:29 -07:00
|
|
|
import "ibc/core/client/v1/client.proto";
|
|
|
|
import "ibc/core/connection/v1/connection.proto";
|
2020-08-14 03:05:35 -07:00
|
|
|
import "google/api/annotations.proto";
|
2020-08-12 05:54:38 -07:00
|
|
|
import "google/protobuf/any.proto";
|
2020-07-06 12:35:35 -07:00
|
|
|
|
2020-10-02 02:03:02 -07:00
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/x/ibc/core/03-connection/types";
|
2020-07-06 12:35:35 -07:00
|
|
|
|
|
|
|
// Query provides defines the gRPC querier service
|
|
|
|
service Query {
|
|
|
|
// Connection queries an IBC connection end.
|
2020-08-12 05:54:38 -07:00
|
|
|
rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) {
|
2020-11-10 09:50:53 -08:00
|
|
|
option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}";
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
2020-07-06 12:35:35 -07:00
|
|
|
|
|
|
|
// Connections queries all the IBC connections of a chain.
|
2020-08-12 05:54:38 -07:00
|
|
|
rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) {
|
2020-11-10 09:50:53 -08:00
|
|
|
option (google.api.http).get = "/ibc/core/connection/v1beta1/connections";
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
2020-07-06 12:35:35 -07:00
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// ClientConnections queries the connection paths associated with a client
|
|
|
|
// state.
|
2020-09-08 15:06:54 -07:00
|
|
|
rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) {
|
2020-11-10 09:50:53 -08:00
|
|
|
option (google.api.http).get = "/ibc/core/connection/v1beta1/client_connections/{client_id}";
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// ConnectionClientState queries the client state associated with the
|
2020-08-14 03:05:35 -07:00
|
|
|
// connection.
|
2020-09-08 15:06:54 -07:00
|
|
|
rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) {
|
2020-11-10 09:50:53 -08:00
|
|
|
option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/client_state";
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// ConnectionConsensusState queries the consensus state associated with the
|
2020-08-14 03:05:35 -07:00
|
|
|
// connection.
|
2020-09-08 15:06:54 -07:00
|
|
|
rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) {
|
2020-11-10 09:50:53 -08:00
|
|
|
option (google.api.http).get = "/ibc/core/connection/v1beta1/connections/{connection_id}/consensus_state/"
|
2020-10-01 08:08:26 -07:00
|
|
|
"version/{version_number}/height/{version_height}";
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
2020-07-06 12:35:35 -07:00
|
|
|
}
|
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// QueryConnectionRequest is the request type for the Query/Connection RPC
|
|
|
|
// method
|
2020-07-06 12:35:35 -07:00
|
|
|
message QueryConnectionRequest {
|
|
|
|
// connection unique identifier
|
2020-08-14 01:55:54 -07:00
|
|
|
string connection_id = 1;
|
2020-07-06 12:35:35 -07:00
|
|
|
}
|
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// 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.
|
2020-07-06 12:35:35 -07:00
|
|
|
message QueryConnectionResponse {
|
|
|
|
// connection associated with the request identifier
|
2020-10-01 12:23:29 -07:00
|
|
|
ibc.core.connection.v1.ConnectionEnd connection = 1;
|
2020-07-06 12:35:35 -07:00
|
|
|
// merkle proof of existence
|
|
|
|
bytes proof = 2;
|
|
|
|
// height at which the proof was retrieved
|
2020-10-29 05:42:12 -07:00
|
|
|
ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false];
|
2020-07-06 12:35:35 -07:00
|
|
|
}
|
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// QueryConnectionsRequest is the request type for the Query/Connections RPC
|
|
|
|
// method
|
2020-07-06 12:35:35 -07:00
|
|
|
message QueryConnectionsRequest {
|
2020-08-11 04:49:45 -07:00
|
|
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
2020-07-06 12:35:35 -07:00
|
|
|
}
|
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// QueryConnectionsResponse is the response type for the Query/Connections RPC
|
|
|
|
// method.
|
2020-07-06 12:35:35 -07:00
|
|
|
message QueryConnectionsResponse {
|
|
|
|
// list of stored connections of the chain.
|
2020-10-01 12:23:29 -07:00
|
|
|
repeated ibc.core.connection.v1.IdentifiedConnection connections = 1;
|
2020-07-06 12:35:35 -07:00
|
|
|
// pagination response
|
2020-08-11 04:49:45 -07:00
|
|
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
2020-07-06 12:35:35 -07:00
|
|
|
// query block height
|
2020-10-01 12:23:29 -07:00
|
|
|
ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false];
|
2020-07-06 12:35:35 -07:00
|
|
|
}
|
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// QueryClientConnectionsRequest is the request type for the
|
|
|
|
// Query/ClientConnections RPC method
|
2020-07-06 12:35:35 -07:00
|
|
|
message QueryClientConnectionsRequest {
|
|
|
|
// client identifier associated with a connection
|
2020-08-14 01:55:54 -07:00
|
|
|
string client_id = 1;
|
2020-07-06 12:35:35 -07:00
|
|
|
}
|
|
|
|
|
2020-08-12 05:54:38 -07:00
|
|
|
// QueryClientConnectionsResponse is the response type for the
|
|
|
|
// Query/ClientConnections RPC method
|
2020-07-06 12:35:35 -07:00
|
|
|
message QueryClientConnectionsResponse {
|
|
|
|
// slice of all the connection paths associated with a client.
|
|
|
|
repeated string connection_paths = 1;
|
|
|
|
// merkle proof of existence
|
|
|
|
bytes proof = 2;
|
|
|
|
// height at which the proof was generated
|
2020-10-29 05:42:12 -07:00
|
|
|
ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false];
|
2020-07-22 06:59:15 -07:00
|
|
|
}
|
2020-08-12 05:54:38 -07:00
|
|
|
|
|
|
|
// QueryConnectionClientStateRequest is the request type for the
|
|
|
|
// Query/ConnectionClientState RPC method
|
|
|
|
message QueryConnectionClientStateRequest {
|
|
|
|
// connection identifier
|
2020-09-08 15:06:54 -07:00
|
|
|
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryConnectionClientStateResponse is the response type for the
|
|
|
|
// Query/ConnectionClientState RPC method
|
|
|
|
message QueryConnectionClientStateResponse {
|
|
|
|
// client state associated with the channel
|
2020-10-01 12:23:29 -07:00
|
|
|
ibc.core.client.v1.IdentifiedClientState identified_client_state = 1;
|
2020-08-12 05:54:38 -07:00
|
|
|
// merkle proof of existence
|
|
|
|
bytes proof = 2;
|
|
|
|
// height at which the proof was retrieved
|
2020-10-29 05:42:12 -07:00
|
|
|
ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false];
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// QueryConnectionConsensusStateRequest is the request type for the
|
|
|
|
// Query/ConnectionConsensusState RPC method
|
|
|
|
message QueryConnectionConsensusStateRequest {
|
|
|
|
// connection identifier
|
2020-10-01 08:08:26 -07:00
|
|
|
string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""];
|
|
|
|
uint64 version_number = 2;
|
|
|
|
uint64 version_height = 3;
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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
|
2020-08-14 01:55:54 -07:00
|
|
|
string client_id = 2;
|
2020-08-12 05:54:38 -07:00
|
|
|
// merkle proof of existence
|
|
|
|
bytes proof = 3;
|
|
|
|
// height at which the proof was retrieved
|
2020-10-29 05:42:12 -07:00
|
|
|
ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false];
|
2020-08-12 05:54:38 -07:00
|
|
|
}
|