github.com/okex/exchain@v1.8.0/libs/ibc-go/proto/ibc/core/channel/v1/query.proto (about) 1 syntax = "proto3"; 2 3 package ibc.core.channel.v1; 4 5 option go_package = "github.com/cosmos/ibc-go/v2/modules/core/04-channel/types"; 6 7 import "ibc/core/client/v1/client.proto"; 8 import "cosmos/base/query/v1beta1/pagination.proto"; 9 import "ibc/core/channel/v1/channel.proto"; 10 import "google/api/annotations.proto"; 11 import "google/protobuf/any.proto"; 12 import "gogoproto/gogo.proto"; 13 14 // Query provides defines the gRPC querier service 15 service Query { 16 // Channel queries an IBC Channel. 17 rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { 18 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}"; 19 } 20 21 // Channels queries all the IBC channels of a chain. 22 rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { 23 option (google.api.http).get = "/ibc/core/channel/v1/channels"; 24 } 25 26 // ConnectionChannels queries all the channels associated with a connection 27 // end. 28 rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { 29 option (google.api.http).get = "/ibc/core/channel/v1/connections/{connection}/channels"; 30 } 31 32 // ChannelClientState queries for the client state for the channel associated 33 // with the provided channel identifiers. 34 rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { 35 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 36 "ports/{port_id}/client_state"; 37 } 38 39 // ChannelConsensusState queries for the consensus state for the channel 40 // associated with the provided channel identifiers. 41 rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { 42 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 43 "ports/{port_id}/consensus_state/revision/" 44 "{revision_number}/height/{revision_height}"; 45 } 46 47 // PacketCommitment queries a stored packet commitment hash. 48 rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { 49 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" 50 "packet_commitments/{sequence}"; 51 } 52 53 // PacketCommitments returns all the packet commitments hashes associated 54 // with a channel. 55 rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { 56 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 57 "ports/{port_id}/packet_commitments"; 58 } 59 60 // PacketReceipt queries if a given packet sequence has been received on the 61 // queried chain 62 rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { 63 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 64 "ports/{port_id}/packet_receipts/{sequence}"; 65 } 66 67 // PacketAcknowledgement queries a stored packet acknowledgement hash. 68 rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { 69 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 70 "ports/{port_id}/packet_acks/{sequence}"; 71 } 72 73 // PacketAcknowledgements returns all the packet acknowledgements associated 74 // with a channel. 75 rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { 76 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 77 "ports/{port_id}/packet_acknowledgements"; 78 } 79 80 // UnreceivedPackets returns all the unreceived IBC packets associated with a 81 // channel and sequences. 82 rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { 83 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" 84 "packet_commitments/" 85 "{packet_commitment_sequences}/unreceived_packets"; 86 } 87 88 // UnreceivedAcks returns all the unreceived IBC acknowledgements associated 89 // with a channel and sequences. 90 rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { 91 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 92 "ports/{port_id}/packet_commitments/" 93 "{packet_ack_sequences}/unreceived_acks"; 94 } 95 96 // NextSequenceReceive returns the next receive sequence for a given channel. 97 rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { 98 option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" 99 "ports/{port_id}/next_sequence"; 100 } 101 } 102 103 // QueryChannelRequest is the request type for the Query/Channel RPC method 104 message QueryChannelRequest { 105 // port unique identifier 106 string port_id = 1; 107 // channel unique identifier 108 string channel_id = 2; 109 } 110 111 // QueryChannelResponse is the response type for the Query/Channel RPC method. 112 // Besides the Channel end, it includes a proof and the height from which the 113 // proof was retrieved. 114 message QueryChannelResponse { 115 // channel associated with the request identifiers 116 ibc.core.channel.v1.Channel channel = 1; 117 // merkle proof of existence 118 bytes proof = 2; 119 // height at which the proof was retrieved 120 ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; 121 } 122 123 // QueryChannelsRequest is the request type for the Query/Channels RPC method 124 message QueryChannelsRequest { 125 // pagination request 126 cosmos.base.query.v1beta1.PageRequest pagination = 1; 127 } 128 129 // QueryChannelsResponse is the response type for the Query/Channels RPC method. 130 message QueryChannelsResponse { 131 // list of stored channels of the chain. 132 repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; 133 // pagination response 134 cosmos.base.query.v1beta1.PageResponse pagination = 2; 135 // query block height 136 ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; 137 } 138 139 // QueryConnectionChannelsRequest is the request type for the 140 // Query/QueryConnectionChannels RPC method 141 message QueryConnectionChannelsRequest { 142 // connection unique identifier 143 string connection = 1; 144 // pagination request 145 cosmos.base.query.v1beta1.PageRequest pagination = 2; 146 } 147 148 // QueryConnectionChannelsResponse is the Response type for the 149 // Query/QueryConnectionChannels RPC method 150 message QueryConnectionChannelsResponse { 151 // list of channels associated with a connection. 152 repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; 153 // pagination response 154 cosmos.base.query.v1beta1.PageResponse pagination = 2; 155 // query block height 156 ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; 157 } 158 159 // QueryChannelClientStateRequest is the request type for the Query/ClientState 160 // RPC method 161 message QueryChannelClientStateRequest { 162 // port unique identifier 163 string port_id = 1; 164 // channel unique identifier 165 string channel_id = 2; 166 } 167 168 // QueryChannelClientStateResponse is the Response type for the 169 // Query/QueryChannelClientState RPC method 170 message QueryChannelClientStateResponse { 171 // client state associated with the channel 172 ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; 173 // merkle proof of existence 174 bytes proof = 2; 175 // height at which the proof was retrieved 176 ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; 177 } 178 179 // QueryChannelConsensusStateRequest is the request type for the 180 // Query/ConsensusState RPC method 181 message QueryChannelConsensusStateRequest { 182 // port unique identifier 183 string port_id = 1; 184 // channel unique identifier 185 string channel_id = 2; 186 // revision number of the consensus state 187 uint64 revision_number = 3; 188 // revision height of the consensus state 189 uint64 revision_height = 4; 190 } 191 192 // QueryChannelClientStateResponse is the Response type for the 193 // Query/QueryChannelClientState RPC method 194 message QueryChannelConsensusStateResponse { 195 // consensus state associated with the channel 196 google.protobuf.Any consensus_state = 1; 197 // client ID associated with the consensus state 198 string client_id = 2; 199 // merkle proof of existence 200 bytes proof = 3; 201 // height at which the proof was retrieved 202 ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; 203 } 204 205 // QueryPacketCommitmentRequest is the request type for the 206 // Query/PacketCommitment RPC method 207 message QueryPacketCommitmentRequest { 208 // port unique identifier 209 string port_id = 1; 210 // channel unique identifier 211 string channel_id = 2; 212 // packet sequence 213 uint64 sequence = 3; 214 } 215 216 // QueryPacketCommitmentResponse defines the client query response for a packet 217 // which also includes a proof and the height from which the proof was 218 // retrieved 219 message QueryPacketCommitmentResponse { 220 // packet associated with the request fields 221 bytes commitment = 1; 222 // merkle proof of existence 223 bytes proof = 2; 224 // height at which the proof was retrieved 225 ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; 226 } 227 228 // QueryPacketCommitmentsRequest is the request type for the 229 // Query/QueryPacketCommitments RPC method 230 message QueryPacketCommitmentsRequest { 231 // port unique identifier 232 string port_id = 1; 233 // channel unique identifier 234 string channel_id = 2; 235 // pagination request 236 cosmos.base.query.v1beta1.PageRequest pagination = 3; 237 } 238 239 // QueryPacketCommitmentsResponse is the request type for the 240 // Query/QueryPacketCommitments RPC method 241 message QueryPacketCommitmentsResponse { 242 repeated ibc.core.channel.v1.PacketState commitments = 1; 243 // pagination response 244 cosmos.base.query.v1beta1.PageResponse pagination = 2; 245 // query block height 246 ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; 247 } 248 249 // QueryPacketReceiptRequest is the request type for the 250 // Query/PacketReceipt RPC method 251 message QueryPacketReceiptRequest { 252 // port unique identifier 253 string port_id = 1; 254 // channel unique identifier 255 string channel_id = 2; 256 // packet sequence 257 uint64 sequence = 3; 258 } 259 260 // QueryPacketReceiptResponse defines the client query response for a packet 261 // receipt which also includes a proof, and the height from which the proof was 262 // retrieved 263 message QueryPacketReceiptResponse { 264 // success flag for if receipt exists 265 bool received = 2; 266 // merkle proof of existence 267 bytes proof = 3; 268 // height at which the proof was retrieved 269 ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; 270 } 271 272 // QueryPacketAcknowledgementRequest is the request type for the 273 // Query/PacketAcknowledgement RPC method 274 message QueryPacketAcknowledgementRequest { 275 // port unique identifier 276 string port_id = 1; 277 // channel unique identifier 278 string channel_id = 2; 279 // packet sequence 280 uint64 sequence = 3; 281 } 282 283 // QueryPacketAcknowledgementResponse defines the client query response for a 284 // packet which also includes a proof and the height from which the 285 // proof was retrieved 286 message QueryPacketAcknowledgementResponse { 287 // packet associated with the request fields 288 bytes acknowledgement = 1; 289 // merkle proof of existence 290 bytes proof = 2; 291 // height at which the proof was retrieved 292 ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; 293 } 294 295 // QueryPacketAcknowledgementsRequest is the request type for the 296 // Query/QueryPacketCommitments RPC method 297 message QueryPacketAcknowledgementsRequest { 298 // port unique identifier 299 string port_id = 1; 300 // channel unique identifier 301 string channel_id = 2; 302 // pagination request 303 cosmos.base.query.v1beta1.PageRequest pagination = 3; 304 // list of packet sequences 305 repeated uint64 packet_commitment_sequences = 4; 306 } 307 308 // QueryPacketAcknowledgemetsResponse is the request type for the 309 // Query/QueryPacketAcknowledgements RPC method 310 message QueryPacketAcknowledgementsResponse { 311 repeated ibc.core.channel.v1.PacketState acknowledgements = 1; 312 // pagination response 313 cosmos.base.query.v1beta1.PageResponse pagination = 2; 314 // query block height 315 ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; 316 } 317 318 // QueryUnreceivedPacketsRequest is the request type for the 319 // Query/UnreceivedPackets RPC method 320 message QueryUnreceivedPacketsRequest { 321 // port unique identifier 322 string port_id = 1; 323 // channel unique identifier 324 string channel_id = 2; 325 // list of packet sequences 326 repeated uint64 packet_commitment_sequences = 3; 327 } 328 329 // QueryUnreceivedPacketsResponse is the response type for the 330 // Query/UnreceivedPacketCommitments RPC method 331 message QueryUnreceivedPacketsResponse { 332 // list of unreceived packet sequences 333 repeated uint64 sequences = 1; 334 // query block height 335 ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; 336 } 337 338 // QueryUnreceivedAcks is the request type for the 339 // Query/UnreceivedAcks RPC method 340 message QueryUnreceivedAcksRequest { 341 // port unique identifier 342 string port_id = 1; 343 // channel unique identifier 344 string channel_id = 2; 345 // list of acknowledgement sequences 346 repeated uint64 packet_ack_sequences = 3; 347 } 348 349 // QueryUnreceivedAcksResponse is the response type for the 350 // Query/UnreceivedAcks RPC method 351 message QueryUnreceivedAcksResponse { 352 // list of unreceived acknowledgement sequences 353 repeated uint64 sequences = 1; 354 // query block height 355 ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; 356 } 357 358 // QueryNextSequenceReceiveRequest is the request type for the 359 // Query/QueryNextSequenceReceiveRequest RPC method 360 message QueryNextSequenceReceiveRequest { 361 // port unique identifier 362 string port_id = 1; 363 // channel unique identifier 364 string channel_id = 2; 365 } 366 367 // QuerySequenceResponse is the request type for the 368 // Query/QueryNextSequenceReceiveResponse RPC method 369 message QueryNextSequenceReceiveResponse { 370 // next sequence receive number 371 uint64 next_sequence_receive = 1; 372 // merkle proof of existence 373 bytes proof = 2; 374 // height at which the proof was retrieved 375 ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; 376 }