diff --git a/bdchain/api/ac_chain.proto b/bdchain/api/ac_chain.proto index be0a638..0372f1d 100644 --- a/bdchain/api/ac_chain.proto +++ b/bdchain/api/ac_chain.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bdchain.api; +package bdchain.api.acchain; import "google/protobuf/empty.proto"; import "bdchain/api/common.proto"; @@ -11,7 +11,7 @@ option java_outer_classname = "AccountingChainProto"; option java_multiple_files = true; service AccountingChain { - rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse); + rpc ClientVersion (google.protobuf.Empty) returns (common.ClientVersionResponse); rpc BlockNumber (BlockNumberRequest) returns (BlockNumberResponse); rpc GetBlockByNumber (GetBlockByNumberRequest) returns (Block); rpc GetBlockByHash (GetBlockByHashRequest) returns (Block); @@ -25,7 +25,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`如为合约创建 diff --git a/bdchain/api/common.proto b/bdchain/api/common.proto index 2ae17b9..be079a5 100644 --- a/bdchain/api/common.proto +++ b/bdchain/api/common.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bdchain.api; +package bdchain.api.common; option go_package = "bdchain/sdk/api/grpc/common"; option java_package = "bdchain.api.grpc.common"; diff --git a/bdchain/api/error_details.proto b/bdchain/api/error_details.proto index 56b234f..e6b9c02 100644 --- a/bdchain/api/error_details.proto +++ b/bdchain/api/error_details.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bdchain.api; +package bdchain.api.common; option go_package = "bdchain/sdk/api/grpc/errdetails"; option java_package = "bdchain.api.grpc.common"; diff --git a/bdchain/api/tx_ledger.proto b/bdchain/api/tx_ledger.proto index 5ab3140..d9176a7 100644 --- a/bdchain/api/tx_ledger.proto +++ b/bdchain/api/tx_ledger.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package bdchain.api; +package bdchain.api.txledger; import "google/protobuf/empty.proto"; import "bdchain/api/common.proto"; @@ -11,7 +11,7 @@ option java_outer_classname = "TransactionLedgerProto"; option java_multiple_files = true; service TransactionLedger { - rpc ClientVersion (google.protobuf.Empty) returns (ClientVersionResponse); + rpc ClientVersion (google.protobuf.Empty) returns (common.ClientVersionResponse); rpc CreateLedger (CreateLedgerRequest) returns (CreateLedgerResponse); rpc GetLedgers (google.protobuf.Empty) returns (GetLedgersResponse); rpc BlockCount (BlockCountRequest) returns (BlockCountResponse); @@ -23,7 +23,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`如为合约创建 @@ -76,7 +76,7 @@ message GetBlocksResponse { message SendTransactionRequest { string ledger = 1; message Transaction { - TransactionType type = 1; + common.TransactionType type = 1; bytes from = 2; bytes to = 3; bytes data = 4;