34 lines
618 B
Protocol Buffer
34 lines
618 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package blockchain;
|
|
|
|
service BlockchainService {
|
|
rpc GetBalance (BalanceRequest) returns (BalanceResponse);
|
|
rpc SendTransaction (TransactionRequest) returns (TransactionResponse);
|
|
rpc GetChainId (ChainIdRequest) returns (ChainIdResponse);
|
|
}
|
|
|
|
message BalanceRequest {
|
|
string address = 1;
|
|
}
|
|
|
|
message BalanceResponse {
|
|
string balance = 1;
|
|
}
|
|
|
|
message TransactionRequest {
|
|
string from = 1;
|
|
string to = 2;
|
|
string amount = 3;
|
|
}
|
|
|
|
message TransactionResponse {
|
|
string transactionHash = 1;
|
|
}
|
|
|
|
message ChainIdRequest {}
|
|
|
|
message ChainIdResponse {
|
|
string chainId = 1;
|
|
}
|