Skip to content

Commit

Permalink
remove internal
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Apr 19, 2024
1 parent 1637738 commit bbc76de
Show file tree
Hide file tree
Showing 23 changed files with 286 additions and 303 deletions.
84 changes: 42 additions & 42 deletions internal/nft/types/query.pb.go → nft/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
61 changes: 30 additions & 31 deletions internal/nft/types/types.pb.go → nft/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 8 additions & 16 deletions proto/indexer/block/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,32 @@ option go_package = "github.com/initia-labs/kvindexer/submodules/block/types";
service Query {

// Block returns a block by its height.
rpc Block(BlockRequest)
returns (BlockResponse) {
rpc Block(BlockRequest) returns (BlockResponse) {
option (google.api.http) = {
get : "/indexer/block/v1/blocks/{height}"
};
}

// Blocks returns a list of blocks.
rpc Blocks(BlocksRequest)
returns (BlocksResponse) {
rpc Blocks(BlocksRequest) returns (BlocksResponse) {
option (google.api.http) = {
get : "/indexer/block/v1/blocks"
};
}

// AvgBlockTime returns the average block time.
rpc AvgBlockTime(AvgBlockTimeRequest)
returns (AvgBlockTimeResponse) {
rpc AvgBlockTime(AvgBlockTimeRequest) returns (AvgBlockTimeResponse) {
option (google.api.http) = {
get : "/indexer/block/v1/avg_blocktime"
};
}
}

// BlockRequest defines the request for the Blocks RPC.
message BlockRequest {
int64 height = 1;
}
message BlockRequest { int64 height = 1; }

// BlockResponse defines the response for the Blocks RPC.
message BlockResponse {
Block block = 1;
}
message BlockResponse { Block block = 1; }

// BlocksRequest defines the request for the Blocks RPC.
message BlocksRequest {
Expand All @@ -60,10 +53,9 @@ message BlocksResponse {
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// AvgBlockTimeRequest defines the request for the AvgBlockTime RPC: no params for now.
// AvgBlockTimeRequest defines the request for the AvgBlockTime RPC: no params
// for now.
message AvgBlockTimeRequest {}

// AvgBlockTimeResponse defines the response for the AvgBlockTime RPC.
message AvgBlockTimeResponse {
double avg_block_time = 1;
}
message AvgBlockTimeResponse { double avg_block_time = 1; }
20 changes: 10 additions & 10 deletions proto/indexer/block/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,23 @@ import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/initia-labs/kvindexer/submodules/block/types";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.equal_all) = true;

// Block represents a indexed block in a blockchain
message Block {
string chain_id = 1;
int64 height = 2;
string hash = 3;
int64 block_time = 4;
google.protobuf.Timestamp timestamp = 5 [
(gogoproto.nullable) = false,
(gogoproto.stdtime) = true
];
google.protobuf.Timestamp timestamp = 5
[ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ];
int64 gas_used = 6;
int64 gas_wanted = 7;
int64 tx_count = 8;
repeated cosmos.base.v1beta1.Coin total_fee = 9 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true,
(amino.encoding) = "legacy_coins",
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
Proposer proposer = 10;
Expand All @@ -36,7 +34,9 @@ message Block {
// Proposer represents the proposer of a block: for minitia, its the L2 operator
message Proposer {
string moniker = 1;
// actually minitias have no identity because they haven't MsgCreateValidator, but we decided to keep this field for compatibility with L1
// actually minitias have no identity because they haven't MsgCreateValidator,
// but we decided to keep this field for compatibility with L1
string identity = 2;
string operator_address = 3; // [(cosmos_proto.scalar) = "cosmos.AddressString"];
string operator_address =
3; // [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
41 changes: 16 additions & 25 deletions proto/indexer/info/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,32 @@ package indexer.info;
import "google/api/annotations.proto";
import "indexer/info/types.proto";


option go_package = "github.com/initia-labs/kvindexer/x/kvindexer/types";

// Query provides the service definition for the Token Version
service Query {
// Version queries all the collections of an account
rpc Versions(QueryVersionRequest) returns (QueryVersionResponse) {
option (google.api.http) = {
get : "/indexer/version"
};
}
rpc VMType(QueryVMTypeRequest) returns (QueryVMTypeResponse) {
option (google.api.http) = {
get : "/indexer/vmtype"
};
}
// Version queries all the collections of an account
rpc Versions(QueryVersionRequest) returns (QueryVersionResponse) {
option (google.api.http) = {
get : "/indexer/version"
};
}

rpc VMType(QueryVMTypeRequest) returns (QueryVMTypeResponse) {
option (google.api.http) = {
get : "/indexer/vmtype"
};
}
}

// QueryVersionRequest is the request type for the Query/Versions RPC method
message QueryVersionRequest {
}
message QueryVersionRequest {}

// QueryVersionResponse is the response type for the Query/Versions RPC method
message QueryVersionResponse {
repeated SubmoduleVersion versions = 1;
}

message QueryVersionResponse { repeated SubmoduleVersion versions = 1; }

// QueryVMTypeRequest is the request type for the Query/VMType RPC method
message QueryVMTypeRequest {
}
message QueryVMTypeRequest {}

// QueryVMTypeResponse is the response type for the Query/VMType RPC method
message QueryVMTypeResponse {
string vmtype = 1;
}

message QueryVMTypeResponse { string vmtype = 1; }
2 changes: 1 addition & 1 deletion proto/indexer/info/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/initia-labs/kvindexer/x/kvindexer/types";
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.equal_all) = true;
option (gogoproto.equal_all) = true;

// SubmoduleVersion defines the version of the submodule
message SubmoduleVersion {
Expand Down
Loading

0 comments on commit bbc76de

Please sign in to comment.