syntax = "proto3";

package nebula.v1;

import "google/protobuf/empty.proto";
import "nebula/v1/request_response.proto";
import "nebula/v1/account_req_res.proto";


service NebulaService {
  // web3
  rpc Sha3(Sha3Request) returns (Sha3Response) {};
  rpc NodeVersion(google.protobuf.Empty) returns (NodeVersionResponse) {};

  // network info service
  rpc NetVersion(google.protobuf.Empty) returns (NetVersionResponse) {};
  rpc NetPeerCount(google.protobuf.Empty) returns (NetPeerCountResponse) {};

  // node status
  rpc ProtocolVersion(google.protobuf.Empty) returns (ProtocolVersionResponse) {};
  rpc Syncing(google.protobuf.Empty) returns (SyncingResponse) {};
  rpc Coinbase(google.protobuf.Empty) returns (CoinbaseResponse) {};
  rpc Mining(google.protobuf.Empty) returns (MiningResponse) {};
  rpc HashRate(google.protobuf.Empty) returns (HashRateResponse) {};
  rpc Accounts(google.protobuf.Empty) returns (AccountsResponse) {};

  // tx operatoration
  rpc GasPrice(google.protobuf.Empty) returns (GasPriceResponse) {};
  
  // block info service 
  rpc BlockNumber(google.protobuf.Empty) returns (HeightResponse) {};
  rpc BlockByHash(BlockByHashRequest) returns (BlockByHashResponse) {};
  rpc BlockByNumber(BlockByNumberRequest) returns (BlockByNumberResponse) {};
  rpc BlockTransactionCountByHash(BlockTransactionCountByHashRequest) returns (BlockTransactionCountByHashResponse) {};
  rpc BlockTransactionCountByNumber(BlockTransactionCountByNumberRequest) returns (BlockTransactionCountByNumberResponse) {};
  rpc UncleCountByHash(UncleCountByHashRequest) returns (UncleCountByHashResponse) {};
  rpc UncleCountByNumber(UncleCountByNumberRequest) returns (UncleCountByNumberResponse) {};
  rpc UncleByBlockHashAndIndex(UncleByBlockHashAndIndexRequest) returns (UncleByBlockHashAndIndexResponse) {};
  rpc UncleByBlockNumberAndIndex(UncleByBlockNumberAndIndexRequest) returns (UncleByBlockNumberAndIndexResponse) {};
  
  // compiler
  rpc Compilers(CompilersRequest) returns (CompilersResponse) {};
  rpc CompileSolidity(CompileSolidityRequest) returns (CompileSolidityResponse) {};
  rpc CompileLLL(CompileLLLRequest) returns (CompileLLLResponse) {};
  rpc CompileSerpent(CompileSerpentRequest) returns (CompileSerpentResponse) {};

  // transaction info service 
  rpc EstimateGas(EstimateGasRequest) returns (EstimateGasResponse) {};
  rpc TransactionByHash(TransactionByHashRequest) returns (TransactionByHashResponse) {};
  rpc TransactionByBlockHashAndIndex(TransactionByBlockHashAndIndexRequest) returns (TransactionByBlockHashAndIndexResponse) {};
  rpc TransactionByBlockNumberAndIndex(TransactionByBlockNumberAndIndexRequest) returns (TransactionByBlockNumberAndIndexResponse) {};
  rpc TransactionReceipt(TransactionReceiptRequest) returns (TransactionReceiptResponse) {};


  // account info service
  rpc Balance(BalanceRequest) returns (BalanceResponse) {};
  rpc Storage(StorageRequest) returns (StorageResponse) {};
  rpc Nonce(NonceRequest) returns (NonceResponse) {};
  rpc RepeatedNonce(RepeatedNonceRequest) returns (RepeatedNonceResponse) {};
  rpc TransactionCount(TransactionCountRequest) returns (TransactionCountResponse) {};
  rpc GetCode(GetCodeRequest) returns (GetCodeResponse) {};
  rpc Sign(SignRequest) returns (SignResponse) {};
  rpc SignTransaction(SignTransactionRequest) returns (SignTransactionResponse) {};
  rpc SendTransaction(SendTransactionRequest) returns (SendTransactionResponse) {};
  rpc SendRawTransaction(SendRawTransactionRequest) returns (SendRawTransactionResponse) {};
  rpc Call(CallRequest) returns (CallResponse) {};

  // filter
  rpc NewFilter(NewFilterRequest) returns (NewFilterResponse) {};
  rpc NewBlockFilter(google.protobuf.Empty) returns (NewBlockFilterResponse) {};
  rpc PendingTransactionFilter(google.protobuf.Empty) returns (PendingTransactionFilterResponse) {};
  rpc UninstallFilter(UninstallFilterRequest) returns (UninstallFilterResponse) {};
  rpc FilterChanges(FilterChangesRequest) returns (FilterChangesResponse) {};
  rpc FilterLogs(FilterLogsRequest) returns (FilterLogsResponse) {};
  rpc Logs(LogsRequest) returns (LogsResponse) {};


  // consensus info service

}