update API docs
This commit is contained in:
29
docs/apis.md
29
docs/apis.md
@@ -56,10 +56,11 @@
|
||||
- [GetTransactionByHashRequest](#bdware.bdledger.api.GetTransactionByHashRequest)
|
||||
- [GetTransactionByHashResponse](#bdware.bdledger.api.GetTransactionByHashResponse)
|
||||
- [GetTransactionsResponse](#bdware.bdledger.api.GetTransactionsResponse)
|
||||
- [RecentBlocksRequest](#bdware.bdledger.api.RecentBlocksRequest)
|
||||
- [TransactionFilter](#bdware.bdledger.api.TransactionFilter)
|
||||
- [TransactionsRequest](#bdware.bdledger.api.TransactionsRequest)
|
||||
|
||||
- [BlocksRequest.IncludeTransactions](#bdware.bdledger.api.BlocksRequest.IncludeTransactions)
|
||||
- [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions)
|
||||
|
||||
|
||||
- [Query](#bdware.bdledger.api.Query)
|
||||
@@ -138,6 +139,7 @@
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| block_hash | [bytes](#bytes) | | 事务所在的区块的哈希,当事务处于待确认状态时为`null` |
|
||||
| block_timestamp | [int64](#int64) | | 事务所在的区块产生时的 UNIX 时间戳,单位为秒 |
|
||||
| index | [uint32](#uint32) | | 事务在区块中的位置 index,当事务处于待确认状态时为`null` |
|
||||
| hash | [bytes](#bytes) | | 事务的哈希 |
|
||||
| type | [TransactionType](#bdware.bdledger.api.TransactionType) | | 事务类型 |
|
||||
@@ -327,6 +329,7 @@ A message type used to describe a single invalid field.
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| type | [TransactionType](#bdware.bdledger.api.TransactionType) | | |
|
||||
| from | [bytes](#bytes) | | |
|
||||
| nonce | [uint64](#uint64) | | |
|
||||
| to | [bytes](#bytes) | | |
|
||||
| data | [bytes](#bytes) | | |
|
||||
|
||||
@@ -447,7 +450,7 @@ A message type used to describe a single invalid field.
|
||||
| start_timestamp | [int64](#int64) | | |
|
||||
| end_timestamp | [int64](#int64) | | |
|
||||
| filters | [BlockFilter](#bdware.bdledger.api.BlockFilter) | repeated | |
|
||||
| include_transactions | [BlocksRequest.IncludeTransactions](#bdware.bdledger.api.BlocksRequest.IncludeTransactions) | | |
|
||||
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | |
|
||||
|
||||
|
||||
|
||||
@@ -617,6 +620,23 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.RecentBlocksRequest"></a>
|
||||
|
||||
### RecentBlocksRequest
|
||||
|
||||
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| ledger | [string](#string) | | |
|
||||
| count | [int64](#int64) | | |
|
||||
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.TransactionFilter"></a>
|
||||
|
||||
### TransactionFilter
|
||||
@@ -655,9 +675,9 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.BlocksRequest.IncludeTransactions"></a>
|
||||
<a name="bdware.bdledger.api.IncludeTransactions"></a>
|
||||
|
||||
### BlocksRequest.IncludeTransactions
|
||||
### IncludeTransactions
|
||||
|
||||
|
||||
| Name | Number | Description |
|
||||
@@ -682,6 +702,7 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
||||
| 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 |
|
||||
| CountBlocks | [BlocksRequest](#bdware.bdledger.api.BlocksRequest) | [CountBlocksResponse](#bdware.bdledger.api.CountBlocksResponse) | Count all blocks in a ledger, or blocks in a timestamp range 查询帐本中的所有区块数量,或时间范围内的区块数量 |
|
||||
| GetRecentBlocks | [RecentBlocksRequest](#bdware.bdledger.api.RecentBlocksRequest) | [GetBlocksResponse](#bdware.bdledger.api.GetBlocksResponse) | Get recent 'count' blocks (Only support IncludeTransactions=NONE for now) 查询最新的n个区块 |
|
||||
| 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所指定的事务 |
|
||||
| GetTransactions | [TransactionsRequest](#bdware.bdledger.api.TransactionsRequest) | [GetTransactionsResponse](#bdware.bdledger.api.GetTransactionsResponse) | Get transactions in a timestamp range 查询时间范围内的事务 |
|
||||
|
||||
Reference in New Issue
Block a user