38 lines
753 B
Protocol Buffer
38 lines
753 B
Protocol Buffer
syntax = "proto3";
|
|
package api;
|
|
|
|
import "common.proto";
|
|
|
|
service TxLedger {
|
|
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
|
|
rpc GetLedgers (GetLedgersRequest) returns (GetLedgersResponse);
|
|
rpc SendMessage (SendMessageRequest) returns (SendMessageResponse);
|
|
}
|
|
|
|
message CreateLedgerRequest {
|
|
string name = 1;
|
|
}
|
|
message CreateLedgerResponse {
|
|
bool ok = 1;
|
|
}
|
|
|
|
message GetLedgersRequest {
|
|
}
|
|
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;
|
|
}
|