docs: update
This commit is contained in:
parent
9d77f65495
commit
345adce56e
129
docs/apis.html
129
docs/apis.html
@ -471,7 +471,7 @@
|
|||||||
<td>transaction_hashes</td>
|
<td>transaction_hashes</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td>repeated</td>
|
<td>repeated</td>
|
||||||
<td><p>20字节的交易哈希的数组,或为空 </p></td>
|
<td><p>20字节的事务哈希的数组,或为空 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -865,7 +865,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>name</td>
|
<td>name</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -889,7 +889,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ok</td>
|
<td>ok</td>
|
||||||
<td><a href="#bool">bool</a></td>
|
<td><a href="#bool">bool</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>是否创建成功 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -913,7 +913,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledgers</td>
|
<td>ledgers</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td>repeated</td>
|
<td>repeated</td>
|
||||||
<td><p> </p></td>
|
<td><p>帐本名称列表 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -937,14 +937,14 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>transaction</td>
|
<td>transaction</td>
|
||||||
<td><a href="#bdware.bdledger.api.SendTransactionRequest.Transaction">SendTransactionRequest.Transaction</a></td>
|
<td><a href="#bdware.bdledger.api.SendTransactionRequest.Transaction">SendTransactionRequest.Transaction</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务信息 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -968,35 +968,35 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>type</td>
|
<td>type</td>
|
||||||
<td><a href="#bdware.bdledger.api.TransactionType">TransactionType</a></td>
|
<td><a href="#bdware.bdledger.api.TransactionType">TransactionType</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务类型,目前仅支持通用数据记录,即type为RECORD (0) </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>from</td>
|
<td>from</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>任意20字节的地址,用于区分使用同一节点的事务发起者 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>nonce</td>
|
<td>nonce</td>
|
||||||
<td><a href="#uint64">uint64</a></td>
|
<td><a href="#uint64">uint64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>正整数,同一from每个nonce应只使用一次,防止重复的事务(可以每次发送事务+1) </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>to</td>
|
<td>to</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>对于通用数据记录不需传递,无意义 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>data</td>
|
<td>data</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务数据内容,字节数组 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1020,7 +1020,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>hash</td>
|
<td>hash</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务哈希 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1139,7 +1139,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
|
|
||||||
|
|
||||||
<h3 id="bdware.bdledger.api.BlockFilter">BlockFilter</h3>
|
<h3 id="bdware.bdledger.api.BlockFilter">BlockFilter</h3>
|
||||||
<p></p>
|
<p>暂不支持</p>
|
||||||
|
|
||||||
|
|
||||||
<table class="field-table">
|
<table class="field-table">
|
||||||
@ -1183,35 +1183,35 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>start_timestamp</td>
|
<td>start_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>查询范围开始时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>end_timestamp</td>
|
<td>end_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>查询范围结束时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>filters</td>
|
<td>filters</td>
|
||||||
<td><a href="#bdware.bdledger.api.BlockFilter">BlockFilter</a></td>
|
<td><a href="#bdware.bdledger.api.BlockFilter">BlockFilter</a></td>
|
||||||
<td>repeated</td>
|
<td>repeated</td>
|
||||||
<td><p> </p></td>
|
<td><p>暂不支持 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>include_transactions</td>
|
<td>include_transactions</td>
|
||||||
<td><a href="#bdware.bdledger.api.IncludeTransactions">IncludeTransactions</a></td>
|
<td><a href="#bdware.bdledger.api.IncludeTransactions">IncludeTransactions</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>包含事务信息详细程度 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1235,21 +1235,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>count</td>
|
<td>count</td>
|
||||||
<td><a href="#uint64">uint64</a></td>
|
<td><a href="#uint64">uint64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>区块数量 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>start_timestamp</td>
|
<td>start_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>end_timestamp</td>
|
<td>end_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1273,21 +1273,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>count</td>
|
<td>count</td>
|
||||||
<td><a href="#uint64">uint64</a></td>
|
<td><a href="#uint64">uint64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务数量 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>start_timestamp</td>
|
<td>start_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>end_timestamp</td>
|
<td>end_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1311,21 +1311,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>hash</td>
|
<td>hash</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>区块哈希 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>full_transactions</td>
|
<td>full_transactions</td>
|
||||||
<td><a href="#bool">bool</a></td>
|
<td><a href="#bool">bool</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>是否返回完整事务列表,而不是事务哈希列表 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1349,7 +1349,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>block</td>
|
<td>block</td>
|
||||||
<td><a href="#bdware.bdledger.api.Block">Block</a></td>
|
<td><a href="#bdware.bdledger.api.Block">Block</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>区块信息 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1373,21 +1373,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>blocks</td>
|
<td>blocks</td>
|
||||||
<td><a href="#bdware.bdledger.api.Block">Block</a></td>
|
<td><a href="#bdware.bdledger.api.Block">Block</a></td>
|
||||||
<td>repeated</td>
|
<td>repeated</td>
|
||||||
<td><p> </p></td>
|
<td><p>区块列表 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>start_timestamp</td>
|
<td>start_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>end_timestamp</td>
|
<td>end_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1411,21 +1411,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>block_hash</td>
|
<td>block_hash</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务所属区块哈希 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>index</td>
|
<td>index</td>
|
||||||
<td><a href="#uint32">uint32</a></td>
|
<td><a href="#uint32">uint32</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务在区块中的位置 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1449,7 +1449,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>transaction</td>
|
<td>transaction</td>
|
||||||
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
|
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务信息 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1473,14 +1473,14 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>hash</td>
|
<td>hash</td>
|
||||||
<td><a href="#bytes">bytes</a></td>
|
<td><a href="#bytes">bytes</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务哈希 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1504,7 +1504,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>transaction</td>
|
<td>transaction</td>
|
||||||
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
|
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>事务信息 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1528,21 +1528,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>transactions</td>
|
<td>transactions</td>
|
||||||
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
|
<td><a href="#bdware.bdledger.api.Transaction">Transaction</a></td>
|
||||||
<td>repeated</td>
|
<td>repeated</td>
|
||||||
<td><p> </p></td>
|
<td><p>事务列表 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>start_timestamp</td>
|
<td>start_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围开始时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>end_timestamp</td>
|
<td>end_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>本次查询有效的查询范围结束时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1566,21 +1566,21 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>count</td>
|
<td>count</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>查询区块数量 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>include_transactions</td>
|
<td>include_transactions</td>
|
||||||
<td><a href="#bdware.bdledger.api.IncludeTransactions">IncludeTransactions</a></td>
|
<td><a href="#bdware.bdledger.api.IncludeTransactions">IncludeTransactions</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>包含事务信息详细程度 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1649,28 +1649,28 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td>ledger</td>
|
<td>ledger</td>
|
||||||
<td><a href="#string">string</a></td>
|
<td><a href="#string">string</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>账本名称 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>start_timestamp</td>
|
<td>start_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p>required </p></td>
|
<td><p>查询范围开始时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>end_timestamp</td>
|
<td>end_timestamp</td>
|
||||||
<td><a href="#int64">int64</a></td>
|
<td><a href="#int64">int64</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td><p> </p></td>
|
<td><p>查询范围结束时间戳 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>filters</td>
|
<td>filters</td>
|
||||||
<td><a href="#bdware.bdledger.api.TransactionFilter">TransactionFilter</a></td>
|
<td><a href="#bdware.bdledger.api.TransactionFilter">TransactionFilter</a></td>
|
||||||
<td>repeated</td>
|
<td>repeated</td>
|
||||||
<td><p> </p></td>
|
<td><p>暂不支持 </p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1683,7 +1683,7 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
|
|
||||||
|
|
||||||
<h3 id="bdware.bdledger.api.IncludeTransactions">IncludeTransactions</h3>
|
<h3 id="bdware.bdledger.api.IncludeTransactions">IncludeTransactions</h3>
|
||||||
<p></p>
|
<p>包含事务信息详细程度</p>
|
||||||
<table class="enum-table">
|
<table class="enum-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
|
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
|
||||||
@ -1693,19 +1693,19 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<tr>
|
<tr>
|
||||||
<td>NONE</td>
|
<td>NONE</td>
|
||||||
<td>0</td>
|
<td>0</td>
|
||||||
<td><p>不包含交易数据</p></td>
|
<td><p>不包含事务数据</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>HASH</td>
|
<td>HASH</td>
|
||||||
<td>1</td>
|
<td>1</td>
|
||||||
<td><p>包含交易哈希列表</p></td>
|
<td><p>包含事务哈希列表</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>FULL</td>
|
<td>FULL</td>
|
||||||
<td>2</td>
|
<td>2</td>
|
||||||
<td><p>包含完整交易列表</p></td>
|
<td><p>包含完整事务列表</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -1737,7 +1737,15 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
|||||||
<td><a href="#bdware.bdledger.api.GetBlocksResponse">GetBlocksResponse</a></td>
|
<td><a href="#bdware.bdledger.api.GetBlocksResponse">GetBlocksResponse</a></td>
|
||||||
<td><p>Get blocks in a timestamp range
|
<td><p>Get blocks in a timestamp range
|
||||||
查询时间范围内的区块
|
查询时间范围内的区块
|
||||||
start_timestamp is required</p></td>
|
Requirement: start_timestamp <= end_timestamp
|
||||||
|
If neither 'start_timestamp' nor 'end_timestamp' is specified, then 'start_timestamp' will be set to
|
||||||
|
the genesis block's timestamp, and 'end_timestamp' will be set to (start_timestamp + query.maxDuration)
|
||||||
|
(query.maxDuration is specified in go-bdledger's config file).
|
||||||
|
If only 'end_timestamp' is not specified, or (end_timestamp - start_timestamp > query.maxDuration),
|
||||||
|
then 'end_timestamp' will be set to (start_timestamp + query.maxDuration).
|
||||||
|
If only 'start_timestamp' is not specified, then 'start_timestamp' will be set to (end_timestamp - query.maxDuration).
|
||||||
|
In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,
|
||||||
|
and 'end_timestamp' will never be later than the current timestamp when the node process the query request.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<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.BlocksRequest">BlocksRequest</a></td>
|
||||||
<td><a href="#bdware.bdledger.api.CountBlocksResponse">CountBlocksResponse</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
|
<td><p>Count all blocks in a ledger, or blocks in a timestamp range
|
||||||
查询帐本中的所有区块数量,或时间范围内的区块数量</p></td>
|
查询帐本中的所有区块数量,或时间范围内的区块数量
|
||||||
|
Requirement: start_timestamp <= end_timestamp
|
||||||
|
If neither 'start_timestamp' nor 'end_timestamp' is specified, then count all blocks in the specified ledger.
|
||||||
|
If only 'end_timestamp' is not specified, then count all blocks with timestamps later than 'start_timestamp'.
|
||||||
|
If only 'start_timestamp' is not specified, then count all blocks with timestamps earlier than 'end_timestamp'.
|
||||||
|
In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp,
|
||||||
|
and 'end_timestamp' will never be later than the current timestamp when the node process the query request.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<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.RecentBlocksRequest">RecentBlocksRequest</a></td>
|
||||||
<td><a href="#bdware.bdledger.api.GetBlocksResponse">GetBlocksResponse</a></td>
|
<td><a href="#bdware.bdledger.api.GetBlocksResponse">GetBlocksResponse</a></td>
|
||||||
<td><p>Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
|
<td><p>Get recent 'count' blocks (Only support IncludeTransactions=NONE for now)
|
||||||
查询最新的n个区块</p></td>
|
查询最新的 'count' 个区块</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<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.TransactionsRequest">TransactionsRequest</a></td>
|
||||||
<td><a href="#bdware.bdledger.api.GetTransactionsResponse">GetTransactionsResponse</a></td>
|
<td><a href="#bdware.bdledger.api.GetTransactionsResponse">GetTransactionsResponse</a></td>
|
||||||
<td><p>Get transactions in a timestamp range
|
<td><p>Get transactions in a timestamp range
|
||||||
查询时间范围内的事务</p></td>
|
查询时间范围内的事务
|
||||||
|
'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
@ -1786,7 +1801,7 @@ start_timestamp is required</p></td>
|
|||||||
<td><a href="#bdware.bdledger.api.CountTransactionsResponse">CountTransactionsResponse</a></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
|
<td><p>Count all transactions in a ledger, or transactions in a timestamp range
|
||||||
查询帐本中的所有事务数量,或时间范围内的事务数量
|
查询帐本中的所有事务数量,或时间范围内的事务数量
|
||||||
start_timestamp is required</p></td>
|
'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'.</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
314
docs/apis.json
314
docs/apis.json
File diff suppressed because it is too large
Load Diff
114
docs/apis.md
114
docs/apis.md
@ -83,7 +83,7 @@
|
|||||||
| transaction_count | [uint32](#uint32) | | 区块包含的事务数量 |
|
| transaction_count | [uint32](#uint32) | | 区块包含的事务数量 |
|
||||||
| transactions_root | [bytes](#bytes) | | 区块的事务默克尔树根 |
|
| transactions_root | [bytes](#bytes) | | 区块的事务默克尔树根 |
|
||||||
| transactions | [Transaction](#bdware.bdledger.api.Transaction) | repeated | 事务对象的数组,或为空 |
|
| transactions | [Transaction](#bdware.bdledger.api.Transaction) | repeated | 事务对象的数组,或为空 |
|
||||||
| transaction_hashes | [bytes](#bytes) | repeated | 20字节的交易哈希的数组,或为空 |
|
| transaction_hashes | [bytes](#bytes) | repeated | 20字节的事务哈希的数组,或为空 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| name | [string](#string) | | |
|
| name | [string](#string) | | 账本名称 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -262,7 +262,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ok | [bool](#bool) | | |
|
| ok | [bool](#bool) | | 是否创建成功 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -277,7 +277,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledgers | [string](#string) | repeated | |
|
| ledgers | [string](#string) | repeated | 帐本名称列表 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -292,8 +292,8 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| transaction | [SendTransactionRequest.Transaction](#bdware.bdledger.api.SendTransactionRequest.Transaction) | | |
|
| transaction | [SendTransactionRequest.Transaction](#bdware.bdledger.api.SendTransactionRequest.Transaction) | | 事务信息 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -308,11 +308,11 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| type | [TransactionType](#bdware.bdledger.api.TransactionType) | | |
|
| type | [TransactionType](#bdware.bdledger.api.TransactionType) | | 事务类型,目前仅支持通用数据记录,即type为RECORD (0) |
|
||||||
| from | [bytes](#bytes) | | |
|
| from | [bytes](#bytes) | | 任意20字节的地址,用于区分使用同一节点的事务发起者 |
|
||||||
| nonce | [uint64](#uint64) | | |
|
| nonce | [uint64](#uint64) | | 正整数,同一from每个nonce应只使用一次,防止重复的事务(可以每次发送事务+1) |
|
||||||
| to | [bytes](#bytes) | | |
|
| to | [bytes](#bytes) | | 对于通用数据记录不需传递,无意义 |
|
||||||
| data | [bytes](#bytes) | | |
|
| data | [bytes](#bytes) | | 事务数据内容,字节数组 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| hash | [bytes](#bytes) | | |
|
| hash | [bytes](#bytes) | | 事务哈希 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -406,7 +406,7 @@ A message type used to describe a single invalid field.
|
|||||||
<a name="bdware.bdledger.api.BlockFilter"></a>
|
<a name="bdware.bdledger.api.BlockFilter"></a>
|
||||||
|
|
||||||
### BlockFilter
|
### BlockFilter
|
||||||
|
暂不支持
|
||||||
|
|
||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
@ -427,11 +427,11 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| start_timestamp | [int64](#int64) | | |
|
| start_timestamp | [int64](#int64) | | 查询范围开始时间戳 |
|
||||||
| end_timestamp | [int64](#int64) | | |
|
| end_timestamp | [int64](#int64) | | 查询范围结束时间戳 |
|
||||||
| filters | [BlockFilter](#bdware.bdledger.api.BlockFilter) | repeated | |
|
| filters | [BlockFilter](#bdware.bdledger.api.BlockFilter) | repeated | 暂不支持 |
|
||||||
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | |
|
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | 包含事务信息详细程度 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -446,9 +446,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| count | [uint64](#uint64) | | |
|
| count | [uint64](#uint64) | | 区块数量 |
|
||||||
| start_timestamp | [int64](#int64) | | |
|
| start_timestamp | [int64](#int64) | | 本次查询有效的查询范围开始时间戳 |
|
||||||
| end_timestamp | [int64](#int64) | | |
|
| end_timestamp | [int64](#int64) | | 本次查询有效的查询范围结束时间戳 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -463,9 +463,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| count | [uint64](#uint64) | | |
|
| count | [uint64](#uint64) | | 事务数量 |
|
||||||
| start_timestamp | [int64](#int64) | | |
|
| start_timestamp | [int64](#int64) | | 本次查询有效的查询范围开始时间戳 |
|
||||||
| end_timestamp | [int64](#int64) | | |
|
| end_timestamp | [int64](#int64) | | 本次查询有效的查询范围结束时间戳 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -480,9 +480,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| hash | [bytes](#bytes) | | |
|
| hash | [bytes](#bytes) | | 区块哈希 |
|
||||||
| full_transactions | [bool](#bool) | | |
|
| full_transactions | [bool](#bool) | | 是否返回完整事务列表,而不是事务哈希列表 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -497,7 +497,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| block | [Block](#bdware.bdledger.api.Block) | | |
|
| block | [Block](#bdware.bdledger.api.Block) | | 区块信息 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -512,9 +512,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| blocks | [Block](#bdware.bdledger.api.Block) | repeated | |
|
| blocks | [Block](#bdware.bdledger.api.Block) | repeated | 区块列表 |
|
||||||
| start_timestamp | [int64](#int64) | | |
|
| start_timestamp | [int64](#int64) | | 本次查询有效的查询范围开始时间戳 |
|
||||||
| end_timestamp | [int64](#int64) | | |
|
| end_timestamp | [int64](#int64) | | 本次查询有效的查询范围结束时间戳 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -529,9 +529,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| block_hash | [bytes](#bytes) | | |
|
| block_hash | [bytes](#bytes) | | 事务所属区块哈希 |
|
||||||
| index | [uint32](#uint32) | | |
|
| index | [uint32](#uint32) | | 事务在区块中的位置 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| transaction | [Transaction](#bdware.bdledger.api.Transaction) | | |
|
| transaction | [Transaction](#bdware.bdledger.api.Transaction) | | 事务信息 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -561,8 +561,8 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| hash | [bytes](#bytes) | | |
|
| hash | [bytes](#bytes) | | 事务哈希 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -577,7 +577,7 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| transaction | [Transaction](#bdware.bdledger.api.Transaction) | | |
|
| transaction | [Transaction](#bdware.bdledger.api.Transaction) | | 事务信息 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -592,9 +592,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| transactions | [Transaction](#bdware.bdledger.api.Transaction) | repeated | |
|
| transactions | [Transaction](#bdware.bdledger.api.Transaction) | repeated | 事务列表 |
|
||||||
| start_timestamp | [int64](#int64) | | |
|
| start_timestamp | [int64](#int64) | | 本次查询有效的查询范围开始时间戳 |
|
||||||
| end_timestamp | [int64](#int64) | | |
|
| end_timestamp | [int64](#int64) | | 本次查询有效的查询范围结束时间戳 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -609,9 +609,9 @@ A message type used to describe a single invalid field.
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| count | [int64](#int64) | | |
|
| count | [int64](#int64) | | 查询区块数量 |
|
||||||
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | |
|
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | 包含事务信息详细程度 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -644,10 +644,10 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
|||||||
|
|
||||||
| Field | Type | Label | Description |
|
| Field | Type | Label | Description |
|
||||||
| ----- | ---- | ----- | ----------- |
|
| ----- | ---- | ----- | ----------- |
|
||||||
| ledger | [string](#string) | | |
|
| ledger | [string](#string) | | 账本名称 |
|
||||||
| start_timestamp | [int64](#int64) | | required |
|
| start_timestamp | [int64](#int64) | | 查询范围开始时间戳 |
|
||||||
| end_timestamp | [int64](#int64) | | |
|
| end_timestamp | [int64](#int64) | | 查询范围结束时间戳 |
|
||||||
| filters | [TransactionFilter](#bdware.bdledger.api.TransactionFilter) | repeated | |
|
| filters | [TransactionFilter](#bdware.bdledger.api.TransactionFilter) | repeated | 暂不支持 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -659,13 +659,13 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
|||||||
<a name="bdware.bdledger.api.IncludeTransactions"></a>
|
<a name="bdware.bdledger.api.IncludeTransactions"></a>
|
||||||
|
|
||||||
### IncludeTransactions
|
### IncludeTransactions
|
||||||
|
包含事务信息详细程度
|
||||||
|
|
||||||
| Name | Number | Description |
|
| Name | Number | Description |
|
||||||
| ---- | ------ | ----------- |
|
| ---- | ------ | ----------- |
|
||||||
| NONE | 0 | 不包含交易数据 |
|
| NONE | 0 | 不包含事务数据 |
|
||||||
| HASH | 1 | 包含交易哈希列表 |
|
| HASH | 1 | 包含事务哈希列表 |
|
||||||
| FULL | 2 | 包含完整交易列表 |
|
| FULL | 2 | 包含完整事务列表 |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -681,13 +681,13 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
|||||||
| Method Name | Request Type | Response Type | Description |
|
| Method Name | Request Type | Response Type | Description |
|
||||||
| ----------- | ------------ | ------------- | ------------|
|
| ----------- | ------------ | ------------- | ------------|
|
||||||
| GetBlockByHash | [GetBlockByHashRequest](#bdware.bdledger.api.GetBlockByHashRequest) | [GetBlockByHashResponse](#bdware.bdledger.api.GetBlockByHashResponse) | Get a block identified by its hash 查询哈希所指定的区块 |
|
| GetBlockByHash | [GetBlockByHashRequest](#bdware.bdledger.api.GetBlockByHashRequest) | [GetBlockByHashResponse](#bdware.bdledger.api.GetBlockByHashResponse) | Get a block identified by its hash 查询哈希所指定的区块 |
|
||||||
| GetBlocks | [BlocksRequest](#bdware.bdledger.api.BlocksRequest) | [GetBlocksResponse](#bdware.bdledger.api.GetBlocksResponse) | Get blocks in a timestamp range 查询时间范围内的区块 start_timestamp is required |
|
| GetBlocks | [BlocksRequest](#bdware.bdledger.api.BlocksRequest) | [GetBlocksResponse](#bdware.bdledger.api.GetBlocksResponse) | Get blocks in a timestamp range 查询时间范围内的区块 Requirement: start_timestamp <= end_timestamp If neither 'start_timestamp' nor 'end_timestamp' is specified, then 'start_timestamp' will be set to the genesis block's timestamp, and 'end_timestamp' will be set to (start_timestamp + query.maxDuration) (query.maxDuration is specified in go-bdledger's config file). If only 'end_timestamp' is not specified, or (end_timestamp - start_timestamp > query.maxDuration), then 'end_timestamp' will be set to (start_timestamp + query.maxDuration). If only 'start_timestamp' is not specified, then 'start_timestamp' will be set to (end_timestamp - query.maxDuration). In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp, and 'end_timestamp' will never be later than the current timestamp when the node process the query request. |
|
||||||
| CountBlocks | [BlocksRequest](#bdware.bdledger.api.BlocksRequest) | [CountBlocksResponse](#bdware.bdledger.api.CountBlocksResponse) | Count all blocks in a ledger, or blocks in a timestamp range 查询帐本中的所有区块数量,或时间范围内的区块数量 |
|
| CountBlocks | [BlocksRequest](#bdware.bdledger.api.BlocksRequest) | [CountBlocksResponse](#bdware.bdledger.api.CountBlocksResponse) | Count all blocks in a ledger, or blocks in a timestamp range 查询帐本中的所有区块数量,或时间范围内的区块数量 Requirement: start_timestamp <= end_timestamp If neither 'start_timestamp' nor 'end_timestamp' is specified, then count all blocks in the specified ledger. If only 'end_timestamp' is not specified, then count all blocks with timestamps later than 'start_timestamp'. If only 'start_timestamp' is not specified, then count all blocks with timestamps earlier than 'end_timestamp'. In all cases, 'start_timestamp' will never be earlier than the genesis block's timestamp, and 'end_timestamp' will never be later than the current timestamp when the node process the query request. |
|
||||||
| GetRecentBlocks | [RecentBlocksRequest](#bdware.bdledger.api.RecentBlocksRequest) | [GetBlocksResponse](#bdware.bdledger.api.GetBlocksResponse) | Get recent 'count' blocks (Only support IncludeTransactions=NONE for now) 查询最新的n个区块 |
|
| GetRecentBlocks | [RecentBlocksRequest](#bdware.bdledger.api.RecentBlocksRequest) | [GetBlocksResponse](#bdware.bdledger.api.GetBlocksResponse) | Get recent 'count' blocks (Only support IncludeTransactions=NONE for now) 查询最新的 'count' 个区块 |
|
||||||
| GetTransactionByHash | [GetTransactionByHashRequest](#bdware.bdledger.api.GetTransactionByHashRequest) | [GetTransactionByHashResponse](#bdware.bdledger.api.GetTransactionByHashResponse) | Get a transaction identified by its hash 查询哈希所指定的事务 |
|
| GetTransactionByHash | [GetTransactionByHashRequest](#bdware.bdledger.api.GetTransactionByHashRequest) | [GetTransactionByHashResponse](#bdware.bdledger.api.GetTransactionByHashResponse) | Get a transaction identified by its hash 查询哈希所指定的事务 |
|
||||||
| GetTransactionByBlockHashAndIndex | [GetTransactionByBlockHashAndIndexRequest](#bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest) | [GetTransactionByBlockHashAndIndexResponse](#bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse) | Get a transaction identified by hash of the block it belongs to and its index inside the block 查询所在区块的哈希与其在区块中的index所指定的事务 |
|
| GetTransactionByBlockHashAndIndex | [GetTransactionByBlockHashAndIndexRequest](#bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest) | [GetTransactionByBlockHashAndIndexResponse](#bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse) | Get a transaction identified by hash of the block it belongs to and its index inside the block 查询所在区块的哈希与其在区块中的index所指定的事务 |
|
||||||
| GetTransactions | [TransactionsRequest](#bdware.bdledger.api.TransactionsRequest) | [GetTransactionsResponse](#bdware.bdledger.api.GetTransactionsResponse) | Get transactions in a timestamp range 查询时间范围内的事务 |
|
| GetTransactions | [TransactionsRequest](#bdware.bdledger.api.TransactionsRequest) | [GetTransactionsResponse](#bdware.bdledger.api.GetTransactionsResponse) | Get transactions in a timestamp range 查询时间范围内的事务 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'GetBlocks'. |
|
||||||
| CountTransactions | [TransactionsRequest](#bdware.bdledger.api.TransactionsRequest) | [CountTransactionsResponse](#bdware.bdledger.api.CountTransactionsResponse) | Count all transactions in a ledger, or transactions in a timestamp range 查询帐本中的所有事务数量,或时间范围内的事务数量 start_timestamp is required |
|
| CountTransactions | [TransactionsRequest](#bdware.bdledger.api.TransactionsRequest) | [CountTransactionsResponse](#bdware.bdledger.api.CountTransactionsResponse) | Count all transactions in a ledger, or transactions in a timestamp range 查询帐本中的所有事务数量,或时间范围内的事务数量 'start_timestamp' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,4 +96,3 @@ Install Go then run:
|
|||||||
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
|
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
|
||||||
./scripts/gen [-a, --async] docs
|
./scripts/gen [-a, --async] docs
|
||||||
```
|
```
|
||||||
|
|
@ -41,7 +41,7 @@ message Block {
|
|||||||
uint32 transaction_count = 8; // 区块包含的事务数量
|
uint32 transaction_count = 8; // 区块包含的事务数量
|
||||||
bytes transactions_root = 9; // 区块的事务默克尔树根
|
bytes transactions_root = 9; // 区块的事务默克尔树根
|
||||||
repeated Transaction transactions = 10; // 事务对象的数组,或为空
|
repeated Transaction transactions = 10; // 事务对象的数组,或为空
|
||||||
repeated bytes transaction_hashes = 11; // 20字节的交易哈希的数组,或为空
|
repeated bytes transaction_hashes = 11; // 20字节的事务哈希的数组,或为空
|
||||||
}
|
}
|
||||||
|
|
||||||
message Contract {
|
message Contract {
|
||||||
|
@ -28,27 +28,27 @@ service Ledger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message CreateLedgerRequest {
|
message CreateLedgerRequest {
|
||||||
string name = 1;
|
string name = 1; // 账本名称
|
||||||
}
|
}
|
||||||
message CreateLedgerResponse {
|
message CreateLedgerResponse {
|
||||||
bool ok = 1;
|
bool ok = 1; // 是否创建成功
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetLedgersResponse {
|
message GetLedgersResponse {
|
||||||
repeated string ledgers = 1;
|
repeated string ledgers = 1; // 帐本名称列表
|
||||||
}
|
}
|
||||||
|
|
||||||
message SendTransactionRequest {
|
message SendTransactionRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
message Transaction {
|
message Transaction {
|
||||||
TransactionType type = 1;
|
TransactionType type = 1; // 事务类型,目前仅支持通用数据记录,即type为RECORD (0)
|
||||||
bytes from = 2;
|
bytes from = 2; // 任意20字节的地址,用于区分使用同一节点的事务发起者
|
||||||
uint64 nonce = 3;
|
uint64 nonce = 3; // 正整数,同一from每个nonce应只使用一次,防止重复的事务(可以每次发送事务+1)
|
||||||
bytes to = 4;
|
bytes to = 4; // 对于通用数据记录不需传递,无意义
|
||||||
bytes data = 5;
|
bytes data = 5; // 事务数据内容,字节数组
|
||||||
}
|
}
|
||||||
Transaction transaction = 2;
|
Transaction transaction = 2; // 事务信息
|
||||||
}
|
}
|
||||||
message SendTransactionResponse {
|
message SendTransactionResponse {
|
||||||
bytes hash = 1;
|
bytes hash = 1; // 事务哈希
|
||||||
}
|
}
|
||||||
|
@ -68,12 +68,18 @@ service Query {
|
|||||||
rpc CountTransactions (TransactionsRequest) returns (CountTransactionsResponse);
|
rpc CountTransactions (TransactionsRequest) returns (CountTransactionsResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 包含事务信息详细程度
|
||||||
|
*/
|
||||||
enum IncludeTransactions {
|
enum IncludeTransactions {
|
||||||
NONE = 0; // 不包含交易数据
|
NONE = 0; // 不包含事务数据
|
||||||
HASH = 1; // 包含交易哈希列表
|
HASH = 1; // 包含事务哈希列表
|
||||||
FULL = 2; // 包含完整交易列表
|
FULL = 2; // 包含完整事务列表
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂不支持
|
||||||
|
*/
|
||||||
message BlockFilter {
|
message BlockFilter {
|
||||||
bytes hash = 1;
|
bytes hash = 1;
|
||||||
int64 timestamp = 2;
|
int64 timestamp = 2;
|
||||||
@ -88,68 +94,68 @@ message TransactionFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message GetBlockByHashRequest {
|
message GetBlockByHashRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
bytes hash = 2;
|
bytes hash = 2; // 区块哈希
|
||||||
bool full_transactions = 3;
|
bool full_transactions = 3; // 是否返回完整事务列表,而不是事务哈希列表
|
||||||
}
|
}
|
||||||
message GetBlockByHashResponse {
|
message GetBlockByHashResponse {
|
||||||
Block block = 1;
|
Block block = 1; // 区块信息
|
||||||
}
|
}
|
||||||
|
|
||||||
message BlocksRequest {
|
message BlocksRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
int64 start_timestamp = 2;
|
int64 start_timestamp = 2; // 查询范围开始时间戳
|
||||||
int64 end_timestamp = 3;
|
int64 end_timestamp = 3; // 查询范围结束时间戳
|
||||||
repeated BlockFilter filters = 4;
|
repeated BlockFilter filters = 4; // 暂不支持
|
||||||
IncludeTransactions include_transactions = 5;
|
IncludeTransactions include_transactions = 5; // 包含事务信息详细程度
|
||||||
}
|
}
|
||||||
message GetBlocksResponse {
|
message GetBlocksResponse {
|
||||||
repeated Block blocks = 1;
|
repeated Block blocks = 1; // 区块列表
|
||||||
int64 start_timestamp = 2;
|
int64 start_timestamp = 2; // 本次查询有效的查询范围开始时间戳
|
||||||
int64 end_timestamp = 3;
|
int64 end_timestamp = 3; // 本次查询有效的查询范围结束时间戳
|
||||||
}
|
}
|
||||||
message CountBlocksResponse {
|
message CountBlocksResponse {
|
||||||
uint64 count = 1;
|
uint64 count = 1; // 区块数量
|
||||||
int64 start_timestamp = 2;
|
int64 start_timestamp = 2; // 本次查询有效的查询范围开始时间戳
|
||||||
int64 end_timestamp = 3;
|
int64 end_timestamp = 3; // 本次查询有效的查询范围结束时间戳
|
||||||
}
|
}
|
||||||
|
|
||||||
message RecentBlocksRequest {
|
message RecentBlocksRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
int64 count = 2;
|
int64 count = 2; // 查询区块数量
|
||||||
IncludeTransactions include_transactions = 3;
|
IncludeTransactions include_transactions = 3; // 包含事务信息详细程度
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetTransactionByHashRequest {
|
message GetTransactionByHashRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
bytes hash = 2;
|
bytes hash = 2; // 事务哈希
|
||||||
}
|
}
|
||||||
message GetTransactionByHashResponse {
|
message GetTransactionByHashResponse {
|
||||||
Transaction transaction = 1;
|
Transaction transaction = 1; // 事务信息
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetTransactionByBlockHashAndIndexRequest {
|
message GetTransactionByBlockHashAndIndexRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
bytes block_hash = 2;
|
bytes block_hash = 2; // 事务所属区块哈希
|
||||||
uint32 index = 3;
|
uint32 index = 3; // 事务在区块中的位置
|
||||||
}
|
}
|
||||||
message GetTransactionByBlockHashAndIndexResponse {
|
message GetTransactionByBlockHashAndIndexResponse {
|
||||||
Transaction transaction = 1;
|
Transaction transaction = 1; // 事务信息
|
||||||
}
|
}
|
||||||
|
|
||||||
message TransactionsRequest {
|
message TransactionsRequest {
|
||||||
string ledger = 1;
|
string ledger = 1; // 账本名称
|
||||||
int64 start_timestamp = 2; // required
|
int64 start_timestamp = 2; // 查询范围开始时间戳
|
||||||
int64 end_timestamp = 3;
|
int64 end_timestamp = 3; // 查询范围结束时间戳
|
||||||
repeated TransactionFilter filters = 4;
|
repeated TransactionFilter filters = 4; // 暂不支持
|
||||||
}
|
}
|
||||||
message GetTransactionsResponse {
|
message GetTransactionsResponse {
|
||||||
repeated Transaction transactions = 1;
|
repeated Transaction transactions = 1; // 事务列表
|
||||||
int64 start_timestamp = 2;
|
int64 start_timestamp = 2; // 本次查询有效的查询范围开始时间戳
|
||||||
int64 end_timestamp = 3;
|
int64 end_timestamp = 3; // 本次查询有效的查询范围结束时间戳
|
||||||
}
|
}
|
||||||
message CountTransactionsResponse {
|
message CountTransactionsResponse {
|
||||||
uint64 count = 1;
|
uint64 count = 1; // 事务数量
|
||||||
int64 start_timestamp = 2;
|
int64 start_timestamp = 2; // 本次查询有效的查询范围开始时间戳
|
||||||
int64 end_timestamp = 3;
|
int64 end_timestamp = 3; // 本次查询有效的查询范围结束时间戳
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ for %%A in (%*) do (
|
|||||||
@echo off
|
@echo off
|
||||||
)
|
)
|
||||||
if "%%A"=="docs" (
|
if "%%A"=="docs" (
|
||||||
set plugin=protoc-gen-ts
|
set plugin=protoc-gen-doc
|
||||||
where /q !plugin! || echo missing !plugin! && exit /B
|
where /q !plugin! || echo missing !plugin! && exit /B
|
||||||
set out=..\..\docs
|
set out=..\..\docs
|
||||||
if not exist !out! mkdir !out!
|
if not exist !out! mkdir !out!
|
||||||
|
@ -93,7 +93,7 @@ for aug in $@; do
|
|||||||
$async_tag
|
$async_tag
|
||||||
fi
|
fi
|
||||||
if [ $aug == "docs" ]; then
|
if [ $aug == "docs" ]; then
|
||||||
plugin=protoc-gen-ts
|
plugin=protoc-gen-doc
|
||||||
plugin_path=$(which $plugin)
|
plugin_path=$(which $plugin)
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "missing plugin: $plugin" && exit
|
echo "missing plugin: $plugin" && exit
|
||||||
|
Loading…
Reference in New Issue
Block a user