chore: update protobuf + gRPC toolchains
This commit is contained in:
parent
b74f3fe89c
commit
d607cb6a7b
@ -474,6 +474,20 @@
|
||||
<td><p>20字节的事务哈希的数组,或为空 </p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>creator_signature</td>
|
||||
<td><a href="#bytes">bytes</a></td>
|
||||
<td></td>
|
||||
<td><p>产块者签名 </p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>witness_signatures</td>
|
||||
<td><a href="#bytes">bytes</a></td>
|
||||
<td>repeated</td>
|
||||
<td><p>见证者签名 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -865,7 +879,8 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
||||
<td>name</td>
|
||||
<td><a href="#string">string</a></td>
|
||||
<td></td>
|
||||
<td><p>账本名称 </p></td>
|
||||
<td><p>Ledger name
|
||||
账本名称 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -889,7 +904,8 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
||||
<td>ok</td>
|
||||
<td><a href="#bool">bool</a></td>
|
||||
<td></td>
|
||||
<td><p>是否创建成功 </p></td>
|
||||
<td><p>Boolean value indicating if the ledger is successfully created
|
||||
是否创建成功 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -913,7 +929,8 @@ field. E.g., "field_violations.field" 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>List of ledger names
|
||||
帐本名称列表 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -937,14 +954,16 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
||||
<td>ledger</td>
|
||||
<td><a href="#string">string</a></td>
|
||||
<td></td>
|
||||
<td><p>账本名称 </p></td>
|
||||
<td><p>Ledger name
|
||||
账本名称 </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>Transaction info
|
||||
事务信息 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -1020,7 +1039,8 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
||||
<td>hash</td>
|
||||
<td><a href="#bytes">bytes</a></td>
|
||||
<td></td>
|
||||
<td><p>事务哈希 </p></td>
|
||||
<td><p>Hash of the created transaction
|
||||
事务哈希 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -1094,7 +1114,8 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
||||
<td>version</td>
|
||||
<td><a href="#string">string</a></td>
|
||||
<td></td>
|
||||
<td><p>节点客户端版本 </p></td>
|
||||
<td><p>Client version
|
||||
节点客户端版本 </p></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@ -1569,6 +1590,13 @@ field. E.g., "field_violations.field" would identify this field. </p></t
|
||||
<td><p>账本名称 </p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>offset</td>
|
||||
<td><a href="#int64">int64</a></td>
|
||||
<td></td>
|
||||
<td><p>起始值 </p></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>count</td>
|
||||
<td><a href="#int64">int64</a></td>
|
||||
|
@ -249,6 +249,30 @@
|
||||
"isoneof": false,
|
||||
"oneofdecl": "",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "creator_signature",
|
||||
"description": "产块者签名",
|
||||
"label": "",
|
||||
"type": "bytes",
|
||||
"longType": "bytes",
|
||||
"fullType": "bytes",
|
||||
"ismap": false,
|
||||
"isoneof": false,
|
||||
"oneofdecl": "",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "witness_signatures",
|
||||
"description": "见证者签名",
|
||||
"label": "repeated",
|
||||
"type": "bytes",
|
||||
"longType": "bytes",
|
||||
"fullType": "bytes",
|
||||
"ismap": false,
|
||||
"isoneof": false,
|
||||
"oneofdecl": "",
|
||||
"defaultValue": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -604,7 +628,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"name": "name",
|
||||
"description": "账本名称",
|
||||
"description": "Ledger name\n账本名称",
|
||||
"label": "",
|
||||
"type": "string",
|
||||
"longType": "string",
|
||||
@ -628,7 +652,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"name": "ok",
|
||||
"description": "是否创建成功",
|
||||
"description": "Boolean value indicating if the ledger is successfully created\n是否创建成功",
|
||||
"label": "",
|
||||
"type": "bool",
|
||||
"longType": "bool",
|
||||
@ -652,7 +676,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"name": "ledgers",
|
||||
"description": "帐本名称列表",
|
||||
"description": "List of ledger names\n帐本名称列表",
|
||||
"label": "repeated",
|
||||
"type": "string",
|
||||
"longType": "string",
|
||||
@ -676,7 +700,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"name": "ledger",
|
||||
"description": "账本名称",
|
||||
"description": "Ledger name\n账本名称",
|
||||
"label": "",
|
||||
"type": "string",
|
||||
"longType": "string",
|
||||
@ -688,7 +712,7 @@
|
||||
},
|
||||
{
|
||||
"name": "transaction",
|
||||
"description": "事务信息",
|
||||
"description": "Transaction info\n事务信息",
|
||||
"label": "",
|
||||
"type": "Transaction",
|
||||
"longType": "SendTransactionRequest.Transaction",
|
||||
@ -784,7 +808,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"name": "hash",
|
||||
"description": "事务哈希",
|
||||
"description": "Hash of the created transaction\n事务哈希",
|
||||
"label": "",
|
||||
"type": "bytes",
|
||||
"longType": "bytes",
|
||||
@ -867,7 +891,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"name": "version",
|
||||
"description": "节点客户端版本",
|
||||
"description": "Client version\n节点客户端版本",
|
||||
"label": "",
|
||||
"type": "string",
|
||||
"longType": "string",
|
||||
@ -1464,6 +1488,18 @@
|
||||
"oneofdecl": "",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "offset",
|
||||
"description": "起始值",
|
||||
"label": "",
|
||||
"type": "int64",
|
||||
"longType": "int64",
|
||||
"fullType": "int64",
|
||||
"ismap": false,
|
||||
"isoneof": false,
|
||||
"oneofdecl": "",
|
||||
"defaultValue": ""
|
||||
},
|
||||
{
|
||||
"name": "count",
|
||||
"description": "查询区块数量",
|
||||
|
227
docs/apis.md
227
docs/apis.md
@ -3,69 +3,69 @@
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [bdware/bdledger/api/common.proto](#bdware/bdledger/api/common.proto)
|
||||
- [Block](#bdware.bdledger.api.Block)
|
||||
- [Contract](#bdware.bdledger.api.Contract)
|
||||
- [Transaction](#bdware.bdledger.api.Transaction)
|
||||
- [bdware/bdledger/api/common.proto](#bdware_bdledger_api_common-proto)
|
||||
- [Block](#bdware-bdledger-api-Block)
|
||||
- [Contract](#bdware-bdledger-api-Contract)
|
||||
- [Transaction](#bdware-bdledger-api-Transaction)
|
||||
|
||||
- [Contract.ContractUnitRequestType](#bdware.bdledger.api.Contract.ContractUnitRequestType)
|
||||
- [TransactionType](#bdware.bdledger.api.TransactionType)
|
||||
- [Contract.ContractUnitRequestType](#bdware-bdledger-api-Contract-ContractUnitRequestType)
|
||||
- [TransactionType](#bdware-bdledger-api-TransactionType)
|
||||
|
||||
- [bdware/bdledger/api/error_details.proto](#bdware/bdledger/api/error_details.proto)
|
||||
- [InvalidArgument](#bdware.bdledger.api.InvalidArgument)
|
||||
- [InvalidArgument.FieldViolation](#bdware.bdledger.api.InvalidArgument.FieldViolation)
|
||||
- [bdware/bdledger/api/error_details.proto](#bdware_bdledger_api_error_details-proto)
|
||||
- [InvalidArgument](#bdware-bdledger-api-InvalidArgument)
|
||||
- [InvalidArgument.FieldViolation](#bdware-bdledger-api-InvalidArgument-FieldViolation)
|
||||
|
||||
- [bdware/bdledger/api/ledger.proto](#bdware/bdledger/api/ledger.proto)
|
||||
- [CreateLedgerRequest](#bdware.bdledger.api.CreateLedgerRequest)
|
||||
- [CreateLedgerResponse](#bdware.bdledger.api.CreateLedgerResponse)
|
||||
- [GetLedgersResponse](#bdware.bdledger.api.GetLedgersResponse)
|
||||
- [SendTransactionRequest](#bdware.bdledger.api.SendTransactionRequest)
|
||||
- [SendTransactionRequest.Transaction](#bdware.bdledger.api.SendTransactionRequest.Transaction)
|
||||
- [SendTransactionResponse](#bdware.bdledger.api.SendTransactionResponse)
|
||||
- [bdware/bdledger/api/ledger.proto](#bdware_bdledger_api_ledger-proto)
|
||||
- [CreateLedgerRequest](#bdware-bdledger-api-CreateLedgerRequest)
|
||||
- [CreateLedgerResponse](#bdware-bdledger-api-CreateLedgerResponse)
|
||||
- [GetLedgersResponse](#bdware-bdledger-api-GetLedgersResponse)
|
||||
- [SendTransactionRequest](#bdware-bdledger-api-SendTransactionRequest)
|
||||
- [SendTransactionRequest.Transaction](#bdware-bdledger-api-SendTransactionRequest-Transaction)
|
||||
- [SendTransactionResponse](#bdware-bdledger-api-SendTransactionResponse)
|
||||
|
||||
- [Ledger](#bdware.bdledger.api.Ledger)
|
||||
- [Ledger](#bdware-bdledger-api-Ledger)
|
||||
|
||||
- [bdware/bdledger/api/node.proto](#bdware/bdledger/api/node.proto)
|
||||
- [ClientVersionResponse](#bdware.bdledger.api.ClientVersionResponse)
|
||||
- [bdware/bdledger/api/node.proto](#bdware_bdledger_api_node-proto)
|
||||
- [ClientVersionResponse](#bdware-bdledger-api-ClientVersionResponse)
|
||||
|
||||
- [Node](#bdware.bdledger.api.Node)
|
||||
- [Node](#bdware-bdledger-api-Node)
|
||||
|
||||
- [bdware/bdledger/api/query.proto](#bdware/bdledger/api/query.proto)
|
||||
- [BlockFilter](#bdware.bdledger.api.BlockFilter)
|
||||
- [BlocksRequest](#bdware.bdledger.api.BlocksRequest)
|
||||
- [CountBlocksResponse](#bdware.bdledger.api.CountBlocksResponse)
|
||||
- [CountTransactionsResponse](#bdware.bdledger.api.CountTransactionsResponse)
|
||||
- [GetBlockByHashRequest](#bdware.bdledger.api.GetBlockByHashRequest)
|
||||
- [GetBlockByHashResponse](#bdware.bdledger.api.GetBlockByHashResponse)
|
||||
- [GetBlocksResponse](#bdware.bdledger.api.GetBlocksResponse)
|
||||
- [GetTransactionByBlockHashAndIndexRequest](#bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest)
|
||||
- [GetTransactionByBlockHashAndIndexResponse](#bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse)
|
||||
- [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)
|
||||
- [bdware/bdledger/api/query.proto](#bdware_bdledger_api_query-proto)
|
||||
- [BlockFilter](#bdware-bdledger-api-BlockFilter)
|
||||
- [BlocksRequest](#bdware-bdledger-api-BlocksRequest)
|
||||
- [CountBlocksResponse](#bdware-bdledger-api-CountBlocksResponse)
|
||||
- [CountTransactionsResponse](#bdware-bdledger-api-CountTransactionsResponse)
|
||||
- [GetBlockByHashRequest](#bdware-bdledger-api-GetBlockByHashRequest)
|
||||
- [GetBlockByHashResponse](#bdware-bdledger-api-GetBlockByHashResponse)
|
||||
- [GetBlocksResponse](#bdware-bdledger-api-GetBlocksResponse)
|
||||
- [GetTransactionByBlockHashAndIndexRequest](#bdware-bdledger-api-GetTransactionByBlockHashAndIndexRequest)
|
||||
- [GetTransactionByBlockHashAndIndexResponse](#bdware-bdledger-api-GetTransactionByBlockHashAndIndexResponse)
|
||||
- [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)
|
||||
|
||||
- [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions)
|
||||
- [IncludeTransactions](#bdware-bdledger-api-IncludeTransactions)
|
||||
|
||||
- [Query](#bdware.bdledger.api.Query)
|
||||
- [Query](#bdware-bdledger-api-Query)
|
||||
|
||||
- [google/protobuf/empty.proto](#google/protobuf/empty.proto)
|
||||
- [Empty](#google.protobuf.Empty)
|
||||
- [google/protobuf/empty.proto](#google_protobuf_empty-proto)
|
||||
- [Empty](#google-protobuf-Empty)
|
||||
|
||||
- [Scalar Value Types](#scalar-value-types)
|
||||
|
||||
|
||||
|
||||
<a name="bdware/bdledger/api/common.proto"></a>
|
||||
<a name="bdware_bdledger_api_common-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## bdware/bdledger/api/common.proto
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Block"></a>
|
||||
<a name="bdware-bdledger-api-Block"></a>
|
||||
|
||||
### Block
|
||||
|
||||
@ -82,15 +82,17 @@
|
||||
| size | [uint64](#uint64) | | 区块大小的字节数 |
|
||||
| transaction_count | [uint32](#uint32) | | 区块包含的事务数量 |
|
||||
| transactions_root | [bytes](#bytes) | | 区块的事务默克尔树根 |
|
||||
| transactions | [Transaction](#bdware.bdledger.api.Transaction) | repeated | 事务对象的数组,或为空 |
|
||||
| transactions | [Transaction](#bdware-bdledger-api-Transaction) | repeated | 事务对象的数组,或为空 |
|
||||
| transaction_hashes | [bytes](#bytes) | repeated | 20字节的事务哈希的数组,或为空 |
|
||||
| creator_signature | [bytes](#bytes) | | 产块者签名 |
|
||||
| witness_signatures | [bytes](#bytes) | repeated | 见证者签名 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Contract"></a>
|
||||
<a name="bdware-bdledger-api-Contract"></a>
|
||||
|
||||
### Contract
|
||||
|
||||
@ -111,7 +113,7 @@
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Transaction"></a>
|
||||
<a name="bdware-bdledger-api-Transaction"></a>
|
||||
|
||||
### Transaction
|
||||
|
||||
@ -123,7 +125,7 @@
|
||||
| block_timestamp | [int64](#int64) | | 事务所在的区块产生时的 UNIX 时间戳,单位为秒 |
|
||||
| index | [uint32](#uint32) | | 事务在区块中的位置 index,当事务处于待确认状态时为`null` |
|
||||
| hash | [bytes](#bytes) | | 事务的哈希 |
|
||||
| type | [TransactionType](#bdware.bdledger.api.TransactionType) | | 事务类型 |
|
||||
| type | [TransactionType](#bdware-bdledger-api-TransactionType) | | 事务类型 |
|
||||
| from | [bytes](#bytes) | | 发送账户地址 |
|
||||
| nonce | [uint64](#uint64) | | 这条事务之前发送者所发送的事务数量 |
|
||||
| to | [bytes](#bytes) | | 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 |
|
||||
@ -139,7 +141,7 @@
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Contract.ContractUnitRequestType"></a>
|
||||
<a name="bdware-bdledger-api-Contract-ContractUnitRequestType"></a>
|
||||
|
||||
### Contract.ContractUnitRequestType
|
||||
|
||||
@ -160,7 +162,7 @@
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.TransactionType"></a>
|
||||
<a name="bdware-bdledger-api-TransactionType"></a>
|
||||
|
||||
### TransactionType
|
||||
事务类型
|
||||
@ -182,14 +184,14 @@
|
||||
|
||||
|
||||
|
||||
<a name="bdware/bdledger/api/error_details.proto"></a>
|
||||
<a name="bdware_bdledger_api_error_details-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## bdware/bdledger/api/error_details.proto
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.InvalidArgument"></a>
|
||||
<a name="bdware-bdledger-api-InvalidArgument"></a>
|
||||
|
||||
### InvalidArgument
|
||||
InvalidArgument indicates client specified an invalid argument.
|
||||
@ -200,14 +202,14 @@ that are problematic regardless of the state of the system
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| field_violations | [InvalidArgument.FieldViolation](#bdware.bdledger.api.InvalidArgument.FieldViolation) | repeated | Describes all violations in a client request. |
|
||||
| field_violations | [InvalidArgument.FieldViolation](#bdware-bdledger-api-InvalidArgument-FieldViolation) | repeated | Describes all violations in a client request. |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.InvalidArgument.FieldViolation"></a>
|
||||
<a name="bdware-bdledger-api-InvalidArgument-FieldViolation"></a>
|
||||
|
||||
### InvalidArgument.FieldViolation
|
||||
A message type used to describe a single invalid field.
|
||||
@ -232,14 +234,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware/bdledger/api/ledger.proto"></a>
|
||||
<a name="bdware_bdledger_api_ledger-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## bdware/bdledger/api/ledger.proto
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.CreateLedgerRequest"></a>
|
||||
<a name="bdware-bdledger-api-CreateLedgerRequest"></a>
|
||||
|
||||
### CreateLedgerRequest
|
||||
|
||||
@ -247,14 +249,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| name | [string](#string) | | 账本名称 |
|
||||
| name | [string](#string) | | Ledger name 账本名称 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.CreateLedgerResponse"></a>
|
||||
<a name="bdware-bdledger-api-CreateLedgerResponse"></a>
|
||||
|
||||
### CreateLedgerResponse
|
||||
|
||||
@ -262,14 +264,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| ok | [bool](#bool) | | 是否创建成功 |
|
||||
| ok | [bool](#bool) | | Boolean value indicating if the ledger is successfully created 是否创建成功 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetLedgersResponse"></a>
|
||||
<a name="bdware-bdledger-api-GetLedgersResponse"></a>
|
||||
|
||||
### GetLedgersResponse
|
||||
|
||||
@ -277,14 +279,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| ledgers | [string](#string) | repeated | 帐本名称列表 |
|
||||
| ledgers | [string](#string) | repeated | List of ledger names 帐本名称列表 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.SendTransactionRequest"></a>
|
||||
<a name="bdware-bdledger-api-SendTransactionRequest"></a>
|
||||
|
||||
### SendTransactionRequest
|
||||
|
||||
@ -292,15 +294,15 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| ledger | [string](#string) | | 账本名称 |
|
||||
| transaction | [SendTransactionRequest.Transaction](#bdware.bdledger.api.SendTransactionRequest.Transaction) | | 事务信息 |
|
||||
| ledger | [string](#string) | | Ledger name 账本名称 |
|
||||
| transaction | [SendTransactionRequest.Transaction](#bdware-bdledger-api-SendTransactionRequest-Transaction) | | Transaction info 事务信息 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.SendTransactionRequest.Transaction"></a>
|
||||
<a name="bdware-bdledger-api-SendTransactionRequest-Transaction"></a>
|
||||
|
||||
### SendTransactionRequest.Transaction
|
||||
|
||||
@ -308,7 +310,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| type | [TransactionType](#bdware.bdledger.api.TransactionType) | | 事务类型,目前仅支持通用数据记录,即type为RECORD (0) |
|
||||
| type | [TransactionType](#bdware-bdledger-api-TransactionType) | | 事务类型,目前仅支持通用数据记录,即type为RECORD (0) |
|
||||
| from | [bytes](#bytes) | | 任意20字节的地址,用于区分使用同一节点的事务发起者 |
|
||||
| nonce | [uint64](#uint64) | | 正整数,同一from每个nonce应只使用一次,防止重复的事务(可以每次发送事务+1) |
|
||||
| to | [bytes](#bytes) | | 对于通用数据记录不需传递,无意义 |
|
||||
@ -319,7 +321,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.SendTransactionResponse"></a>
|
||||
<a name="bdware-bdledger-api-SendTransactionResponse"></a>
|
||||
|
||||
### SendTransactionResponse
|
||||
|
||||
@ -327,7 +329,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| hash | [bytes](#bytes) | | 事务哈希 |
|
||||
| hash | [bytes](#bytes) | | Hash of the created transaction 事务哈希 |
|
||||
|
||||
|
||||
|
||||
@ -340,29 +342,29 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Ledger"></a>
|
||||
<a name="bdware-bdledger-api-Ledger"></a>
|
||||
|
||||
### Ledger
|
||||
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| CreateLedger | [CreateLedgerRequest](#bdware.bdledger.api.CreateLedgerRequest) | [CreateLedgerResponse](#bdware.bdledger.api.CreateLedgerResponse) | Create a new ledger 创建一个新账本 |
|
||||
| GetLedgers | [.google.protobuf.Empty](#google.protobuf.Empty) | [GetLedgersResponse](#bdware.bdledger.api.GetLedgersResponse) | Get all ledgers 查询所有帐本列表 |
|
||||
| SendTransaction | [SendTransactionRequest](#bdware.bdledger.api.SendTransactionRequest) | [SendTransactionResponse](#bdware.bdledger.api.SendTransactionResponse) | Send a new transaction 发送一个新事务 |
|
||||
| CreateLedger | [CreateLedgerRequest](#bdware-bdledger-api-CreateLedgerRequest) | [CreateLedgerResponse](#bdware-bdledger-api-CreateLedgerResponse) | Create a new ledger 创建一个新账本 |
|
||||
| GetLedgers | [.google.protobuf.Empty](#google-protobuf-Empty) | [GetLedgersResponse](#bdware-bdledger-api-GetLedgersResponse) | Get all ledgers 查询所有帐本列表 |
|
||||
| SendTransaction | [SendTransactionRequest](#bdware-bdledger-api-SendTransactionRequest) | [SendTransactionResponse](#bdware-bdledger-api-SendTransactionResponse) | Send a new transaction 发送一个新事务 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware/bdledger/api/node.proto"></a>
|
||||
<a name="bdware_bdledger_api_node-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## bdware/bdledger/api/node.proto
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.ClientVersionResponse"></a>
|
||||
<a name="bdware-bdledger-api-ClientVersionResponse"></a>
|
||||
|
||||
### ClientVersionResponse
|
||||
|
||||
@ -370,7 +372,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| version | [string](#string) | | 节点客户端版本 |
|
||||
| version | [string](#string) | | Client version 节点客户端版本 |
|
||||
|
||||
|
||||
|
||||
@ -383,27 +385,27 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Node"></a>
|
||||
<a name="bdware-bdledger-api-Node"></a>
|
||||
|
||||
### Node
|
||||
|
||||
|
||||
| Method Name | Request Type | Response Type | Description |
|
||||
| ----------- | ------------ | ------------- | ------------|
|
||||
| ClientVersion | [.google.protobuf.Empty](#google.protobuf.Empty) | [ClientVersionResponse](#bdware.bdledger.api.ClientVersionResponse) | Get BDLedger node version 查询BDLedger节点版本 |
|
||||
| ClientVersion | [.google.protobuf.Empty](#google-protobuf-Empty) | [ClientVersionResponse](#bdware-bdledger-api-ClientVersionResponse) | Get BDLedger node version 查询BDLedger节点版本 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware/bdledger/api/query.proto"></a>
|
||||
<a name="bdware_bdledger_api_query-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## bdware/bdledger/api/query.proto
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.BlockFilter"></a>
|
||||
<a name="bdware-bdledger-api-BlockFilter"></a>
|
||||
|
||||
### BlockFilter
|
||||
暂不支持
|
||||
@ -419,7 +421,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.BlocksRequest"></a>
|
||||
<a name="bdware-bdledger-api-BlocksRequest"></a>
|
||||
|
||||
### BlocksRequest
|
||||
|
||||
@ -430,15 +432,15 @@ A message type used to describe a single invalid field.
|
||||
| ledger | [string](#string) | | 账本名称 |
|
||||
| start_timestamp | [int64](#int64) | | 查询范围开始时间戳 |
|
||||
| end_timestamp | [int64](#int64) | | 查询范围结束时间戳 |
|
||||
| filters | [BlockFilter](#bdware.bdledger.api.BlockFilter) | repeated | 暂不支持 |
|
||||
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | 包含事务信息详细程度 |
|
||||
| filters | [BlockFilter](#bdware-bdledger-api-BlockFilter) | repeated | 暂不支持 |
|
||||
| include_transactions | [IncludeTransactions](#bdware-bdledger-api-IncludeTransactions) | | 包含事务信息详细程度 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.CountBlocksResponse"></a>
|
||||
<a name="bdware-bdledger-api-CountBlocksResponse"></a>
|
||||
|
||||
### CountBlocksResponse
|
||||
|
||||
@ -455,7 +457,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.CountTransactionsResponse"></a>
|
||||
<a name="bdware-bdledger-api-CountTransactionsResponse"></a>
|
||||
|
||||
### CountTransactionsResponse
|
||||
|
||||
@ -472,7 +474,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetBlockByHashRequest"></a>
|
||||
<a name="bdware-bdledger-api-GetBlockByHashRequest"></a>
|
||||
|
||||
### GetBlockByHashRequest
|
||||
|
||||
@ -489,7 +491,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetBlockByHashResponse"></a>
|
||||
<a name="bdware-bdledger-api-GetBlockByHashResponse"></a>
|
||||
|
||||
### GetBlockByHashResponse
|
||||
|
||||
@ -497,14 +499,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| block | [Block](#bdware.bdledger.api.Block) | | 区块信息 |
|
||||
| block | [Block](#bdware-bdledger-api-Block) | | 区块信息 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetBlocksResponse"></a>
|
||||
<a name="bdware-bdledger-api-GetBlocksResponse"></a>
|
||||
|
||||
### GetBlocksResponse
|
||||
|
||||
@ -512,7 +514,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| blocks | [Block](#bdware.bdledger.api.Block) | repeated | 区块列表 |
|
||||
| blocks | [Block](#bdware-bdledger-api-Block) | repeated | 区块列表 |
|
||||
| start_timestamp | [int64](#int64) | | 本次查询有效的查询范围开始时间戳 |
|
||||
| end_timestamp | [int64](#int64) | | 本次查询有效的查询范围结束时间戳 |
|
||||
|
||||
@ -521,7 +523,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetTransactionByBlockHashAndIndexRequest"></a>
|
||||
<a name="bdware-bdledger-api-GetTransactionByBlockHashAndIndexRequest"></a>
|
||||
|
||||
### GetTransactionByBlockHashAndIndexRequest
|
||||
|
||||
@ -538,7 +540,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetTransactionByBlockHashAndIndexResponse"></a>
|
||||
<a name="bdware-bdledger-api-GetTransactionByBlockHashAndIndexResponse"></a>
|
||||
|
||||
### GetTransactionByBlockHashAndIndexResponse
|
||||
|
||||
@ -546,14 +548,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| transaction | [Transaction](#bdware.bdledger.api.Transaction) | | 事务信息 |
|
||||
| transaction | [Transaction](#bdware-bdledger-api-Transaction) | | 事务信息 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetTransactionByHashRequest"></a>
|
||||
<a name="bdware-bdledger-api-GetTransactionByHashRequest"></a>
|
||||
|
||||
### GetTransactionByHashRequest
|
||||
|
||||
@ -569,7 +571,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetTransactionByHashResponse"></a>
|
||||
<a name="bdware-bdledger-api-GetTransactionByHashResponse"></a>
|
||||
|
||||
### GetTransactionByHashResponse
|
||||
|
||||
@ -577,14 +579,14 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| transaction | [Transaction](#bdware.bdledger.api.Transaction) | | 事务信息 |
|
||||
| transaction | [Transaction](#bdware-bdledger-api-Transaction) | | 事务信息 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.GetTransactionsResponse"></a>
|
||||
<a name="bdware-bdledger-api-GetTransactionsResponse"></a>
|
||||
|
||||
### GetTransactionsResponse
|
||||
|
||||
@ -592,7 +594,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| transactions | [Transaction](#bdware.bdledger.api.Transaction) | repeated | 事务列表 |
|
||||
| transactions | [Transaction](#bdware-bdledger-api-Transaction) | repeated | 事务列表 |
|
||||
| start_timestamp | [int64](#int64) | | 本次查询有效的查询范围开始时间戳 |
|
||||
| end_timestamp | [int64](#int64) | | 本次查询有效的查询范围结束时间戳 |
|
||||
|
||||
@ -601,7 +603,7 @@ A message type used to describe a single invalid field.
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.RecentBlocksRequest"></a>
|
||||
<a name="bdware-bdledger-api-RecentBlocksRequest"></a>
|
||||
|
||||
### RecentBlocksRequest
|
||||
|
||||
@ -610,15 +612,16 @@ A message type used to describe a single invalid field.
|
||||
| Field | Type | Label | Description |
|
||||
| ----- | ---- | ----- | ----------- |
|
||||
| ledger | [string](#string) | | 账本名称 |
|
||||
| offset | [int64](#int64) | | 起始值 |
|
||||
| count | [int64](#int64) | | 查询区块数量 |
|
||||
| include_transactions | [IncludeTransactions](#bdware.bdledger.api.IncludeTransactions) | | 包含事务信息详细程度 |
|
||||
| include_transactions | [IncludeTransactions](#bdware-bdledger-api-IncludeTransactions) | | 包含事务信息详细程度 |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.TransactionFilter"></a>
|
||||
<a name="bdware-bdledger-api-TransactionFilter"></a>
|
||||
|
||||
### TransactionFilter
|
||||
repeated Transaction/BlockFilters are combined by "&&"(and) operator;
|
||||
@ -636,7 +639,7 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.TransactionsRequest"></a>
|
||||
<a name="bdware-bdledger-api-TransactionsRequest"></a>
|
||||
|
||||
### TransactionsRequest
|
||||
|
||||
@ -647,7 +650,7 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
||||
| ledger | [string](#string) | | 账本名称 |
|
||||
| start_timestamp | [int64](#int64) | | 查询范围开始时间戳 |
|
||||
| end_timestamp | [int64](#int64) | | 查询范围结束时间戳 |
|
||||
| filters | [TransactionFilter](#bdware.bdledger.api.TransactionFilter) | repeated | 暂不支持 |
|
||||
| filters | [TransactionFilter](#bdware-bdledger-api-TransactionFilter) | repeated | 暂不支持 |
|
||||
|
||||
|
||||
|
||||
@ -656,7 +659,7 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.IncludeTransactions"></a>
|
||||
<a name="bdware-bdledger-api-IncludeTransactions"></a>
|
||||
|
||||
### IncludeTransactions
|
||||
包含事务信息详细程度
|
||||
@ -673,34 +676,34 @@ repeated Transaction/BlockFilters are combined by "&&"(and) oper
|
||||
|
||||
|
||||
|
||||
<a name="bdware.bdledger.api.Query"></a>
|
||||
<a name="bdware-bdledger-api-Query"></a>
|
||||
|
||||
### Query
|
||||
|
||||
|
||||
| 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 查询哈希所指定的区块 |
|
||||
| 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 查询帐本中的所有区块数量,或时间范围内的区块数量 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) 查询最新的 'count' 个区块 |
|
||||
| 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 查询时间范围内的事务 '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' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'. |
|
||||
| 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 查询时间范围内的区块 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 查询帐本中的所有区块数量,或时间范围内的区块数量 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) 查询最新的 'count' 个区块 |
|
||||
| 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 查询时间范围内的事务 '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' and 'end_timestamp' follow the same requirements and rules as in 'CountBlocks'. |
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="google/protobuf/empty.proto"></a>
|
||||
<a name="google_protobuf_empty-proto"></a>
|
||||
<p align="right"><a href="#top">Top</a></p>
|
||||
|
||||
## google/protobuf/empty.proto
|
||||
|
||||
|
||||
|
||||
<a name="google.protobuf.Empty"></a>
|
||||
<a name="google-protobuf-Empty"></a>
|
||||
|
||||
### Empty
|
||||
A generic empty message that you can re-use to avoid defining duplicated
|
||||
|
@ -34,6 +34,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
|
@ -101,13 +101,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transaction": {
|
||||
"$ref": "#/definitions/apiSendTransactionRequestTransaction",
|
||||
"title": "Transaction info\n事务信息"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/LedgerSendTransactionBody"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -118,6 +112,15 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"LedgerSendTransactionBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transaction": {
|
||||
"$ref": "#/definitions/apiSendTransactionRequestTransaction",
|
||||
"title": "Transaction info\n事务信息"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiCreateLedgerRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -222,6 +225,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
|
@ -72,6 +72,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
|
@ -142,30 +142,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiBlockFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
},
|
||||
"includeTransactions": {
|
||||
"$ref": "#/definitions/apiIncludeTransactions",
|
||||
"title": "包含事务信息详细程度"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/QueryCountBlocksBody"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -205,30 +182,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiBlockFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
},
|
||||
"includeTransactions": {
|
||||
"$ref": "#/definitions/apiIncludeTransactions",
|
||||
"title": "包含事务信息详细程度"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/QueryGetBlocksBody"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -369,26 +323,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTransactionFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/QueryCountTransactionsBody"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -428,26 +363,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/apiTransactionFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
}
|
||||
}
|
||||
"$ref": "#/definitions/QueryGetTransactionsBody"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -458,6 +374,106 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"QueryCountBlocksBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/apiBlockFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
},
|
||||
"includeTransactions": {
|
||||
"$ref": "#/definitions/apiIncludeTransactions",
|
||||
"title": "包含事务信息详细程度"
|
||||
}
|
||||
}
|
||||
},
|
||||
"QueryCountTransactionsBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/apiTransactionFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
}
|
||||
}
|
||||
},
|
||||
"QueryGetBlocksBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/apiBlockFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
},
|
||||
"includeTransactions": {
|
||||
"$ref": "#/definitions/apiIncludeTransactions",
|
||||
"title": "包含事务信息详细程度"
|
||||
}
|
||||
}
|
||||
},
|
||||
"QueryGetTransactionsBody": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围开始时间戳"
|
||||
},
|
||||
"endTimestamp": {
|
||||
"type": "string",
|
||||
"format": "int64",
|
||||
"title": "查询范围结束时间戳"
|
||||
},
|
||||
"filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/apiTransactionFilter"
|
||||
},
|
||||
"title": "暂不支持"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiBlock": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -515,6 +531,7 @@
|
||||
"transactions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/bdledgerapiTransaction"
|
||||
},
|
||||
"title": "事务对象的数组,或为空"
|
||||
@ -533,8 +550,11 @@
|
||||
"title": "产块者签名"
|
||||
},
|
||||
"witnessSignatures": {
|
||||
"type": "string",
|
||||
"format": "byte",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
},
|
||||
"title": "见证者签名"
|
||||
}
|
||||
}
|
||||
@ -608,6 +628,7 @@
|
||||
"blocks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/apiBlock"
|
||||
},
|
||||
"title": "区块列表"
|
||||
@ -648,6 +669,7 @@
|
||||
"transactions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/bdledgerapiTransaction"
|
||||
},
|
||||
"title": "事务列表"
|
||||
@ -796,6 +818,7 @@
|
||||
"details": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#/definitions/protobufAny"
|
||||
}
|
||||
}
|
||||
|
@ -10,52 +10,41 @@ See [API documentation](..\docs\apis.md)
|
||||
|
||||
##### Installling tools
|
||||
|
||||
Download the [Protocol Buffers compiler](https://github.com/protocolbuffers/protobuf/releases) (protoc-3.21.9-*)+ for
|
||||
Download the [Protocol Buffers compiler](https://github.com/protocolbuffers/protobuf/releases) (protoc-25.3-*)+ for
|
||||
your platform and add `protoc` to `PATH` environment variable
|
||||
|
||||
For generating Go code, install `protoc-gen-go` (v1.28.1+):
|
||||
For generating Go code, install `protoc-gen-go` (v1.33.0+):
|
||||
|
||||
```shell
|
||||
GIT_TAG="v1.28.1"
|
||||
go get -d -u google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
git -C "$(go env GOPATH)"/src/google.golang.org/protobuf checkout $GIT_TAG
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
```sh
|
||||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
|
||||
```
|
||||
|
||||
Also install `protoc-gen-go-grpc` v1.2.0+:
|
||||
Also install `protoc-gen-go-grpc` v1.3.0+:
|
||||
|
||||
```shell
|
||||
go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
```
|
||||
|
||||
Or install using [gobin](https://github.com/myitcv/gobin):
|
||||
|
||||
```shell
|
||||
gobin google.golang.org/protobuf/cmd/protoc-gen-go
|
||||
gobin google.golang.org/grpc/cmd/protoc-gen-go-grpc
|
||||
```sh
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
```
|
||||
|
||||
For generating HTTP JSON APIs with [grpc-gateway](https://grpc-ecosystem.github.io/grpc-gateway/) **v2.2.0**, follow
|
||||
the [documentation](https://github.com/grpc-ecosystem/grpc-gateway#installation).
|
||||
|
||||
For generating validators
|
||||
install [go-proto-validators](https://github.com/mwitkow/go-proto-validators/tree/master/protoc-gen-govalidators):
|
||||
For generating validators, install [go-proto-validators](https://github.com/mwitkow/go-proto-validators/tree/master/protoc-gen-govalidators) v0.3.2+:
|
||||
|
||||
```shell
|
||||
go get github.com/mwitkow/go-proto-validators/protoc-gen-govalidators
|
||||
```sh
|
||||
go install github.com/mwitkow/go-proto-validators/protoc-gen-govalidators@latest
|
||||
```
|
||||
|
||||
For generating Java code: From `bdledger-sdk-java` run `gradle generateProto`
|
||||
|
||||
For generating Node.js code and/or TypeScript definitions), install Node.js then run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
For frontend JavaScript:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
git clone https://github.com/grpc/grpc-web
|
||||
cd grpc-web
|
||||
sudo make install-plugin
|
||||
@ -75,19 +64,19 @@ Run:
|
||||
|
||||
For generating TypeScript client code with `ts-proto`, run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
invoke gen -t ts
|
||||
```
|
||||
|
||||
For generating TypeScript definitions to be used with `@grpc/proto-loader`, run:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
invoke gen -t types
|
||||
```
|
||||
|
||||
Others:
|
||||
|
||||
```shell
|
||||
```sh
|
||||
./scripts/gen [-a, --async] [go] [gohttp] [nodejs] [docs]
|
||||
```
|
||||
|
||||
@ -96,11 +85,11 @@ Others:
|
||||
Use `-a` or `--async` to speed up generation by asynchronously and concurrently generating all code and documentation (
|
||||
script will exit without waiting for completion)
|
||||
|
||||
#### Generateing documentation
|
||||
#### Generating documentation
|
||||
|
||||
Install Go then run:
|
||||
|
||||
```shell
|
||||
go get -u github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc
|
||||
```sh
|
||||
go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
|
||||
./scripts/gen [-a, --async] docs
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user