diff --git a/docs.md b/docs.md index 59c21c5..8d4417c 100644 --- a/docs.md +++ b/docs.md @@ -1,6 +1,6 @@ ## 通用类型 -### ClientVersionResponse 节点客户端版本查询返回值 +### common.ClientVersionResponse 节点客户端版本查询返回值 ``` message ClientVersionResponse { @@ -8,7 +8,7 @@ message ClientVersionResponse { } ``` -### TransactionType 事务类型 +### common.TransactionType 事务类型 ``` enum TransactionType { @@ -30,7 +30,7 @@ message Transaction { bytes block_hash = 2; // 事务所在的区块的哈希,当事务处于待确认状态时为`null` uint32 index = 3; // 事务在区块中的位置index,当事务处于待确认状态时为`null` bytes hash = 4; // 事务的哈希 - TransactionType type = 5; // 事务类型 + common.TransactionType type = 5; // 事务类型 bytes from = 6; // 发送账户地址 uint64 nonce = 7; // 这条事务之前发送者所发送的事务数量 bytes to = 8; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 @@ -186,7 +186,7 @@ message GetLedgersResponse { message SendTransactionRequest { string ledger = 1; message Transaction { - TransactionType type = 1; + common.TransactionType type = 1; bytes from = 2; bytes to = 3; bytes data = 4; diff --git a/test.md b/test.md index 3e1d2b1..059ce6c 100644 --- a/test.md +++ b/test.md @@ -2,7 +2,7 @@ ## Basic types -### ClientVersionResponse +### common.ClientVersionResponse ```proto message ClientVersionResponse { @@ -10,7 +10,7 @@ message ClientVersionResponse { } ``` -### TransactionType +### common.TransactionType ```proto enum TransactionType { @@ -29,7 +29,7 @@ message Transaction { bytes block_hash = 1; // 事务所在的区块的哈希,当事务处于待确认状态时为`null` uint32 index = 2; // 事务在区块中的位置 index,当事务处于待确认状态时为`null` bytes hash = 3; // 事务的哈希 - TransactionType type = 4; // 事务类型 + common.TransactionType type = 4; // 事务类型 bytes from = 5; // 发送账户地址 uint64 nonce = 6; // 这条事务之前发送者所发送的事务数量 bytes to = 7; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 @@ -48,7 +48,7 @@ message Transaction { bytes block_hash = 2; // 事务所在的区块的哈希,当事务处于待确认状态时为`null` uint32 index = 3; // 事务在区块中的位置index,当事务处于待确认状态时为`null` bytes hash = 4; // 事务的哈希 - TransactionType type = 5; // 事务类型 + common.TransactionType type = 5; // 事务类型 bytes from = 6; // 发送账户地址 uint64 nonce = 7; // 这条事务之前发送者所发送的事务数量 bytes to = 8; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 @@ -106,7 +106,7 @@ google.protobuf.Empty #### Response ``` -bdchain.api.ClientVersionResponse +bdchain.api.common.ClientVersionResponse ``` #### Test cases @@ -339,7 +339,7 @@ blocks: - block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 0 hash: 0x0404040404040404040404040404040404040404 (in bytes) - type: TransactionType.RECORD + type: common.TransactionType.RECORD from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2018 to: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) @@ -350,7 +350,7 @@ blocks: - block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 1 hash: 0x1313131313131313131313131313131313131313 (in bytes) - type: TransactionType.MESSAGE + type: common.TransactionType.MESSAGE from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2019 to: 0xfeedbabefeedbabefeedbabefeedbabefeedbabe (in bytes) @@ -556,7 +556,7 @@ blocks: message SendTransactionRequest { string ledger = 1; message Transaction { - TransactionType type = 1; + common.TransactionType type = 1; bytes from = 2; bytes to = 3; bytes data = 4; @@ -582,7 +582,7 @@ message SendTransactionResponse { ```yaml ledger: 'test' transaction: - type: TransactionType.MESSAGE + type: common.TransactionType.MESSAGE from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) to: 0xfeedbabefeedbabefeedbabefeedbabefeedbabe (in bytes) data: 0xdeadbeef (in bytes) @@ -601,7 +601,7 @@ hash: 0xd15ea5edd15ea5edd15ea5edd15ea5edd15ea5edd15ea5edd15ea5edd15ea5ed (in byt ```yaml ledger: 'test' transaction: - type: TransactionType.MESSAGE + type: common.TransactionType.MESSAGE from: null (in bytes) to: 0x50bada55 (in bytes) data: null (in bytes) @@ -635,7 +635,7 @@ google.protobuf.Empty #### Response ``` -bdchain.api.ClientVersionResponse +bdchain.api.common.ClientVersionResponse ``` #### Test cases @@ -764,7 +764,7 @@ transactions: block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 0 hash: 0x0404040404040404040404040404040404040404 (in bytes) - type: TransactionType.RECORD + type: common.TransactionType.RECORD from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2018 to: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) @@ -776,7 +776,7 @@ transactions: block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 1 hash: 0x1313131313131313131313131313131313131313 (in bytes) - type: TransactionType.MESSAGE + type: common.TransactionType.MESSAGE from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2019 to: 0xfeedbabefeedbabefeedbabefeedbabefeedbabe (in bytes) @@ -914,7 +914,7 @@ block_number: 2018 block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 0 hash: 0x0404040404040404040404040404040404040404 (in bytes) -type: TransactionType.RECORD +type: common.TransactionType.RECORD from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2018 to: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) @@ -963,7 +963,7 @@ block_number: 2018 block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 0 hash: 0x0404040404040404040404040404040404040404 (in bytes) -type: TransactionType.RECORD +type: common.TransactionType.RECORD from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2018 to: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) @@ -1012,7 +1012,7 @@ block_number: 2018 block_hash: 0xdeadc0dedeadc0dedeadc0dedeadc0dedeadc0de (in bytes) index: 0 hash: 0x0404040404040404040404040404040404040404 (in bytes) -type: TransactionType.RECORD +type: common.TransactionType.RECORD from: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes) nonce: 2018 to: 0xf00dcafef00dcafef00dcafef00dcafef00dcafe (in bytes)