2021-09-26 12:47:11 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
import "web3/common.proto";
|
|
|
|
import "types/types.proto";
|
|
|
|
|
|
|
|
package web3;
|
|
|
|
|
|
|
|
message BlockNumberResponse { uint64 block_number = 1; }
|
|
|
|
|
|
|
|
message ResolveBlockHashRequest { uint64 block_number = 1; }
|
|
|
|
message ResolveBlockHashResponse { optional types.H256 block_hash = 1; }
|
|
|
|
|
2022-07-26 02:28:10 +00:00
|
|
|
message BlockRequest { optional BlockId search_location = 1; }
|
2021-09-26 12:47:11 +00:00
|
|
|
message LightBlockResponse { optional LightBlock block = 1; }
|
|
|
|
message FullBlockResponse { optional FullBlock block = 1; }
|
|
|
|
|
|
|
|
message TransactionResponse { optional StoredTransaction transaction = 1; }
|
|
|
|
|
|
|
|
service EthApi {
|
|
|
|
rpc BlockNumber(google.protobuf.Empty) returns (BlockNumberResponse);
|
|
|
|
rpc ResolveBlockHash(ResolveBlockHashRequest)
|
|
|
|
returns (ResolveBlockHashResponse);
|
|
|
|
|
|
|
|
rpc LightBlock(BlockRequest) returns (LightBlockResponse);
|
|
|
|
rpc FullBlock(BlockRequest) returns (FullBlockResponse);
|
|
|
|
rpc TransactionByHash(types.H256) returns (TransactionResponse);
|
|
|
|
rpc SendTransaction(Transaction) returns (google.protobuf.Empty);
|
|
|
|
}
|