wormhole/wormhole_chain/proto/tokenbridge/query.proto

114 lines
4.0 KiB
Protocol Buffer

syntax = "proto3";
package wormhole_foundation.wormholechain.tokenbridge;
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "tokenbridge/config.proto";
import "tokenbridge/replay_protection.proto";
import "tokenbridge/chain_registration.proto";
import "tokenbridge/coin_meta_rollback_protection.proto";
// this line is used by starport scaffolding # 1
import "gogoproto/gogo.proto";
option go_package = "github.com/wormhole-foundation/wormhole-chain/x/tokenbridge/types";
// Query defines the gRPC querier service.
service Query {
// Queries a config by index.
rpc Config(QueryGetConfigRequest) returns (QueryGetConfigResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/config";
}
// Queries a replayProtection by index.
rpc ReplayProtection(QueryGetReplayProtectionRequest) returns (QueryGetReplayProtectionResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/replayProtection/{index}";
}
// Queries a list of replayProtection items.
rpc ReplayProtectionAll(QueryAllReplayProtectionRequest) returns (QueryAllReplayProtectionResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/replayProtection";
}
// Queries a chainRegistration by index.
rpc ChainRegistration(QueryGetChainRegistrationRequest) returns (QueryGetChainRegistrationResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/chainRegistration/{chainID}";
}
// Queries a list of chainRegistration items.
rpc ChainRegistrationAll(QueryAllChainRegistrationRequest) returns (QueryAllChainRegistrationResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/chainRegistration";
}
// Queries a coinMetaRollbackProtection by index.
rpc CoinMetaRollbackProtection(QueryGetCoinMetaRollbackProtectionRequest) returns (QueryGetCoinMetaRollbackProtectionResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/coinMetaRollbackProtection/{index}";
}
// Queries a list of coinMetaRollbackProtection items.
rpc CoinMetaRollbackProtectionAll(QueryAllCoinMetaRollbackProtectionRequest) returns (QueryAllCoinMetaRollbackProtectionResponse) {
option (google.api.http).get = "/wormhole_foundation/wormholechain/tokenbridge/coinMetaRollbackProtection";
}
// this line is used by starport scaffolding # 2
}
message QueryGetConfigRequest {}
message QueryGetConfigResponse {
Config Config = 1 [(gogoproto.nullable) = false];
}
message QueryGetReplayProtectionRequest {
string index = 1;
}
message QueryGetReplayProtectionResponse {
ReplayProtection replayProtection = 1 [(gogoproto.nullable) = false];
}
message QueryAllReplayProtectionRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
message QueryAllReplayProtectionResponse {
repeated ReplayProtection replayProtection = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
message QueryGetChainRegistrationRequest {
uint32 chainID = 1;
}
message QueryGetChainRegistrationResponse {
ChainRegistration chainRegistration = 1 [(gogoproto.nullable) = false];
}
message QueryAllChainRegistrationRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
message QueryAllChainRegistrationResponse {
repeated ChainRegistration chainRegistration = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
message QueryGetCoinMetaRollbackProtectionRequest {
string index = 1;
}
message QueryGetCoinMetaRollbackProtectionResponse {
CoinMetaRollbackProtection coinMetaRollbackProtection = 1 [(gogoproto.nullable) = false];
}
message QueryAllCoinMetaRollbackProtectionRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}
message QueryAllCoinMetaRollbackProtectionResponse {
repeated CoinMetaRollbackProtection coinMetaRollbackProtection = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// this line is used by starport scaffolding # 3