Update docs
This commit is contained in:
parent
d2792917e7
commit
72a517f36a
@ -44,7 +44,7 @@ message Block {
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 20字节的交易哈希的数组,或为空
|
||||
}
|
||||
|
||||
message BlockNumberRequest {
|
||||
|
@ -42,7 +42,7 @@ message Block {
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 20字节的交易哈希的数组,或为空
|
||||
}
|
||||
|
||||
message CreateLedgerRequest {
|
||||
|
20
docs.md
20
docs.md
@ -55,7 +55,7 @@ message Block {
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 20字节的交易哈希的数组,或为空
|
||||
}
|
||||
```
|
||||
|
||||
@ -197,7 +197,7 @@ message SendTransactionRequest {
|
||||
|
||||
#### 返回值
|
||||
|
||||
1. hash `DATA`, 32 Bytes - 事务哈希
|
||||
1. hash `DATA`, 20 Bytes - 事务哈希
|
||||
|
||||
```
|
||||
message SendTransactionResponse {
|
||||
@ -321,14 +321,14 @@ message GetBlockByNumberRequest {
|
||||
|
||||
`Object` - 区块对象,或者`null`如果没有找到区块
|
||||
- number `QUANTITY` - 区块号,当区块处于待确认状态时为`null`
|
||||
- hash `DATA`, 32 Bytes - 区块的哈希,当区块处于待确认状态时为`null`
|
||||
- parent_hash `DATA`, 32 Bytes - 父区块的哈希
|
||||
- hash `DATA`, 20 Bytes - 区块的哈希,当区块处于待确认状态时为`null`
|
||||
- parent_hash `DATA`, 20 Bytes - 父区块的哈希
|
||||
- witnesses `Array` of 20 Bytes `DATA` - 见证者账户地址的数组
|
||||
- timestamp `QUANTITY` - 区块产生时的UNIX时间戳
|
||||
- size `QUANTITY` - 整型,区块大小的字节数
|
||||
- transactions_root `DATA`, 32 Bytes - 区块的事务树根
|
||||
- transactions `Array` - 最后一个参数为`true`时为事务对象的数组,否则为空
|
||||
- transaction_hashes `Array` - 最后一个参数为`false`时为32字节的交易哈希的数组,否则为空
|
||||
- transaction_hashes `Array` - 最后一个参数为`false`时为20字节的交易哈希的数组,否则为空
|
||||
|
||||
```
|
||||
Block
|
||||
@ -370,7 +370,7 @@ Block
|
||||
#### 参数
|
||||
|
||||
1. ledger `DATA` - 账本名称
|
||||
2. hash `DATA`, 32 Bytes - 区块的哈希
|
||||
2. hash `DATA`, 20 Bytes - 区块的哈希
|
||||
3. full_transaction `Boolean` - 如果为`true`返回完整的事务对象,如果为`false`仅返回事务的哈希
|
||||
|
||||
```
|
||||
@ -407,7 +407,7 @@ message GetBlockByHashRequest {
|
||||
#### 参数
|
||||
|
||||
1. ledger `DATA` - 账本名称
|
||||
2. hash `DATA`, 32 Bytes - 事务的哈希
|
||||
2. hash `DATA`, 20 Bytes - 事务的哈希
|
||||
|
||||
```
|
||||
message GetTransactionByHashRequest {
|
||||
@ -420,9 +420,9 @@ message GetTransactionByHashRequest {
|
||||
|
||||
`Object` - 事务对象,或者`null`如果没有找到区块
|
||||
- block_number `QUANTITY` - 事务所在的区块的区块号,当事务处于待确认状态时为`null`
|
||||
- block_hash `DATA`, 32 Bytes - 事务所在的区块的哈希,当事务处于待确认状态时为`null`
|
||||
- block_hash `DATA`, 20 Bytes - 事务所在的区块的哈希,当事务处于待确认状态时为`null`
|
||||
- index `QUANTITY` - 整型,事务在区块中的位置index,当事务处于待确认状态时为`null`
|
||||
- hash `DATA`, 32 Bytes - 事务的哈希
|
||||
- hash `DATA`, 20 Bytes - 事务的哈希
|
||||
- type `QUANTITY`, 1 Byte - 事务类型
|
||||
- from `DATA`, 20 Bytes - 发送账户地址
|
||||
- nonce `QUANTITY` - 这条事务之前发送者所发送的事务数量
|
||||
@ -508,7 +508,7 @@ message GetTransactionByBlockNumberAndIndexRequest {
|
||||
#### 参数
|
||||
|
||||
1. ledger `DATA` - 账本名称
|
||||
2. block_hash `DATA`, 32 Bytes - 区块的哈希
|
||||
2. block_hash `DATA`, 20 Bytes - 区块的哈希
|
||||
3. index `QUANTITY` - 整型,事务的index
|
||||
|
||||
```
|
||||
|
6
test.md
6
test.md
@ -71,7 +71,7 @@ message Block {
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 20字节的交易哈希的数组,或为空
|
||||
}
|
||||
```
|
||||
|
||||
@ -87,7 +87,7 @@ message Block {
|
||||
uint64 size = 6; // 区块大小的字节数
|
||||
bytes transactions_root = 7; // 区块的事务树根
|
||||
repeated Transaction transactions = 8; // 事务对象的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 32字节的交易哈希的数组,或为空
|
||||
repeated bytes transaction_hashes = 9; // 20字节的交易哈希的数组,或为空
|
||||
}
|
||||
```
|
||||
|
||||
@ -617,7 +617,7 @@ details:
|
||||
- field: 'transaction.from'
|
||||
description: 'from must not be empty'
|
||||
- field: 'transaction.to'
|
||||
description: 'to must be a valid 32-byte address'
|
||||
description: 'to must be a valid 20-byte address'
|
||||
```
|
||||
|
||||
---
|
||||
|
Loading…
Reference in New Issue
Block a user