Update packages

This commit is contained in:
Nex
2019-04-23 15:22:19 +08:00
parent 62e3d389b8
commit e6ab7c4630
4 changed files with 9 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package bdchain.api; package bdchain.api.acchain;
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
import "bdchain/api/common.proto"; import "bdchain/api/common.proto";
@@ -11,7 +11,7 @@ option java_outer_classname = "AccountingChainProto";
option java_multiple_files = true; option java_multiple_files = true;
service AccountingChain { service AccountingChain {
rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse); rpc ClientVersion (google.protobuf.Empty) returns (common.ClientVersionResponse);
rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse); rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse);
rpc GetBlockByNumber (GetBlockByNumberRequest) returns (Block); rpc GetBlockByNumber (GetBlockByNumberRequest) returns (Block);
rpc GetBlockByHash (GetBlockByHashRequest) returns (Block); rpc GetBlockByHash (GetBlockByHashRequest) returns (Block);
@@ -25,7 +25,7 @@ message Transaction {
bytes block_hash = 2; // 事务所在的区块的哈希,当事务处于待确认状态时为`null` bytes block_hash = 2; // 事务所在的区块的哈希,当事务处于待确认状态时为`null`
uint32 index = 3; // 事务在区块中的位置index当事务处于待确认状态时为`null` uint32 index = 3; // 事务在区块中的位置index当事务处于待确认状态时为`null`
bytes hash = 4; // 事务的哈希 bytes hash = 4; // 事务的哈希
TransactionType type = 5; // 事务类型 common.TransactionType type = 5; // 事务类型
bytes from = 6; // 发送账户地址 bytes from = 6; // 发送账户地址
uint64 nonce = 7; // 这条事务之前发送者所发送的事务数量 uint64 nonce = 7; // 这条事务之前发送者所发送的事务数量
bytes to = 8; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 bytes to = 8; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建

View File

@@ -1,6 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package bdchain.api; package bdchain.api.common;
option go_package = "bdchain/sdk/api/grpc/common"; option go_package = "bdchain/sdk/api/grpc/common";
option java_package = "bdchain.api.grpc.common"; option java_package = "bdchain.api.grpc.common";

View File

@@ -1,6 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package bdchain.api; package bdchain.api.common;
option go_package = "bdchain/sdk/api/grpc/errdetails"; option go_package = "bdchain/sdk/api/grpc/errdetails";
option java_package = "bdchain.api.grpc.common"; option java_package = "bdchain.api.grpc.common";

View File

@@ -1,6 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package bdchain.api; package bdchain.api.txledger;
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
import "bdchain/api/common.proto"; import "bdchain/api/common.proto";
@@ -11,7 +11,7 @@ option java_outer_classname = "TransactionLedgerProto";
option java_multiple_files = true; option java_multiple_files = true;
service TransactionLedger { service TransactionLedger {
rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse); rpc ClientVersion (google.protobuf.Empty) returns (common.ClientVersionResponse);
rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse); rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse);
rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse); rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse);
rpc BlockCount (BlockCountRequest) returns (BlockCountResponse); rpc BlockCount (BlockCountRequest) returns (BlockCountResponse);
@@ -23,7 +23,7 @@ message Transaction {
bytes block_hash = 1; // 事务所在的区块的哈希,当事务处于待确认状态时为`null` bytes block_hash = 1; // 事务所在的区块的哈希,当事务处于待确认状态时为`null`
uint32 index = 2; // 事务在区块中的位置 index当事务处于待确认状态时为`null` uint32 index = 2; // 事务在区块中的位置 index当事务处于待确认状态时为`null`
bytes hash = 3; // 事务的哈希 bytes hash = 3; // 事务的哈希
TransactionType type = 4; // 事务类型 common.TransactionType type = 4; // 事务类型
bytes from = 5; // 发送账户地址 bytes from = 5; // 发送账户地址
uint64 nonce = 6; // 这条事务之前发送者所发送的事务数量 uint64 nonce = 6; // 这条事务之前发送者所发送的事务数量
bytes to = 7; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建 bytes to = 7; // 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
@@ -76,7 +76,7 @@ message GetBlocksResponse {
message SendTransactionRequest { message SendTransactionRequest {
string ledger = 1; string ledger = 1;
message Transaction { message Transaction {
TransactionType type = 1; common.TransactionType type = 1;
bytes from = 2; bytes from = 2;
bytes to = 3; bytes to = 3;
bytes data = 4; bytes data = 4;