docs: wip, add English docs

This commit is contained in:
Nex Zhu
2021-07-22 22:25:57 +08:00
parent a0fab83cef
commit 0d8ac0a76d
2 changed files with 21 additions and 7 deletions

View File

@@ -28,18 +28,26 @@ service Ledger {
}
message CreateLedgerRequest {
string name = 1; // 账本名称
// Ledger name
// 账本名称
string name = 1;
}
message CreateLedgerResponse {
bool ok = 1; // 是否创建成功
// Boolean value indicating if the ledger is successfully created
// 是否创建成功
bool ok = 1;
}
message GetLedgersResponse {
repeated string ledgers = 1; // 帐本名称列表
// List of ledger names
// 帐本名称列表
repeated string ledgers = 1;
}
message SendTransactionRequest {
string ledger = 1; // 账本名称
// Ledger name
// 账本名称
string ledger = 1;
message Transaction {
TransactionType type = 1; // 事务类型目前仅支持通用数据记录即type为RECORD (0)
bytes from = 2; // 任意20字节的地址用于区分使用同一节点的事务发起者
@@ -47,8 +55,12 @@ message SendTransactionRequest {
bytes to = 4; // 对于通用数据记录不需传递,无意义
bytes data = 5; // 事务数据内容,字节数组
}
Transaction transaction = 2; // 事务信息
// Transaction info
// 事务信息
Transaction transaction = 2;
}
message SendTransactionResponse {
bytes hash = 1; // 事务哈希
// Hash of the created transaction
// 事务哈希
bytes hash = 1;
}

View File

@@ -17,5 +17,7 @@ service Node {
}
message ClientVersionResponse {
string version = 1; // 节点客户端版本
// Client version
// 节点客户端版本
string version = 1;
}