bdledger-apis/bg/api/tx_ledger.proto
2018-09-07 13:22:25 +08:00

43 lines
945 B
Protocol Buffer

syntax = "proto3";
package bg.api;
import "google/protobuf/empty.proto";
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;
service TxLedger {
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse);
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;
}