bdledger-apis/bg/api/tx_ledger.proto

43 lines
945 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-07 04:53:15 +00:00
package bg.api;
2018-09-06 10:36:06 +00:00
2018-09-07 05:22:14 +00:00
import "google/protobuf/empty.proto";
2018-09-07 04:53:15 +00:00
import "bg/api/common.proto";
option go_package = "bg/api/protobuf/tx_ledger";
option java_package = "bg.protobuf";
option java_outer_classname = "TxLedgerProto";
option java_multiple_files = true;
2018-09-06 10:36:06 +00:00
service TxLedger {
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
2018-09-07 05:22:14 +00:00
rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse);
2018-09-06 10:36:06 +00:00
rpc SendMessage (SendMessageRequest) returns (SendMessageResponse);
}
message CreateLedgerRequest {
string name = 1;
}
message CreateLedgerResponse {
bool ok = 1;
}
message GetLedgersResponse {
repeated string ledgers = 1;
}
message SendMessageRequest {
string ledger = 1;
message Message {
MessageType type = 1;
bytes from = 2;
bytes to = 3;
bytes data = 4;
}
Message message = 2;
}
message SendMessageResponse {
bytes hash = 1;
}