docs: update

This commit is contained in:
Nex Zhu
2021-07-20 09:36:57 +08:00
parent 9d77f65495
commit 345adce56e
9 changed files with 444 additions and 224 deletions

View File

@@ -471,7 +471,7 @@
<td>transaction_hashes</td>
<td><a href="#bytes">bytes</a></td>
<td>repeated</td>
<td><p>20字节的交易哈希的数组,或为空 </p></td>
<td><p>20字节的事务哈希的数组,或为空 </p></td>
</tr>
</tbody>
@@ -865,7 +865,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
</tbody>
@@ -889,7 +889,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ok</td>
<td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
<td><p>是否创建成功 </p></td>
</tr>
</tbody>
@@ -913,7 +913,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledgers</td>
<td><a href="#string">string</a></td>
<td>repeated</td>
<td><p> </p></td>
<td><p>帐本名称列表 </p></td>
</tr>
</tbody>
@@ -937,14 +937,14 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>transaction</td>
<td><a href="#bdware.bdledger.api.SendTransactionRequest.Transaction">SendTransactionRequest.Transaction</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务信息 </p></td>
</tr>
</tbody>
@@ -968,35 +968,35 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>type</td>
<td><a href="#bdware.bdledger.api.TransactionType">TransactionType</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务类型目前仅支持通用数据记录即type为RECORD (0) </p></td>
</tr>
<tr>
<td>from</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>任意20字节的地址用于区分使用同一节点的事务发起者 </p></td>
</tr>
<tr>
<td>nonce</td>
<td><a href="#uint64">uint64</a></td>
<td></td>
<td><p> </p></td>
<td><p>正整数同一from每个nonce应只使用一次防止重复的事务可以每次发送事务&#43;1 </p></td>
</tr>
<tr>
<td>to</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>对于通用数据记录不需传递,无意义 </p></td>
</tr>
<tr>
<td>data</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务数据内容,字节数组 </p></td>
</tr>
</tbody>
@@ -1020,7 +1020,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>hash</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务哈希 </p></td>
</tr>
</tbody>
@@ -1139,7 +1139,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<h3 id="bdware.bdledger.api.BlockFilter">BlockFilter</h3>
<p></p>
<p>暂不支持</p>
<table class="field-table">
@@ -1183,35 +1183,35 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>start_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>查询范围开始时间戳 </p></td>
</tr>
<tr>
<td>end_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>查询范围结束时间戳 </p></td>
</tr>
<tr>
<td>filters</td>
<td><a href="#bdware.bdledger.api.BlockFilter">BlockFilter</a></td>
<td>repeated</td>
<td><p> </p></td>
<td><p>暂不支持 </p></td>
</tr>
<tr>
<td>include_transactions</td>
<td><a href="#bdware.bdledger.api.IncludeTransactions">IncludeTransactions</a></td>
<td></td>
<td><p> </p></td>
<td><p>包含事务信息详细程度 </p></td>
</tr>
</tbody>
@@ -1235,21 +1235,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>count</td>
<td><a href="#uint64">uint64</a></td>
<td></td>
<td><p> </p></td>
<td><p>区块数量 </p></td>
</tr>
<tr>
<td>start_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
</tr>
<tr>
<td>end_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
</tr>
</tbody>
@@ -1273,21 +1273,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>count</td>
<td><a href="#uint64">uint64</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务数量 </p></td>
</tr>
<tr>
<td>start_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
</tr>
<tr>
<td>end_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
</tr>
</tbody>
@@ -1311,21 +1311,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>hash</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>区块哈希 </p></td>
</tr>
<tr>
<td>full_transactions</td>
<td><a href="#bool">bool</a></td>
<td></td>
<td><p> </p></td>
<td><p>是否返回完整事务列表,而不是事务哈希列表 </p></td>
</tr>
</tbody>
@@ -1349,7 +1349,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>block</td>
<td><a href="#bdware.bdledger.api.Block">Block</a></td>
<td></td>
<td><p> </p></td>
<td><p>区块信息 </p></td>
</tr>
</tbody>
@@ -1373,21 +1373,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>blocks</td>
<td><a href="#bdware.bdledger.api.Block">Block</a></td>
<td>repeated</td>
<td><p> </p></td>
<td><p>区块列表 </p></td>
</tr>
<tr>
<td>start_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
</tr>
<tr>
<td>end_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
</tr>
</tbody>
@@ -1411,21 +1411,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>block_hash</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务所属区块哈希 </p></td>
</tr>
<tr>
<td>index</td>
<td><a href="#uint32">uint32</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务在区块中的位置 </p></td>
</tr>
</tbody>
@@ -1449,7 +1449,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>transaction</td>
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务信息 </p></td>
</tr>
</tbody>
@@ -1473,14 +1473,14 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>hash</td>
<td><a href="#bytes">bytes</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务哈希 </p></td>
</tr>
</tbody>
@@ -1504,7 +1504,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>transaction</td>
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
<td></td>
<td><p> </p></td>
<td><p>事务信息 </p></td>
</tr>
</tbody>
@@ -1528,21 +1528,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>transactions</td>
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
<td>repeated</td>
<td><p> </p></td>
<td><p>事务列表 </p></td>
</tr>
<tr>
<td>start_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
</tr>
<tr>
<td>end_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
</tr>
</tbody>
@@ -1566,21 +1566,21 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>count</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>查询区块数量 </p></td>
</tr>
<tr>
<td>include_transactions</td>
<td><a href="#bdware.bdledger.api.IncludeTransactions">IncludeTransactions</a></td>
<td></td>
<td><p> </p></td>
<td><p>包含事务信息详细程度 </p></td>
</tr>
</tbody>
@@ -1649,28 +1649,28 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td>ledger</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p> </p></td>
<td><p>账本名称 </p></td>
</tr>
<tr>
<td>start_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p>required </p></td>
<td><p>查询范围开始时间戳 </p></td>
</tr>
<tr>
<td>end_timestamp</td>
<td><a href="#int64">int64</a></td>
<td></td>
<td><p> </p></td>
<td><p>查询范围结束时间戳 </p></td>
</tr>
<tr>
<td>filters</td>
<td><a href="#bdware.bdledger.api.TransactionFilter">TransactionFilter</a></td>
<td>repeated</td>
<td><p> </p></td>
<td><p>暂不支持 </p></td>
</tr>
</tbody>
@@ -1683,7 +1683,7 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<h3 id="bdware.bdledger.api.IncludeTransactions">IncludeTransactions</h3>
<p></p>
<p>包含事务信息详细程度</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -1693,19 +1693,19 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<tr>
<td>NONE</td>
<td>0</td>
<td><p>不包含交易数据</p></td>
<td><p>不包含事务数据</p></td>
</tr>
<tr>
<td>HASH</td>
<td>1</td>
<td><p>包含交易哈希列表</p></td>
<td><p>包含事务哈希列表</p></td>
</tr>
<tr>
<td>FULL</td>
<td>2</td>
<td><p>包含完整交易列表</p></td>
<td><p>包含完整事务列表</p></td>
</tr>
</tbody>
@@ -1737,7 +1737,15 @@ field. E.g., &#34;field_violations.field&#34; would identify this field. </p></t
<td><a href="#bdware.bdledger.api.GetBlocksResponse">GetBlocksResponse</a></td>
<td><p>Get blocks in a timestamp range
查询时间范围内的区块
start_timestamp is required</p></td>
Requirement: start_timestamp &lt;= end_timestamp
If neither &#39;start_timestamp&#39; nor &#39;end_timestamp&#39; is specified, then &#39;start_timestamp&#39; will be set to
the genesis block&#39;s timestamp, and &#39;end_timestamp&#39; will be set to (start_timestamp &#43; query.maxDuration)
(query.maxDuration is specified in go-bdledger&#39;s config file).
If only &#39;end_timestamp&#39; is not specified, or (end_timestamp - start_timestamp &gt; query.maxDuration),
then &#39;end_timestamp&#39; will be set to (start_timestamp &#43; query.maxDuration).
If only &#39;start_timestamp&#39; is not specified, then &#39;start_timestamp&#39; will be set to (end_timestamp - query.maxDuration).
In all cases, &#39;start_timestamp&#39; will never be earlier than the genesis block&#39;s timestamp,
and &#39;end_timestamp&#39; will never be later than the current timestamp when the node process the query request.</p></td>
</tr>
<tr>
@@ -1745,7 +1753,13 @@ start_timestamp is required</p></td>
<td><a href="#bdware.bdledger.api.BlocksRequest">BlocksRequest</a></td>
<td><a href="#bdware.bdledger.api.CountBlocksResponse">CountBlocksResponse</a></td>
<td><p>Count all blocks in a ledger, or blocks in a timestamp range
查询帐本中的所有区块数量,或时间范围内的区块数量</p></td>
查询帐本中的所有区块数量,或时间范围内的区块数量
Requirement: start_timestamp &lt;= end_timestamp
If neither &#39;start_timestamp&#39; nor &#39;end_timestamp&#39; is specified, then count all blocks in the specified ledger.
If only &#39;end_timestamp&#39; is not specified, then count all blocks with timestamps later than &#39;start_timestamp&#39;.
If only &#39;start_timestamp&#39; is not specified, then count all blocks with timestamps earlier than &#39;end_timestamp&#39;.
In all cases, &#39;start_timestamp&#39; will never be earlier than the genesis block&#39;s timestamp,
and &#39;end_timestamp&#39; will never be later than the current timestamp when the node process the query request.</p></td>
</tr>
<tr>
@@ -1753,7 +1767,7 @@ start_timestamp is required</p></td>
<td><a href="#bdware.bdledger.api.RecentBlocksRequest">RecentBlocksRequest</a></td>
<td><a href="#bdware.bdledger.api.GetBlocksResponse">GetBlocksResponse</a></td>
<td><p>Get recent &#39;count&#39; blocks (Only support IncludeTransactions=NONE for now)
查询最新的n个区块</p></td>
查询最新的 &#39;count&#39; 个区块</p></td>
</tr>
<tr>
@@ -1777,7 +1791,8 @@ start_timestamp is required</p></td>
<td><a href="#bdware.bdledger.api.TransactionsRequest">TransactionsRequest</a></td>
<td><a href="#bdware.bdledger.api.GetTransactionsResponse">GetTransactionsResponse</a></td>
<td><p>Get transactions in a timestamp range
查询时间范围内的事务</p></td>
查询时间范围内的事务
&#39;start_timestamp&#39; and &#39;end_timestamp&#39; follow the same requirements and rules as in &#39;GetBlocks&#39;.</p></td>
</tr>
<tr>
@@ -1786,7 +1801,7 @@ start_timestamp is required</p></td>
<td><a href="#bdware.bdledger.api.CountTransactionsResponse">CountTransactionsResponse</a></td>
<td><p>Count all transactions in a ledger, or transactions in a timestamp range
查询帐本中的所有事务数量,或时间范围内的事务数量
start_timestamp is required</p></td>
&#39;start_timestamp&#39; and &#39;end_timestamp&#39; follow the same requirements and rules as in &#39;CountBlocks&#39;.</p></td>
</tr>
</tbody>