From 0d8ac0a76dea6b9d2f12704e138d0617b94f4a31 Mon Sep 17 00:00:00 2001 From: Nex Zhu <4370605+NexZhu@users.noreply.github.com> Date: Thu, 22 Jul 2021 22:25:57 +0800 Subject: [PATCH] docs: wip, add English docs --- grpc/pb/bdware/bdledger/api/ledger.proto | 24 ++++++++++++++++++------ grpc/pb/bdware/bdledger/api/node.proto | 4 +++- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/grpc/pb/bdware/bdledger/api/ledger.proto b/grpc/pb/bdware/bdledger/api/ledger.proto index 56a9a42..7244fe4 100644 --- a/grpc/pb/bdware/bdledger/api/ledger.proto +++ b/grpc/pb/bdware/bdledger/api/ledger.proto @@ -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; } diff --git a/grpc/pb/bdware/bdledger/api/node.proto b/grpc/pb/bdware/bdledger/api/node.proto index 6d49bce..4c05ea8 100644 --- a/grpc/pb/bdware/bdledger/api/node.proto +++ b/grpc/pb/bdware/bdledger/api/node.proto @@ -17,5 +17,7 @@ service Node { } message ClientVersionResponse { - string version = 1; // 节点客户端版本 + // Client version + // 节点客户端版本 + string version = 1; }