bdledger-apis/bdchain/api/tx_ledger.proto

43 lines
1011 B
Protocol Buffer
Raw Normal View History

2018-09-06 10:36:06 +00:00
syntax = "proto3";
2018-09-07 02:28:07 +00:00
2018-09-09 11:13:05 +00:00
package bdchain.api;
2018-09-06 10:36:06 +00:00
2018-09-07 05:22:14 +00:00
import "google/protobuf/empty.proto";
2018-09-09 11:13:05 +00:00
import "bdchain/api/common.proto";
2018-09-07 04:53:15 +00:00
2018-09-11 13:50:23 +00:00
option go_package = "bdchain/api/tx_ledger";
2018-09-11 14:07:37 +00:00
option java_package = "bdchain.api.proto";
2018-09-11 13:56:25 +00:00
option java_outer_classname = "TransactionLedgerProto";
2018-09-07 04:53:15 +00:00
option java_multiple_files = true;
2018-09-06 10:36:06 +00:00
2018-09-09 11:13:05 +00:00
service TransactionLedger {
2018-09-06 10:36:06 +00:00
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
2018-09-07 05:22:14 +00:00
rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse);
2018-09-09 11:13:05 +00:00
rpc SendTransaction (SendTransactionRequest) returns (SendTransactionResponse);
2018-09-06 10:36:06 +00:00
}
message CreateLedgerRequest {
string name = 1;
}
message CreateLedgerResponse {
bool ok = 1;
}
message GetLedgersResponse {
repeated string ledgers = 1;
}
2018-09-09 11:13:05 +00:00
message SendTransactionRequest {
2018-09-06 10:36:06 +00:00
string ledger = 1;
2018-09-09 11:13:05 +00:00
message Transaction {
TransactionType type = 1;
2018-09-06 10:36:06 +00:00
bytes from = 2;
bytes to = 3;
bytes data = 4;
}
2018-09-09 11:13:05 +00:00
Transaction transaction = 2;
2018-09-06 10:36:06 +00:00
}
2018-09-09 11:13:05 +00:00
message SendTransactionResponse {
2018-09-06 10:36:06 +00:00
bytes hash = 1;
}