114 lines
3.9 KiB
Protocol Buffer
114 lines
3.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
package certusone.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/certusone/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 = "/certusone/wormholechain/tokenbridge/config";
|
|
}
|
|
// Queries a replayProtection by index.
|
|
rpc ReplayProtection(QueryGetReplayProtectionRequest) returns (QueryGetReplayProtectionResponse) {
|
|
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/replayProtection/{index}";
|
|
}
|
|
|
|
// Queries a list of replayProtection items.
|
|
rpc ReplayProtectionAll(QueryAllReplayProtectionRequest) returns (QueryAllReplayProtectionResponse) {
|
|
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/replayProtection";
|
|
}
|
|
|
|
// Queries a chainRegistration by index.
|
|
rpc ChainRegistration(QueryGetChainRegistrationRequest) returns (QueryGetChainRegistrationResponse) {
|
|
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/chainRegistration/{chainID}";
|
|
}
|
|
|
|
// Queries a list of chainRegistration items.
|
|
rpc ChainRegistrationAll(QueryAllChainRegistrationRequest) returns (QueryAllChainRegistrationResponse) {
|
|
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/chainRegistration";
|
|
}
|
|
|
|
// Queries a coinMetaRollbackProtection by index.
|
|
rpc CoinMetaRollbackProtection(QueryGetCoinMetaRollbackProtectionRequest) returns (QueryGetCoinMetaRollbackProtectionResponse) {
|
|
option (google.api.http).get = "/certusone/wormholechain/tokenbridge/coinMetaRollbackProtection/{index}";
|
|
}
|
|
|
|
// Queries a list of coinMetaRollbackProtection items.
|
|
rpc CoinMetaRollbackProtectionAll(QueryAllCoinMetaRollbackProtectionRequest) returns (QueryAllCoinMetaRollbackProtectionResponse) {
|
|
option (google.api.http).get = "/certusone/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
|