diff --git a/src/main/java/bdchain/api/AccountingChainClient.java b/src/main/java/bdchain/api/AccountingChainClient.java
index d7a5cf0..8fca052 100644
--- a/src/main/java/bdchain/api/AccountingChainClient.java
+++ b/src/main/java/bdchain/api/AccountingChainClient.java
@@ -1,8 +1,9 @@
package bdchain.api;
-import bdchain.api.grpc.*;
-import bdchain.api.grpc.AccountingChainGrpc.AccountingChainBlockingStub;
-import bdchain.api.grpc.AccountingChainGrpc.AccountingChainFutureStub;
+import bdchain.api.grpc.acchain.*;
+import bdchain.api.grpc.acchain.AccountingChainGrpc.AccountingChainBlockingStub;
+import bdchain.api.grpc.acchain.AccountingChainGrpc.AccountingChainFutureStub;
+import bdchain.api.grpc.common.ClientVersionResponse;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
@@ -14,12 +15,12 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
-// import bdchain.api.grpc.AccountingChainGrpc.AccountingChainStub;
+// import bdchain.api.grpc.acchain.AccountingChainGrpc.AccountingChainStub;
/**
* 记账链客户端
*
- *
如有更灵活的需求可直接使用{@link bdchain.api.grpc.AccountingChainGrpc}类。
+ *
如有更灵活的需求可直接使用{@link bdchain.api.grpc.acchain.AccountingChainGrpc}类。
*
* @see 记账链API
* @author nex
diff --git a/src/main/java/bdchain/api/TransactionLedgerClient.java b/src/main/java/bdchain/api/TransactionLedgerClient.java
index da14de5..dd1a68e 100644
--- a/src/main/java/bdchain/api/TransactionLedgerClient.java
+++ b/src/main/java/bdchain/api/TransactionLedgerClient.java
@@ -1,8 +1,11 @@
package bdchain.api;
import bdchain.api.grpc.*;
-import bdchain.api.grpc.TransactionLedgerGrpc.TransactionLedgerBlockingStub;
-import bdchain.api.grpc.TransactionLedgerGrpc.TransactionLedgerFutureStub;
+import bdchain.api.grpc.common.ClientVersionResponse;
+import bdchain.api.grpc.common.TransactionType;
+import bdchain.api.grpc.txledger.*;
+import bdchain.api.grpc.txledger.TransactionLedgerGrpc.TransactionLedgerBlockingStub;
+import bdchain.api.grpc.txledger.TransactionLedgerGrpc.TransactionLedgerFutureStub;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.protobuf.ByteString;
import com.google.protobuf.Empty;
@@ -14,12 +17,12 @@ import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
-// import bdchain.api.grpc.TransactionLedgerGrpc.TransactionLedgerStub;
+// import bdchain.api.grpc.txledger.TransactionLedgerGrpc.TransactionLedgerStub;
/**
* 事务账本客户端
*
- *
如有更灵活的需求可直接使用{@link bdchain.api.grpc.TransactionLedgerGrpc}类。
+ *
如有更灵活的需求可直接使用{@link bdchain.api.grpc.txledger.TransactionLedgerGrpc}类。
*
* @see 事务账本API
* @author nex
@@ -159,7 +162,7 @@ public class TransactionLedgerClient {
* (非阻塞)
*/
public ListenableFuture sendTransaction(
- String ledger, TransactionType type, String from, String to, byte[] data) {
+ String ledger, TransactionType type, String from, String to, byte[] data) {
info(
"*** sendTransaction: ledger={0} type={1} from={2} to={3} data={4}",
diff --git a/src/main/java/bdchain/api/grpc/AccountingChainProto.java b/src/main/java/bdchain/api/grpc/AccountingChainProto.java
deleted file mode 100644
index ea4a968..0000000
--- a/src/main/java/bdchain/api/grpc/AccountingChainProto.java
+++ /dev/null
@@ -1,190 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: bdchain/api/ac_chain.proto
-
-package bdchain.api.grpc;
-
-public final class AccountingChainProto {
- private AccountingChainProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_Transaction_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_Transaction_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_Block_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_Block_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_BlockNumberRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_BlockNumberRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_BlockNumberResponse_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_BlockNumberResponse_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_GetBlockByNumberRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_GetBlockByHashRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_GetTransactionByHashRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\032bdchain/api/ac_chain.proto\022\013bdchain.ap" +
- "i\032\033google/protobuf/empty.proto\032\030bdchain/" +
- "api/common.proto\"\330\001\n\013Transaction\022\024\n\014bloc" +
- "k_number\030\001 \001(\004\022\022\n\nblock_hash\030\002 \001(\014\022\r\n\005in" +
- "dex\030\003 \001(\r\022\014\n\004hash\030\004 \001(\014\022*\n\004type\030\005 \001(\0162\034." +
- "bdchain.api.TransactionType\022\014\n\004from\030\006 \001(" +
- "\014\022\r\n\005nonce\030\007 \001(\004\022\n\n\002to\030\010 \001(\014\022\014\n\004data\030\t \001" +
- "(\014\022\t\n\001v\030\n \001(\014\022\t\n\001r\030\013 \001(\014\022\t\n\001s\030\014 \001(\014\"\323\001\n\005" +
- "Block\022\016\n\006number\030\001 \001(\004\022\014\n\004hash\030\002 \001(\014\022\023\n\013p" +
- "arent_hash\030\003 \001(\014\022\017\n\007witness\030\004 \001(\014\022\021\n\ttim" +
- "estamp\030\005 \001(\004\022\014\n\004size\030\006 \001(\004\022\031\n\021transactio" +
- "ns_root\030\007 \001(\014\022.\n\014transactions\030\010 \003(\0132\030.bd" +
- "chain.api.Transaction\022\032\n\022transaction_has" +
- "hes\030\t \003(\014\"$\n\022BlockNumberRequest\022\016\n\006ledge" +
- "r\030\001 \001(\t\"+\n\023BlockNumberResponse\022\024\n\014block_" +
- "number\030\001 \001(\004\"S\n\027GetBlockByNumberRequest\022" +
- "\016\n\006ledger\030\001 \001(\t\022\016\n\006number\030\002 \001(\004\022\030\n\020full_" +
- "transaction\030\003 \001(\010\"O\n\025GetBlockByHashReque" +
- "st\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\022\030\n\020full" +
- "_transaction\030\003 \001(\010\";\n\033GetTransactionByHa" +
- "shRequest\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\"" +
- "a\n*GetTransactionByBlockNumberAndIndexRe" +
- "quest\022\016\n\006ledger\030\001 \001(\t\022\024\n\014block_number\030\002 " +
- "\001(\004\022\r\n\005index\030\003 \001(\r\"]\n(GetTransactionByBl" +
- "ockHashAndIndexRequest\022\016\n\006ledger\030\001 \001(\t\022\022" +
- "\n\nblock_hash\030\002 \001(\014\022\r\n\005index\030\003 \001(\r2\224\005\n\017Ac" +
- "countingChain\022K\n\rClientVersion\022\026.google." +
- "protobuf.Empty\032\".bdchain.api.ClientVersi" +
- "onResponse\022P\n\013BlockNumber\022\037.bdchain.api." +
- "BlockNumberRequest\032 .bdchain.api.BlockNu" +
- "mberResponse\022L\n\020GetBlockByNumber\022$.bdcha" +
- "in.api.GetBlockByNumberRequest\032\022.bdchain" +
- ".api.Block\022H\n\016GetBlockByHash\022\".bdchain.a" +
- "pi.GetBlockByHashRequest\032\022.bdchain.api.B" +
- "lock\022Z\n\024GetTransactionByHash\022(.bdchain.a" +
- "pi.GetTransactionByHashRequest\032\030.bdchain" +
- ".api.Transaction\022x\n#GetTransactionByBloc" +
- "kNumberAndIndex\0227.bdchain.api.GetTransac" +
- "tionByBlockNumberAndIndexRequest\032\030.bdcha" +
- "in.api.Transaction\022t\n!GetTransactionByBl" +
- "ockHashAndIndex\0225.bdchain.api.GetTransac" +
- "tionByBlockHashAndIndexRequest\032\030.bdchain" +
- ".api.TransactionBH\n\020bdchain.api.grpcB\024Ac" +
- "countingChainProtoP\001Z\034bdchain/sdk/api/gr" +
- "pc/acchainb\006proto3"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.EmptyProto.getDescriptor(),
- bdchain.api.grpc.CommonProto.getDescriptor(),
- }, assigner);
- internal_static_bdchain_api_Transaction_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_bdchain_api_Transaction_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_Transaction_descriptor,
- new java.lang.String[] { "BlockNumber", "BlockHash", "Index", "Hash", "Type", "From", "Nonce", "To", "Data", "V", "R", "S", });
- internal_static_bdchain_api_Block_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_bdchain_api_Block_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_Block_descriptor,
- new java.lang.String[] { "Number", "Hash", "ParentHash", "Witness", "Timestamp", "Size", "TransactionsRoot", "Transactions", "TransactionHashes", });
- internal_static_bdchain_api_BlockNumberRequest_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_bdchain_api_BlockNumberRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_BlockNumberRequest_descriptor,
- new java.lang.String[] { "Ledger", });
- internal_static_bdchain_api_BlockNumberResponse_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_bdchain_api_BlockNumberResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_BlockNumberResponse_descriptor,
- new java.lang.String[] { "BlockNumber", });
- internal_static_bdchain_api_GetBlockByNumberRequest_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_bdchain_api_GetBlockByNumberRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_GetBlockByNumberRequest_descriptor,
- new java.lang.String[] { "Ledger", "Number", "FullTransaction", });
- internal_static_bdchain_api_GetBlockByHashRequest_descriptor =
- getDescriptor().getMessageTypes().get(5);
- internal_static_bdchain_api_GetBlockByHashRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_GetBlockByHashRequest_descriptor,
- new java.lang.String[] { "Ledger", "Hash", "FullTransaction", });
- internal_static_bdchain_api_GetTransactionByHashRequest_descriptor =
- getDescriptor().getMessageTypes().get(6);
- internal_static_bdchain_api_GetTransactionByHashRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_GetTransactionByHashRequest_descriptor,
- new java.lang.String[] { "Ledger", "Hash", });
- internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor =
- getDescriptor().getMessageTypes().get(7);
- internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor,
- new java.lang.String[] { "Ledger", "BlockNumber", "Index", });
- internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor =
- getDescriptor().getMessageTypes().get(8);
- internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor,
- new java.lang.String[] { "Ledger", "BlockHash", "Index", });
- com.google.protobuf.EmptyProto.getDescriptor();
- bdchain.api.grpc.CommonProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java b/src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java
deleted file mode 100644
index 51965e1..0000000
--- a/src/main/java/bdchain/api/grpc/InvalidArgumentOrBuilder.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: bdchain/api/error_details.proto
-
-package bdchain.api.grpc;
-
-public interface InvalidArgumentOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.InvalidArgument)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- java.util.List
- getFieldViolationsList();
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index);
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- int getFieldViolationsCount();
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- java.util.List extends bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>
- getFieldViolationsOrBuilderList();
- /**
- *
- * Describes all violations in a client request.
- *
- *
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
- */
- bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
- int index);
-}
diff --git a/src/main/java/bdchain/api/grpc/SendTransactionRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/SendTransactionRequestOrBuilder.java
deleted file mode 100644
index 68094a6..0000000
--- a/src/main/java/bdchain/api/grpc/SendTransactionRequestOrBuilder.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: bdchain/api/tx_ledger.proto
-
-package bdchain.api.grpc;
-
-public interface SendTransactionRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.SendTransactionRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * string ledger = 1;
- */
- java.lang.String getLedger();
- /**
- * string ledger = 1;
- */
- com.google.protobuf.ByteString
- getLedgerBytes();
-
- /**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
- */
- boolean hasTransaction();
- /**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
- */
- bdchain.api.grpc.SendTransactionRequest.Transaction getTransaction();
- /**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
- */
- bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder();
-}
diff --git a/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java b/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java
deleted file mode 100644
index d0ebc96..0000000
--- a/src/main/java/bdchain/api/grpc/TransactionLedgerProto.java
+++ /dev/null
@@ -1,135 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: bdchain/api/tx_ledger.proto
-
-package bdchain.api.grpc;
-
-public final class TransactionLedgerProto {
- private TransactionLedgerProto() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_CreateLedgerRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_CreateLedgerRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_CreateLedgerResponse_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_CreateLedgerResponse_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_GetLedgersResponse_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_GetLedgersResponse_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_SendTransactionRequest_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_SendTransactionRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_SendTransactionRequest_Transaction_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_SendTransactionRequest_Transaction_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_SendTransactionResponse_descriptor;
- static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_SendTransactionResponse_fieldAccessorTable;
-
- public static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n\033bdchain/api/tx_ledger.proto\022\013bdchain.a" +
- "pi\032\033google/protobuf/empty.proto\032\030bdchain" +
- "/api/common.proto\"#\n\023CreateLedgerRequest" +
- "\022\014\n\004name\030\001 \001(\t\"\"\n\024CreateLedgerResponse\022\n" +
- "\n\002ok\030\001 \001(\010\"%\n\022GetLedgersResponse\022\017\n\007ledg" +
- "ers\030\001 \003(\t\"\321\001\n\026SendTransactionRequest\022\016\n\006" +
- "ledger\030\001 \001(\t\022D\n\013transaction\030\002 \001(\0132/.bdch" +
- "ain.api.SendTransactionRequest.Transacti" +
- "on\032a\n\013Transaction\022*\n\004type\030\001 \001(\0162\034.bdchai" +
- "n.api.TransactionType\022\014\n\004from\030\002 \001(\014\022\n\n\002t" +
- "o\030\003 \001(\014\022\014\n\004data\030\004 \001(\014\"\'\n\027SendTransaction" +
- "Response\022\014\n\004hash\030\001 \001(\0142\332\002\n\021TransactionLe" +
- "dger\022K\n\rClientVersion\022\026.google.protobuf." +
- "Empty\032\".bdchain.api.ClientVersionRespons" +
- "e\022S\n\014CreateLedger\022 .bdchain.api.CreateLe" +
- "dgerRequest\032!.bdchain.api.CreateLedgerRe" +
- "sponse\022E\n\nGetLedgers\022\026.google.protobuf.E" +
- "mpty\032\037.bdchain.api.GetLedgersResponse\022\\\n" +
- "\017SendTransaction\022#.bdchain.api.SendTrans" +
- "actionRequest\032$.bdchain.api.SendTransact" +
- "ionResponseBK\n\020bdchain.api.grpcB\026Transac" +
- "tionLedgerProtoP\001Z\035bdchain/sdk/api/grpc/" +
- "txledgerb\006proto3"
- };
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
- .internalBuildGeneratedFileFrom(descriptorData,
- new com.google.protobuf.Descriptors.FileDescriptor[] {
- com.google.protobuf.EmptyProto.getDescriptor(),
- bdchain.api.grpc.CommonProto.getDescriptor(),
- }, assigner);
- internal_static_bdchain_api_CreateLedgerRequest_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_bdchain_api_CreateLedgerRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_CreateLedgerRequest_descriptor,
- new java.lang.String[] { "Name", });
- internal_static_bdchain_api_CreateLedgerResponse_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_bdchain_api_CreateLedgerResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_CreateLedgerResponse_descriptor,
- new java.lang.String[] { "Ok", });
- internal_static_bdchain_api_GetLedgersResponse_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_bdchain_api_GetLedgersResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_GetLedgersResponse_descriptor,
- new java.lang.String[] { "Ledgers", });
- internal_static_bdchain_api_SendTransactionRequest_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_bdchain_api_SendTransactionRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_SendTransactionRequest_descriptor,
- new java.lang.String[] { "Ledger", "Transaction", });
- internal_static_bdchain_api_SendTransactionRequest_Transaction_descriptor =
- internal_static_bdchain_api_SendTransactionRequest_descriptor.getNestedTypes().get(0);
- internal_static_bdchain_api_SendTransactionRequest_Transaction_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_SendTransactionRequest_Transaction_descriptor,
- new java.lang.String[] { "Type", "From", "To", "Data", });
- internal_static_bdchain_api_SendTransactionResponse_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_bdchain_api_SendTransactionResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_SendTransactionResponse_descriptor,
- new java.lang.String[] { "Hash", });
- com.google.protobuf.EmptyProto.getDescriptor();
- bdchain.api.grpc.CommonProto.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/src/main/java/bdchain/api/grpc/AccountingChainGrpc.java b/src/main/java/bdchain/api/grpc/acchain/AccountingChainGrpc.java
similarity index 63%
rename from src/main/java/bdchain/api/grpc/AccountingChainGrpc.java
rename to src/main/java/bdchain/api/grpc/acchain/AccountingChainGrpc.java
index 802f823..c1596be 100644
--- a/src/main/java/bdchain/api/grpc/AccountingChainGrpc.java
+++ b/src/main/java/bdchain/api/grpc/acchain/AccountingChainGrpc.java
@@ -1,4 +1,4 @@
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
@@ -18,39 +18,39 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.15.0)",
+ value = "by gRPC proto compiler (version 1.20.0)",
comments = "Source: bdchain/api/ac_chain.proto")
public final class AccountingChainGrpc {
private AccountingChainGrpc() {}
- public static final String SERVICE_NAME = "bdchain.api.AccountingChain";
+ public static final String SERVICE_NAME = "bdchain.api.acchain.AccountingChain";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getClientVersionMethod;
+ bdchain.api.grpc.common.ClientVersionResponse> getClientVersionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientVersion",
requestType = com.google.protobuf.Empty.class,
- responseType = bdchain.api.grpc.ClientVersionResponse.class,
+ responseType = bdchain.api.grpc.common.ClientVersionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getClientVersionMethod() {
- io.grpc.MethodDescriptor getClientVersionMethod;
+ bdchain.api.grpc.common.ClientVersionResponse> getClientVersionMethod() {
+ io.grpc.MethodDescriptor getClientVersionMethod;
if ((getClientVersionMethod = AccountingChainGrpc.getClientVersionMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getClientVersionMethod = AccountingChainGrpc.getClientVersionMethod) == null) {
AccountingChainGrpc.getClientVersionMethod = getClientVersionMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "ClientVersion"))
+ "bdchain.api.acchain.AccountingChain", "ClientVersion"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()))
+ bdchain.api.grpc.common.ClientVersionResponse.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("ClientVersion"))
.build();
}
@@ -59,30 +59,30 @@ public final class AccountingChainGrpc {
return getClientVersionMethod;
}
- private static volatile io.grpc.MethodDescriptor getBlockNumberMethod;
+ private static volatile io.grpc.MethodDescriptor getBlockNumberMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "BlockNumber",
- requestType = bdchain.api.grpc.BlockNumberRequest.class,
- responseType = bdchain.api.grpc.BlockNumberResponse.class,
+ requestType = bdchain.api.grpc.acchain.BlockNumberRequest.class,
+ responseType = bdchain.api.grpc.acchain.BlockNumberResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getBlockNumberMethod() {
- io.grpc.MethodDescriptor getBlockNumberMethod;
+ public static io.grpc.MethodDescriptor getBlockNumberMethod() {
+ io.grpc.MethodDescriptor getBlockNumberMethod;
if ((getBlockNumberMethod = AccountingChainGrpc.getBlockNumberMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getBlockNumberMethod = AccountingChainGrpc.getBlockNumberMethod) == null) {
AccountingChainGrpc.getBlockNumberMethod = getBlockNumberMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "BlockNumber"))
+ "bdchain.api.acchain.AccountingChain", "BlockNumber"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.BlockNumberRequest.getDefaultInstance()))
+ bdchain.api.grpc.acchain.BlockNumberRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.BlockNumberResponse.getDefaultInstance()))
+ bdchain.api.grpc.acchain.BlockNumberResponse.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("BlockNumber"))
.build();
}
@@ -91,30 +91,30 @@ public final class AccountingChainGrpc {
return getBlockNumberMethod;
}
- private static volatile io.grpc.MethodDescriptor getGetBlockByNumberMethod;
+ private static volatile io.grpc.MethodDescriptor getGetBlockByNumberMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlockByNumber",
- requestType = bdchain.api.grpc.GetBlockByNumberRequest.class,
- responseType = bdchain.api.grpc.Block.class,
+ requestType = bdchain.api.grpc.acchain.GetBlockByNumberRequest.class,
+ responseType = bdchain.api.grpc.acchain.Block.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getGetBlockByNumberMethod() {
- io.grpc.MethodDescriptor getGetBlockByNumberMethod;
+ public static io.grpc.MethodDescriptor getGetBlockByNumberMethod() {
+ io.grpc.MethodDescriptor getGetBlockByNumberMethod;
if ((getGetBlockByNumberMethod = AccountingChainGrpc.getGetBlockByNumberMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetBlockByNumberMethod = AccountingChainGrpc.getGetBlockByNumberMethod) == null) {
AccountingChainGrpc.getGetBlockByNumberMethod = getGetBlockByNumberMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "GetBlockByNumber"))
+ "bdchain.api.acchain.AccountingChain", "GetBlockByNumber"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance()))
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.Block.getDefaultInstance()))
+ bdchain.api.grpc.acchain.Block.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetBlockByNumber"))
.build();
}
@@ -123,30 +123,30 @@ public final class AccountingChainGrpc {
return getGetBlockByNumberMethod;
}
- private static volatile io.grpc.MethodDescriptor getGetBlockByHashMethod;
+ private static volatile io.grpc.MethodDescriptor getGetBlockByHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlockByHash",
- requestType = bdchain.api.grpc.GetBlockByHashRequest.class,
- responseType = bdchain.api.grpc.Block.class,
+ requestType = bdchain.api.grpc.acchain.GetBlockByHashRequest.class,
+ responseType = bdchain.api.grpc.acchain.Block.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getGetBlockByHashMethod() {
- io.grpc.MethodDescriptor getGetBlockByHashMethod;
+ public static io.grpc.MethodDescriptor getGetBlockByHashMethod() {
+ io.grpc.MethodDescriptor getGetBlockByHashMethod;
if ((getGetBlockByHashMethod = AccountingChainGrpc.getGetBlockByHashMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetBlockByHashMethod = AccountingChainGrpc.getGetBlockByHashMethod) == null) {
AccountingChainGrpc.getGetBlockByHashMethod = getGetBlockByHashMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "GetBlockByHash"))
+ "bdchain.api.acchain.AccountingChain", "GetBlockByHash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance()))
+ bdchain.api.grpc.acchain.GetBlockByHashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.Block.getDefaultInstance()))
+ bdchain.api.grpc.acchain.Block.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetBlockByHash"))
.build();
}
@@ -155,30 +155,30 @@ public final class AccountingChainGrpc {
return getGetBlockByHashMethod;
}
- private static volatile io.grpc.MethodDescriptor getGetTransactionByHashMethod;
+ private static volatile io.grpc.MethodDescriptor getGetTransactionByHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByHash",
- requestType = bdchain.api.grpc.GetTransactionByHashRequest.class,
- responseType = bdchain.api.grpc.Transaction.class,
+ requestType = bdchain.api.grpc.acchain.GetTransactionByHashRequest.class,
+ responseType = bdchain.api.grpc.acchain.Transaction.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getGetTransactionByHashMethod() {
- io.grpc.MethodDescriptor getGetTransactionByHashMethod;
+ public static io.grpc.MethodDescriptor getGetTransactionByHashMethod() {
+ io.grpc.MethodDescriptor getGetTransactionByHashMethod;
if ((getGetTransactionByHashMethod = AccountingChainGrpc.getGetTransactionByHashMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetTransactionByHashMethod = AccountingChainGrpc.getGetTransactionByHashMethod) == null) {
AccountingChainGrpc.getGetTransactionByHashMethod = getGetTransactionByHashMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "GetTransactionByHash"))
+ "bdchain.api.acchain.AccountingChain", "GetTransactionByHash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance()))
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.Transaction.getDefaultInstance()))
+ bdchain.api.grpc.acchain.Transaction.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByHash"))
.build();
}
@@ -187,30 +187,30 @@ public final class AccountingChainGrpc {
return getGetTransactionByHashMethod;
}
- private static volatile io.grpc.MethodDescriptor getGetTransactionByBlockNumberAndIndexMethod;
+ private static volatile io.grpc.MethodDescriptor getGetTransactionByBlockNumberAndIndexMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockNumberAndIndex",
- requestType = bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class,
- responseType = bdchain.api.grpc.Transaction.class,
+ requestType = bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.class,
+ responseType = bdchain.api.grpc.acchain.Transaction.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getGetTransactionByBlockNumberAndIndexMethod() {
- io.grpc.MethodDescriptor getGetTransactionByBlockNumberAndIndexMethod;
+ public static io.grpc.MethodDescriptor getGetTransactionByBlockNumberAndIndexMethod() {
+ io.grpc.MethodDescriptor getGetTransactionByBlockNumberAndIndexMethod;
if ((getGetTransactionByBlockNumberAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetTransactionByBlockNumberAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod) == null) {
AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod = getGetTransactionByBlockNumberAndIndexMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "GetTransactionByBlockNumberAndIndex"))
+ "bdchain.api.acchain.AccountingChain", "GetTransactionByBlockNumberAndIndex"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()))
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.Transaction.getDefaultInstance()))
+ bdchain.api.grpc.acchain.Transaction.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByBlockNumberAndIndex"))
.build();
}
@@ -219,30 +219,30 @@ public final class AccountingChainGrpc {
return getGetTransactionByBlockNumberAndIndexMethod;
}
- private static volatile io.grpc.MethodDescriptor getGetTransactionByBlockHashAndIndexMethod;
+ private static volatile io.grpc.MethodDescriptor getGetTransactionByBlockHashAndIndexMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockHashAndIndex",
- requestType = bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class,
- responseType = bdchain.api.grpc.Transaction.class,
+ requestType = bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.class,
+ responseType = bdchain.api.grpc.acchain.Transaction.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getGetTransactionByBlockHashAndIndexMethod() {
- io.grpc.MethodDescriptor getGetTransactionByBlockHashAndIndexMethod;
+ public static io.grpc.MethodDescriptor getGetTransactionByBlockHashAndIndexMethod() {
+ io.grpc.MethodDescriptor getGetTransactionByBlockHashAndIndexMethod;
if ((getGetTransactionByBlockHashAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetTransactionByBlockHashAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod = getGetTransactionByBlockHashAndIndexMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.AccountingChain", "GetTransactionByBlockHashAndIndex"))
+ "bdchain.api.acchain.AccountingChain", "GetTransactionByBlockHashAndIndex"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()))
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.Transaction.getDefaultInstance()))
+ bdchain.api.grpc.acchain.Transaction.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByBlockHashAndIndex"))
.build();
}
@@ -281,49 +281,49 @@ public final class AccountingChainGrpc {
/**
*/
public void clientVersion(com.google.protobuf.Empty request,
- io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver);
}
/**
*/
- public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void blockNumber(bdchain.api.grpc.acchain.BlockNumberRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getBlockNumberMethod(), responseObserver);
}
/**
*/
- public void getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getBlockByNumber(bdchain.api.grpc.acchain.GetBlockByNumberRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetBlockByNumberMethod(), responseObserver);
}
/**
*/
- public void getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getBlockByHash(bdchain.api.grpc.acchain.GetBlockByHashRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetBlockByHashMethod(), responseObserver);
}
/**
*/
- public void getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getTransactionByHash(bdchain.api.grpc.acchain.GetTransactionByHashRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByHashMethod(), responseObserver);
}
/**
*/
- public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByBlockNumberAndIndexMethod(), responseObserver);
}
/**
*/
- public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByBlockHashAndIndexMethod(), responseObserver);
}
@@ -334,49 +334,49 @@ public final class AccountingChainGrpc {
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
- bdchain.api.grpc.ClientVersionResponse>(
+ bdchain.api.grpc.common.ClientVersionResponse>(
this, METHODID_CLIENT_VERSION)))
.addMethod(
getBlockNumberMethod(),
asyncUnaryCall(
new MethodHandlers<
- bdchain.api.grpc.BlockNumberRequest,
- bdchain.api.grpc.BlockNumberResponse>(
+ bdchain.api.grpc.acchain.BlockNumberRequest,
+ bdchain.api.grpc.acchain.BlockNumberResponse>(
this, METHODID_BLOCK_NUMBER)))
.addMethod(
getGetBlockByNumberMethod(),
asyncUnaryCall(
new MethodHandlers<
- bdchain.api.grpc.GetBlockByNumberRequest,
- bdchain.api.grpc.Block>(
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest,
+ bdchain.api.grpc.acchain.Block>(
this, METHODID_GET_BLOCK_BY_NUMBER)))
.addMethod(
getGetBlockByHashMethod(),
asyncUnaryCall(
new MethodHandlers<
- bdchain.api.grpc.GetBlockByHashRequest,
- bdchain.api.grpc.Block>(
+ bdchain.api.grpc.acchain.GetBlockByHashRequest,
+ bdchain.api.grpc.acchain.Block>(
this, METHODID_GET_BLOCK_BY_HASH)))
.addMethod(
getGetTransactionByHashMethod(),
asyncUnaryCall(
new MethodHandlers<
- bdchain.api.grpc.GetTransactionByHashRequest,
- bdchain.api.grpc.Transaction>(
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest,
+ bdchain.api.grpc.acchain.Transaction>(
this, METHODID_GET_TRANSACTION_BY_HASH)))
.addMethod(
getGetTransactionByBlockNumberAndIndexMethod(),
asyncUnaryCall(
new MethodHandlers<
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
- bdchain.api.grpc.Transaction>(
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest,
+ bdchain.api.grpc.acchain.Transaction>(
this, METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX)))
.addMethod(
getGetTransactionByBlockHashAndIndexMethod(),
asyncUnaryCall(
new MethodHandlers<
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
- bdchain.api.grpc.Transaction>(
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest,
+ bdchain.api.grpc.acchain.Transaction>(
this, METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)))
.build();
}
@@ -403,55 +403,55 @@ public final class AccountingChainGrpc {
/**
*/
public void clientVersion(com.google.protobuf.Empty request,
- io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
- public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void blockNumber(bdchain.api.grpc.acchain.BlockNumberRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getBlockNumberMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
- public void getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getBlockByNumber(bdchain.api.grpc.acchain.GetBlockByNumberRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetBlockByNumberMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
- public void getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getBlockByHash(bdchain.api.grpc.acchain.GetBlockByHashRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
- public void getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getTransactionByHash(bdchain.api.grpc.acchain.GetTransactionByHashRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
- public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
- public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request,
- io.grpc.stub.StreamObserver responseObserver) {
+ public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request, responseObserver);
}
@@ -477,49 +477,49 @@ public final class AccountingChainGrpc {
/**
*/
- public bdchain.api.grpc.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
+ public bdchain.api.grpc.common.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getClientVersionMethod(), getCallOptions(), request);
}
/**
*/
- public bdchain.api.grpc.BlockNumberResponse blockNumber(bdchain.api.grpc.BlockNumberRequest request) {
+ public bdchain.api.grpc.acchain.BlockNumberResponse blockNumber(bdchain.api.grpc.acchain.BlockNumberRequest request) {
return blockingUnaryCall(
getChannel(), getBlockNumberMethod(), getCallOptions(), request);
}
/**
*/
- public bdchain.api.grpc.Block getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request) {
+ public bdchain.api.grpc.acchain.Block getBlockByNumber(bdchain.api.grpc.acchain.GetBlockByNumberRequest request) {
return blockingUnaryCall(
getChannel(), getGetBlockByNumberMethod(), getCallOptions(), request);
}
/**
*/
- public bdchain.api.grpc.Block getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request) {
+ public bdchain.api.grpc.acchain.Block getBlockByHash(bdchain.api.grpc.acchain.GetBlockByHashRequest request) {
return blockingUnaryCall(
getChannel(), getGetBlockByHashMethod(), getCallOptions(), request);
}
/**
*/
- public bdchain.api.grpc.Transaction getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request) {
+ public bdchain.api.grpc.acchain.Transaction getTransactionByHash(bdchain.api.grpc.acchain.GetTransactionByHashRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByHashMethod(), getCallOptions(), request);
}
/**
*/
- public bdchain.api.grpc.Transaction getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request) {
+ public bdchain.api.grpc.acchain.Transaction getTransactionByBlockNumberAndIndex(bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions(), request);
}
/**
*/
- public bdchain.api.grpc.Transaction getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request) {
+ public bdchain.api.grpc.acchain.Transaction getTransactionByBlockHashAndIndex(bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByBlockHashAndIndexMethod(), getCallOptions(), request);
}
@@ -545,7 +545,7 @@ public final class AccountingChainGrpc {
/**
*/
- public com.google.common.util.concurrent.ListenableFuture clientVersion(
+ public com.google.common.util.concurrent.ListenableFuture clientVersion(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request);
@@ -553,48 +553,48 @@ public final class AccountingChainGrpc {
/**
*/
- public com.google.common.util.concurrent.ListenableFuture blockNumber(
- bdchain.api.grpc.BlockNumberRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture blockNumber(
+ bdchain.api.grpc.acchain.BlockNumberRequest request) {
return futureUnaryCall(
getChannel().newCall(getBlockNumberMethod(), getCallOptions()), request);
}
/**
*/
- public com.google.common.util.concurrent.ListenableFuture getBlockByNumber(
- bdchain.api.grpc.GetBlockByNumberRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture getBlockByNumber(
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetBlockByNumberMethod(), getCallOptions()), request);
}
/**
*/
- public com.google.common.util.concurrent.ListenableFuture getBlockByHash(
- bdchain.api.grpc.GetBlockByHashRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture getBlockByHash(
+ bdchain.api.grpc.acchain.GetBlockByHashRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request);
}
/**
*/
- public com.google.common.util.concurrent.ListenableFuture getTransactionByHash(
- bdchain.api.grpc.GetTransactionByHashRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture getTransactionByHash(
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request);
}
/**
*/
- public com.google.common.util.concurrent.ListenableFuture getTransactionByBlockNumberAndIndex(
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture getTransactionByBlockNumberAndIndex(
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions()), request);
}
/**
*/
- public com.google.common.util.concurrent.ListenableFuture getTransactionByBlockHashAndIndex(
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request) {
+ public com.google.common.util.concurrent.ListenableFuture getTransactionByBlockHashAndIndex(
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request);
}
@@ -627,31 +627,31 @@ public final class AccountingChainGrpc {
switch (methodId) {
case METHODID_CLIENT_VERSION:
serviceImpl.clientVersion((com.google.protobuf.Empty) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_BLOCK_NUMBER:
- serviceImpl.blockNumber((bdchain.api.grpc.BlockNumberRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ serviceImpl.blockNumber((bdchain.api.grpc.acchain.BlockNumberRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_BLOCK_BY_NUMBER:
- serviceImpl.getBlockByNumber((bdchain.api.grpc.GetBlockByNumberRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ serviceImpl.getBlockByNumber((bdchain.api.grpc.acchain.GetBlockByNumberRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_BLOCK_BY_HASH:
- serviceImpl.getBlockByHash((bdchain.api.grpc.GetBlockByHashRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ serviceImpl.getBlockByHash((bdchain.api.grpc.acchain.GetBlockByHashRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_HASH:
- serviceImpl.getTransactionByHash((bdchain.api.grpc.GetTransactionByHashRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ serviceImpl.getTransactionByHash((bdchain.api.grpc.acchain.GetTransactionByHashRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX:
- serviceImpl.getTransactionByBlockNumberAndIndex((bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ serviceImpl.getTransactionByBlockNumberAndIndex((bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX:
- serviceImpl.getTransactionByBlockHashAndIndex((bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) request,
- (io.grpc.stub.StreamObserver) responseObserver);
+ serviceImpl.getTransactionByBlockHashAndIndex((bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
@@ -675,7 +675,7 @@ public final class AccountingChainGrpc {
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.getDescriptor();
+ return bdchain.api.grpc.acchain.AccountingChainProto.getDescriptor();
}
@java.lang.Override
diff --git a/src/main/java/bdchain/api/grpc/acchain/AccountingChainProto.java b/src/main/java/bdchain/api/grpc/acchain/AccountingChainProto.java
new file mode 100644
index 0000000..410127c
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/acchain/AccountingChainProto.java
@@ -0,0 +1,193 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/ac_chain.proto
+
+package bdchain.api.grpc.acchain;
+
+public final class AccountingChainProto {
+ private AccountingChainProto() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_Transaction_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_Transaction_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_Block_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_Block_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_BlockNumberRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_BlockNumberRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_BlockNumberResponse_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_BlockNumberResponse_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_GetBlockByNumberRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_GetBlockByNumberRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_GetBlockByHashRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_GetBlockByHashRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_GetTransactionByHashRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_GetTransactionByHashRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\032bdchain/api/ac_chain.proto\022\023bdchain.ap" +
+ "i.acchain\032\033google/protobuf/empty.proto\032\030" +
+ "bdchain/api/common.proto\"\337\001\n\013Transaction" +
+ "\022\024\n\014block_number\030\001 \001(\004\022\022\n\nblock_hash\030\002 \001" +
+ "(\014\022\r\n\005index\030\003 \001(\r\022\014\n\004hash\030\004 \001(\014\0221\n\004type\030" +
+ "\005 \001(\0162#.bdchain.api.common.TransactionTy" +
+ "pe\022\014\n\004from\030\006 \001(\014\022\r\n\005nonce\030\007 \001(\004\022\n\n\002to\030\010 " +
+ "\001(\014\022\014\n\004data\030\t \001(\014\022\t\n\001v\030\n \001(\014\022\t\n\001r\030\013 \001(\014\022" +
+ "\t\n\001s\030\014 \001(\014\"\335\001\n\005Block\022\016\n\006number\030\001 \001(\004\022\014\n\004" +
+ "hash\030\002 \001(\014\022\023\n\013parent_hash\030\003 \001(\014\022\021\n\twitne" +
+ "sses\030\004 \003(\014\022\021\n\ttimestamp\030\005 \001(\003\022\014\n\004size\030\006 " +
+ "\001(\004\022\031\n\021transactions_root\030\007 \001(\014\0226\n\014transa" +
+ "ctions\030\010 \003(\0132 .bdchain.api.acchain.Trans" +
+ "action\022\032\n\022transaction_hashes\030\t \003(\014\"$\n\022Bl" +
+ "ockNumberRequest\022\016\n\006ledger\030\001 \001(\t\"+\n\023Bloc" +
+ "kNumberResponse\022\024\n\014block_number\030\001 \001(\004\"S\n" +
+ "\027GetBlockByNumberRequest\022\016\n\006ledger\030\001 \001(\t" +
+ "\022\016\n\006number\030\002 \001(\004\022\030\n\020full_transaction\030\003 \001" +
+ "(\010\"O\n\025GetBlockByHashRequest\022\016\n\006ledger\030\001 " +
+ "\001(\t\022\014\n\004hash\030\002 \001(\014\022\030\n\020full_transaction\030\003 " +
+ "\001(\010\";\n\033GetTransactionByHashRequest\022\016\n\006le" +
+ "dger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\"a\n*GetTransacti" +
+ "onByBlockNumberAndIndexRequest\022\016\n\006ledger" +
+ "\030\001 \001(\t\022\024\n\014block_number\030\002 \001(\004\022\r\n\005index\030\003 " +
+ "\001(\r\"]\n(GetTransactionByBlockHashAndIndex" +
+ "Request\022\016\n\006ledger\030\001 \001(\t\022\022\n\nblock_hash\030\002 " +
+ "\001(\014\022\r\n\005index\030\003 \001(\r2\375\005\n\017AccountingChain\022R" +
+ "\n\rClientVersion\022\026.google.protobuf.Empty\032" +
+ ").bdchain.api.common.ClientVersionRespon" +
+ "se\022`\n\013BlockNumber\022\'.bdchain.api.acchain." +
+ "BlockNumberRequest\032(.bdchain.api.acchain" +
+ ".BlockNumberResponse\022\\\n\020GetBlockByNumber" +
+ "\022,.bdchain.api.acchain.GetBlockByNumberR" +
+ "equest\032\032.bdchain.api.acchain.Block\022X\n\016Ge" +
+ "tBlockByHash\022*.bdchain.api.acchain.GetBl" +
+ "ockByHashRequest\032\032.bdchain.api.acchain.B" +
+ "lock\022j\n\024GetTransactionByHash\0220.bdchain.a" +
+ "pi.acchain.GetTransactionByHashRequest\032 " +
+ ".bdchain.api.acchain.Transaction\022\210\001\n#Get" +
+ "TransactionByBlockNumberAndIndex\022?.bdcha" +
+ "in.api.acchain.GetTransactionByBlockNumb" +
+ "erAndIndexRequest\032 .bdchain.api.acchain." +
+ "Transaction\022\204\001\n!GetTransactionByBlockHas" +
+ "hAndIndex\022=.bdchain.api.acchain.GetTrans" +
+ "actionByBlockHashAndIndexRequest\032 .bdcha" +
+ "in.api.acchain.TransactionBP\n\030bdchain.ap" +
+ "i.grpc.acchainB\024AccountingChainProtoP\001Z\034" +
+ "bdchain/sdk/api/grpc/acchainb\006proto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.protobuf.EmptyProto.getDescriptor(),
+ bdchain.api.grpc.common.CommonProto.getDescriptor(),
+ }, assigner);
+ internal_static_bdchain_api_acchain_Transaction_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_bdchain_api_acchain_Transaction_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_Transaction_descriptor,
+ new java.lang.String[] { "BlockNumber", "BlockHash", "Index", "Hash", "Type", "From", "Nonce", "To", "Data", "V", "R", "S", });
+ internal_static_bdchain_api_acchain_Block_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_bdchain_api_acchain_Block_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_Block_descriptor,
+ new java.lang.String[] { "Number", "Hash", "ParentHash", "Witnesses", "Timestamp", "Size", "TransactionsRoot", "Transactions", "TransactionHashes", });
+ internal_static_bdchain_api_acchain_BlockNumberRequest_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_bdchain_api_acchain_BlockNumberRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_BlockNumberRequest_descriptor,
+ new java.lang.String[] { "Ledger", });
+ internal_static_bdchain_api_acchain_BlockNumberResponse_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_bdchain_api_acchain_BlockNumberResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_BlockNumberResponse_descriptor,
+ new java.lang.String[] { "BlockNumber", });
+ internal_static_bdchain_api_acchain_GetBlockByNumberRequest_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_bdchain_api_acchain_GetBlockByNumberRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_GetBlockByNumberRequest_descriptor,
+ new java.lang.String[] { "Ledger", "Number", "FullTransaction", });
+ internal_static_bdchain_api_acchain_GetBlockByHashRequest_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_bdchain_api_acchain_GetBlockByHashRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_GetBlockByHashRequest_descriptor,
+ new java.lang.String[] { "Ledger", "Hash", "FullTransaction", });
+ internal_static_bdchain_api_acchain_GetTransactionByHashRequest_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_bdchain_api_acchain_GetTransactionByHashRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_GetTransactionByHashRequest_descriptor,
+ new java.lang.String[] { "Ledger", "Hash", });
+ internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_descriptor =
+ getDescriptor().getMessageTypes().get(7);
+ internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_descriptor,
+ new java.lang.String[] { "Ledger", "BlockNumber", "Index", });
+ internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_descriptor =
+ getDescriptor().getMessageTypes().get(8);
+ internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_descriptor,
+ new java.lang.String[] { "Ledger", "BlockHash", "Index", });
+ com.google.protobuf.EmptyProto.getDescriptor();
+ bdchain.api.grpc.common.CommonProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/src/main/java/bdchain/api/grpc/Block.java b/src/main/java/bdchain/api/grpc/acchain/Block.java
similarity index 71%
rename from src/main/java/bdchain/api/grpc/Block.java
rename to src/main/java/bdchain/api/grpc/acchain/Block.java
index 9cedfa6..88bb154 100644
--- a/src/main/java/bdchain/api/grpc/Block.java
+++ b/src/main/java/bdchain/api/grpc/acchain/Block.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.Block}
+ * Protobuf type {@code bdchain.api.acchain.Block}
*/
public final class Block extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.Block)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.Block)
BlockOrBuilder {
private static final long serialVersionUID = 0L;
// Use Block.newBuilder() to construct.
@@ -16,12 +16,9 @@ private static final long serialVersionUID = 0L;
super(builder);
}
private Block() {
- number_ = 0L;
hash_ = com.google.protobuf.ByteString.EMPTY;
parentHash_ = com.google.protobuf.ByteString.EMPTY;
- witness_ = com.google.protobuf.ByteString.EMPTY;
- timestamp_ = 0L;
- size_ = 0L;
+ witnesses_ = java.util.Collections.emptyList();
transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
transactions_ = java.util.Collections.emptyList();
transactionHashes_ = java.util.Collections.emptyList();
@@ -67,13 +64,16 @@ private static final long serialVersionUID = 0L;
break;
}
case 34: {
-
- witness_ = input.readBytes();
+ if (!((mutable_bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000008;
+ }
+ witnesses_.add(input.readBytes());
break;
}
case 40: {
- timestamp_ = input.readUInt64();
+ timestamp_ = input.readInt64();
break;
}
case 48: {
@@ -87,16 +87,16 @@ private static final long serialVersionUID = 0L;
break;
}
case 66: {
- if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
- transactions_ = new java.util.ArrayList();
+ if (!((mutable_bitField0_ & 0x00000080) != 0)) {
+ transactions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000080;
}
transactions_.add(
- input.readMessage(bdchain.api.grpc.Transaction.parser(), extensionRegistry));
+ input.readMessage(bdchain.api.grpc.acchain.Transaction.parser(), extensionRegistry));
break;
}
case 74: {
- if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
+ if (!((mutable_bitField0_ & 0x00000100) != 0)) {
transactionHashes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
@@ -104,7 +104,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -118,11 +118,14 @@ private static final long serialVersionUID = 0L;
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((mutable_bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = java.util.Collections.unmodifiableList(witnesses_); // C
+ }
+ if (((mutable_bitField0_ & 0x00000080) != 0)) {
transactions_ = java.util.Collections.unmodifiableList(transactions_);
}
- if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
- transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_);
+ if (((mutable_bitField0_ & 0x00000100) != 0)) {
+ transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
@@ -130,15 +133,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Block_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Block_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Block_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Block_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.Block.class, bdchain.api.grpc.Block.Builder.class);
+ bdchain.api.grpc.acchain.Block.class, bdchain.api.grpc.acchain.Block.Builder.class);
}
private int bitField0_;
@@ -181,17 +184,38 @@ private static final long serialVersionUID = 0L;
return parentHash_;
}
- public static final int WITNESS_FIELD_NUMBER = 4;
- private com.google.protobuf.ByteString witness_;
+ public static final int WITNESSES_FIELD_NUMBER = 4;
+ private java.util.List witnesses_;
/**
*
- * 见证者账户地址
+ * 见证者账户地址的数组
*
*
- * bytes witness = 4;
+ * repeated bytes witnesses = 4;
*/
- public com.google.protobuf.ByteString getWitness() {
- return witness_;
+ public java.util.List
+ getWitnessesList() {
+ return witnesses_;
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public int getWitnessesCount() {
+ return witnesses_.size();
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public com.google.protobuf.ByteString getWitnesses(int index) {
+ return witnesses_.get(index);
}
public static final int TIMESTAMP_FIELD_NUMBER = 5;
@@ -201,7 +225,7 @@ private static final long serialVersionUID = 0L;
* 区块产生时的UNIX时间戳
*
*
- * uint64 timestamp = 5;
+ * int64 timestamp = 5;
*/
public long getTimestamp() {
return timestamp_;
@@ -234,15 +258,15 @@ private static final long serialVersionUID = 0L;
}
public static final int TRANSACTIONS_FIELD_NUMBER = 8;
- private java.util.List transactions_;
+ private java.util.List transactions_;
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public java.util.List getTransactionsList() {
+ public java.util.List getTransactionsList() {
return transactions_;
}
/**
@@ -250,9 +274,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public java.util.List extends bdchain.api.grpc.TransactionOrBuilder>
+ public java.util.List extends bdchain.api.grpc.acchain.TransactionOrBuilder>
getTransactionsOrBuilderList() {
return transactions_;
}
@@ -261,7 +285,7 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public int getTransactionsCount() {
return transactions_.size();
@@ -271,9 +295,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.Transaction getTransactions(int index) {
+ public bdchain.api.grpc.acchain.Transaction getTransactions(int index) {
return transactions_.get(index);
}
/**
@@ -281,9 +305,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.TransactionOrBuilder getTransactionsOrBuilder(
+ public bdchain.api.grpc.acchain.TransactionOrBuilder getTransactionsOrBuilder(
int index) {
return transactions_.get(index);
}
@@ -345,11 +369,11 @@ private static final long serialVersionUID = 0L;
if (!parentHash_.isEmpty()) {
output.writeBytes(3, parentHash_);
}
- if (!witness_.isEmpty()) {
- output.writeBytes(4, witness_);
+ for (int i = 0; i < witnesses_.size(); i++) {
+ output.writeBytes(4, witnesses_.get(i));
}
if (timestamp_ != 0L) {
- output.writeUInt64(5, timestamp_);
+ output.writeInt64(5, timestamp_);
}
if (size_ != 0L) {
output.writeUInt64(6, size_);
@@ -384,13 +408,18 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(3, parentHash_);
}
- if (!witness_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, witness_);
+ {
+ int dataSize = 0;
+ for (int i = 0; i < witnesses_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(witnesses_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getWitnessesList().size();
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
- .computeUInt64Size(5, timestamp_);
+ .computeInt64Size(5, timestamp_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
@@ -423,32 +452,31 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.Block)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.Block)) {
return super.equals(obj);
}
- bdchain.api.grpc.Block other = (bdchain.api.grpc.Block) obj;
+ bdchain.api.grpc.acchain.Block other = (bdchain.api.grpc.acchain.Block) obj;
- boolean result = true;
- result = result && (getNumber()
- == other.getNumber());
- result = result && getHash()
- .equals(other.getHash());
- result = result && getParentHash()
- .equals(other.getParentHash());
- result = result && getWitness()
- .equals(other.getWitness());
- result = result && (getTimestamp()
- == other.getTimestamp());
- result = result && (getSize()
- == other.getSize());
- result = result && getTransactionsRoot()
- .equals(other.getTransactionsRoot());
- result = result && getTransactionsList()
- .equals(other.getTransactionsList());
- result = result && getTransactionHashesList()
- .equals(other.getTransactionHashesList());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getNumber()
+ != other.getNumber()) return false;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (!getParentHash()
+ .equals(other.getParentHash())) return false;
+ if (!getWitnessesList()
+ .equals(other.getWitnessesList())) return false;
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ if (getSize()
+ != other.getSize()) return false;
+ if (!getTransactionsRoot()
+ .equals(other.getTransactionsRoot())) return false;
+ if (!getTransactionsList()
+ .equals(other.getTransactionsList())) return false;
+ if (!getTransactionHashesList()
+ .equals(other.getTransactionHashesList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -465,8 +493,10 @@ private static final long serialVersionUID = 0L;
hash = (53 * hash) + getHash().hashCode();
hash = (37 * hash) + PARENT_HASH_FIELD_NUMBER;
hash = (53 * hash) + getParentHash().hashCode();
- hash = (37 * hash) + WITNESS_FIELD_NUMBER;
- hash = (53 * hash) + getWitness().hashCode();
+ if (getWitnessesCount() > 0) {
+ hash = (37 * hash) + WITNESSES_FIELD_NUMBER;
+ hash = (53 * hash) + getWitnessesList().hashCode();
+ }
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
@@ -488,69 +518,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.Block parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.Block parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.Block parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.Block parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.Block parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.Block parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.Block parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.Block parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.Block parseFrom(
+ public static bdchain.api.grpc.acchain.Block parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -563,7 +593,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.Block prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.Block prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -579,26 +609,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.Block}
+ * Protobuf type {@code bdchain.api.acchain.Block}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.Block)
- bdchain.api.grpc.BlockOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.Block)
+ bdchain.api.grpc.acchain.BlockOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Block_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Block_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Block_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Block_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.Block.class, bdchain.api.grpc.Block.Builder.class);
+ bdchain.api.grpc.acchain.Block.class, bdchain.api.grpc.acchain.Block.Builder.class);
}
- // Construct using bdchain.api.grpc.Block.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.Block.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -623,8 +653,8 @@ private static final long serialVersionUID = 0L;
parentHash_ = com.google.protobuf.ByteString.EMPTY;
- witness_ = com.google.protobuf.ByteString.EMPTY;
-
+ witnesses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
timestamp_ = 0L;
size_ = 0L;
@@ -645,17 +675,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Block_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Block_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.Block getDefaultInstanceForType() {
- return bdchain.api.grpc.Block.getDefaultInstance();
+ public bdchain.api.grpc.acchain.Block getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.Block.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.Block build() {
- bdchain.api.grpc.Block result = buildPartial();
+ public bdchain.api.grpc.acchain.Block build() {
+ bdchain.api.grpc.acchain.Block result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -663,19 +693,23 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.Block buildPartial() {
- bdchain.api.grpc.Block result = new bdchain.api.grpc.Block(this);
+ public bdchain.api.grpc.acchain.Block buildPartial() {
+ bdchain.api.grpc.acchain.Block result = new bdchain.api.grpc.acchain.Block(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.number_ = number_;
result.hash_ = hash_;
result.parentHash_ = parentHash_;
- result.witness_ = witness_;
+ if (((bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = java.util.Collections.unmodifiableList(witnesses_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.witnesses_ = witnesses_;
result.timestamp_ = timestamp_;
result.size_ = size_;
result.transactionsRoot_ = transactionsRoot_;
if (transactionsBuilder_ == null) {
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000080) != 0)) {
transactions_ = java.util.Collections.unmodifiableList(transactions_);
bitField0_ = (bitField0_ & ~0x00000080);
}
@@ -683,7 +717,7 @@ private static final long serialVersionUID = 0L;
} else {
result.transactions_ = transactionsBuilder_.build();
}
- if (((bitField0_ & 0x00000100) == 0x00000100)) {
+ if (((bitField0_ & 0x00000100) != 0)) {
transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_);
bitField0_ = (bitField0_ & ~0x00000100);
}
@@ -695,48 +729,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.Block) {
- return mergeFrom((bdchain.api.grpc.Block)other);
+ if (other instanceof bdchain.api.grpc.acchain.Block) {
+ return mergeFrom((bdchain.api.grpc.acchain.Block)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.Block other) {
- if (other == bdchain.api.grpc.Block.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.Block other) {
+ if (other == bdchain.api.grpc.acchain.Block.getDefaultInstance()) return this;
if (other.getNumber() != 0L) {
setNumber(other.getNumber());
}
@@ -746,8 +780,15 @@ private static final long serialVersionUID = 0L;
if (other.getParentHash() != com.google.protobuf.ByteString.EMPTY) {
setParentHash(other.getParentHash());
}
- if (other.getWitness() != com.google.protobuf.ByteString.EMPTY) {
- setWitness(other.getWitness());
+ if (!other.witnesses_.isEmpty()) {
+ if (witnesses_.isEmpty()) {
+ witnesses_ = other.witnesses_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureWitnessesIsMutable();
+ witnesses_.addAll(other.witnesses_);
+ }
+ onChanged();
}
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
@@ -809,11 +850,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.Block parsedMessage = null;
+ bdchain.api.grpc.acchain.Block parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.Block) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.Block) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -944,43 +985,103 @@ private static final long serialVersionUID = 0L;
return this;
}
- private com.google.protobuf.ByteString witness_ = com.google.protobuf.ByteString.EMPTY;
- /**
- *
- * 见证者账户地址
- *
- *
- * bytes witness = 4;
- */
- public com.google.protobuf.ByteString getWitness() {
- return witness_;
+ private java.util.List witnesses_ = java.util.Collections.emptyList();
+ private void ensureWitnessesIsMutable() {
+ if (!((bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = new java.util.ArrayList(witnesses_);
+ bitField0_ |= 0x00000008;
+ }
}
/**
*
- * 见证者账户地址
+ * 见证者账户地址的数组
*
*
- * bytes witness = 4;
+ * repeated bytes witnesses = 4;
*/
- public Builder setWitness(com.google.protobuf.ByteString value) {
+ public java.util.List
+ getWitnessesList() {
+ return ((bitField0_ & 0x00000008) != 0) ?
+ java.util.Collections.unmodifiableList(witnesses_) : witnesses_;
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public int getWitnessesCount() {
+ return witnesses_.size();
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public com.google.protobuf.ByteString getWitnesses(int index) {
+ return witnesses_.get(index);
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder setWitnesses(
+ int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
-
- witness_ = value;
+ ensureWitnessesIsMutable();
+ witnesses_.set(index, value);
onChanged();
return this;
}
/**
*
- * 见证者账户地址
+ * 见证者账户地址的数组
*
*
- * bytes witness = 4;
+ * repeated bytes witnesses = 4;
*/
- public Builder clearWitness() {
-
- witness_ = getDefaultInstance().getWitness();
+ public Builder addWitnesses(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWitnessesIsMutable();
+ witnesses_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder addAllWitnesses(
+ java.lang.Iterable extends com.google.protobuf.ByteString> values) {
+ ensureWitnessesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, witnesses_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder clearWitnesses() {
+ witnesses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
@@ -991,7 +1092,7 @@ private static final long serialVersionUID = 0L;
* 区块产生时的UNIX时间戳
*
*
- * uint64 timestamp = 5;
+ * int64 timestamp = 5;
*/
public long getTimestamp() {
return timestamp_;
@@ -1001,7 +1102,7 @@ private static final long serialVersionUID = 0L;
* 区块产生时的UNIX时间戳
*
*
- * uint64 timestamp = 5;
+ * int64 timestamp = 5;
*/
public Builder setTimestamp(long value) {
@@ -1014,7 +1115,7 @@ private static final long serialVersionUID = 0L;
* 区块产生时的UNIX时间戳
*
*
- * uint64 timestamp = 5;
+ * int64 timestamp = 5;
*/
public Builder clearTimestamp() {
@@ -1102,26 +1203,26 @@ private static final long serialVersionUID = 0L;
return this;
}
- private java.util.List transactions_ =
+ private java.util.List transactions_ =
java.util.Collections.emptyList();
private void ensureTransactionsIsMutable() {
- if (!((bitField0_ & 0x00000080) == 0x00000080)) {
- transactions_ = new java.util.ArrayList(transactions_);
+ if (!((bitField0_ & 0x00000080) != 0)) {
+ transactions_ = new java.util.ArrayList(transactions_);
bitField0_ |= 0x00000080;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
- bdchain.api.grpc.Transaction, bdchain.api.grpc.Transaction.Builder, bdchain.api.grpc.TransactionOrBuilder> transactionsBuilder_;
+ bdchain.api.grpc.acchain.Transaction, bdchain.api.grpc.acchain.Transaction.Builder, bdchain.api.grpc.acchain.TransactionOrBuilder> transactionsBuilder_;
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public java.util.List getTransactionsList() {
+ public java.util.List getTransactionsList() {
if (transactionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(transactions_);
} else {
@@ -1133,7 +1234,7 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public int getTransactionsCount() {
if (transactionsBuilder_ == null) {
@@ -1147,9 +1248,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.Transaction getTransactions(int index) {
+ public bdchain.api.grpc.acchain.Transaction getTransactions(int index) {
if (transactionsBuilder_ == null) {
return transactions_.get(index);
} else {
@@ -1161,10 +1262,10 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder setTransactions(
- int index, bdchain.api.grpc.Transaction value) {
+ int index, bdchain.api.grpc.acchain.Transaction value) {
if (transactionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1182,10 +1283,10 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder setTransactions(
- int index, bdchain.api.grpc.Transaction.Builder builderForValue) {
+ int index, bdchain.api.grpc.acchain.Transaction.Builder builderForValue) {
if (transactionsBuilder_ == null) {
ensureTransactionsIsMutable();
transactions_.set(index, builderForValue.build());
@@ -1200,9 +1301,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public Builder addTransactions(bdchain.api.grpc.Transaction value) {
+ public Builder addTransactions(bdchain.api.grpc.acchain.Transaction value) {
if (transactionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1220,10 +1321,10 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder addTransactions(
- int index, bdchain.api.grpc.Transaction value) {
+ int index, bdchain.api.grpc.acchain.Transaction value) {
if (transactionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1241,10 +1342,10 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder addTransactions(
- bdchain.api.grpc.Transaction.Builder builderForValue) {
+ bdchain.api.grpc.acchain.Transaction.Builder builderForValue) {
if (transactionsBuilder_ == null) {
ensureTransactionsIsMutable();
transactions_.add(builderForValue.build());
@@ -1259,10 +1360,10 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder addTransactions(
- int index, bdchain.api.grpc.Transaction.Builder builderForValue) {
+ int index, bdchain.api.grpc.acchain.Transaction.Builder builderForValue) {
if (transactionsBuilder_ == null) {
ensureTransactionsIsMutable();
transactions_.add(index, builderForValue.build());
@@ -1277,10 +1378,10 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder addAllTransactions(
- java.lang.Iterable extends bdchain.api.grpc.Transaction> values) {
+ java.lang.Iterable extends bdchain.api.grpc.acchain.Transaction> values) {
if (transactionsBuilder_ == null) {
ensureTransactionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
@@ -1296,7 +1397,7 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder clearTransactions() {
if (transactionsBuilder_ == null) {
@@ -1313,7 +1414,7 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
public Builder removeTransactions(int index) {
if (transactionsBuilder_ == null) {
@@ -1330,9 +1431,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.Transaction.Builder getTransactionsBuilder(
+ public bdchain.api.grpc.acchain.Transaction.Builder getTransactionsBuilder(
int index) {
return getTransactionsFieldBuilder().getBuilder(index);
}
@@ -1341,9 +1442,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.TransactionOrBuilder getTransactionsOrBuilder(
+ public bdchain.api.grpc.acchain.TransactionOrBuilder getTransactionsOrBuilder(
int index) {
if (transactionsBuilder_ == null) {
return transactions_.get(index); } else {
@@ -1355,9 +1456,9 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public java.util.List extends bdchain.api.grpc.TransactionOrBuilder>
+ public java.util.List extends bdchain.api.grpc.acchain.TransactionOrBuilder>
getTransactionsOrBuilderList() {
if (transactionsBuilder_ != null) {
return transactionsBuilder_.getMessageOrBuilderList();
@@ -1370,43 +1471,43 @@ private static final long serialVersionUID = 0L;
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.Transaction.Builder addTransactionsBuilder() {
+ public bdchain.api.grpc.acchain.Transaction.Builder addTransactionsBuilder() {
return getTransactionsFieldBuilder().addBuilder(
- bdchain.api.grpc.Transaction.getDefaultInstance());
+ bdchain.api.grpc.acchain.Transaction.getDefaultInstance());
}
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public bdchain.api.grpc.Transaction.Builder addTransactionsBuilder(
+ public bdchain.api.grpc.acchain.Transaction.Builder addTransactionsBuilder(
int index) {
return getTransactionsFieldBuilder().addBuilder(
- index, bdchain.api.grpc.Transaction.getDefaultInstance());
+ index, bdchain.api.grpc.acchain.Transaction.getDefaultInstance());
}
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- public java.util.List
+ public java.util.List
getTransactionsBuilderList() {
return getTransactionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
- bdchain.api.grpc.Transaction, bdchain.api.grpc.Transaction.Builder, bdchain.api.grpc.TransactionOrBuilder>
+ bdchain.api.grpc.acchain.Transaction, bdchain.api.grpc.acchain.Transaction.Builder, bdchain.api.grpc.acchain.TransactionOrBuilder>
getTransactionsFieldBuilder() {
if (transactionsBuilder_ == null) {
transactionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- bdchain.api.grpc.Transaction, bdchain.api.grpc.Transaction.Builder, bdchain.api.grpc.TransactionOrBuilder>(
+ bdchain.api.grpc.acchain.Transaction, bdchain.api.grpc.acchain.Transaction.Builder, bdchain.api.grpc.acchain.TransactionOrBuilder>(
transactions_,
- ((bitField0_ & 0x00000080) == 0x00000080),
+ ((bitField0_ & 0x00000080) != 0),
getParentForChildren(),
isClean());
transactions_ = null;
@@ -1416,7 +1517,7 @@ private static final long serialVersionUID = 0L;
private java.util.List transactionHashes_ = java.util.Collections.emptyList();
private void ensureTransactionHashesIsMutable() {
- if (!((bitField0_ & 0x00000100) == 0x00000100)) {
+ if (!((bitField0_ & 0x00000100) != 0)) {
transactionHashes_ = new java.util.ArrayList(transactionHashes_);
bitField0_ |= 0x00000100;
}
@@ -1430,7 +1531,8 @@ private static final long serialVersionUID = 0L;
*/
public java.util.List
getTransactionHashesList() {
- return java.util.Collections.unmodifiableList(transactionHashes_);
+ return ((bitField0_ & 0x00000100) != 0) ?
+ java.util.Collections.unmodifiableList(transactionHashes_) : transactionHashes_;
}
/**
*
@@ -1516,7 +1618,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -1526,16 +1628,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.Block)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.Block)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.Block)
- private static final bdchain.api.grpc.Block DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.Block)
+ private static final bdchain.api.grpc.acchain.Block DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.Block();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.Block();
}
- public static bdchain.api.grpc.Block getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.Block getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -1560,7 +1662,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.Block getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.Block getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/BlockNumberRequest.java b/src/main/java/bdchain/api/grpc/acchain/BlockNumberRequest.java
similarity index 75%
rename from src/main/java/bdchain/api/grpc/BlockNumberRequest.java
rename to src/main/java/bdchain/api/grpc/acchain/BlockNumberRequest.java
index 432007f..8be2353 100644
--- a/src/main/java/bdchain/api/grpc/BlockNumberRequest.java
+++ b/src/main/java/bdchain/api/grpc/acchain/BlockNumberRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.BlockNumberRequest}
+ * Protobuf type {@code bdchain.api.acchain.BlockNumberRequest}
*/
public final class BlockNumberRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.BlockNumberRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.BlockNumberRequest)
BlockNumberRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use BlockNumberRequest.newBuilder() to construct.
@@ -50,7 +50,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -70,15 +70,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.BlockNumberRequest.class, bdchain.api.grpc.BlockNumberRequest.Builder.class);
+ bdchain.api.grpc.acchain.BlockNumberRequest.class, bdchain.api.grpc.acchain.BlockNumberRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
@@ -154,16 +154,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.BlockNumberRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.BlockNumberRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.BlockNumberRequest other = (bdchain.api.grpc.BlockNumberRequest) obj;
+ bdchain.api.grpc.acchain.BlockNumberRequest other = (bdchain.api.grpc.acchain.BlockNumberRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -180,69 +179,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.BlockNumberRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.BlockNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -255,7 +254,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.BlockNumberRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.BlockNumberRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -271,26 +270,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.BlockNumberRequest}
+ * Protobuf type {@code bdchain.api.acchain.BlockNumberRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.BlockNumberRequest)
- bdchain.api.grpc.BlockNumberRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.BlockNumberRequest)
+ bdchain.api.grpc.acchain.BlockNumberRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.BlockNumberRequest.class, bdchain.api.grpc.BlockNumberRequest.Builder.class);
+ bdchain.api.grpc.acchain.BlockNumberRequest.class, bdchain.api.grpc.acchain.BlockNumberRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.BlockNumberRequest.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.BlockNumberRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -316,17 +315,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.BlockNumberRequest.getDefaultInstance();
+ public bdchain.api.grpc.acchain.BlockNumberRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.BlockNumberRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberRequest build() {
- bdchain.api.grpc.BlockNumberRequest result = buildPartial();
+ public bdchain.api.grpc.acchain.BlockNumberRequest build() {
+ bdchain.api.grpc.acchain.BlockNumberRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -334,8 +333,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberRequest buildPartial() {
- bdchain.api.grpc.BlockNumberRequest result = new bdchain.api.grpc.BlockNumberRequest(this);
+ public bdchain.api.grpc.acchain.BlockNumberRequest buildPartial() {
+ bdchain.api.grpc.acchain.BlockNumberRequest result = new bdchain.api.grpc.acchain.BlockNumberRequest(this);
result.ledger_ = ledger_;
onBuilt();
return result;
@@ -343,48 +342,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.BlockNumberRequest) {
- return mergeFrom((bdchain.api.grpc.BlockNumberRequest)other);
+ if (other instanceof bdchain.api.grpc.acchain.BlockNumberRequest) {
+ return mergeFrom((bdchain.api.grpc.acchain.BlockNumberRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.BlockNumberRequest other) {
- if (other == bdchain.api.grpc.BlockNumberRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.BlockNumberRequest other) {
+ if (other == bdchain.api.grpc.acchain.BlockNumberRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -404,11 +403,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.BlockNumberRequest parsedMessage = null;
+ bdchain.api.grpc.acchain.BlockNumberRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.BlockNumberRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.BlockNumberRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -489,7 +488,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -499,16 +498,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.BlockNumberRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.BlockNumberRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.BlockNumberRequest)
- private static final bdchain.api.grpc.BlockNumberRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.BlockNumberRequest)
+ private static final bdchain.api.grpc.acchain.BlockNumberRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.BlockNumberRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.BlockNumberRequest();
}
- public static bdchain.api.grpc.BlockNumberRequest getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.BlockNumberRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -533,7 +532,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.BlockNumberRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/BlockNumberRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/BlockNumberRequestOrBuilder.java
similarity index 75%
rename from src/main/java/bdchain/api/grpc/BlockNumberRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/BlockNumberRequestOrBuilder.java
index cc4bb01..67f9c24 100644
--- a/src/main/java/bdchain/api/grpc/BlockNumberRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/BlockNumberRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface BlockNumberRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.BlockNumberRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.BlockNumberRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/BlockNumberResponse.java b/src/main/java/bdchain/api/grpc/acchain/BlockNumberResponse.java
similarity index 72%
rename from src/main/java/bdchain/api/grpc/BlockNumberResponse.java
rename to src/main/java/bdchain/api/grpc/acchain/BlockNumberResponse.java
index ce580c9..8e094aa 100644
--- a/src/main/java/bdchain/api/grpc/BlockNumberResponse.java
+++ b/src/main/java/bdchain/api/grpc/acchain/BlockNumberResponse.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.BlockNumberResponse}
+ * Protobuf type {@code bdchain.api.acchain.BlockNumberResponse}
*/
public final class BlockNumberResponse extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.BlockNumberResponse)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.BlockNumberResponse)
BlockNumberResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use BlockNumberResponse.newBuilder() to construct.
@@ -16,7 +16,6 @@ private static final long serialVersionUID = 0L;
super(builder);
}
private BlockNumberResponse() {
- blockNumber_ = 0L;
}
@java.lang.Override
@@ -49,7 +48,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -69,15 +68,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.BlockNumberResponse.class, bdchain.api.grpc.BlockNumberResponse.Builder.class);
+ bdchain.api.grpc.acchain.BlockNumberResponse.class, bdchain.api.grpc.acchain.BlockNumberResponse.Builder.class);
}
public static final int BLOCK_NUMBER_FIELD_NUMBER = 1;
@@ -129,16 +128,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.BlockNumberResponse)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.BlockNumberResponse)) {
return super.equals(obj);
}
- bdchain.api.grpc.BlockNumberResponse other = (bdchain.api.grpc.BlockNumberResponse) obj;
+ bdchain.api.grpc.acchain.BlockNumberResponse other = (bdchain.api.grpc.acchain.BlockNumberResponse) obj;
- boolean result = true;
- result = result && (getBlockNumber()
- == other.getBlockNumber());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getBlockNumber()
+ != other.getBlockNumber()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -156,69 +154,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberResponse parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.BlockNumberResponse parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.BlockNumberResponse parseFrom(
+ public static bdchain.api.grpc.acchain.BlockNumberResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -231,7 +229,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.BlockNumberResponse prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.BlockNumberResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -247,26 +245,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.BlockNumberResponse}
+ * Protobuf type {@code bdchain.api.acchain.BlockNumberResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.BlockNumberResponse)
- bdchain.api.grpc.BlockNumberResponseOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.BlockNumberResponse)
+ bdchain.api.grpc.acchain.BlockNumberResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.BlockNumberResponse.class, bdchain.api.grpc.BlockNumberResponse.Builder.class);
+ bdchain.api.grpc.acchain.BlockNumberResponse.class, bdchain.api.grpc.acchain.BlockNumberResponse.Builder.class);
}
- // Construct using bdchain.api.grpc.BlockNumberResponse.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.BlockNumberResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -292,17 +290,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_BlockNumberResponse_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberResponse getDefaultInstanceForType() {
- return bdchain.api.grpc.BlockNumberResponse.getDefaultInstance();
+ public bdchain.api.grpc.acchain.BlockNumberResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.BlockNumberResponse.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberResponse build() {
- bdchain.api.grpc.BlockNumberResponse result = buildPartial();
+ public bdchain.api.grpc.acchain.BlockNumberResponse build() {
+ bdchain.api.grpc.acchain.BlockNumberResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -310,8 +308,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberResponse buildPartial() {
- bdchain.api.grpc.BlockNumberResponse result = new bdchain.api.grpc.BlockNumberResponse(this);
+ public bdchain.api.grpc.acchain.BlockNumberResponse buildPartial() {
+ bdchain.api.grpc.acchain.BlockNumberResponse result = new bdchain.api.grpc.acchain.BlockNumberResponse(this);
result.blockNumber_ = blockNumber_;
onBuilt();
return result;
@@ -319,48 +317,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.BlockNumberResponse) {
- return mergeFrom((bdchain.api.grpc.BlockNumberResponse)other);
+ if (other instanceof bdchain.api.grpc.acchain.BlockNumberResponse) {
+ return mergeFrom((bdchain.api.grpc.acchain.BlockNumberResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.BlockNumberResponse other) {
- if (other == bdchain.api.grpc.BlockNumberResponse.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.BlockNumberResponse other) {
+ if (other == bdchain.api.grpc.acchain.BlockNumberResponse.getDefaultInstance()) return this;
if (other.getBlockNumber() != 0L) {
setBlockNumber(other.getBlockNumber());
}
@@ -379,11 +377,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.BlockNumberResponse parsedMessage = null;
+ bdchain.api.grpc.acchain.BlockNumberResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.BlockNumberResponse) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.BlockNumberResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -421,7 +419,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -431,16 +429,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.BlockNumberResponse)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.BlockNumberResponse)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.BlockNumberResponse)
- private static final bdchain.api.grpc.BlockNumberResponse DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.BlockNumberResponse)
+ private static final bdchain.api.grpc.acchain.BlockNumberResponse DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.BlockNumberResponse();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.BlockNumberResponse();
}
- public static bdchain.api.grpc.BlockNumberResponse getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.BlockNumberResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -465,7 +463,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.BlockNumberResponse getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.BlockNumberResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/BlockNumberResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/BlockNumberResponseOrBuilder.java
similarity index 69%
rename from src/main/java/bdchain/api/grpc/BlockNumberResponseOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/BlockNumberResponseOrBuilder.java
index 63894e9..228685a 100644
--- a/src/main/java/bdchain/api/grpc/BlockNumberResponseOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/BlockNumberResponseOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface BlockNumberResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.BlockNumberResponse)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.BlockNumberResponse)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/BlockOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/BlockOrBuilder.java
similarity index 63%
rename from src/main/java/bdchain/api/grpc/BlockOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/BlockOrBuilder.java
index 8b5b9d0..e7afa52 100644
--- a/src/main/java/bdchain/api/grpc/BlockOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/BlockOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface BlockOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.Block)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.Block)
com.google.protobuf.MessageOrBuilder {
/**
@@ -36,19 +36,35 @@ public interface BlockOrBuilder extends
/**
*
- * 见证者账户地址
+ * 见证者账户地址的数组
*
*
- * bytes witness = 4;
+ * repeated bytes witnesses = 4;
*/
- com.google.protobuf.ByteString getWitness();
+ java.util.List getWitnessesList();
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ int getWitnessesCount();
+ /**
+ *
+ * 见证者账户地址的数组
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ com.google.protobuf.ByteString getWitnesses(int index);
/**
*
* 区块产生时的UNIX时间戳
*
*
- * uint64 timestamp = 5;
+ * int64 timestamp = 5;
*/
long getTimestamp();
@@ -75,24 +91,24 @@ public interface BlockOrBuilder extends
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- java.util.List
+ java.util.List
getTransactionsList();
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- bdchain.api.grpc.Transaction getTransactions(int index);
+ bdchain.api.grpc.acchain.Transaction getTransactions(int index);
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
int getTransactionsCount();
/**
@@ -100,18 +116,18 @@ public interface BlockOrBuilder extends
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- java.util.List extends bdchain.api.grpc.TransactionOrBuilder>
+ java.util.List extends bdchain.api.grpc.acchain.TransactionOrBuilder>
getTransactionsOrBuilderList();
/**
*
* 事务对象的数组,或为空
*
*
- * repeated .bdchain.api.Transaction transactions = 8;
+ * repeated .bdchain.api.acchain.Transaction transactions = 8;
*/
- bdchain.api.grpc.TransactionOrBuilder getTransactionsOrBuilder(
+ bdchain.api.grpc.acchain.TransactionOrBuilder getTransactionsOrBuilder(
int index);
/**
diff --git a/src/main/java/bdchain/api/grpc/GetBlockByHashRequest.java b/src/main/java/bdchain/api/grpc/acchain/GetBlockByHashRequest.java
similarity index 77%
rename from src/main/java/bdchain/api/grpc/GetBlockByHashRequest.java
rename to src/main/java/bdchain/api/grpc/acchain/GetBlockByHashRequest.java
index 0e96963..91f538c 100644
--- a/src/main/java/bdchain/api/grpc/GetBlockByHashRequest.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetBlockByHashRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.GetBlockByHashRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetBlockByHashRequest}
*/
public final class GetBlockByHashRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.GetBlockByHashRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.GetBlockByHashRequest)
GetBlockByHashRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetBlockByHashRequest.newBuilder() to construct.
@@ -18,7 +18,6 @@ private static final long serialVersionUID = 0L;
private GetBlockByHashRequest() {
ledger_ = "";
hash_ = com.google.protobuf.ByteString.EMPTY;
- fullTransaction_ = false;
}
@java.lang.Override
@@ -62,7 +61,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -82,15 +81,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetBlockByHashRequest.class, bdchain.api.grpc.GetBlockByHashRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetBlockByHashRequest.class, bdchain.api.grpc.acchain.GetBlockByHashRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
@@ -198,20 +197,19 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.GetBlockByHashRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.GetBlockByHashRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.GetBlockByHashRequest other = (bdchain.api.grpc.GetBlockByHashRequest) obj;
+ bdchain.api.grpc.acchain.GetBlockByHashRequest other = (bdchain.api.grpc.acchain.GetBlockByHashRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && getHash()
- .equals(other.getHash());
- result = result && (getFullTransaction()
- == other.getFullTransaction());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (getFullTransaction()
+ != other.getFullTransaction()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -233,69 +231,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetBlockByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -308,7 +306,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.GetBlockByHashRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.GetBlockByHashRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -324,26 +322,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.GetBlockByHashRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetBlockByHashRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.GetBlockByHashRequest)
- bdchain.api.grpc.GetBlockByHashRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.GetBlockByHashRequest)
+ bdchain.api.grpc.acchain.GetBlockByHashRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetBlockByHashRequest.class, bdchain.api.grpc.GetBlockByHashRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetBlockByHashRequest.class, bdchain.api.grpc.acchain.GetBlockByHashRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.GetBlockByHashRequest.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.GetBlockByHashRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -373,17 +371,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByHashRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByHashRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance();
+ public bdchain.api.grpc.acchain.GetBlockByHashRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.GetBlockByHashRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByHashRequest build() {
- bdchain.api.grpc.GetBlockByHashRequest result = buildPartial();
+ public bdchain.api.grpc.acchain.GetBlockByHashRequest build() {
+ bdchain.api.grpc.acchain.GetBlockByHashRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -391,8 +389,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByHashRequest buildPartial() {
- bdchain.api.grpc.GetBlockByHashRequest result = new bdchain.api.grpc.GetBlockByHashRequest(this);
+ public bdchain.api.grpc.acchain.GetBlockByHashRequest buildPartial() {
+ bdchain.api.grpc.acchain.GetBlockByHashRequest result = new bdchain.api.grpc.acchain.GetBlockByHashRequest(this);
result.ledger_ = ledger_;
result.hash_ = hash_;
result.fullTransaction_ = fullTransaction_;
@@ -402,48 +400,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.GetBlockByHashRequest) {
- return mergeFrom((bdchain.api.grpc.GetBlockByHashRequest)other);
+ if (other instanceof bdchain.api.grpc.acchain.GetBlockByHashRequest) {
+ return mergeFrom((bdchain.api.grpc.acchain.GetBlockByHashRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.GetBlockByHashRequest other) {
- if (other == bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.GetBlockByHashRequest other) {
+ if (other == bdchain.api.grpc.acchain.GetBlockByHashRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -469,11 +467,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.GetBlockByHashRequest parsedMessage = null;
+ bdchain.api.grpc.acchain.GetBlockByHashRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.GetBlockByHashRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.GetBlockByHashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -609,7 +607,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -619,16 +617,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.GetBlockByHashRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.GetBlockByHashRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.GetBlockByHashRequest)
- private static final bdchain.api.grpc.GetBlockByHashRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.GetBlockByHashRequest)
+ private static final bdchain.api.grpc.acchain.GetBlockByHashRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.GetBlockByHashRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.GetBlockByHashRequest();
}
- public static bdchain.api.grpc.GetBlockByHashRequest getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.GetBlockByHashRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -653,7 +651,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByHashRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.GetBlockByHashRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/GetBlockByHashRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/GetBlockByHashRequestOrBuilder.java
similarity index 81%
rename from src/main/java/bdchain/api/grpc/GetBlockByHashRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/GetBlockByHashRequestOrBuilder.java
index 9efb63a..de4a385 100644
--- a/src/main/java/bdchain/api/grpc/GetBlockByHashRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetBlockByHashRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface GetBlockByHashRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.GetBlockByHashRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.GetBlockByHashRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/GetBlockByNumberRequest.java b/src/main/java/bdchain/api/grpc/acchain/GetBlockByNumberRequest.java
similarity index 77%
rename from src/main/java/bdchain/api/grpc/GetBlockByNumberRequest.java
rename to src/main/java/bdchain/api/grpc/acchain/GetBlockByNumberRequest.java
index fd431a6..c9fe69e 100644
--- a/src/main/java/bdchain/api/grpc/GetBlockByNumberRequest.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetBlockByNumberRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.GetBlockByNumberRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetBlockByNumberRequest}
*/
public final class GetBlockByNumberRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.GetBlockByNumberRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.GetBlockByNumberRequest)
GetBlockByNumberRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetBlockByNumberRequest.newBuilder() to construct.
@@ -17,8 +17,6 @@ private static final long serialVersionUID = 0L;
}
private GetBlockByNumberRequest() {
ledger_ = "";
- number_ = 0L;
- fullTransaction_ = false;
}
@java.lang.Override
@@ -62,7 +60,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -82,15 +80,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetBlockByNumberRequest.class, bdchain.api.grpc.GetBlockByNumberRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest.class, bdchain.api.grpc.acchain.GetBlockByNumberRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
@@ -198,20 +196,19 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.GetBlockByNumberRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.GetBlockByNumberRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.GetBlockByNumberRequest other = (bdchain.api.grpc.GetBlockByNumberRequest) obj;
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest other = (bdchain.api.grpc.acchain.GetBlockByNumberRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && (getNumber()
- == other.getNumber());
- result = result && (getFullTransaction()
- == other.getFullTransaction());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (getNumber()
+ != other.getNumber()) return false;
+ if (getFullTransaction()
+ != other.getFullTransaction()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -234,69 +231,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetBlockByNumberRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -309,7 +306,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.GetBlockByNumberRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.GetBlockByNumberRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -325,26 +322,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.GetBlockByNumberRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetBlockByNumberRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.GetBlockByNumberRequest)
- bdchain.api.grpc.GetBlockByNumberRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.GetBlockByNumberRequest)
+ bdchain.api.grpc.acchain.GetBlockByNumberRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetBlockByNumberRequest.class, bdchain.api.grpc.GetBlockByNumberRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest.class, bdchain.api.grpc.acchain.GetBlockByNumberRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.GetBlockByNumberRequest.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.GetBlockByNumberRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -374,17 +371,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetBlockByNumberRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByNumberRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance();
+ public bdchain.api.grpc.acchain.GetBlockByNumberRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.GetBlockByNumberRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByNumberRequest build() {
- bdchain.api.grpc.GetBlockByNumberRequest result = buildPartial();
+ public bdchain.api.grpc.acchain.GetBlockByNumberRequest build() {
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -392,8 +389,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByNumberRequest buildPartial() {
- bdchain.api.grpc.GetBlockByNumberRequest result = new bdchain.api.grpc.GetBlockByNumberRequest(this);
+ public bdchain.api.grpc.acchain.GetBlockByNumberRequest buildPartial() {
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest result = new bdchain.api.grpc.acchain.GetBlockByNumberRequest(this);
result.ledger_ = ledger_;
result.number_ = number_;
result.fullTransaction_ = fullTransaction_;
@@ -403,48 +400,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.GetBlockByNumberRequest) {
- return mergeFrom((bdchain.api.grpc.GetBlockByNumberRequest)other);
+ if (other instanceof bdchain.api.grpc.acchain.GetBlockByNumberRequest) {
+ return mergeFrom((bdchain.api.grpc.acchain.GetBlockByNumberRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.GetBlockByNumberRequest other) {
- if (other == bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.GetBlockByNumberRequest other) {
+ if (other == bdchain.api.grpc.acchain.GetBlockByNumberRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -470,11 +467,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.GetBlockByNumberRequest parsedMessage = null;
+ bdchain.api.grpc.acchain.GetBlockByNumberRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.GetBlockByNumberRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.GetBlockByNumberRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -607,7 +604,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -617,16 +614,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.GetBlockByNumberRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.GetBlockByNumberRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.GetBlockByNumberRequest)
- private static final bdchain.api.grpc.GetBlockByNumberRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.GetBlockByNumberRequest)
+ private static final bdchain.api.grpc.acchain.GetBlockByNumberRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.GetBlockByNumberRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.GetBlockByNumberRequest();
}
- public static bdchain.api.grpc.GetBlockByNumberRequest getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.GetBlockByNumberRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -651,7 +648,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetBlockByNumberRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.GetBlockByNumberRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/GetBlockByNumberRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/GetBlockByNumberRequestOrBuilder.java
similarity index 81%
rename from src/main/java/bdchain/api/grpc/GetBlockByNumberRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/GetBlockByNumberRequestOrBuilder.java
index 559b7f5..ad03d52 100644
--- a/src/main/java/bdchain/api/grpc/GetBlockByNumberRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetBlockByNumberRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface GetBlockByNumberRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.GetBlockByNumberRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.GetBlockByNumberRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/GetTransactionByBlockHashAndIndexRequest.java b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockHashAndIndexRequest.java
similarity index 74%
rename from src/main/java/bdchain/api/grpc/GetTransactionByBlockHashAndIndexRequest.java
rename to src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockHashAndIndexRequest.java
index 4e8a907..54ab9c0 100644
--- a/src/main/java/bdchain/api/grpc/GetTransactionByBlockHashAndIndexRequest.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockHashAndIndexRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.GetTransactionByBlockHashAndIndexRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest}
*/
public final class GetTransactionByBlockHashAndIndexRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest)
GetTransactionByBlockHashAndIndexRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTransactionByBlockHashAndIndexRequest.newBuilder() to construct.
@@ -18,7 +18,6 @@ private static final long serialVersionUID = 0L;
private GetTransactionByBlockHashAndIndexRequest() {
ledger_ = "";
blockHash_ = com.google.protobuf.ByteString.EMPTY;
- index_ = 0;
}
@java.lang.Override
@@ -62,7 +61,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -82,15 +81,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.class, bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
@@ -198,20 +197,19 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest other = (bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) obj;
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest other = (bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && getBlockHash()
- .equals(other.getBlockHash());
- result = result && (getIndex()
- == other.getIndex());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (!getBlockHash()
+ .equals(other.getBlockHash())) return false;
+ if (getIndex()
+ != other.getIndex()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -232,69 +230,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -307,7 +305,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -323,26 +321,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.GetTransactionByBlockHashAndIndexRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest)
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.class, bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -372,17 +370,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockHashAndIndexRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance();
+ public bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest build() {
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest result = buildPartial();
+ public bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest build() {
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -390,8 +388,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest buildPartial() {
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest result = new bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest(this);
+ public bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest buildPartial() {
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest result = new bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest(this);
result.ledger_ = ledger_;
result.blockHash_ = blockHash_;
result.index_ = index_;
@@ -401,48 +399,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) {
- return mergeFrom((bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest)other);
+ if (other instanceof bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest) {
+ return mergeFrom((bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest other) {
- if (other == bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest other) {
+ if (other == bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -468,11 +466,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parsedMessage = null;
+ bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -608,7 +606,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -618,16 +616,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
- private static final bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest)
+ private static final bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest();
}
- public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -652,7 +650,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.GetTransactionByBlockHashAndIndexRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/GetTransactionByBlockHashAndIndexRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockHashAndIndexRequestOrBuilder.java
similarity index 79%
rename from src/main/java/bdchain/api/grpc/GetTransactionByBlockHashAndIndexRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockHashAndIndexRequestOrBuilder.java
index d1987c9..6c2d15c 100644
--- a/src/main/java/bdchain/api/grpc/GetTransactionByBlockHashAndIndexRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockHashAndIndexRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface GetTransactionByBlockHashAndIndexRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.GetTransactionByBlockHashAndIndexRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/GetTransactionByBlockNumberAndIndexRequest.java b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockNumberAndIndexRequest.java
similarity index 73%
rename from src/main/java/bdchain/api/grpc/GetTransactionByBlockNumberAndIndexRequest.java
rename to src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockNumberAndIndexRequest.java
index 41d361d..b610ca2 100644
--- a/src/main/java/bdchain/api/grpc/GetTransactionByBlockNumberAndIndexRequest.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockNumberAndIndexRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.GetTransactionByBlockNumberAndIndexRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest}
*/
public final class GetTransactionByBlockNumberAndIndexRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest)
GetTransactionByBlockNumberAndIndexRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTransactionByBlockNumberAndIndexRequest.newBuilder() to construct.
@@ -17,8 +17,6 @@ private static final long serialVersionUID = 0L;
}
private GetTransactionByBlockNumberAndIndexRequest() {
ledger_ = "";
- blockNumber_ = 0L;
- index_ = 0;
}
@java.lang.Override
@@ -62,7 +60,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -82,15 +80,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.class, bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
@@ -198,20 +196,19 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest other = (bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) obj;
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest other = (bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && (getBlockNumber()
- == other.getBlockNumber());
- result = result && (getIndex()
- == other.getIndex());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (getBlockNumber()
+ != other.getBlockNumber()) return false;
+ if (getIndex()
+ != other.getIndex()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -233,69 +230,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -308,7 +305,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -324,26 +321,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.GetTransactionByBlockNumberAndIndexRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest)
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.class, bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -373,17 +370,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByBlockNumberAndIndexRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance();
+ public bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest build() {
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest result = buildPartial();
+ public bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest build() {
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -391,8 +388,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest buildPartial() {
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest result = new bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest(this);
+ public bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest buildPartial() {
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest result = new bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest(this);
result.ledger_ = ledger_;
result.blockNumber_ = blockNumber_;
result.index_ = index_;
@@ -402,48 +399,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) {
- return mergeFrom((bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest)other);
+ if (other instanceof bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest) {
+ return mergeFrom((bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest other) {
- if (other == bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest other) {
+ if (other == bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -469,11 +466,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parsedMessage = null;
+ bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -606,7 +603,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -616,16 +613,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
- private static final bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest)
+ private static final bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest();
}
- public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -650,7 +647,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.GetTransactionByBlockNumberAndIndexRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/GetTransactionByBlockNumberAndIndexRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockNumberAndIndexRequestOrBuilder.java
similarity index 79%
rename from src/main/java/bdchain/api/grpc/GetTransactionByBlockNumberAndIndexRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockNumberAndIndexRequestOrBuilder.java
index ed46bdb..fc37618 100644
--- a/src/main/java/bdchain/api/grpc/GetTransactionByBlockNumberAndIndexRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByBlockNumberAndIndexRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface GetTransactionByBlockNumberAndIndexRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.GetTransactionByBlockNumberAndIndexRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/GetTransactionByHashRequest.java b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByHashRequest.java
similarity index 75%
rename from src/main/java/bdchain/api/grpc/GetTransactionByHashRequest.java
rename to src/main/java/bdchain/api/grpc/acchain/GetTransactionByHashRequest.java
index 42e1cf6..21caa9d 100644
--- a/src/main/java/bdchain/api/grpc/GetTransactionByHashRequest.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByHashRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.GetTransactionByHashRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetTransactionByHashRequest}
*/
public final class GetTransactionByHashRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.GetTransactionByHashRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.GetTransactionByHashRequest)
GetTransactionByHashRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTransactionByHashRequest.newBuilder() to construct.
@@ -56,7 +56,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -76,15 +76,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetTransactionByHashRequest.class, bdchain.api.grpc.GetTransactionByHashRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest.class, bdchain.api.grpc.acchain.GetTransactionByHashRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
@@ -176,18 +176,17 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.GetTransactionByHashRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.GetTransactionByHashRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.GetTransactionByHashRequest other = (bdchain.api.grpc.GetTransactionByHashRequest) obj;
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest other = (bdchain.api.grpc.acchain.GetTransactionByHashRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && getHash()
- .equals(other.getHash());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -206,69 +205,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -281,7 +280,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.GetTransactionByHashRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.GetTransactionByHashRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -297,26 +296,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.GetTransactionByHashRequest}
+ * Protobuf type {@code bdchain.api.acchain.GetTransactionByHashRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.GetTransactionByHashRequest)
- bdchain.api.grpc.GetTransactionByHashRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.GetTransactionByHashRequest)
+ bdchain.api.grpc.acchain.GetTransactionByHashRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetTransactionByHashRequest.class, bdchain.api.grpc.GetTransactionByHashRequest.Builder.class);
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest.class, bdchain.api.grpc.acchain.GetTransactionByHashRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.GetTransactionByHashRequest.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.GetTransactionByHashRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -344,17 +343,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_GetTransactionByHashRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByHashRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance();
+ public bdchain.api.grpc.acchain.GetTransactionByHashRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.GetTransactionByHashRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByHashRequest build() {
- bdchain.api.grpc.GetTransactionByHashRequest result = buildPartial();
+ public bdchain.api.grpc.acchain.GetTransactionByHashRequest build() {
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -362,8 +361,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByHashRequest buildPartial() {
- bdchain.api.grpc.GetTransactionByHashRequest result = new bdchain.api.grpc.GetTransactionByHashRequest(this);
+ public bdchain.api.grpc.acchain.GetTransactionByHashRequest buildPartial() {
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest result = new bdchain.api.grpc.acchain.GetTransactionByHashRequest(this);
result.ledger_ = ledger_;
result.hash_ = hash_;
onBuilt();
@@ -372,48 +371,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.GetTransactionByHashRequest) {
- return mergeFrom((bdchain.api.grpc.GetTransactionByHashRequest)other);
+ if (other instanceof bdchain.api.grpc.acchain.GetTransactionByHashRequest) {
+ return mergeFrom((bdchain.api.grpc.acchain.GetTransactionByHashRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.GetTransactionByHashRequest other) {
- if (other == bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.GetTransactionByHashRequest other) {
+ if (other == bdchain.api.grpc.acchain.GetTransactionByHashRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -436,11 +435,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.GetTransactionByHashRequest parsedMessage = null;
+ bdchain.api.grpc.acchain.GetTransactionByHashRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.GetTransactionByHashRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.GetTransactionByHashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -550,7 +549,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -560,16 +559,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.GetTransactionByHashRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.GetTransactionByHashRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.GetTransactionByHashRequest)
- private static final bdchain.api.grpc.GetTransactionByHashRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.GetTransactionByHashRequest)
+ private static final bdchain.api.grpc.acchain.GetTransactionByHashRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.GetTransactionByHashRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.GetTransactionByHashRequest();
}
- public static bdchain.api.grpc.GetTransactionByHashRequest getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.GetTransactionByHashRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -594,7 +593,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetTransactionByHashRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.GetTransactionByHashRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/GetTransactionByHashRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByHashRequestOrBuilder.java
similarity index 78%
rename from src/main/java/bdchain/api/grpc/GetTransactionByHashRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/GetTransactionByHashRequestOrBuilder.java
index c4376de..6eedfd6 100644
--- a/src/main/java/bdchain/api/grpc/GetTransactionByHashRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/GetTransactionByHashRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface GetTransactionByHashRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.GetTransactionByHashRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.GetTransactionByHashRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/Transaction.java b/src/main/java/bdchain/api/grpc/acchain/Transaction.java
similarity index 83%
rename from src/main/java/bdchain/api/grpc/Transaction.java
rename to src/main/java/bdchain/api/grpc/acchain/Transaction.java
index e7fd22d..59b1b48 100644
--- a/src/main/java/bdchain/api/grpc/Transaction.java
+++ b/src/main/java/bdchain/api/grpc/acchain/Transaction.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
/**
- * Protobuf type {@code bdchain.api.Transaction}
+ * Protobuf type {@code bdchain.api.acchain.Transaction}
*/
public final class Transaction extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.Transaction)
+ // @@protoc_insertion_point(message_implements:bdchain.api.acchain.Transaction)
TransactionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Transaction.newBuilder() to construct.
@@ -16,13 +16,10 @@ private static final long serialVersionUID = 0L;
super(builder);
}
private Transaction() {
- blockNumber_ = 0L;
blockHash_ = com.google.protobuf.ByteString.EMPTY;
- index_ = 0;
hash_ = com.google.protobuf.ByteString.EMPTY;
type_ = 0;
from_ = com.google.protobuf.ByteString.EMPTY;
- nonce_ = 0L;
to_ = com.google.protobuf.ByteString.EMPTY;
data_ = com.google.protobuf.ByteString.EMPTY;
v_ = com.google.protobuf.ByteString.EMPTY;
@@ -116,7 +113,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -136,15 +133,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Transaction_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Transaction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Transaction_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Transaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.Transaction.class, bdchain.api.grpc.Transaction.Builder.class);
+ bdchain.api.grpc.acchain.Transaction.class, bdchain.api.grpc.acchain.Transaction.Builder.class);
}
public static final int BLOCK_NUMBER_FIELD_NUMBER = 1;
@@ -206,7 +203,7 @@ private static final long serialVersionUID = 0L;
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
public int getTypeValue() {
return type_;
@@ -216,12 +213,12 @@ private static final long serialVersionUID = 0L;
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
- public bdchain.api.grpc.TransactionType getType() {
+ public bdchain.api.grpc.common.TransactionType getType() {
@SuppressWarnings("deprecation")
- bdchain.api.grpc.TransactionType result = bdchain.api.grpc.TransactionType.valueOf(type_);
- return result == null ? bdchain.api.grpc.TransactionType.UNRECOGNIZED : result;
+ bdchain.api.grpc.common.TransactionType result = bdchain.api.grpc.common.TransactionType.valueOf(type_);
+ return result == null ? bdchain.api.grpc.common.TransactionType.UNRECOGNIZED : result;
}
public static final int FROM_FIELD_NUMBER = 6;
@@ -341,7 +338,7 @@ private static final long serialVersionUID = 0L;
if (!hash_.isEmpty()) {
output.writeBytes(4, hash_);
}
- if (type_ != bdchain.api.grpc.TransactionType.RECORD.getNumber()) {
+ if (type_ != bdchain.api.grpc.common.TransactionType.RECORD.getNumber()) {
output.writeEnum(5, type_);
}
if (!from_.isEmpty()) {
@@ -390,7 +387,7 @@ private static final long serialVersionUID = 0L;
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(4, hash_);
}
- if (type_ != bdchain.api.grpc.TransactionType.RECORD.getNumber()) {
+ if (type_ != bdchain.api.grpc.common.TransactionType.RECORD.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, type_);
}
@@ -432,37 +429,36 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.Transaction)) {
+ if (!(obj instanceof bdchain.api.grpc.acchain.Transaction)) {
return super.equals(obj);
}
- bdchain.api.grpc.Transaction other = (bdchain.api.grpc.Transaction) obj;
+ bdchain.api.grpc.acchain.Transaction other = (bdchain.api.grpc.acchain.Transaction) obj;
- boolean result = true;
- result = result && (getBlockNumber()
- == other.getBlockNumber());
- result = result && getBlockHash()
- .equals(other.getBlockHash());
- result = result && (getIndex()
- == other.getIndex());
- result = result && getHash()
- .equals(other.getHash());
- result = result && type_ == other.type_;
- result = result && getFrom()
- .equals(other.getFrom());
- result = result && (getNonce()
- == other.getNonce());
- result = result && getTo()
- .equals(other.getTo());
- result = result && getData()
- .equals(other.getData());
- result = result && getV()
- .equals(other.getV());
- result = result && getR()
- .equals(other.getR());
- result = result && getS()
- .equals(other.getS());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getBlockNumber()
+ != other.getBlockNumber()) return false;
+ if (!getBlockHash()
+ .equals(other.getBlockHash())) return false;
+ if (getIndex()
+ != other.getIndex()) return false;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (type_ != other.type_) return false;
+ if (!getFrom()
+ .equals(other.getFrom())) return false;
+ if (getNonce()
+ != other.getNonce()) return false;
+ if (!getTo()
+ .equals(other.getTo())) return false;
+ if (!getData()
+ .equals(other.getData())) return false;
+ if (!getV()
+ .equals(other.getV())) return false;
+ if (!getR()
+ .equals(other.getR())) return false;
+ if (!getS()
+ .equals(other.getS())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -503,69 +499,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.Transaction parseFrom(byte[] data)
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.Transaction parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.Transaction parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.acchain.Transaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.Transaction parseDelimitedFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.Transaction parseFrom(
+ public static bdchain.api.grpc.acchain.Transaction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -578,7 +574,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.Transaction prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.acchain.Transaction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -594,26 +590,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.Transaction}
+ * Protobuf type {@code bdchain.api.acchain.Transaction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.Transaction)
- bdchain.api.grpc.TransactionOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.acchain.Transaction)
+ bdchain.api.grpc.acchain.TransactionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Transaction_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Transaction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Transaction_fieldAccessorTable
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Transaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.Transaction.class, bdchain.api.grpc.Transaction.Builder.class);
+ bdchain.api.grpc.acchain.Transaction.class, bdchain.api.grpc.acchain.Transaction.Builder.class);
}
- // Construct using bdchain.api.grpc.Transaction.newBuilder()
+ // Construct using bdchain.api.grpc.acchain.Transaction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -661,17 +657,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_Transaction_descriptor;
+ return bdchain.api.grpc.acchain.AccountingChainProto.internal_static_bdchain_api_acchain_Transaction_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.Transaction getDefaultInstanceForType() {
- return bdchain.api.grpc.Transaction.getDefaultInstance();
+ public bdchain.api.grpc.acchain.Transaction getDefaultInstanceForType() {
+ return bdchain.api.grpc.acchain.Transaction.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.Transaction build() {
- bdchain.api.grpc.Transaction result = buildPartial();
+ public bdchain.api.grpc.acchain.Transaction build() {
+ bdchain.api.grpc.acchain.Transaction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -679,8 +675,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.Transaction buildPartial() {
- bdchain.api.grpc.Transaction result = new bdchain.api.grpc.Transaction(this);
+ public bdchain.api.grpc.acchain.Transaction buildPartial() {
+ bdchain.api.grpc.acchain.Transaction result = new bdchain.api.grpc.acchain.Transaction(this);
result.blockNumber_ = blockNumber_;
result.blockHash_ = blockHash_;
result.index_ = index_;
@@ -699,48 +695,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.Transaction) {
- return mergeFrom((bdchain.api.grpc.Transaction)other);
+ if (other instanceof bdchain.api.grpc.acchain.Transaction) {
+ return mergeFrom((bdchain.api.grpc.acchain.Transaction)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.Transaction other) {
- if (other == bdchain.api.grpc.Transaction.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.acchain.Transaction other) {
+ if (other == bdchain.api.grpc.acchain.Transaction.getDefaultInstance()) return this;
if (other.getBlockNumber() != 0L) {
setBlockNumber(other.getBlockNumber());
}
@@ -792,11 +788,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.Transaction parsedMessage = null;
+ bdchain.api.grpc.acchain.Transaction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.Transaction) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.acchain.Transaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -970,7 +966,7 @@ private static final long serialVersionUID = 0L;
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
public int getTypeValue() {
return type_;
@@ -980,7 +976,7 @@ private static final long serialVersionUID = 0L;
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
public Builder setTypeValue(int value) {
type_ = value;
@@ -992,21 +988,21 @@ private static final long serialVersionUID = 0L;
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
- public bdchain.api.grpc.TransactionType getType() {
+ public bdchain.api.grpc.common.TransactionType getType() {
@SuppressWarnings("deprecation")
- bdchain.api.grpc.TransactionType result = bdchain.api.grpc.TransactionType.valueOf(type_);
- return result == null ? bdchain.api.grpc.TransactionType.UNRECOGNIZED : result;
+ bdchain.api.grpc.common.TransactionType result = bdchain.api.grpc.common.TransactionType.valueOf(type_);
+ return result == null ? bdchain.api.grpc.common.TransactionType.UNRECOGNIZED : result;
}
/**
*
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
- public Builder setType(bdchain.api.grpc.TransactionType value) {
+ public Builder setType(bdchain.api.grpc.common.TransactionType value) {
if (value == null) {
throw new NullPointerException();
}
@@ -1020,7 +1016,7 @@ private static final long serialVersionUID = 0L;
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
public Builder clearType() {
@@ -1315,7 +1311,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -1325,16 +1321,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.Transaction)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.acchain.Transaction)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.Transaction)
- private static final bdchain.api.grpc.Transaction DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.acchain.Transaction)
+ private static final bdchain.api.grpc.acchain.Transaction DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.Transaction();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.acchain.Transaction();
}
- public static bdchain.api.grpc.Transaction getDefaultInstance() {
+ public static bdchain.api.grpc.acchain.Transaction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -1359,7 +1355,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.Transaction getDefaultInstanceForType() {
+ public bdchain.api.grpc.acchain.Transaction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/TransactionOrBuilder.java b/src/main/java/bdchain/api/grpc/acchain/TransactionOrBuilder.java
similarity index 87%
rename from src/main/java/bdchain/api/grpc/TransactionOrBuilder.java
rename to src/main/java/bdchain/api/grpc/acchain/TransactionOrBuilder.java
index 2c2d7b2..bc988de 100644
--- a/src/main/java/bdchain/api/grpc/TransactionOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/acchain/TransactionOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.acchain;
public interface TransactionOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.Transaction)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.acchain.Transaction)
com.google.protobuf.MessageOrBuilder {
/**
@@ -48,7 +48,7 @@ public interface TransactionOrBuilder extends
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
int getTypeValue();
/**
@@ -56,9 +56,9 @@ public interface TransactionOrBuilder extends
* 事务类型
*
*
- * .bdchain.api.TransactionType type = 5;
+ * .bdchain.api.common.TransactionType type = 5;
*/
- bdchain.api.grpc.TransactionType getType();
+ bdchain.api.grpc.common.TransactionType getType();
/**
*
diff --git a/src/main/java/bdchain/api/grpc/ClientVersionResponse.java b/src/main/java/bdchain/api/grpc/common/ClientVersionResponse.java
similarity index 75%
rename from src/main/java/bdchain/api/grpc/ClientVersionResponse.java
rename to src/main/java/bdchain/api/grpc/common/ClientVersionResponse.java
index b6fed80..86c5817 100644
--- a/src/main/java/bdchain/api/grpc/ClientVersionResponse.java
+++ b/src/main/java/bdchain/api/grpc/common/ClientVersionResponse.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.common;
/**
- * Protobuf type {@code bdchain.api.ClientVersionResponse}
+ * Protobuf type {@code bdchain.api.common.ClientVersionResponse}
*/
public final class ClientVersionResponse extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.ClientVersionResponse)
+ // @@protoc_insertion_point(message_implements:bdchain.api.common.ClientVersionResponse)
ClientVersionResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClientVersionResponse.newBuilder() to construct.
@@ -50,7 +50,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -70,15 +70,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor;
+ return bdchain.api.grpc.common.CommonProto.internal_static_bdchain_api_common_ClientVersionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable
+ return bdchain.api.grpc.common.CommonProto.internal_static_bdchain_api_common_ClientVersionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.ClientVersionResponse.class, bdchain.api.grpc.ClientVersionResponse.Builder.class);
+ bdchain.api.grpc.common.ClientVersionResponse.class, bdchain.api.grpc.common.ClientVersionResponse.Builder.class);
}
public static final int VERSION_FIELD_NUMBER = 1;
@@ -162,16 +162,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.ClientVersionResponse)) {
+ if (!(obj instanceof bdchain.api.grpc.common.ClientVersionResponse)) {
return super.equals(obj);
}
- bdchain.api.grpc.ClientVersionResponse other = (bdchain.api.grpc.ClientVersionResponse) obj;
+ bdchain.api.grpc.common.ClientVersionResponse other = (bdchain.api.grpc.common.ClientVersionResponse) obj;
- boolean result = true;
- result = result && getVersion()
- .equals(other.getVersion());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getVersion()
+ .equals(other.getVersion())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -188,69 +187,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(byte[] data)
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.common.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.ClientVersionResponse parseDelimitedFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.ClientVersionResponse parseFrom(
+ public static bdchain.api.grpc.common.ClientVersionResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -263,7 +262,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.ClientVersionResponse prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.common.ClientVersionResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -279,26 +278,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.ClientVersionResponse}
+ * Protobuf type {@code bdchain.api.common.ClientVersionResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.ClientVersionResponse)
- bdchain.api.grpc.ClientVersionResponseOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.common.ClientVersionResponse)
+ bdchain.api.grpc.common.ClientVersionResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor;
+ return bdchain.api.grpc.common.CommonProto.internal_static_bdchain_api_common_ClientVersionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable
+ return bdchain.api.grpc.common.CommonProto.internal_static_bdchain_api_common_ClientVersionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.ClientVersionResponse.class, bdchain.api.grpc.ClientVersionResponse.Builder.class);
+ bdchain.api.grpc.common.ClientVersionResponse.class, bdchain.api.grpc.common.ClientVersionResponse.Builder.class);
}
- // Construct using bdchain.api.grpc.ClientVersionResponse.newBuilder()
+ // Construct using bdchain.api.grpc.common.ClientVersionResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -324,17 +323,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor;
+ return bdchain.api.grpc.common.CommonProto.internal_static_bdchain_api_common_ClientVersionResponse_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.ClientVersionResponse getDefaultInstanceForType() {
- return bdchain.api.grpc.ClientVersionResponse.getDefaultInstance();
+ public bdchain.api.grpc.common.ClientVersionResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.common.ClientVersionResponse.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.ClientVersionResponse build() {
- bdchain.api.grpc.ClientVersionResponse result = buildPartial();
+ public bdchain.api.grpc.common.ClientVersionResponse build() {
+ bdchain.api.grpc.common.ClientVersionResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -342,8 +341,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.ClientVersionResponse buildPartial() {
- bdchain.api.grpc.ClientVersionResponse result = new bdchain.api.grpc.ClientVersionResponse(this);
+ public bdchain.api.grpc.common.ClientVersionResponse buildPartial() {
+ bdchain.api.grpc.common.ClientVersionResponse result = new bdchain.api.grpc.common.ClientVersionResponse(this);
result.version_ = version_;
onBuilt();
return result;
@@ -351,48 +350,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.ClientVersionResponse) {
- return mergeFrom((bdchain.api.grpc.ClientVersionResponse)other);
+ if (other instanceof bdchain.api.grpc.common.ClientVersionResponse) {
+ return mergeFrom((bdchain.api.grpc.common.ClientVersionResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.ClientVersionResponse other) {
- if (other == bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.common.ClientVersionResponse other) {
+ if (other == bdchain.api.grpc.common.ClientVersionResponse.getDefaultInstance()) return this;
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
@@ -412,11 +411,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.ClientVersionResponse parsedMessage = null;
+ bdchain.api.grpc.common.ClientVersionResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.ClientVersionResponse) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.common.ClientVersionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -517,7 +516,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -527,16 +526,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.ClientVersionResponse)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.common.ClientVersionResponse)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.ClientVersionResponse)
- private static final bdchain.api.grpc.ClientVersionResponse DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.common.ClientVersionResponse)
+ private static final bdchain.api.grpc.common.ClientVersionResponse DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.ClientVersionResponse();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.common.ClientVersionResponse();
}
- public static bdchain.api.grpc.ClientVersionResponse getDefaultInstance() {
+ public static bdchain.api.grpc.common.ClientVersionResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -561,7 +560,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.ClientVersionResponse getDefaultInstanceForType() {
+ public bdchain.api.grpc.common.ClientVersionResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/common/ClientVersionResponseOrBuilder.java
similarity index 80%
rename from src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java
rename to src/main/java/bdchain/api/grpc/common/ClientVersionResponseOrBuilder.java
index 7f545c4..d1cf073 100644
--- a/src/main/java/bdchain/api/grpc/ClientVersionResponseOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/common/ClientVersionResponseOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.common;
public interface ClientVersionResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.ClientVersionResponse)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.common.ClientVersionResponse)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/CommonProto.java b/src/main/java/bdchain/api/grpc/common/CommonProto.java
similarity index 64%
rename from src/main/java/bdchain/api/grpc/CommonProto.java
rename to src/main/java/bdchain/api/grpc/common/CommonProto.java
index f08c695..e7eb654 100644
--- a/src/main/java/bdchain/api/grpc/CommonProto.java
+++ b/src/main/java/bdchain/api/grpc/common/CommonProto.java
@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.common;
public final class CommonProto {
private CommonProto() {}
@@ -15,10 +15,10 @@ public final class CommonProto {
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_ClientVersionResponse_descriptor;
+ internal_static_bdchain_api_common_ClientVersionResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable;
+ internal_static_bdchain_api_common_ClientVersionResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -28,13 +28,13 @@ public final class CommonProto {
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\030bdchain/api/common.proto\022\013bdchain.api\"" +
- "(\n\025ClientVersionResponse\022\017\n\007version\030\001 \001(" +
- "\t*o\n\017TransactionType\022\n\n\006RECORD\020\000\022\013\n\007MESS" +
- "AGE\020\001\022\025\n\021CONTRACT_CREATION\020\002\022\027\n\023CONTRACT" +
- "_INVOCATION\020\003\022\023\n\017CONTRACT_STATUS\020\004B>\n\020bd" +
- "chain.api.grpcB\013CommonProtoP\001Z\033bdchain/s" +
- "dk/api/grpc/commonb\006proto3"
+ "\n\030bdchain/api/common.proto\022\022bdchain.api." +
+ "common\"(\n\025ClientVersionResponse\022\017\n\007versi" +
+ "on\030\001 \001(\t*o\n\017TransactionType\022\n\n\006RECORD\020\000\022" +
+ "\013\n\007MESSAGE\020\001\022\025\n\021CONTRACT_CREATION\020\002\022\027\n\023C" +
+ "ONTRACT_INVOCATION\020\003\022\023\n\017CONTRACT_STATUS\020" +
+ "\004BE\n\027bdchain.api.grpc.commonB\013CommonProt" +
+ "oP\001Z\033bdchain/sdk/api/grpc/commonb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -48,11 +48,11 @@ public final class CommonProto {
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
- internal_static_bdchain_api_ClientVersionResponse_descriptor =
+ internal_static_bdchain_api_common_ClientVersionResponse_descriptor =
getDescriptor().getMessageTypes().get(0);
- internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable = new
+ internal_static_bdchain_api_common_ClientVersionResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_ClientVersionResponse_descriptor,
+ internal_static_bdchain_api_common_ClientVersionResponse_descriptor,
new java.lang.String[] { "Version", });
}
diff --git a/src/main/java/bdchain/api/grpc/ErrorDetailsProto.java b/src/main/java/bdchain/api/grpc/common/ErrorDetailsProto.java
similarity index 58%
rename from src/main/java/bdchain/api/grpc/ErrorDetailsProto.java
rename to src/main/java/bdchain/api/grpc/common/ErrorDetailsProto.java
index 8f9b8ad..60edfa0 100644
--- a/src/main/java/bdchain/api/grpc/ErrorDetailsProto.java
+++ b/src/main/java/bdchain/api/grpc/common/ErrorDetailsProto.java
@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/error_details.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.common;
public final class ErrorDetailsProto {
private ErrorDetailsProto() {}
@@ -15,15 +15,15 @@ public final class ErrorDetailsProto {
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_InvalidArgument_descriptor;
+ internal_static_bdchain_api_common_InvalidArgument_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_InvalidArgument_fieldAccessorTable;
+ internal_static_bdchain_api_common_InvalidArgument_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
- internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor;
+ internal_static_bdchain_api_common_InvalidArgument_FieldViolation_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable;
+ internal_static_bdchain_api_common_InvalidArgument_FieldViolation_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@@ -33,13 +33,14 @@ public final class ErrorDetailsProto {
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\037bdchain/api/error_details.proto\022\013bdcha" +
- "in.api\"\216\001\n\017InvalidArgument\022E\n\020field_viol" +
- "ations\030\001 \003(\0132+.bdchain.api.InvalidArgume" +
- "nt.FieldViolation\0324\n\016FieldViolation\022\r\n\005f" +
- "ield\030\001 \001(\t\022\023\n\013description\030\002 \001(\tBH\n\020bdcha" +
- "in.api.grpcB\021ErrorDetailsProtoP\001Z\037bdchai" +
- "n/sdk/api/grpc/errdetailsb\006proto3"
+ "\n\037bdchain/api/error_details.proto\022\022bdcha" +
+ "in.api.common\"\225\001\n\017InvalidArgument\022L\n\020fie" +
+ "ld_violations\030\001 \003(\01322.bdchain.api.common" +
+ ".InvalidArgument.FieldViolation\0324\n\016Field" +
+ "Violation\022\r\n\005field\030\001 \001(\t\022\023\n\013description\030" +
+ "\002 \001(\tBO\n\027bdchain.api.grpc.commonB\021ErrorD" +
+ "etailsProtoP\001Z\037bdchain/sdk/api/grpc/errd" +
+ "etailsb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -53,17 +54,17 @@ public final class ErrorDetailsProto {
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
- internal_static_bdchain_api_InvalidArgument_descriptor =
+ internal_static_bdchain_api_common_InvalidArgument_descriptor =
getDescriptor().getMessageTypes().get(0);
- internal_static_bdchain_api_InvalidArgument_fieldAccessorTable = new
+ internal_static_bdchain_api_common_InvalidArgument_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_InvalidArgument_descriptor,
+ internal_static_bdchain_api_common_InvalidArgument_descriptor,
new java.lang.String[] { "FieldViolations", });
- internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor =
- internal_static_bdchain_api_InvalidArgument_descriptor.getNestedTypes().get(0);
- internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable = new
+ internal_static_bdchain_api_common_InvalidArgument_FieldViolation_descriptor =
+ internal_static_bdchain_api_common_InvalidArgument_descriptor.getNestedTypes().get(0);
+ internal_static_bdchain_api_common_InvalidArgument_FieldViolation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor,
+ internal_static_bdchain_api_common_InvalidArgument_FieldViolation_descriptor,
new java.lang.String[] { "Field", "Description", });
}
diff --git a/src/main/java/bdchain/api/grpc/InvalidArgument.java b/src/main/java/bdchain/api/grpc/common/InvalidArgument.java
similarity index 74%
rename from src/main/java/bdchain/api/grpc/InvalidArgument.java
rename to src/main/java/bdchain/api/grpc/common/InvalidArgument.java
index 576e7b6..cba4684 100644
--- a/src/main/java/bdchain/api/grpc/InvalidArgument.java
+++ b/src/main/java/bdchain/api/grpc/common/InvalidArgument.java
@@ -1,7 +1,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/error_details.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.common;
/**
*
@@ -11,11 +11,11 @@ package bdchain.api.grpc;
* (e.g., a malformed file name).
*
*
- * Protobuf type {@code bdchain.api.InvalidArgument}
+ * Protobuf type {@code bdchain.api.common.InvalidArgument}
*/
public final class InvalidArgument extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.InvalidArgument)
+ // @@protoc_insertion_point(message_implements:bdchain.api.common.InvalidArgument)
InvalidArgumentOrBuilder {
private static final long serialVersionUID = 0L;
// Use InvalidArgument.newBuilder() to construct.
@@ -51,16 +51,16 @@ private static final long serialVersionUID = 0L;
done = true;
break;
case 10: {
- if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
- fieldViolations_ = new java.util.ArrayList();
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ fieldViolations_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
fieldViolations_.add(
- input.readMessage(bdchain.api.grpc.InvalidArgument.FieldViolation.parser(), extensionRegistry));
+ input.readMessage(bdchain.api.grpc.common.InvalidArgument.FieldViolation.parser(), extensionRegistry));
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -74,7 +74,7 @@ private static final long serialVersionUID = 0L;
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
}
this.unknownFields = unknownFields.build();
@@ -83,19 +83,19 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_descriptor;
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_fieldAccessorTable
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.InvalidArgument.class, bdchain.api.grpc.InvalidArgument.Builder.class);
+ bdchain.api.grpc.common.InvalidArgument.class, bdchain.api.grpc.common.InvalidArgument.Builder.class);
}
public interface FieldViolationOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.InvalidArgument.FieldViolation)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.common.InvalidArgument.FieldViolation)
com.google.protobuf.MessageOrBuilder {
/**
@@ -143,11 +143,11 @@ private static final long serialVersionUID = 0L;
* A message type used to describe a single invalid field.
*
*
- * Protobuf type {@code bdchain.api.InvalidArgument.FieldViolation}
+ * Protobuf type {@code bdchain.api.common.InvalidArgument.FieldViolation}
*/
public static final class FieldViolation extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.InvalidArgument.FieldViolation)
+ // @@protoc_insertion_point(message_implements:bdchain.api.common.InvalidArgument.FieldViolation)
FieldViolationOrBuilder {
private static final long serialVersionUID = 0L;
// Use FieldViolation.newBuilder() to construct.
@@ -196,7 +196,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -216,15 +216,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor;
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_FieldViolation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_FieldViolation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.InvalidArgument.FieldViolation.class, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder.class);
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation.class, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder.class);
}
public static final int FIELD_FIELD_NUMBER = 1;
@@ -360,18 +360,17 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.InvalidArgument.FieldViolation)) {
+ if (!(obj instanceof bdchain.api.grpc.common.InvalidArgument.FieldViolation)) {
return super.equals(obj);
}
- bdchain.api.grpc.InvalidArgument.FieldViolation other = (bdchain.api.grpc.InvalidArgument.FieldViolation) obj;
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation other = (bdchain.api.grpc.common.InvalidArgument.FieldViolation) obj;
- boolean result = true;
- result = result && getField()
- .equals(other.getField());
- result = result && getDescription()
- .equals(other.getDescription());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getField()
+ .equals(other.getField())) return false;
+ if (!getDescription()
+ .equals(other.getDescription())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -390,69 +389,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(byte[] data)
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseDelimitedFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -465,7 +464,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.InvalidArgument.FieldViolation prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.common.InvalidArgument.FieldViolation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -485,26 +484,26 @@ private static final long serialVersionUID = 0L;
* A message type used to describe a single invalid field.
*
*
- * Protobuf type {@code bdchain.api.InvalidArgument.FieldViolation}
+ * Protobuf type {@code bdchain.api.common.InvalidArgument.FieldViolation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.InvalidArgument.FieldViolation)
- bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.common.InvalidArgument.FieldViolation)
+ bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor;
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_FieldViolation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_FieldViolation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.InvalidArgument.FieldViolation.class, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder.class);
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation.class, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder.class);
}
- // Construct using bdchain.api.grpc.InvalidArgument.FieldViolation.newBuilder()
+ // Construct using bdchain.api.grpc.common.InvalidArgument.FieldViolation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -532,17 +531,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor;
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_FieldViolation_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument.FieldViolation getDefaultInstanceForType() {
- return bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance();
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation getDefaultInstanceForType() {
+ return bdchain.api.grpc.common.InvalidArgument.FieldViolation.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument.FieldViolation build() {
- bdchain.api.grpc.InvalidArgument.FieldViolation result = buildPartial();
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation build() {
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -550,8 +549,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument.FieldViolation buildPartial() {
- bdchain.api.grpc.InvalidArgument.FieldViolation result = new bdchain.api.grpc.InvalidArgument.FieldViolation(this);
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation buildPartial() {
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation result = new bdchain.api.grpc.common.InvalidArgument.FieldViolation(this);
result.field_ = field_;
result.description_ = description_;
onBuilt();
@@ -560,48 +559,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.InvalidArgument.FieldViolation) {
- return mergeFrom((bdchain.api.grpc.InvalidArgument.FieldViolation)other);
+ if (other instanceof bdchain.api.grpc.common.InvalidArgument.FieldViolation) {
+ return mergeFrom((bdchain.api.grpc.common.InvalidArgument.FieldViolation)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.InvalidArgument.FieldViolation other) {
- if (other == bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.common.InvalidArgument.FieldViolation other) {
+ if (other == bdchain.api.grpc.common.InvalidArgument.FieldViolation.getDefaultInstance()) return this;
if (!other.getField().isEmpty()) {
field_ = other.field_;
onChanged();
@@ -625,11 +624,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.InvalidArgument.FieldViolation parsedMessage = null;
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.InvalidArgument.FieldViolation) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.common.InvalidArgument.FieldViolation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -829,7 +828,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -839,16 +838,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.InvalidArgument.FieldViolation)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.common.InvalidArgument.FieldViolation)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.InvalidArgument.FieldViolation)
- private static final bdchain.api.grpc.InvalidArgument.FieldViolation DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.common.InvalidArgument.FieldViolation)
+ private static final bdchain.api.grpc.common.InvalidArgument.FieldViolation DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.InvalidArgument.FieldViolation();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.common.InvalidArgument.FieldViolation();
}
- public static bdchain.api.grpc.InvalidArgument.FieldViolation getDefaultInstance() {
+ public static bdchain.api.grpc.common.InvalidArgument.FieldViolation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -873,22 +872,22 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument.FieldViolation getDefaultInstanceForType() {
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int FIELD_VIOLATIONS_FIELD_NUMBER = 1;
- private java.util.List fieldViolations_;
+ private java.util.List fieldViolations_;
/**
*
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public java.util.List getFieldViolationsList() {
+ public java.util.List getFieldViolationsList() {
return fieldViolations_;
}
/**
@@ -896,9 +895,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public java.util.List extends bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>
+ public java.util.List extends bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsOrBuilderList() {
return fieldViolations_;
}
@@ -907,7 +906,7 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public int getFieldViolationsCount() {
return fieldViolations_.size();
@@ -917,9 +916,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index) {
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation getFieldViolations(int index) {
return fieldViolations_.get(index);
}
/**
@@ -927,9 +926,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
int index) {
return fieldViolations_.get(index);
}
@@ -974,16 +973,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.InvalidArgument)) {
+ if (!(obj instanceof bdchain.api.grpc.common.InvalidArgument)) {
return super.equals(obj);
}
- bdchain.api.grpc.InvalidArgument other = (bdchain.api.grpc.InvalidArgument) obj;
+ bdchain.api.grpc.common.InvalidArgument other = (bdchain.api.grpc.common.InvalidArgument) obj;
- boolean result = true;
- result = result && getFieldViolationsList()
- .equals(other.getFieldViolationsList());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getFieldViolationsList()
+ .equals(other.getFieldViolationsList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -1002,69 +1000,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(byte[] data)
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.common.InvalidArgument parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.InvalidArgument parseDelimitedFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.InvalidArgument parseFrom(
+ public static bdchain.api.grpc.common.InvalidArgument parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -1077,7 +1075,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.InvalidArgument prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.common.InvalidArgument prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -1100,26 +1098,26 @@ private static final long serialVersionUID = 0L;
* (e.g., a malformed file name).
*
*
- * Protobuf type {@code bdchain.api.InvalidArgument}
+ * Protobuf type {@code bdchain.api.common.InvalidArgument}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.InvalidArgument)
- bdchain.api.grpc.InvalidArgumentOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.common.InvalidArgument)
+ bdchain.api.grpc.common.InvalidArgumentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_descriptor;
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_fieldAccessorTable
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.InvalidArgument.class, bdchain.api.grpc.InvalidArgument.Builder.class);
+ bdchain.api.grpc.common.InvalidArgument.class, bdchain.api.grpc.common.InvalidArgument.Builder.class);
}
- // Construct using bdchain.api.grpc.InvalidArgument.newBuilder()
+ // Construct using bdchain.api.grpc.common.InvalidArgument.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -1150,17 +1148,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.ErrorDetailsProto.internal_static_bdchain_api_InvalidArgument_descriptor;
+ return bdchain.api.grpc.common.ErrorDetailsProto.internal_static_bdchain_api_common_InvalidArgument_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument getDefaultInstanceForType() {
- return bdchain.api.grpc.InvalidArgument.getDefaultInstance();
+ public bdchain.api.grpc.common.InvalidArgument getDefaultInstanceForType() {
+ return bdchain.api.grpc.common.InvalidArgument.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument build() {
- bdchain.api.grpc.InvalidArgument result = buildPartial();
+ public bdchain.api.grpc.common.InvalidArgument build() {
+ bdchain.api.grpc.common.InvalidArgument result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -1168,11 +1166,11 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument buildPartial() {
- bdchain.api.grpc.InvalidArgument result = new bdchain.api.grpc.InvalidArgument(this);
+ public bdchain.api.grpc.common.InvalidArgument buildPartial() {
+ bdchain.api.grpc.common.InvalidArgument result = new bdchain.api.grpc.common.InvalidArgument(this);
int from_bitField0_ = bitField0_;
if (fieldViolationsBuilder_ == null) {
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((bitField0_ & 0x00000001) != 0)) {
fieldViolations_ = java.util.Collections.unmodifiableList(fieldViolations_);
bitField0_ = (bitField0_ & ~0x00000001);
}
@@ -1186,48 +1184,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.InvalidArgument) {
- return mergeFrom((bdchain.api.grpc.InvalidArgument)other);
+ if (other instanceof bdchain.api.grpc.common.InvalidArgument) {
+ return mergeFrom((bdchain.api.grpc.common.InvalidArgument)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.InvalidArgument other) {
- if (other == bdchain.api.grpc.InvalidArgument.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.common.InvalidArgument other) {
+ if (other == bdchain.api.grpc.common.InvalidArgument.getDefaultInstance()) return this;
if (fieldViolationsBuilder_ == null) {
if (!other.fieldViolations_.isEmpty()) {
if (fieldViolations_.isEmpty()) {
@@ -1269,11 +1267,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.InvalidArgument parsedMessage = null;
+ bdchain.api.grpc.common.InvalidArgument parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.InvalidArgument) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.common.InvalidArgument) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -1284,26 +1282,26 @@ private static final long serialVersionUID = 0L;
}
private int bitField0_;
- private java.util.List fieldViolations_ =
+ private java.util.List fieldViolations_ =
java.util.Collections.emptyList();
private void ensureFieldViolationsIsMutable() {
- if (!((bitField0_ & 0x00000001) == 0x00000001)) {
- fieldViolations_ = new java.util.ArrayList(fieldViolations_);
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ fieldViolations_ = new java.util.ArrayList(fieldViolations_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
- bdchain.api.grpc.InvalidArgument.FieldViolation, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder> fieldViolationsBuilder_;
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder> fieldViolationsBuilder_;
/**
*
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public java.util.List getFieldViolationsList() {
+ public java.util.List getFieldViolationsList() {
if (fieldViolationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(fieldViolations_);
} else {
@@ -1315,7 +1313,7 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public int getFieldViolationsCount() {
if (fieldViolationsBuilder_ == null) {
@@ -1329,9 +1327,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index) {
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation getFieldViolations(int index) {
if (fieldViolationsBuilder_ == null) {
return fieldViolations_.get(index);
} else {
@@ -1343,10 +1341,10 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder setFieldViolations(
- int index, bdchain.api.grpc.InvalidArgument.FieldViolation value) {
+ int index, bdchain.api.grpc.common.InvalidArgument.FieldViolation value) {
if (fieldViolationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1364,10 +1362,10 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder setFieldViolations(
- int index, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder builderForValue) {
+ int index, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder builderForValue) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
fieldViolations_.set(index, builderForValue.build());
@@ -1382,9 +1380,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public Builder addFieldViolations(bdchain.api.grpc.InvalidArgument.FieldViolation value) {
+ public Builder addFieldViolations(bdchain.api.grpc.common.InvalidArgument.FieldViolation value) {
if (fieldViolationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1402,10 +1400,10 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder addFieldViolations(
- int index, bdchain.api.grpc.InvalidArgument.FieldViolation value) {
+ int index, bdchain.api.grpc.common.InvalidArgument.FieldViolation value) {
if (fieldViolationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1423,10 +1421,10 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder addFieldViolations(
- bdchain.api.grpc.InvalidArgument.FieldViolation.Builder builderForValue) {
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder builderForValue) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
fieldViolations_.add(builderForValue.build());
@@ -1441,10 +1439,10 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder addFieldViolations(
- int index, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder builderForValue) {
+ int index, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder builderForValue) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
fieldViolations_.add(index, builderForValue.build());
@@ -1459,10 +1457,10 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder addAllFieldViolations(
- java.lang.Iterable extends bdchain.api.grpc.InvalidArgument.FieldViolation> values) {
+ java.lang.Iterable extends bdchain.api.grpc.common.InvalidArgument.FieldViolation> values) {
if (fieldViolationsBuilder_ == null) {
ensureFieldViolationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
@@ -1478,7 +1476,7 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder clearFieldViolations() {
if (fieldViolationsBuilder_ == null) {
@@ -1495,7 +1493,7 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
public Builder removeFieldViolations(int index) {
if (fieldViolationsBuilder_ == null) {
@@ -1512,9 +1510,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolation.Builder getFieldViolationsBuilder(
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder getFieldViolationsBuilder(
int index) {
return getFieldViolationsFieldBuilder().getBuilder(index);
}
@@ -1523,9 +1521,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
int index) {
if (fieldViolationsBuilder_ == null) {
return fieldViolations_.get(index); } else {
@@ -1537,9 +1535,9 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public java.util.List extends bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>
+ public java.util.List extends bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsOrBuilderList() {
if (fieldViolationsBuilder_ != null) {
return fieldViolationsBuilder_.getMessageOrBuilderList();
@@ -1552,43 +1550,43 @@ private static final long serialVersionUID = 0L;
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder() {
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder() {
return getFieldViolationsFieldBuilder().addBuilder(
- bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance());
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation.getDefaultInstance());
}
/**
*
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public bdchain.api.grpc.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder(
+ public bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder addFieldViolationsBuilder(
int index) {
return getFieldViolationsFieldBuilder().addBuilder(
- index, bdchain.api.grpc.InvalidArgument.FieldViolation.getDefaultInstance());
+ index, bdchain.api.grpc.common.InvalidArgument.FieldViolation.getDefaultInstance());
}
/**
*
* Describes all violations in a client request.
*
*
- * repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
*/
- public java.util.List
+ public java.util.List
getFieldViolationsBuilderList() {
return getFieldViolationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
- bdchain.api.grpc.InvalidArgument.FieldViolation, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsFieldBuilder() {
if (fieldViolationsBuilder_ == null) {
fieldViolationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- bdchain.api.grpc.InvalidArgument.FieldViolation, bdchain.api.grpc.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>(
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation, bdchain.api.grpc.common.InvalidArgument.FieldViolation.Builder, bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder>(
fieldViolations_,
- ((bitField0_ & 0x00000001) == 0x00000001),
+ ((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
fieldViolations_ = null;
@@ -1598,7 +1596,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -1608,16 +1606,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.InvalidArgument)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.common.InvalidArgument)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.InvalidArgument)
- private static final bdchain.api.grpc.InvalidArgument DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.common.InvalidArgument)
+ private static final bdchain.api.grpc.common.InvalidArgument DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.InvalidArgument();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.common.InvalidArgument();
}
- public static bdchain.api.grpc.InvalidArgument getDefaultInstance() {
+ public static bdchain.api.grpc.common.InvalidArgument getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -1642,7 +1640,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.InvalidArgument getDefaultInstanceForType() {
+ public bdchain.api.grpc.common.InvalidArgument getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/common/InvalidArgumentOrBuilder.java b/src/main/java/bdchain/api/grpc/common/InvalidArgumentOrBuilder.java
new file mode 100644
index 0000000..e83212d
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/common/InvalidArgumentOrBuilder.java
@@ -0,0 +1,53 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/error_details.proto
+
+package bdchain.api.grpc.common;
+
+public interface InvalidArgumentOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.common.InvalidArgument)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * Describes all violations in a client request.
+ *
+ *
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
+ */
+ java.util.List
+ getFieldViolationsList();
+ /**
+ *
+ * Describes all violations in a client request.
+ *
+ *
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
+ */
+ bdchain.api.grpc.common.InvalidArgument.FieldViolation getFieldViolations(int index);
+ /**
+ *
+ * Describes all violations in a client request.
+ *
+ *
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
+ */
+ int getFieldViolationsCount();
+ /**
+ *
+ * Describes all violations in a client request.
+ *
+ *
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
+ */
+ java.util.List extends bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder>
+ getFieldViolationsOrBuilderList();
+ /**
+ *
+ * Describes all violations in a client request.
+ *
+ *
+ * repeated .bdchain.api.common.InvalidArgument.FieldViolation field_violations = 1;
+ */
+ bdchain.api.grpc.common.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
+ int index);
+}
diff --git a/src/main/java/bdchain/api/grpc/TransactionType.java b/src/main/java/bdchain/api/grpc/common/TransactionType.java
similarity index 93%
rename from src/main/java/bdchain/api/grpc/TransactionType.java
rename to src/main/java/bdchain/api/grpc/common/TransactionType.java
index 26a698c..c772c6b 100644
--- a/src/main/java/bdchain/api/grpc/TransactionType.java
+++ b/src/main/java/bdchain/api/grpc/common/TransactionType.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.common;
/**
*
* 事务类型
*
*
- * Protobuf enum {@code bdchain.api.TransactionType}
+ * Protobuf enum {@code bdchain.api.common.TransactionType}
*/
public enum TransactionType
implements com.google.protobuf.ProtocolMessageEnum {
@@ -146,7 +146,7 @@ public enum TransactionType
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
- return bdchain.api.grpc.CommonProto.getDescriptor().getEnumTypes().get(0);
+ return bdchain.api.grpc.common.CommonProto.getDescriptor().getEnumTypes().get(0);
}
private static final TransactionType[] VALUES = values();
@@ -169,6 +169,6 @@ public enum TransactionType
this.value = value;
}
- // @@protoc_insertion_point(enum_scope:bdchain.api.TransactionType)
+ // @@protoc_insertion_point(enum_scope:bdchain.api.common.TransactionType)
}
diff --git a/src/main/java/bdchain/api/grpc/txledger/Block.java b/src/main/java/bdchain/api/grpc/txledger/Block.java
new file mode 100644
index 0000000..a630e54
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/Block.java
@@ -0,0 +1,1775 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+/**
+ * Protobuf type {@code bdchain.api.txledger.Block}
+ */
+public final class Block extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.Block)
+ BlockOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use Block.newBuilder() to construct.
+ private Block(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Block() {
+ hash_ = com.google.protobuf.ByteString.EMPTY;
+ parentHashes_ = java.util.Collections.emptyList();
+ witnesses_ = java.util.Collections.emptyList();
+ transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
+ transactions_ = java.util.Collections.emptyList();
+ transactionHashes_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Block(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+
+ index_ = input.readUInt64();
+ break;
+ }
+ case 18: {
+
+ hash_ = input.readBytes();
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) != 0)) {
+ parentHashes_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000004;
+ }
+ parentHashes_.add(input.readBytes());
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000008;
+ }
+ witnesses_.add(input.readBytes());
+ break;
+ }
+ case 40: {
+
+ timestamp_ = input.readInt64();
+ break;
+ }
+ case 48: {
+
+ size_ = input.readUInt64();
+ break;
+ }
+ case 58: {
+
+ transactionsRoot_ = input.readBytes();
+ break;
+ }
+ case 66: {
+ if (!((mutable_bitField0_ & 0x00000080) != 0)) {
+ transactions_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000080;
+ }
+ transactions_.add(
+ input.readMessage(bdchain.api.grpc.txledger.Transaction.parser(), extensionRegistry));
+ break;
+ }
+ case 74: {
+ if (!((mutable_bitField0_ & 0x00000100) != 0)) {
+ transactionHashes_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000100;
+ }
+ transactionHashes_.add(input.readBytes());
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000004) != 0)) {
+ parentHashes_ = java.util.Collections.unmodifiableList(parentHashes_); // C
+ }
+ if (((mutable_bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = java.util.Collections.unmodifiableList(witnesses_); // C
+ }
+ if (((mutable_bitField0_ & 0x00000080) != 0)) {
+ transactions_ = java.util.Collections.unmodifiableList(transactions_);
+ }
+ if (((mutable_bitField0_ & 0x00000100) != 0)) {
+ transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_); // C
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Block_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Block_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.Block.class, bdchain.api.grpc.txledger.Block.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int INDEX_FIELD_NUMBER = 1;
+ private long index_;
+ /**
+ *
+ * 事务链本地区块索引,当区块处于待确认状态时为`null`
+ *
+ *
+ * uint64 index = 1;
+ */
+ public long getIndex() {
+ return index_;
+ }
+
+ public static final int HASH_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString hash_;
+ /**
+ *
+ * 区块的哈希,当区块处于待确认状态时为`null`
+ *
+ *
+ * bytes hash = 2;
+ */
+ public com.google.protobuf.ByteString getHash() {
+ return hash_;
+ }
+
+ public static final int PARENT_HASHES_FIELD_NUMBER = 3;
+ private java.util.List parentHashes_;
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public java.util.List
+ getParentHashesList() {
+ return parentHashes_;
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public int getParentHashesCount() {
+ return parentHashes_.size();
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public com.google.protobuf.ByteString getParentHashes(int index) {
+ return parentHashes_.get(index);
+ }
+
+ public static final int WITNESSES_FIELD_NUMBER = 4;
+ private java.util.List witnesses_;
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public java.util.List
+ getWitnessesList() {
+ return witnesses_;
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public int getWitnessesCount() {
+ return witnesses_.size();
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public com.google.protobuf.ByteString getWitnesses(int index) {
+ return witnesses_.get(index);
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 5;
+ private long timestamp_;
+ /**
+ *
+ * 区块产生时的 UNIX 时间戳,单位为秒
+ *
+ *
+ * int64 timestamp = 5;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int SIZE_FIELD_NUMBER = 6;
+ private long size_;
+ /**
+ *
+ * 区块大小的字节数
+ *
+ *
+ * uint64 size = 6;
+ */
+ public long getSize() {
+ return size_;
+ }
+
+ public static final int TRANSACTIONS_ROOT_FIELD_NUMBER = 7;
+ private com.google.protobuf.ByteString transactionsRoot_;
+ /**
+ *
+ * 区块的事务树根
+ *
+ *
+ * bytes transactions_root = 7;
+ */
+ public com.google.protobuf.ByteString getTransactionsRoot() {
+ return transactionsRoot_;
+ }
+
+ public static final int TRANSACTIONS_FIELD_NUMBER = 8;
+ private java.util.List transactions_;
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public java.util.List getTransactionsList() {
+ return transactions_;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public java.util.List extends bdchain.api.grpc.txledger.TransactionOrBuilder>
+ getTransactionsOrBuilderList() {
+ return transactions_;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public int getTransactionsCount() {
+ return transactions_.size();
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.Transaction getTransactions(int index) {
+ return transactions_.get(index);
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.TransactionOrBuilder getTransactionsOrBuilder(
+ int index) {
+ return transactions_.get(index);
+ }
+
+ public static final int TRANSACTION_HASHES_FIELD_NUMBER = 9;
+ private java.util.List transactionHashes_;
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public java.util.List
+ getTransactionHashesList() {
+ return transactionHashes_;
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public int getTransactionHashesCount() {
+ return transactionHashes_.size();
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public com.google.protobuf.ByteString getTransactionHashes(int index) {
+ return transactionHashes_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (index_ != 0L) {
+ output.writeUInt64(1, index_);
+ }
+ if (!hash_.isEmpty()) {
+ output.writeBytes(2, hash_);
+ }
+ for (int i = 0; i < parentHashes_.size(); i++) {
+ output.writeBytes(3, parentHashes_.get(i));
+ }
+ for (int i = 0; i < witnesses_.size(); i++) {
+ output.writeBytes(4, witnesses_.get(i));
+ }
+ if (timestamp_ != 0L) {
+ output.writeInt64(5, timestamp_);
+ }
+ if (size_ != 0L) {
+ output.writeUInt64(6, size_);
+ }
+ if (!transactionsRoot_.isEmpty()) {
+ output.writeBytes(7, transactionsRoot_);
+ }
+ for (int i = 0; i < transactions_.size(); i++) {
+ output.writeMessage(8, transactions_.get(i));
+ }
+ for (int i = 0; i < transactionHashes_.size(); i++) {
+ output.writeBytes(9, transactionHashes_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (index_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(1, index_);
+ }
+ if (!hash_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, hash_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < parentHashes_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(parentHashes_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getParentHashesList().size();
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < witnesses_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(witnesses_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getWitnessesList().size();
+ }
+ if (timestamp_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(5, timestamp_);
+ }
+ if (size_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(6, size_);
+ }
+ if (!transactionsRoot_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(7, transactionsRoot_);
+ }
+ for (int i = 0; i < transactions_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(8, transactions_.get(i));
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < transactionHashes_.size(); i++) {
+ dataSize += com.google.protobuf.CodedOutputStream
+ .computeBytesSizeNoTag(transactionHashes_.get(i));
+ }
+ size += dataSize;
+ size += 1 * getTransactionHashesList().size();
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof bdchain.api.grpc.txledger.Block)) {
+ return super.equals(obj);
+ }
+ bdchain.api.grpc.txledger.Block other = (bdchain.api.grpc.txledger.Block) obj;
+
+ if (getIndex()
+ != other.getIndex()) return false;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (!getParentHashesList()
+ .equals(other.getParentHashesList())) return false;
+ if (!getWitnessesList()
+ .equals(other.getWitnessesList())) return false;
+ if (getTimestamp()
+ != other.getTimestamp()) return false;
+ if (getSize()
+ != other.getSize()) return false;
+ if (!getTransactionsRoot()
+ .equals(other.getTransactionsRoot())) return false;
+ if (!getTransactionsList()
+ .equals(other.getTransactionsList())) return false;
+ if (!getTransactionHashesList()
+ .equals(other.getTransactionHashesList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getIndex());
+ hash = (37 * hash) + HASH_FIELD_NUMBER;
+ hash = (53 * hash) + getHash().hashCode();
+ if (getParentHashesCount() > 0) {
+ hash = (37 * hash) + PARENT_HASHES_FIELD_NUMBER;
+ hash = (53 * hash) + getParentHashesList().hashCode();
+ }
+ if (getWitnessesCount() > 0) {
+ hash = (37 * hash) + WITNESSES_FIELD_NUMBER;
+ hash = (53 * hash) + getWitnessesList().hashCode();
+ }
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTimestamp());
+ hash = (37 * hash) + SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getSize());
+ hash = (37 * hash) + TRANSACTIONS_ROOT_FIELD_NUMBER;
+ hash = (53 * hash) + getTransactionsRoot().hashCode();
+ if (getTransactionsCount() > 0) {
+ hash = (37 * hash) + TRANSACTIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getTransactionsList().hashCode();
+ }
+ if (getTransactionHashesCount() > 0) {
+ hash = (37 * hash) + TRANSACTION_HASHES_FIELD_NUMBER;
+ hash = (53 * hash) + getTransactionHashesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Block parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.Block parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.Block parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(bdchain.api.grpc.txledger.Block prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code bdchain.api.txledger.Block}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.Block)
+ bdchain.api.grpc.txledger.BlockOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Block_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Block_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.Block.class, bdchain.api.grpc.txledger.Block.Builder.class);
+ }
+
+ // Construct using bdchain.api.grpc.txledger.Block.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getTransactionsFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ index_ = 0L;
+
+ hash_ = com.google.protobuf.ByteString.EMPTY;
+
+ parentHashes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ witnesses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ timestamp_ = 0L;
+
+ size_ = 0L;
+
+ transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
+
+ if (transactionsBuilder_ == null) {
+ transactions_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000080);
+ } else {
+ transactionsBuilder_.clear();
+ }
+ transactionHashes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000100);
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Block_descriptor;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Block getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.Block.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Block build() {
+ bdchain.api.grpc.txledger.Block result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Block buildPartial() {
+ bdchain.api.grpc.txledger.Block result = new bdchain.api.grpc.txledger.Block(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ result.index_ = index_;
+ result.hash_ = hash_;
+ if (((bitField0_ & 0x00000004) != 0)) {
+ parentHashes_ = java.util.Collections.unmodifiableList(parentHashes_);
+ bitField0_ = (bitField0_ & ~0x00000004);
+ }
+ result.parentHashes_ = parentHashes_;
+ if (((bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = java.util.Collections.unmodifiableList(witnesses_);
+ bitField0_ = (bitField0_ & ~0x00000008);
+ }
+ result.witnesses_ = witnesses_;
+ result.timestamp_ = timestamp_;
+ result.size_ = size_;
+ result.transactionsRoot_ = transactionsRoot_;
+ if (transactionsBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) != 0)) {
+ transactions_ = java.util.Collections.unmodifiableList(transactions_);
+ bitField0_ = (bitField0_ & ~0x00000080);
+ }
+ result.transactions_ = transactions_;
+ } else {
+ result.transactions_ = transactionsBuilder_.build();
+ }
+ if (((bitField0_ & 0x00000100) != 0)) {
+ transactionHashes_ = java.util.Collections.unmodifiableList(transactionHashes_);
+ bitField0_ = (bitField0_ & ~0x00000100);
+ }
+ result.transactionHashes_ = transactionHashes_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof bdchain.api.grpc.txledger.Block) {
+ return mergeFrom((bdchain.api.grpc.txledger.Block)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(bdchain.api.grpc.txledger.Block other) {
+ if (other == bdchain.api.grpc.txledger.Block.getDefaultInstance()) return this;
+ if (other.getIndex() != 0L) {
+ setIndex(other.getIndex());
+ }
+ if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
+ setHash(other.getHash());
+ }
+ if (!other.parentHashes_.isEmpty()) {
+ if (parentHashes_.isEmpty()) {
+ parentHashes_ = other.parentHashes_;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ } else {
+ ensureParentHashesIsMutable();
+ parentHashes_.addAll(other.parentHashes_);
+ }
+ onChanged();
+ }
+ if (!other.witnesses_.isEmpty()) {
+ if (witnesses_.isEmpty()) {
+ witnesses_ = other.witnesses_;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ } else {
+ ensureWitnessesIsMutable();
+ witnesses_.addAll(other.witnesses_);
+ }
+ onChanged();
+ }
+ if (other.getTimestamp() != 0L) {
+ setTimestamp(other.getTimestamp());
+ }
+ if (other.getSize() != 0L) {
+ setSize(other.getSize());
+ }
+ if (other.getTransactionsRoot() != com.google.protobuf.ByteString.EMPTY) {
+ setTransactionsRoot(other.getTransactionsRoot());
+ }
+ if (transactionsBuilder_ == null) {
+ if (!other.transactions_.isEmpty()) {
+ if (transactions_.isEmpty()) {
+ transactions_ = other.transactions_;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ } else {
+ ensureTransactionsIsMutable();
+ transactions_.addAll(other.transactions_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.transactions_.isEmpty()) {
+ if (transactionsBuilder_.isEmpty()) {
+ transactionsBuilder_.dispose();
+ transactionsBuilder_ = null;
+ transactions_ = other.transactions_;
+ bitField0_ = (bitField0_ & ~0x00000080);
+ transactionsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getTransactionsFieldBuilder() : null;
+ } else {
+ transactionsBuilder_.addAllMessages(other.transactions_);
+ }
+ }
+ }
+ if (!other.transactionHashes_.isEmpty()) {
+ if (transactionHashes_.isEmpty()) {
+ transactionHashes_ = other.transactionHashes_;
+ bitField0_ = (bitField0_ & ~0x00000100);
+ } else {
+ ensureTransactionHashesIsMutable();
+ transactionHashes_.addAll(other.transactionHashes_);
+ }
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ bdchain.api.grpc.txledger.Block parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (bdchain.api.grpc.txledger.Block) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private long index_ ;
+ /**
+ *
+ * 事务链本地区块索引,当区块处于待确认状态时为`null`
+ *
+ *
+ * uint64 index = 1;
+ */
+ public long getIndex() {
+ return index_;
+ }
+ /**
+ *
+ * 事务链本地区块索引,当区块处于待确认状态时为`null`
+ *
+ *
+ * uint64 index = 1;
+ */
+ public Builder setIndex(long value) {
+
+ index_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 事务链本地区块索引,当区块处于待确认状态时为`null`
+ *
+ *
+ * uint64 index = 1;
+ */
+ public Builder clearIndex() {
+
+ index_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 区块的哈希,当区块处于待确认状态时为`null`
+ *
+ *
+ * bytes hash = 2;
+ */
+ public com.google.protobuf.ByteString getHash() {
+ return hash_;
+ }
+ /**
+ *
+ * 区块的哈希,当区块处于待确认状态时为`null`
+ *
+ *
+ * bytes hash = 2;
+ */
+ public Builder setHash(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ hash_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 区块的哈希,当区块处于待确认状态时为`null`
+ *
+ *
+ * bytes hash = 2;
+ */
+ public Builder clearHash() {
+
+ hash_ = getDefaultInstance().getHash();
+ onChanged();
+ return this;
+ }
+
+ private java.util.List parentHashes_ = java.util.Collections.emptyList();
+ private void ensureParentHashesIsMutable() {
+ if (!((bitField0_ & 0x00000004) != 0)) {
+ parentHashes_ = new java.util.ArrayList(parentHashes_);
+ bitField0_ |= 0x00000004;
+ }
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public java.util.List
+ getParentHashesList() {
+ return ((bitField0_ & 0x00000004) != 0) ?
+ java.util.Collections.unmodifiableList(parentHashes_) : parentHashes_;
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public int getParentHashesCount() {
+ return parentHashes_.size();
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public com.google.protobuf.ByteString getParentHashes(int index) {
+ return parentHashes_.get(index);
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public Builder setParentHashes(
+ int index, com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureParentHashesIsMutable();
+ parentHashes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public Builder addParentHashes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureParentHashesIsMutable();
+ parentHashes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public Builder addAllParentHashes(
+ java.lang.Iterable extends com.google.protobuf.ByteString> values) {
+ ensureParentHashesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, parentHashes_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ public Builder clearParentHashes() {
+ parentHashes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ private java.util.List witnesses_ = java.util.Collections.emptyList();
+ private void ensureWitnessesIsMutable() {
+ if (!((bitField0_ & 0x00000008) != 0)) {
+ witnesses_ = new java.util.ArrayList(witnesses_);
+ bitField0_ |= 0x00000008;
+ }
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public java.util.List
+ getWitnessesList() {
+ return ((bitField0_ & 0x00000008) != 0) ?
+ java.util.Collections.unmodifiableList(witnesses_) : witnesses_;
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public int getWitnessesCount() {
+ return witnesses_.size();
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public com.google.protobuf.ByteString getWitnesses(int index) {
+ return witnesses_.get(index);
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder setWitnesses(
+ int index, com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWitnessesIsMutable();
+ witnesses_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder addWitnesses(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureWitnessesIsMutable();
+ witnesses_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder addAllWitnesses(
+ java.lang.Iterable extends com.google.protobuf.ByteString> values) {
+ ensureWitnessesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, witnesses_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ public Builder clearWitnesses() {
+ witnesses_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_ ;
+ /**
+ *
+ * 区块产生时的 UNIX 时间戳,单位为秒
+ *
+ *
+ * int64 timestamp = 5;
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ *
+ * 区块产生时的 UNIX 时间戳,单位为秒
+ *
+ *
+ * int64 timestamp = 5;
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 区块产生时的 UNIX 时间戳,单位为秒
+ *
+ *
+ * int64 timestamp = 5;
+ */
+ public Builder clearTimestamp() {
+
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long size_ ;
+ /**
+ *
+ * 区块大小的字节数
+ *
+ *
+ * uint64 size = 6;
+ */
+ public long getSize() {
+ return size_;
+ }
+ /**
+ *
+ * 区块大小的字节数
+ *
+ *
+ * uint64 size = 6;
+ */
+ public Builder setSize(long value) {
+
+ size_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 区块大小的字节数
+ *
+ *
+ * uint64 size = 6;
+ */
+ public Builder clearSize() {
+
+ size_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString transactionsRoot_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 区块的事务树根
+ *
+ *
+ * bytes transactions_root = 7;
+ */
+ public com.google.protobuf.ByteString getTransactionsRoot() {
+ return transactionsRoot_;
+ }
+ /**
+ *
+ * 区块的事务树根
+ *
+ *
+ * bytes transactions_root = 7;
+ */
+ public Builder setTransactionsRoot(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ transactionsRoot_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 区块的事务树根
+ *
+ *
+ * bytes transactions_root = 7;
+ */
+ public Builder clearTransactionsRoot() {
+
+ transactionsRoot_ = getDefaultInstance().getTransactionsRoot();
+ onChanged();
+ return this;
+ }
+
+ private java.util.List transactions_ =
+ java.util.Collections.emptyList();
+ private void ensureTransactionsIsMutable() {
+ if (!((bitField0_ & 0x00000080) != 0)) {
+ transactions_ = new java.util.ArrayList(transactions_);
+ bitField0_ |= 0x00000080;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ bdchain.api.grpc.txledger.Transaction, bdchain.api.grpc.txledger.Transaction.Builder, bdchain.api.grpc.txledger.TransactionOrBuilder> transactionsBuilder_;
+
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public java.util.List getTransactionsList() {
+ if (transactionsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(transactions_);
+ } else {
+ return transactionsBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public int getTransactionsCount() {
+ if (transactionsBuilder_ == null) {
+ return transactions_.size();
+ } else {
+ return transactionsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.Transaction getTransactions(int index) {
+ if (transactionsBuilder_ == null) {
+ return transactions_.get(index);
+ } else {
+ return transactionsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder setTransactions(
+ int index, bdchain.api.grpc.txledger.Transaction value) {
+ if (transactionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransactionsIsMutable();
+ transactions_.set(index, value);
+ onChanged();
+ } else {
+ transactionsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder setTransactions(
+ int index, bdchain.api.grpc.txledger.Transaction.Builder builderForValue) {
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ transactions_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ transactionsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder addTransactions(bdchain.api.grpc.txledger.Transaction value) {
+ if (transactionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransactionsIsMutable();
+ transactions_.add(value);
+ onChanged();
+ } else {
+ transactionsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder addTransactions(
+ int index, bdchain.api.grpc.txledger.Transaction value) {
+ if (transactionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransactionsIsMutable();
+ transactions_.add(index, value);
+ onChanged();
+ } else {
+ transactionsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder addTransactions(
+ bdchain.api.grpc.txledger.Transaction.Builder builderForValue) {
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ transactions_.add(builderForValue.build());
+ onChanged();
+ } else {
+ transactionsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder addTransactions(
+ int index, bdchain.api.grpc.txledger.Transaction.Builder builderForValue) {
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ transactions_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ transactionsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder addAllTransactions(
+ java.lang.Iterable extends bdchain.api.grpc.txledger.Transaction> values) {
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, transactions_);
+ onChanged();
+ } else {
+ transactionsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder clearTransactions() {
+ if (transactionsBuilder_ == null) {
+ transactions_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000080);
+ onChanged();
+ } else {
+ transactionsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public Builder removeTransactions(int index) {
+ if (transactionsBuilder_ == null) {
+ ensureTransactionsIsMutable();
+ transactions_.remove(index);
+ onChanged();
+ } else {
+ transactionsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.Transaction.Builder getTransactionsBuilder(
+ int index) {
+ return getTransactionsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.TransactionOrBuilder getTransactionsOrBuilder(
+ int index) {
+ if (transactionsBuilder_ == null) {
+ return transactions_.get(index); } else {
+ return transactionsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public java.util.List extends bdchain.api.grpc.txledger.TransactionOrBuilder>
+ getTransactionsOrBuilderList() {
+ if (transactionsBuilder_ != null) {
+ return transactionsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(transactions_);
+ }
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.Transaction.Builder addTransactionsBuilder() {
+ return getTransactionsFieldBuilder().addBuilder(
+ bdchain.api.grpc.txledger.Transaction.getDefaultInstance());
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public bdchain.api.grpc.txledger.Transaction.Builder addTransactionsBuilder(
+ int index) {
+ return getTransactionsFieldBuilder().addBuilder(
+ index, bdchain.api.grpc.txledger.Transaction.getDefaultInstance());
+ }
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ public java.util.List
+ getTransactionsBuilderList() {
+ return getTransactionsFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ bdchain.api.grpc.txledger.Transaction, bdchain.api.grpc.txledger.Transaction.Builder, bdchain.api.grpc.txledger.TransactionOrBuilder>
+ getTransactionsFieldBuilder() {
+ if (transactionsBuilder_ == null) {
+ transactionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ bdchain.api.grpc.txledger.Transaction, bdchain.api.grpc.txledger.Transaction.Builder, bdchain.api.grpc.txledger.TransactionOrBuilder>(
+ transactions_,
+ ((bitField0_ & 0x00000080) != 0),
+ getParentForChildren(),
+ isClean());
+ transactions_ = null;
+ }
+ return transactionsBuilder_;
+ }
+
+ private java.util.List transactionHashes_ = java.util.Collections.emptyList();
+ private void ensureTransactionHashesIsMutable() {
+ if (!((bitField0_ & 0x00000100) != 0)) {
+ transactionHashes_ = new java.util.ArrayList(transactionHashes_);
+ bitField0_ |= 0x00000100;
+ }
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public java.util.List
+ getTransactionHashesList() {
+ return ((bitField0_ & 0x00000100) != 0) ?
+ java.util.Collections.unmodifiableList(transactionHashes_) : transactionHashes_;
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public int getTransactionHashesCount() {
+ return transactionHashes_.size();
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public com.google.protobuf.ByteString getTransactionHashes(int index) {
+ return transactionHashes_.get(index);
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public Builder setTransactionHashes(
+ int index, com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransactionHashesIsMutable();
+ transactionHashes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public Builder addTransactionHashes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTransactionHashesIsMutable();
+ transactionHashes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public Builder addAllTransactionHashes(
+ java.lang.Iterable extends com.google.protobuf.ByteString> values) {
+ ensureTransactionHashesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, transactionHashes_);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ public Builder clearTransactionHashes() {
+ transactionHashes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000100);
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.Block)
+ }
+
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.Block)
+ private static final bdchain.api.grpc.txledger.Block DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.Block();
+ }
+
+ public static bdchain.api.grpc.txledger.Block getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Block parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Block(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Block getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/src/main/java/bdchain/api/grpc/txledger/BlockCountRequest.java b/src/main/java/bdchain/api/grpc/txledger/BlockCountRequest.java
new file mode 100644
index 0000000..63b9162
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/BlockCountRequest.java
@@ -0,0 +1,540 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+/**
+ * Protobuf type {@code bdchain.api.txledger.BlockCountRequest}
+ */
+public final class BlockCountRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.BlockCountRequest)
+ BlockCountRequestOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use BlockCountRequest.newBuilder() to construct.
+ private BlockCountRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private BlockCountRequest() {
+ ledger_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BlockCountRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ ledger_ = s;
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.BlockCountRequest.class, bdchain.api.grpc.txledger.BlockCountRequest.Builder.class);
+ }
+
+ public static final int LEDGER_FIELD_NUMBER = 1;
+ private volatile java.lang.Object ledger_;
+ /**
+ * string ledger = 1;
+ */
+ public java.lang.String getLedger() {
+ java.lang.Object ref = ledger_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ ledger_ = s;
+ return s;
+ }
+ }
+ /**
+ * string ledger = 1;
+ */
+ public com.google.protobuf.ByteString
+ getLedgerBytes() {
+ java.lang.Object ref = ledger_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ ledger_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getLedgerBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getLedgerBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof bdchain.api.grpc.txledger.BlockCountRequest)) {
+ return super.equals(obj);
+ }
+ bdchain.api.grpc.txledger.BlockCountRequest other = (bdchain.api.grpc.txledger.BlockCountRequest) obj;
+
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + LEDGER_FIELD_NUMBER;
+ hash = (53 * hash) + getLedger().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(bdchain.api.grpc.txledger.BlockCountRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code bdchain.api.txledger.BlockCountRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.BlockCountRequest)
+ bdchain.api.grpc.txledger.BlockCountRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.BlockCountRequest.class, bdchain.api.grpc.txledger.BlockCountRequest.Builder.class);
+ }
+
+ // Construct using bdchain.api.grpc.txledger.BlockCountRequest.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ ledger_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.BlockCountRequest.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountRequest build() {
+ bdchain.api.grpc.txledger.BlockCountRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountRequest buildPartial() {
+ bdchain.api.grpc.txledger.BlockCountRequest result = new bdchain.api.grpc.txledger.BlockCountRequest(this);
+ result.ledger_ = ledger_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof bdchain.api.grpc.txledger.BlockCountRequest) {
+ return mergeFrom((bdchain.api.grpc.txledger.BlockCountRequest)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(bdchain.api.grpc.txledger.BlockCountRequest other) {
+ if (other == bdchain.api.grpc.txledger.BlockCountRequest.getDefaultInstance()) return this;
+ if (!other.getLedger().isEmpty()) {
+ ledger_ = other.ledger_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ bdchain.api.grpc.txledger.BlockCountRequest parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (bdchain.api.grpc.txledger.BlockCountRequest) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object ledger_ = "";
+ /**
+ * string ledger = 1;
+ */
+ public java.lang.String getLedger() {
+ java.lang.Object ref = ledger_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ ledger_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string ledger = 1;
+ */
+ public com.google.protobuf.ByteString
+ getLedgerBytes() {
+ java.lang.Object ref = ledger_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ ledger_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string ledger = 1;
+ */
+ public Builder setLedger(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ledger_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string ledger = 1;
+ */
+ public Builder clearLedger() {
+
+ ledger_ = getDefaultInstance().getLedger();
+ onChanged();
+ return this;
+ }
+ /**
+ * string ledger = 1;
+ */
+ public Builder setLedgerBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ledger_ = value;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.BlockCountRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.BlockCountRequest)
+ private static final bdchain.api.grpc.txledger.BlockCountRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.BlockCountRequest();
+ }
+
+ public static bdchain.api.grpc.txledger.BlockCountRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public BlockCountRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new BlockCountRequest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/src/main/java/bdchain/api/grpc/txledger/BlockCountRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/BlockCountRequestOrBuilder.java
new file mode 100644
index 0000000..bf32d82
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/BlockCountRequestOrBuilder.java
@@ -0,0 +1,19 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+public interface BlockCountRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.BlockCountRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string ledger = 1;
+ */
+ java.lang.String getLedger();
+ /**
+ * string ledger = 1;
+ */
+ com.google.protobuf.ByteString
+ getLedgerBytes();
+}
diff --git a/src/main/java/bdchain/api/grpc/txledger/BlockCountResponse.java b/src/main/java/bdchain/api/grpc/txledger/BlockCountResponse.java
new file mode 100644
index 0000000..53b4b3a
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/BlockCountResponse.java
@@ -0,0 +1,471 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+/**
+ * Protobuf type {@code bdchain.api.txledger.BlockCountResponse}
+ */
+public final class BlockCountResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.BlockCountResponse)
+ BlockCountResponseOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use BlockCountResponse.newBuilder() to construct.
+ private BlockCountResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private BlockCountResponse() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private BlockCountResponse(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+
+ blockCount_ = input.readUInt64();
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.BlockCountResponse.class, bdchain.api.grpc.txledger.BlockCountResponse.Builder.class);
+ }
+
+ public static final int BLOCK_COUNT_FIELD_NUMBER = 1;
+ private long blockCount_;
+ /**
+ * uint64 block_count = 1;
+ */
+ public long getBlockCount() {
+ return blockCount_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (blockCount_ != 0L) {
+ output.writeUInt64(1, blockCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (blockCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(1, blockCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof bdchain.api.grpc.txledger.BlockCountResponse)) {
+ return super.equals(obj);
+ }
+ bdchain.api.grpc.txledger.BlockCountResponse other = (bdchain.api.grpc.txledger.BlockCountResponse) obj;
+
+ if (getBlockCount()
+ != other.getBlockCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + BLOCK_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getBlockCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.BlockCountResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(bdchain.api.grpc.txledger.BlockCountResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code bdchain.api.txledger.BlockCountResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.BlockCountResponse)
+ bdchain.api.grpc.txledger.BlockCountResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.BlockCountResponse.class, bdchain.api.grpc.txledger.BlockCountResponse.Builder.class);
+ }
+
+ // Construct using bdchain.api.grpc.txledger.BlockCountResponse.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ blockCount_ = 0L;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_BlockCountResponse_descriptor;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.BlockCountResponse.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountResponse build() {
+ bdchain.api.grpc.txledger.BlockCountResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountResponse buildPartial() {
+ bdchain.api.grpc.txledger.BlockCountResponse result = new bdchain.api.grpc.txledger.BlockCountResponse(this);
+ result.blockCount_ = blockCount_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof bdchain.api.grpc.txledger.BlockCountResponse) {
+ return mergeFrom((bdchain.api.grpc.txledger.BlockCountResponse)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(bdchain.api.grpc.txledger.BlockCountResponse other) {
+ if (other == bdchain.api.grpc.txledger.BlockCountResponse.getDefaultInstance()) return this;
+ if (other.getBlockCount() != 0L) {
+ setBlockCount(other.getBlockCount());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ bdchain.api.grpc.txledger.BlockCountResponse parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (bdchain.api.grpc.txledger.BlockCountResponse) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private long blockCount_ ;
+ /**
+ * uint64 block_count = 1;
+ */
+ public long getBlockCount() {
+ return blockCount_;
+ }
+ /**
+ * uint64 block_count = 1;
+ */
+ public Builder setBlockCount(long value) {
+
+ blockCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * uint64 block_count = 1;
+ */
+ public Builder clearBlockCount() {
+
+ blockCount_ = 0L;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.BlockCountResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.BlockCountResponse)
+ private static final bdchain.api.grpc.txledger.BlockCountResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.BlockCountResponse();
+ }
+
+ public static bdchain.api.grpc.txledger.BlockCountResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public BlockCountResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new BlockCountResponse(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.BlockCountResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/src/main/java/bdchain/api/grpc/txledger/BlockCountResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/BlockCountResponseOrBuilder.java
new file mode 100644
index 0000000..c6de46d
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/BlockCountResponseOrBuilder.java
@@ -0,0 +1,14 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+public interface BlockCountResponseOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.BlockCountResponse)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * uint64 block_count = 1;
+ */
+ long getBlockCount();
+}
diff --git a/src/main/java/bdchain/api/grpc/txledger/BlockOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/BlockOrBuilder.java
new file mode 100644
index 0000000..b806ce5
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/BlockOrBuilder.java
@@ -0,0 +1,173 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+public interface BlockOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.Block)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * 事务链本地区块索引,当区块处于待确认状态时为`null`
+ *
+ *
+ * uint64 index = 1;
+ */
+ long getIndex();
+
+ /**
+ *
+ * 区块的哈希,当区块处于待确认状态时为`null`
+ *
+ *
+ * bytes hash = 2;
+ */
+ com.google.protobuf.ByteString getHash();
+
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ java.util.List getParentHashesList();
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ int getParentHashesCount();
+ /**
+ *
+ * 父区块的哈希
+ *
+ *
+ * repeated bytes parent_hashes = 3;
+ */
+ com.google.protobuf.ByteString getParentHashes(int index);
+
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ java.util.List getWitnessesList();
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ int getWitnessesCount();
+ /**
+ *
+ * 见证者账户地址
+ *
+ *
+ * repeated bytes witnesses = 4;
+ */
+ com.google.protobuf.ByteString getWitnesses(int index);
+
+ /**
+ *
+ * 区块产生时的 UNIX 时间戳,单位为秒
+ *
+ *
+ * int64 timestamp = 5;
+ */
+ long getTimestamp();
+
+ /**
+ *
+ * 区块大小的字节数
+ *
+ *
+ * uint64 size = 6;
+ */
+ long getSize();
+
+ /**
+ *
+ * 区块的事务树根
+ *
+ *
+ * bytes transactions_root = 7;
+ */
+ com.google.protobuf.ByteString getTransactionsRoot();
+
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ java.util.List
+ getTransactionsList();
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ bdchain.api.grpc.txledger.Transaction getTransactions(int index);
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ int getTransactionsCount();
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ java.util.List extends bdchain.api.grpc.txledger.TransactionOrBuilder>
+ getTransactionsOrBuilderList();
+ /**
+ *
+ * 事务对象的数组,或为空
+ *
+ *
+ * repeated .bdchain.api.txledger.Transaction transactions = 8;
+ */
+ bdchain.api.grpc.txledger.TransactionOrBuilder getTransactionsOrBuilder(
+ int index);
+
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ java.util.List getTransactionHashesList();
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ int getTransactionHashesCount();
+ /**
+ *
+ * 32字节的交易哈希的数组,或为空
+ *
+ *
+ * repeated bytes transaction_hashes = 9;
+ */
+ com.google.protobuf.ByteString getTransactionHashes(int index);
+}
diff --git a/src/main/java/bdchain/api/grpc/CreateLedgerRequest.java b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerRequest.java
similarity index 74%
rename from src/main/java/bdchain/api/grpc/CreateLedgerRequest.java
rename to src/main/java/bdchain/api/grpc/txledger/CreateLedgerRequest.java
index be80baf..f3d0296 100644
--- a/src/main/java/bdchain/api/grpc/CreateLedgerRequest.java
+++ b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
/**
- * Protobuf type {@code bdchain.api.CreateLedgerRequest}
+ * Protobuf type {@code bdchain.api.txledger.CreateLedgerRequest}
*/
public final class CreateLedgerRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.CreateLedgerRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.CreateLedgerRequest)
CreateLedgerRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateLedgerRequest.newBuilder() to construct.
@@ -50,7 +50,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -70,15 +70,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.CreateLedgerRequest.class, bdchain.api.grpc.CreateLedgerRequest.Builder.class);
+ bdchain.api.grpc.txledger.CreateLedgerRequest.class, bdchain.api.grpc.txledger.CreateLedgerRequest.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@@ -154,16 +154,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.CreateLedgerRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.txledger.CreateLedgerRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.CreateLedgerRequest other = (bdchain.api.grpc.CreateLedgerRequest) obj;
+ bdchain.api.grpc.txledger.CreateLedgerRequest other = (bdchain.api.grpc.txledger.CreateLedgerRequest) obj;
- boolean result = true;
- result = result && getName()
- .equals(other.getName());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getName()
+ .equals(other.getName())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -180,69 +179,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -255,7 +254,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.CreateLedgerRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.txledger.CreateLedgerRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -271,26 +270,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.CreateLedgerRequest}
+ * Protobuf type {@code bdchain.api.txledger.CreateLedgerRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.CreateLedgerRequest)
- bdchain.api.grpc.CreateLedgerRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.CreateLedgerRequest)
+ bdchain.api.grpc.txledger.CreateLedgerRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.CreateLedgerRequest.class, bdchain.api.grpc.CreateLedgerRequest.Builder.class);
+ bdchain.api.grpc.txledger.CreateLedgerRequest.class, bdchain.api.grpc.txledger.CreateLedgerRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.CreateLedgerRequest.newBuilder()
+ // Construct using bdchain.api.grpc.txledger.CreateLedgerRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -316,17 +315,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.CreateLedgerRequest.getDefaultInstance();
+ public bdchain.api.grpc.txledger.CreateLedgerRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.CreateLedgerRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerRequest build() {
- bdchain.api.grpc.CreateLedgerRequest result = buildPartial();
+ public bdchain.api.grpc.txledger.CreateLedgerRequest build() {
+ bdchain.api.grpc.txledger.CreateLedgerRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -334,8 +333,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerRequest buildPartial() {
- bdchain.api.grpc.CreateLedgerRequest result = new bdchain.api.grpc.CreateLedgerRequest(this);
+ public bdchain.api.grpc.txledger.CreateLedgerRequest buildPartial() {
+ bdchain.api.grpc.txledger.CreateLedgerRequest result = new bdchain.api.grpc.txledger.CreateLedgerRequest(this);
result.name_ = name_;
onBuilt();
return result;
@@ -343,48 +342,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.CreateLedgerRequest) {
- return mergeFrom((bdchain.api.grpc.CreateLedgerRequest)other);
+ if (other instanceof bdchain.api.grpc.txledger.CreateLedgerRequest) {
+ return mergeFrom((bdchain.api.grpc.txledger.CreateLedgerRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.CreateLedgerRequest other) {
- if (other == bdchain.api.grpc.CreateLedgerRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.txledger.CreateLedgerRequest other) {
+ if (other == bdchain.api.grpc.txledger.CreateLedgerRequest.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
@@ -404,11 +403,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.CreateLedgerRequest parsedMessage = null;
+ bdchain.api.grpc.txledger.CreateLedgerRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.CreateLedgerRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.txledger.CreateLedgerRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -489,7 +488,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -499,16 +498,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.CreateLedgerRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.CreateLedgerRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.CreateLedgerRequest)
- private static final bdchain.api.grpc.CreateLedgerRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.CreateLedgerRequest)
+ private static final bdchain.api.grpc.txledger.CreateLedgerRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.CreateLedgerRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.CreateLedgerRequest();
}
- public static bdchain.api.grpc.CreateLedgerRequest getDefaultInstance() {
+ public static bdchain.api.grpc.txledger.CreateLedgerRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -533,7 +532,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.txledger.CreateLedgerRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/CreateLedgerRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerRequestOrBuilder.java
similarity index 74%
rename from src/main/java/bdchain/api/grpc/CreateLedgerRequestOrBuilder.java
rename to src/main/java/bdchain/api/grpc/txledger/CreateLedgerRequestOrBuilder.java
index 9e704dc..ac9802b 100644
--- a/src/main/java/bdchain/api/grpc/CreateLedgerRequestOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerRequestOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
public interface CreateLedgerRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.CreateLedgerRequest)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.CreateLedgerRequest)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/CreateLedgerResponse.java b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerResponse.java
similarity index 71%
rename from src/main/java/bdchain/api/grpc/CreateLedgerResponse.java
rename to src/main/java/bdchain/api/grpc/txledger/CreateLedgerResponse.java
index 1bc76a9..0979106 100644
--- a/src/main/java/bdchain/api/grpc/CreateLedgerResponse.java
+++ b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerResponse.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
/**
- * Protobuf type {@code bdchain.api.CreateLedgerResponse}
+ * Protobuf type {@code bdchain.api.txledger.CreateLedgerResponse}
*/
public final class CreateLedgerResponse extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.CreateLedgerResponse)
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.CreateLedgerResponse)
CreateLedgerResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateLedgerResponse.newBuilder() to construct.
@@ -16,7 +16,6 @@ private static final long serialVersionUID = 0L;
super(builder);
}
private CreateLedgerResponse() {
- ok_ = false;
}
@java.lang.Override
@@ -49,7 +48,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -69,15 +68,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.CreateLedgerResponse.class, bdchain.api.grpc.CreateLedgerResponse.Builder.class);
+ bdchain.api.grpc.txledger.CreateLedgerResponse.class, bdchain.api.grpc.txledger.CreateLedgerResponse.Builder.class);
}
public static final int OK_FIELD_NUMBER = 1;
@@ -129,16 +128,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.CreateLedgerResponse)) {
+ if (!(obj instanceof bdchain.api.grpc.txledger.CreateLedgerResponse)) {
return super.equals(obj);
}
- bdchain.api.grpc.CreateLedgerResponse other = (bdchain.api.grpc.CreateLedgerResponse) obj;
+ bdchain.api.grpc.txledger.CreateLedgerResponse other = (bdchain.api.grpc.txledger.CreateLedgerResponse) obj;
- boolean result = true;
- result = result && (getOk()
- == other.getOk());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getOk()
+ != other.getOk()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -156,69 +154,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(byte[] data)
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseDelimitedFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -231,7 +229,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.CreateLedgerResponse prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.txledger.CreateLedgerResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -247,26 +245,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.CreateLedgerResponse}
+ * Protobuf type {@code bdchain.api.txledger.CreateLedgerResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.CreateLedgerResponse)
- bdchain.api.grpc.CreateLedgerResponseOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.CreateLedgerResponse)
+ bdchain.api.grpc.txledger.CreateLedgerResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.CreateLedgerResponse.class, bdchain.api.grpc.CreateLedgerResponse.Builder.class);
+ bdchain.api.grpc.txledger.CreateLedgerResponse.class, bdchain.api.grpc.txledger.CreateLedgerResponse.Builder.class);
}
- // Construct using bdchain.api.grpc.CreateLedgerResponse.newBuilder()
+ // Construct using bdchain.api.grpc.txledger.CreateLedgerResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -292,17 +290,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_CreateLedgerResponse_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerResponse getDefaultInstanceForType() {
- return bdchain.api.grpc.CreateLedgerResponse.getDefaultInstance();
+ public bdchain.api.grpc.txledger.CreateLedgerResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.CreateLedgerResponse.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerResponse build() {
- bdchain.api.grpc.CreateLedgerResponse result = buildPartial();
+ public bdchain.api.grpc.txledger.CreateLedgerResponse build() {
+ bdchain.api.grpc.txledger.CreateLedgerResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -310,8 +308,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerResponse buildPartial() {
- bdchain.api.grpc.CreateLedgerResponse result = new bdchain.api.grpc.CreateLedgerResponse(this);
+ public bdchain.api.grpc.txledger.CreateLedgerResponse buildPartial() {
+ bdchain.api.grpc.txledger.CreateLedgerResponse result = new bdchain.api.grpc.txledger.CreateLedgerResponse(this);
result.ok_ = ok_;
onBuilt();
return result;
@@ -319,48 +317,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.CreateLedgerResponse) {
- return mergeFrom((bdchain.api.grpc.CreateLedgerResponse)other);
+ if (other instanceof bdchain.api.grpc.txledger.CreateLedgerResponse) {
+ return mergeFrom((bdchain.api.grpc.txledger.CreateLedgerResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.CreateLedgerResponse other) {
- if (other == bdchain.api.grpc.CreateLedgerResponse.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.txledger.CreateLedgerResponse other) {
+ if (other == bdchain.api.grpc.txledger.CreateLedgerResponse.getDefaultInstance()) return this;
if (other.getOk() != false) {
setOk(other.getOk());
}
@@ -379,11 +377,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.CreateLedgerResponse parsedMessage = null;
+ bdchain.api.grpc.txledger.CreateLedgerResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.CreateLedgerResponse) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.txledger.CreateLedgerResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -421,7 +419,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -431,16 +429,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.CreateLedgerResponse)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.CreateLedgerResponse)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.CreateLedgerResponse)
- private static final bdchain.api.grpc.CreateLedgerResponse DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.CreateLedgerResponse)
+ private static final bdchain.api.grpc.txledger.CreateLedgerResponse DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.CreateLedgerResponse();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.CreateLedgerResponse();
}
- public static bdchain.api.grpc.CreateLedgerResponse getDefaultInstance() {
+ public static bdchain.api.grpc.txledger.CreateLedgerResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -465,7 +463,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.CreateLedgerResponse getDefaultInstanceForType() {
+ public bdchain.api.grpc.txledger.CreateLedgerResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/CreateLedgerResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerResponseOrBuilder.java
similarity index 67%
rename from src/main/java/bdchain/api/grpc/CreateLedgerResponseOrBuilder.java
rename to src/main/java/bdchain/api/grpc/txledger/CreateLedgerResponseOrBuilder.java
index f9454e1..01d1f11 100644
--- a/src/main/java/bdchain/api/grpc/CreateLedgerResponseOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/txledger/CreateLedgerResponseOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
public interface CreateLedgerResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.CreateLedgerResponse)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.CreateLedgerResponse)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/txledger/GetBlocksRequest.java b/src/main/java/bdchain/api/grpc/txledger/GetBlocksRequest.java
new file mode 100644
index 0000000..0fc8484
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/GetBlocksRequest.java
@@ -0,0 +1,729 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+/**
+ * Protobuf type {@code bdchain.api.txledger.GetBlocksRequest}
+ */
+public final class GetBlocksRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.GetBlocksRequest)
+ GetBlocksRequestOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use GetBlocksRequest.newBuilder() to construct.
+ private GetBlocksRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private GetBlocksRequest() {
+ ledger_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private GetBlocksRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ ledger_ = s;
+ break;
+ }
+ case 16: {
+
+ fromIndex_ = input.readUInt64();
+ break;
+ }
+ case 24: {
+
+ count_ = input.readUInt32();
+ break;
+ }
+ case 32: {
+
+ fullTransaction_ = input.readBool();
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.GetBlocksRequest.class, bdchain.api.grpc.txledger.GetBlocksRequest.Builder.class);
+ }
+
+ public static final int LEDGER_FIELD_NUMBER = 1;
+ private volatile java.lang.Object ledger_;
+ /**
+ * string ledger = 1;
+ */
+ public java.lang.String getLedger() {
+ java.lang.Object ref = ledger_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ ledger_ = s;
+ return s;
+ }
+ }
+ /**
+ * string ledger = 1;
+ */
+ public com.google.protobuf.ByteString
+ getLedgerBytes() {
+ java.lang.Object ref = ledger_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ ledger_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FROM_INDEX_FIELD_NUMBER = 2;
+ private long fromIndex_;
+ /**
+ * uint64 from_index = 2;
+ */
+ public long getFromIndex() {
+ return fromIndex_;
+ }
+
+ public static final int COUNT_FIELD_NUMBER = 3;
+ private int count_;
+ /**
+ *
+ * Optional, default to 10, max value is 10
+ *
+ *
+ * uint32 count = 3;
+ */
+ public int getCount() {
+ return count_;
+ }
+
+ public static final int FULL_TRANSACTION_FIELD_NUMBER = 4;
+ private boolean fullTransaction_;
+ /**
+ * bool full_transaction = 4;
+ */
+ public boolean getFullTransaction() {
+ return fullTransaction_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getLedgerBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
+ }
+ if (fromIndex_ != 0L) {
+ output.writeUInt64(2, fromIndex_);
+ }
+ if (count_ != 0) {
+ output.writeUInt32(3, count_);
+ }
+ if (fullTransaction_ != false) {
+ output.writeBool(4, fullTransaction_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getLedgerBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ledger_);
+ }
+ if (fromIndex_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(2, fromIndex_);
+ }
+ if (count_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(3, count_);
+ }
+ if (fullTransaction_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(4, fullTransaction_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof bdchain.api.grpc.txledger.GetBlocksRequest)) {
+ return super.equals(obj);
+ }
+ bdchain.api.grpc.txledger.GetBlocksRequest other = (bdchain.api.grpc.txledger.GetBlocksRequest) obj;
+
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (getFromIndex()
+ != other.getFromIndex()) return false;
+ if (getCount()
+ != other.getCount()) return false;
+ if (getFullTransaction()
+ != other.getFullTransaction()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + LEDGER_FIELD_NUMBER;
+ hash = (53 * hash) + getLedger().hashCode();
+ hash = (37 * hash) + FROM_INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getFromIndex());
+ hash = (37 * hash) + COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getCount();
+ hash = (37 * hash) + FULL_TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getFullTransaction());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(bdchain.api.grpc.txledger.GetBlocksRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code bdchain.api.txledger.GetBlocksRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.GetBlocksRequest)
+ bdchain.api.grpc.txledger.GetBlocksRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.GetBlocksRequest.class, bdchain.api.grpc.txledger.GetBlocksRequest.Builder.class);
+ }
+
+ // Construct using bdchain.api.grpc.txledger.GetBlocksRequest.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ ledger_ = "";
+
+ fromIndex_ = 0L;
+
+ count_ = 0;
+
+ fullTransaction_ = false;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.GetBlocksRequest.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksRequest build() {
+ bdchain.api.grpc.txledger.GetBlocksRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksRequest buildPartial() {
+ bdchain.api.grpc.txledger.GetBlocksRequest result = new bdchain.api.grpc.txledger.GetBlocksRequest(this);
+ result.ledger_ = ledger_;
+ result.fromIndex_ = fromIndex_;
+ result.count_ = count_;
+ result.fullTransaction_ = fullTransaction_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof bdchain.api.grpc.txledger.GetBlocksRequest) {
+ return mergeFrom((bdchain.api.grpc.txledger.GetBlocksRequest)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(bdchain.api.grpc.txledger.GetBlocksRequest other) {
+ if (other == bdchain.api.grpc.txledger.GetBlocksRequest.getDefaultInstance()) return this;
+ if (!other.getLedger().isEmpty()) {
+ ledger_ = other.ledger_;
+ onChanged();
+ }
+ if (other.getFromIndex() != 0L) {
+ setFromIndex(other.getFromIndex());
+ }
+ if (other.getCount() != 0) {
+ setCount(other.getCount());
+ }
+ if (other.getFullTransaction() != false) {
+ setFullTransaction(other.getFullTransaction());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ bdchain.api.grpc.txledger.GetBlocksRequest parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (bdchain.api.grpc.txledger.GetBlocksRequest) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object ledger_ = "";
+ /**
+ * string ledger = 1;
+ */
+ public java.lang.String getLedger() {
+ java.lang.Object ref = ledger_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ ledger_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * string ledger = 1;
+ */
+ public com.google.protobuf.ByteString
+ getLedgerBytes() {
+ java.lang.Object ref = ledger_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ ledger_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * string ledger = 1;
+ */
+ public Builder setLedger(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ ledger_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * string ledger = 1;
+ */
+ public Builder clearLedger() {
+
+ ledger_ = getDefaultInstance().getLedger();
+ onChanged();
+ return this;
+ }
+ /**
+ * string ledger = 1;
+ */
+ public Builder setLedgerBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ ledger_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long fromIndex_ ;
+ /**
+ * uint64 from_index = 2;
+ */
+ public long getFromIndex() {
+ return fromIndex_;
+ }
+ /**
+ * uint64 from_index = 2;
+ */
+ public Builder setFromIndex(long value) {
+
+ fromIndex_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * uint64 from_index = 2;
+ */
+ public Builder clearFromIndex() {
+
+ fromIndex_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int count_ ;
+ /**
+ *
+ * Optional, default to 10, max value is 10
+ *
+ *
+ * uint32 count = 3;
+ */
+ public int getCount() {
+ return count_;
+ }
+ /**
+ *
+ * Optional, default to 10, max value is 10
+ *
+ *
+ * uint32 count = 3;
+ */
+ public Builder setCount(int value) {
+
+ count_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Optional, default to 10, max value is 10
+ *
+ *
+ * uint32 count = 3;
+ */
+ public Builder clearCount() {
+
+ count_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private boolean fullTransaction_ ;
+ /**
+ * bool full_transaction = 4;
+ */
+ public boolean getFullTransaction() {
+ return fullTransaction_;
+ }
+ /**
+ * bool full_transaction = 4;
+ */
+ public Builder setFullTransaction(boolean value) {
+
+ fullTransaction_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * bool full_transaction = 4;
+ */
+ public Builder clearFullTransaction() {
+
+ fullTransaction_ = false;
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.GetBlocksRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.GetBlocksRequest)
+ private static final bdchain.api.grpc.txledger.GetBlocksRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.GetBlocksRequest();
+ }
+
+ public static bdchain.api.grpc.txledger.GetBlocksRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GetBlocksRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new GetBlocksRequest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/src/main/java/bdchain/api/grpc/txledger/GetBlocksRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/GetBlocksRequestOrBuilder.java
new file mode 100644
index 0000000..7b720a8
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/GetBlocksRequestOrBuilder.java
@@ -0,0 +1,38 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+public interface GetBlocksRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.GetBlocksRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string ledger = 1;
+ */
+ java.lang.String getLedger();
+ /**
+ * string ledger = 1;
+ */
+ com.google.protobuf.ByteString
+ getLedgerBytes();
+
+ /**
+ * uint64 from_index = 2;
+ */
+ long getFromIndex();
+
+ /**
+ *
+ * Optional, default to 10, max value is 10
+ *
+ *
+ * uint32 count = 3;
+ */
+ int getCount();
+
+ /**
+ * bool full_transaction = 4;
+ */
+ boolean getFullTransaction();
+}
diff --git a/src/main/java/bdchain/api/grpc/txledger/GetBlocksResponse.java b/src/main/java/bdchain/api/grpc/txledger/GetBlocksResponse.java
new file mode 100644
index 0000000..baf8031
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/GetBlocksResponse.java
@@ -0,0 +1,758 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+/**
+ * Protobuf type {@code bdchain.api.txledger.GetBlocksResponse}
+ */
+public final class GetBlocksResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.GetBlocksResponse)
+ GetBlocksResponseOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use GetBlocksResponse.newBuilder() to construct.
+ private GetBlocksResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private GetBlocksResponse() {
+ blocks_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private GetBlocksResponse(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ blocks_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ blocks_.add(
+ input.readMessage(bdchain.api.grpc.txledger.Block.parser(), extensionRegistry));
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
+ blocks_ = java.util.Collections.unmodifiableList(blocks_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.GetBlocksResponse.class, bdchain.api.grpc.txledger.GetBlocksResponse.Builder.class);
+ }
+
+ public static final int BLOCKS_FIELD_NUMBER = 1;
+ private java.util.List blocks_;
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public java.util.List getBlocksList() {
+ return blocks_;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public java.util.List extends bdchain.api.grpc.txledger.BlockOrBuilder>
+ getBlocksOrBuilderList() {
+ return blocks_;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public int getBlocksCount() {
+ return blocks_.size();
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.Block getBlocks(int index) {
+ return blocks_.get(index);
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.BlockOrBuilder getBlocksOrBuilder(
+ int index) {
+ return blocks_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < blocks_.size(); i++) {
+ output.writeMessage(1, blocks_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < blocks_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, blocks_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof bdchain.api.grpc.txledger.GetBlocksResponse)) {
+ return super.equals(obj);
+ }
+ bdchain.api.grpc.txledger.GetBlocksResponse other = (bdchain.api.grpc.txledger.GetBlocksResponse) obj;
+
+ if (!getBlocksList()
+ .equals(other.getBlocksList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getBlocksCount() > 0) {
+ hash = (37 * hash) + BLOCKS_FIELD_NUMBER;
+ hash = (53 * hash) + getBlocksList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.GetBlocksResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(bdchain.api.grpc.txledger.GetBlocksResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code bdchain.api.txledger.GetBlocksResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.GetBlocksResponse)
+ bdchain.api.grpc.txledger.GetBlocksResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksResponse_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.GetBlocksResponse.class, bdchain.api.grpc.txledger.GetBlocksResponse.Builder.class);
+ }
+
+ // Construct using bdchain.api.grpc.txledger.GetBlocksResponse.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getBlocksFieldBuilder();
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ if (blocksBuilder_ == null) {
+ blocks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ blocksBuilder_.clear();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetBlocksResponse_descriptor;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.GetBlocksResponse.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksResponse build() {
+ bdchain.api.grpc.txledger.GetBlocksResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksResponse buildPartial() {
+ bdchain.api.grpc.txledger.GetBlocksResponse result = new bdchain.api.grpc.txledger.GetBlocksResponse(this);
+ int from_bitField0_ = bitField0_;
+ if (blocksBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ blocks_ = java.util.Collections.unmodifiableList(blocks_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.blocks_ = blocks_;
+ } else {
+ result.blocks_ = blocksBuilder_.build();
+ }
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof bdchain.api.grpc.txledger.GetBlocksResponse) {
+ return mergeFrom((bdchain.api.grpc.txledger.GetBlocksResponse)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(bdchain.api.grpc.txledger.GetBlocksResponse other) {
+ if (other == bdchain.api.grpc.txledger.GetBlocksResponse.getDefaultInstance()) return this;
+ if (blocksBuilder_ == null) {
+ if (!other.blocks_.isEmpty()) {
+ if (blocks_.isEmpty()) {
+ blocks_ = other.blocks_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureBlocksIsMutable();
+ blocks_.addAll(other.blocks_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.blocks_.isEmpty()) {
+ if (blocksBuilder_.isEmpty()) {
+ blocksBuilder_.dispose();
+ blocksBuilder_ = null;
+ blocks_ = other.blocks_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ blocksBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getBlocksFieldBuilder() : null;
+ } else {
+ blocksBuilder_.addAllMessages(other.blocks_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ bdchain.api.grpc.txledger.GetBlocksResponse parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (bdchain.api.grpc.txledger.GetBlocksResponse) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.util.List blocks_ =
+ java.util.Collections.emptyList();
+ private void ensureBlocksIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ blocks_ = new java.util.ArrayList(blocks_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ bdchain.api.grpc.txledger.Block, bdchain.api.grpc.txledger.Block.Builder, bdchain.api.grpc.txledger.BlockOrBuilder> blocksBuilder_;
+
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public java.util.List getBlocksList() {
+ if (blocksBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(blocks_);
+ } else {
+ return blocksBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public int getBlocksCount() {
+ if (blocksBuilder_ == null) {
+ return blocks_.size();
+ } else {
+ return blocksBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.Block getBlocks(int index) {
+ if (blocksBuilder_ == null) {
+ return blocks_.get(index);
+ } else {
+ return blocksBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder setBlocks(
+ int index, bdchain.api.grpc.txledger.Block value) {
+ if (blocksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBlocksIsMutable();
+ blocks_.set(index, value);
+ onChanged();
+ } else {
+ blocksBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder setBlocks(
+ int index, bdchain.api.grpc.txledger.Block.Builder builderForValue) {
+ if (blocksBuilder_ == null) {
+ ensureBlocksIsMutable();
+ blocks_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ blocksBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder addBlocks(bdchain.api.grpc.txledger.Block value) {
+ if (blocksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBlocksIsMutable();
+ blocks_.add(value);
+ onChanged();
+ } else {
+ blocksBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder addBlocks(
+ int index, bdchain.api.grpc.txledger.Block value) {
+ if (blocksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBlocksIsMutable();
+ blocks_.add(index, value);
+ onChanged();
+ } else {
+ blocksBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder addBlocks(
+ bdchain.api.grpc.txledger.Block.Builder builderForValue) {
+ if (blocksBuilder_ == null) {
+ ensureBlocksIsMutable();
+ blocks_.add(builderForValue.build());
+ onChanged();
+ } else {
+ blocksBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder addBlocks(
+ int index, bdchain.api.grpc.txledger.Block.Builder builderForValue) {
+ if (blocksBuilder_ == null) {
+ ensureBlocksIsMutable();
+ blocks_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ blocksBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder addAllBlocks(
+ java.lang.Iterable extends bdchain.api.grpc.txledger.Block> values) {
+ if (blocksBuilder_ == null) {
+ ensureBlocksIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, blocks_);
+ onChanged();
+ } else {
+ blocksBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder clearBlocks() {
+ if (blocksBuilder_ == null) {
+ blocks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ blocksBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public Builder removeBlocks(int index) {
+ if (blocksBuilder_ == null) {
+ ensureBlocksIsMutable();
+ blocks_.remove(index);
+ onChanged();
+ } else {
+ blocksBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.Block.Builder getBlocksBuilder(
+ int index) {
+ return getBlocksFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.BlockOrBuilder getBlocksOrBuilder(
+ int index) {
+ if (blocksBuilder_ == null) {
+ return blocks_.get(index); } else {
+ return blocksBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public java.util.List extends bdchain.api.grpc.txledger.BlockOrBuilder>
+ getBlocksOrBuilderList() {
+ if (blocksBuilder_ != null) {
+ return blocksBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(blocks_);
+ }
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.Block.Builder addBlocksBuilder() {
+ return getBlocksFieldBuilder().addBuilder(
+ bdchain.api.grpc.txledger.Block.getDefaultInstance());
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public bdchain.api.grpc.txledger.Block.Builder addBlocksBuilder(
+ int index) {
+ return getBlocksFieldBuilder().addBuilder(
+ index, bdchain.api.grpc.txledger.Block.getDefaultInstance());
+ }
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ public java.util.List
+ getBlocksBuilderList() {
+ return getBlocksFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ bdchain.api.grpc.txledger.Block, bdchain.api.grpc.txledger.Block.Builder, bdchain.api.grpc.txledger.BlockOrBuilder>
+ getBlocksFieldBuilder() {
+ if (blocksBuilder_ == null) {
+ blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ bdchain.api.grpc.txledger.Block, bdchain.api.grpc.txledger.Block.Builder, bdchain.api.grpc.txledger.BlockOrBuilder>(
+ blocks_,
+ ((bitField0_ & 0x00000001) != 0),
+ getParentForChildren(),
+ isClean());
+ blocks_ = null;
+ }
+ return blocksBuilder_;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.GetBlocksResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.GetBlocksResponse)
+ private static final bdchain.api.grpc.txledger.GetBlocksResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.GetBlocksResponse();
+ }
+
+ public static bdchain.api.grpc.txledger.GetBlocksResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GetBlocksResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new GetBlocksResponse(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.GetBlocksResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/src/main/java/bdchain/api/grpc/txledger/GetBlocksResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/GetBlocksResponseOrBuilder.java
new file mode 100644
index 0000000..9387291
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/GetBlocksResponseOrBuilder.java
@@ -0,0 +1,33 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+public interface GetBlocksResponseOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.GetBlocksResponse)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ java.util.List
+ getBlocksList();
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ bdchain.api.grpc.txledger.Block getBlocks(int index);
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ int getBlocksCount();
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ java.util.List extends bdchain.api.grpc.txledger.BlockOrBuilder>
+ getBlocksOrBuilderList();
+ /**
+ * repeated .bdchain.api.txledger.Block blocks = 1;
+ */
+ bdchain.api.grpc.txledger.BlockOrBuilder getBlocksOrBuilder(
+ int index);
+}
diff --git a/src/main/java/bdchain/api/grpc/GetLedgersResponse.java b/src/main/java/bdchain/api/grpc/txledger/GetLedgersResponse.java
similarity index 76%
rename from src/main/java/bdchain/api/grpc/GetLedgersResponse.java
rename to src/main/java/bdchain/api/grpc/txledger/GetLedgersResponse.java
index be8a352..63af31e 100644
--- a/src/main/java/bdchain/api/grpc/GetLedgersResponse.java
+++ b/src/main/java/bdchain/api/grpc/txledger/GetLedgersResponse.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
/**
- * Protobuf type {@code bdchain.api.GetLedgersResponse}
+ * Protobuf type {@code bdchain.api.txledger.GetLedgersResponse}
*/
public final class GetLedgersResponse extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.GetLedgersResponse)
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.GetLedgersResponse)
GetLedgersResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetLedgersResponse.newBuilder() to construct.
@@ -45,7 +45,7 @@ private static final long serialVersionUID = 0L;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
ledgers_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
@@ -53,7 +53,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -67,7 +67,7 @@ private static final long serialVersionUID = 0L;
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
ledgers_ = ledgers_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
@@ -76,15 +76,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetLedgersResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetLedgersResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetLedgersResponse.class, bdchain.api.grpc.GetLedgersResponse.Builder.class);
+ bdchain.api.grpc.txledger.GetLedgersResponse.class, bdchain.api.grpc.txledger.GetLedgersResponse.Builder.class);
}
public static final int LEDGERS_FIELD_NUMBER = 1;
@@ -160,16 +160,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.GetLedgersResponse)) {
+ if (!(obj instanceof bdchain.api.grpc.txledger.GetLedgersResponse)) {
return super.equals(obj);
}
- bdchain.api.grpc.GetLedgersResponse other = (bdchain.api.grpc.GetLedgersResponse) obj;
+ bdchain.api.grpc.txledger.GetLedgersResponse other = (bdchain.api.grpc.txledger.GetLedgersResponse) obj;
- boolean result = true;
- result = result && getLedgersList()
- .equals(other.getLedgersList());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getLedgersList()
+ .equals(other.getLedgersList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -188,69 +187,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(byte[] data)
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetLedgersResponse parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetLedgersResponse parseDelimitedFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.GetLedgersResponse parseFrom(
+ public static bdchain.api.grpc.txledger.GetLedgersResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -263,7 +262,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.GetLedgersResponse prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.txledger.GetLedgersResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -279,26 +278,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.GetLedgersResponse}
+ * Protobuf type {@code bdchain.api.txledger.GetLedgersResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.GetLedgersResponse)
- bdchain.api.grpc.GetLedgersResponseOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.GetLedgersResponse)
+ bdchain.api.grpc.txledger.GetLedgersResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetLedgersResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetLedgersResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.GetLedgersResponse.class, bdchain.api.grpc.GetLedgersResponse.Builder.class);
+ bdchain.api.grpc.txledger.GetLedgersResponse.class, bdchain.api.grpc.txledger.GetLedgersResponse.Builder.class);
}
- // Construct using bdchain.api.grpc.GetLedgersResponse.newBuilder()
+ // Construct using bdchain.api.grpc.txledger.GetLedgersResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -324,17 +323,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_GetLedgersResponse_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.GetLedgersResponse getDefaultInstanceForType() {
- return bdchain.api.grpc.GetLedgersResponse.getDefaultInstance();
+ public bdchain.api.grpc.txledger.GetLedgersResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.GetLedgersResponse.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.GetLedgersResponse build() {
- bdchain.api.grpc.GetLedgersResponse result = buildPartial();
+ public bdchain.api.grpc.txledger.GetLedgersResponse build() {
+ bdchain.api.grpc.txledger.GetLedgersResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -342,10 +341,10 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetLedgersResponse buildPartial() {
- bdchain.api.grpc.GetLedgersResponse result = new bdchain.api.grpc.GetLedgersResponse(this);
+ public bdchain.api.grpc.txledger.GetLedgersResponse buildPartial() {
+ bdchain.api.grpc.txledger.GetLedgersResponse result = new bdchain.api.grpc.txledger.GetLedgersResponse(this);
int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ if (((bitField0_ & 0x00000001) != 0)) {
ledgers_ = ledgers_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
@@ -356,48 +355,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.GetLedgersResponse) {
- return mergeFrom((bdchain.api.grpc.GetLedgersResponse)other);
+ if (other instanceof bdchain.api.grpc.txledger.GetLedgersResponse) {
+ return mergeFrom((bdchain.api.grpc.txledger.GetLedgersResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.GetLedgersResponse other) {
- if (other == bdchain.api.grpc.GetLedgersResponse.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.txledger.GetLedgersResponse other) {
+ if (other == bdchain.api.grpc.txledger.GetLedgersResponse.getDefaultInstance()) return this;
if (!other.ledgers_.isEmpty()) {
if (ledgers_.isEmpty()) {
ledgers_ = other.ledgers_;
@@ -423,11 +422,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.GetLedgersResponse parsedMessage = null;
+ bdchain.api.grpc.txledger.GetLedgersResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.GetLedgersResponse) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.txledger.GetLedgersResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -440,7 +439,7 @@ private static final long serialVersionUID = 0L;
private com.google.protobuf.LazyStringList ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureLedgersIsMutable() {
- if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+ if (!((bitField0_ & 0x00000001) != 0)) {
ledgers_ = new com.google.protobuf.LazyStringArrayList(ledgers_);
bitField0_ |= 0x00000001;
}
@@ -534,7 +533,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -544,16 +543,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.GetLedgersResponse)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.GetLedgersResponse)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.GetLedgersResponse)
- private static final bdchain.api.grpc.GetLedgersResponse DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.GetLedgersResponse)
+ private static final bdchain.api.grpc.txledger.GetLedgersResponse DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.GetLedgersResponse();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.GetLedgersResponse();
}
- public static bdchain.api.grpc.GetLedgersResponse getDefaultInstance() {
+ public static bdchain.api.grpc.txledger.GetLedgersResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -578,7 +577,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.GetLedgersResponse getDefaultInstanceForType() {
+ public bdchain.api.grpc.txledger.GetLedgersResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/GetLedgersResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/GetLedgersResponseOrBuilder.java
similarity index 83%
rename from src/main/java/bdchain/api/grpc/GetLedgersResponseOrBuilder.java
rename to src/main/java/bdchain/api/grpc/txledger/GetLedgersResponseOrBuilder.java
index 49cd761..dc18302 100644
--- a/src/main/java/bdchain/api/grpc/GetLedgersResponseOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/txledger/GetLedgersResponseOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
public interface GetLedgersResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.GetLedgersResponse)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.GetLedgersResponse)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/SendTransactionRequest.java b/src/main/java/bdchain/api/grpc/txledger/SendTransactionRequest.java
similarity index 69%
rename from src/main/java/bdchain/api/grpc/SendTransactionRequest.java
rename to src/main/java/bdchain/api/grpc/txledger/SendTransactionRequest.java
index 690b26f..1701342 100644
--- a/src/main/java/bdchain/api/grpc/SendTransactionRequest.java
+++ b/src/main/java/bdchain/api/grpc/txledger/SendTransactionRequest.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
/**
- * Protobuf type {@code bdchain.api.SendTransactionRequest}
+ * Protobuf type {@code bdchain.api.txledger.SendTransactionRequest}
*/
public final class SendTransactionRequest extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.SendTransactionRequest)
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.SendTransactionRequest)
SendTransactionRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SendTransactionRequest.newBuilder() to construct.
@@ -50,11 +50,11 @@ private static final long serialVersionUID = 0L;
break;
}
case 18: {
- bdchain.api.grpc.SendTransactionRequest.Transaction.Builder subBuilder = null;
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder subBuilder = null;
if (transaction_ != null) {
subBuilder = transaction_.toBuilder();
}
- transaction_ = input.readMessage(bdchain.api.grpc.SendTransactionRequest.Transaction.parser(), extensionRegistry);
+ transaction_ = input.readMessage(bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(transaction_);
transaction_ = subBuilder.buildPartial();
@@ -63,7 +63,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -83,29 +83,29 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.SendTransactionRequest.class, bdchain.api.grpc.SendTransactionRequest.Builder.class);
+ bdchain.api.grpc.txledger.SendTransactionRequest.class, bdchain.api.grpc.txledger.SendTransactionRequest.Builder.class);
}
public interface TransactionOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.SendTransactionRequest.Transaction)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.SendTransactionRequest.Transaction)
com.google.protobuf.MessageOrBuilder {
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
int getTypeValue();
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
- bdchain.api.grpc.TransactionType getType();
+ bdchain.api.grpc.common.TransactionType getType();
/**
* bytes from = 2;
@@ -123,11 +123,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.ByteString getData();
}
/**
- * Protobuf type {@code bdchain.api.SendTransactionRequest.Transaction}
+ * Protobuf type {@code bdchain.api.txledger.SendTransactionRequest.Transaction}
*/
public static final class Transaction extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.SendTransactionRequest.Transaction)
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.SendTransactionRequest.Transaction)
TransactionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Transaction.newBuilder() to construct.
@@ -187,7 +187,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -207,32 +207,32 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_Transaction_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_Transaction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_Transaction_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_Transaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.SendTransactionRequest.Transaction.class, bdchain.api.grpc.SendTransactionRequest.Transaction.Builder.class);
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.class, bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder.class);
}
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
- public bdchain.api.grpc.TransactionType getType() {
+ public bdchain.api.grpc.common.TransactionType getType() {
@SuppressWarnings("deprecation")
- bdchain.api.grpc.TransactionType result = bdchain.api.grpc.TransactionType.valueOf(type_);
- return result == null ? bdchain.api.grpc.TransactionType.UNRECOGNIZED : result;
+ bdchain.api.grpc.common.TransactionType result = bdchain.api.grpc.common.TransactionType.valueOf(type_);
+ return result == null ? bdchain.api.grpc.common.TransactionType.UNRECOGNIZED : result;
}
public static final int FROM_FIELD_NUMBER = 2;
@@ -276,7 +276,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (type_ != bdchain.api.grpc.TransactionType.RECORD.getNumber()) {
+ if (type_ != bdchain.api.grpc.common.TransactionType.RECORD.getNumber()) {
output.writeEnum(1, type_);
}
if (!from_.isEmpty()) {
@@ -297,7 +297,7 @@ private static final long serialVersionUID = 0L;
if (size != -1) return size;
size = 0;
- if (type_ != bdchain.api.grpc.TransactionType.RECORD.getNumber()) {
+ if (type_ != bdchain.api.grpc.common.TransactionType.RECORD.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, type_);
}
@@ -323,21 +323,20 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.SendTransactionRequest.Transaction)) {
+ if (!(obj instanceof bdchain.api.grpc.txledger.SendTransactionRequest.Transaction)) {
return super.equals(obj);
}
- bdchain.api.grpc.SendTransactionRequest.Transaction other = (bdchain.api.grpc.SendTransactionRequest.Transaction) obj;
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction other = (bdchain.api.grpc.txledger.SendTransactionRequest.Transaction) obj;
- boolean result = true;
- result = result && type_ == other.type_;
- result = result && getFrom()
- .equals(other.getFrom());
- result = result && getTo()
- .equals(other.getTo());
- result = result && getData()
- .equals(other.getData());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (type_ != other.type_) return false;
+ if (!getFrom()
+ .equals(other.getFrom())) return false;
+ if (!getTo()
+ .equals(other.getTo())) return false;
+ if (!getData()
+ .equals(other.getData())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -360,69 +359,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(byte[] data)
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseDelimitedFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -435,7 +434,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.SendTransactionRequest.Transaction prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.txledger.SendTransactionRequest.Transaction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -451,26 +450,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.SendTransactionRequest.Transaction}
+ * Protobuf type {@code bdchain.api.txledger.SendTransactionRequest.Transaction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.SendTransactionRequest.Transaction)
- bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.SendTransactionRequest.Transaction)
+ bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_Transaction_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_Transaction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_Transaction_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_Transaction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.SendTransactionRequest.Transaction.class, bdchain.api.grpc.SendTransactionRequest.Transaction.Builder.class);
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.class, bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder.class);
}
- // Construct using bdchain.api.grpc.SendTransactionRequest.Transaction.newBuilder()
+ // Construct using bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -502,17 +501,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_Transaction_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_Transaction_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest.Transaction getDefaultInstanceForType() {
- return bdchain.api.grpc.SendTransactionRequest.Transaction.getDefaultInstance();
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest.Transaction build() {
- bdchain.api.grpc.SendTransactionRequest.Transaction result = buildPartial();
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction build() {
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -520,8 +519,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest.Transaction buildPartial() {
- bdchain.api.grpc.SendTransactionRequest.Transaction result = new bdchain.api.grpc.SendTransactionRequest.Transaction(this);
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction buildPartial() {
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction result = new bdchain.api.grpc.txledger.SendTransactionRequest.Transaction(this);
result.type_ = type_;
result.from_ = from_;
result.to_ = to_;
@@ -532,48 +531,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.SendTransactionRequest.Transaction) {
- return mergeFrom((bdchain.api.grpc.SendTransactionRequest.Transaction)other);
+ if (other instanceof bdchain.api.grpc.txledger.SendTransactionRequest.Transaction) {
+ return mergeFrom((bdchain.api.grpc.txledger.SendTransactionRequest.Transaction)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.SendTransactionRequest.Transaction other) {
- if (other == bdchain.api.grpc.SendTransactionRequest.Transaction.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.txledger.SendTransactionRequest.Transaction other) {
+ if (other == bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.getDefaultInstance()) return this;
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
@@ -601,11 +600,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.SendTransactionRequest.Transaction parsedMessage = null;
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.SendTransactionRequest.Transaction) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.txledger.SendTransactionRequest.Transaction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -617,13 +616,13 @@ private static final long serialVersionUID = 0L;
private int type_ = 0;
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
public int getTypeValue() {
return type_;
}
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
public Builder setTypeValue(int value) {
type_ = value;
@@ -631,17 +630,17 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
- public bdchain.api.grpc.TransactionType getType() {
+ public bdchain.api.grpc.common.TransactionType getType() {
@SuppressWarnings("deprecation")
- bdchain.api.grpc.TransactionType result = bdchain.api.grpc.TransactionType.valueOf(type_);
- return result == null ? bdchain.api.grpc.TransactionType.UNRECOGNIZED : result;
+ bdchain.api.grpc.common.TransactionType result = bdchain.api.grpc.common.TransactionType.valueOf(type_);
+ return result == null ? bdchain.api.grpc.common.TransactionType.UNRECOGNIZED : result;
}
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
- public Builder setType(bdchain.api.grpc.TransactionType value) {
+ public Builder setType(bdchain.api.grpc.common.TransactionType value) {
if (value == null) {
throw new NullPointerException();
}
@@ -651,7 +650,7 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * .bdchain.api.TransactionType type = 1;
+ * .bdchain.api.common.TransactionType type = 1;
*/
public Builder clearType() {
@@ -749,7 +748,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -759,16 +758,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.SendTransactionRequest.Transaction)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.SendTransactionRequest.Transaction)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.SendTransactionRequest.Transaction)
- private static final bdchain.api.grpc.SendTransactionRequest.Transaction DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.SendTransactionRequest.Transaction)
+ private static final bdchain.api.grpc.txledger.SendTransactionRequest.Transaction DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.SendTransactionRequest.Transaction();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.SendTransactionRequest.Transaction();
}
- public static bdchain.api.grpc.SendTransactionRequest.Transaction getDefaultInstance() {
+ public static bdchain.api.grpc.txledger.SendTransactionRequest.Transaction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -793,7 +792,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest.Transaction getDefaultInstanceForType() {
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -834,23 +833,23 @@ private static final long serialVersionUID = 0L;
}
public static final int TRANSACTION_FIELD_NUMBER = 2;
- private bdchain.api.grpc.SendTransactionRequest.Transaction transaction_;
+ private bdchain.api.grpc.txledger.SendTransactionRequest.Transaction transaction_;
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
public boolean hasTransaction() {
return transaction_ != null;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public bdchain.api.grpc.SendTransactionRequest.Transaction getTransaction() {
- return transaction_ == null ? bdchain.api.grpc.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction getTransaction() {
+ return transaction_ == null ? bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder() {
+ public bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder() {
return getTransaction();
}
@@ -900,21 +899,20 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.SendTransactionRequest)) {
+ if (!(obj instanceof bdchain.api.grpc.txledger.SendTransactionRequest)) {
return super.equals(obj);
}
- bdchain.api.grpc.SendTransactionRequest other = (bdchain.api.grpc.SendTransactionRequest) obj;
+ bdchain.api.grpc.txledger.SendTransactionRequest other = (bdchain.api.grpc.txledger.SendTransactionRequest) obj;
- boolean result = true;
- result = result && getLedger()
- .equals(other.getLedger());
- result = result && (hasTransaction() == other.hasTransaction());
+ if (!getLedger()
+ .equals(other.getLedger())) return false;
+ if (hasTransaction() != other.hasTransaction()) return false;
if (hasTransaction()) {
- result = result && getTransaction()
- .equals(other.getTransaction());
+ if (!getTransaction()
+ .equals(other.getTransaction())) return false;
}
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -935,69 +933,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(byte[] data)
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionRequest parseDelimitedFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionRequest parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -1010,7 +1008,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.SendTransactionRequest prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.txledger.SendTransactionRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -1026,26 +1024,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.SendTransactionRequest}
+ * Protobuf type {@code bdchain.api.txledger.SendTransactionRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.SendTransactionRequest)
- bdchain.api.grpc.SendTransactionRequestOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.SendTransactionRequest)
+ bdchain.api.grpc.txledger.SendTransactionRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.SendTransactionRequest.class, bdchain.api.grpc.SendTransactionRequest.Builder.class);
+ bdchain.api.grpc.txledger.SendTransactionRequest.class, bdchain.api.grpc.txledger.SendTransactionRequest.Builder.class);
}
- // Construct using bdchain.api.grpc.SendTransactionRequest.newBuilder()
+ // Construct using bdchain.api.grpc.txledger.SendTransactionRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -1077,17 +1075,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionRequest_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionRequest_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest getDefaultInstanceForType() {
- return bdchain.api.grpc.SendTransactionRequest.getDefaultInstance();
+ public bdchain.api.grpc.txledger.SendTransactionRequest getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.SendTransactionRequest.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest build() {
- bdchain.api.grpc.SendTransactionRequest result = buildPartial();
+ public bdchain.api.grpc.txledger.SendTransactionRequest build() {
+ bdchain.api.grpc.txledger.SendTransactionRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -1095,8 +1093,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest buildPartial() {
- bdchain.api.grpc.SendTransactionRequest result = new bdchain.api.grpc.SendTransactionRequest(this);
+ public bdchain.api.grpc.txledger.SendTransactionRequest buildPartial() {
+ bdchain.api.grpc.txledger.SendTransactionRequest result = new bdchain.api.grpc.txledger.SendTransactionRequest(this);
result.ledger_ = ledger_;
if (transactionBuilder_ == null) {
result.transaction_ = transaction_;
@@ -1109,48 +1107,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.SendTransactionRequest) {
- return mergeFrom((bdchain.api.grpc.SendTransactionRequest)other);
+ if (other instanceof bdchain.api.grpc.txledger.SendTransactionRequest) {
+ return mergeFrom((bdchain.api.grpc.txledger.SendTransactionRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.SendTransactionRequest other) {
- if (other == bdchain.api.grpc.SendTransactionRequest.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.txledger.SendTransactionRequest other) {
+ if (other == bdchain.api.grpc.txledger.SendTransactionRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
@@ -1173,11 +1171,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.SendTransactionRequest parsedMessage = null;
+ bdchain.api.grpc.txledger.SendTransactionRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.SendTransactionRequest) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.txledger.SendTransactionRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -1256,29 +1254,29 @@ private static final long serialVersionUID = 0L;
return this;
}
- private bdchain.api.grpc.SendTransactionRequest.Transaction transaction_ = null;
+ private bdchain.api.grpc.txledger.SendTransactionRequest.Transaction transaction_;
private com.google.protobuf.SingleFieldBuilderV3<
- bdchain.api.grpc.SendTransactionRequest.Transaction, bdchain.api.grpc.SendTransactionRequest.Transaction.Builder, bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder> transactionBuilder_;
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction, bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder, bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder> transactionBuilder_;
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
public boolean hasTransaction() {
return transactionBuilder_ != null || transaction_ != null;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public bdchain.api.grpc.SendTransactionRequest.Transaction getTransaction() {
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction getTransaction() {
if (transactionBuilder_ == null) {
- return transaction_ == null ? bdchain.api.grpc.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
+ return transaction_ == null ? bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
} else {
return transactionBuilder_.getMessage();
}
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public Builder setTransaction(bdchain.api.grpc.SendTransactionRequest.Transaction value) {
+ public Builder setTransaction(bdchain.api.grpc.txledger.SendTransactionRequest.Transaction value) {
if (transactionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
@@ -1292,10 +1290,10 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
public Builder setTransaction(
- bdchain.api.grpc.SendTransactionRequest.Transaction.Builder builderForValue) {
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder builderForValue) {
if (transactionBuilder_ == null) {
transaction_ = builderForValue.build();
onChanged();
@@ -1306,13 +1304,13 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public Builder mergeTransaction(bdchain.api.grpc.SendTransactionRequest.Transaction value) {
+ public Builder mergeTransaction(bdchain.api.grpc.txledger.SendTransactionRequest.Transaction value) {
if (transactionBuilder_ == null) {
if (transaction_ != null) {
transaction_ =
- bdchain.api.grpc.SendTransactionRequest.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial();
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial();
} else {
transaction_ = value;
}
@@ -1324,7 +1322,7 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
public Builder clearTransaction() {
if (transactionBuilder_ == null) {
@@ -1338,33 +1336,33 @@ private static final long serialVersionUID = 0L;
return this;
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public bdchain.api.grpc.SendTransactionRequest.Transaction.Builder getTransactionBuilder() {
+ public bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder getTransactionBuilder() {
onChanged();
return getTransactionFieldBuilder().getBuilder();
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
- public bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder() {
+ public bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder() {
if (transactionBuilder_ != null) {
return transactionBuilder_.getMessageOrBuilder();
} else {
return transaction_ == null ?
- bdchain.api.grpc.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.getDefaultInstance() : transaction_;
}
}
/**
- * .bdchain.api.SendTransactionRequest.Transaction transaction = 2;
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
- bdchain.api.grpc.SendTransactionRequest.Transaction, bdchain.api.grpc.SendTransactionRequest.Transaction.Builder, bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder>
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction, bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder, bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder>
getTransactionFieldBuilder() {
if (transactionBuilder_ == null) {
transactionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- bdchain.api.grpc.SendTransactionRequest.Transaction, bdchain.api.grpc.SendTransactionRequest.Transaction.Builder, bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder>(
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction, bdchain.api.grpc.txledger.SendTransactionRequest.Transaction.Builder, bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder>(
getTransaction(),
getParentForChildren(),
isClean());
@@ -1375,7 +1373,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -1385,16 +1383,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.SendTransactionRequest)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.SendTransactionRequest)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.SendTransactionRequest)
- private static final bdchain.api.grpc.SendTransactionRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.SendTransactionRequest)
+ private static final bdchain.api.grpc.txledger.SendTransactionRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.SendTransactionRequest();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.SendTransactionRequest();
}
- public static bdchain.api.grpc.SendTransactionRequest getDefaultInstance() {
+ public static bdchain.api.grpc.txledger.SendTransactionRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -1419,7 +1417,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionRequest getDefaultInstanceForType() {
+ public bdchain.api.grpc.txledger.SendTransactionRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/txledger/SendTransactionRequestOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/SendTransactionRequestOrBuilder.java
new file mode 100644
index 0000000..13c48a4
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/SendTransactionRequestOrBuilder.java
@@ -0,0 +1,32 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+public interface SendTransactionRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.SendTransactionRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * string ledger = 1;
+ */
+ java.lang.String getLedger();
+ /**
+ * string ledger = 1;
+ */
+ com.google.protobuf.ByteString
+ getLedgerBytes();
+
+ /**
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
+ */
+ boolean hasTransaction();
+ /**
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
+ */
+ bdchain.api.grpc.txledger.SendTransactionRequest.Transaction getTransaction();
+ /**
+ * .bdchain.api.txledger.SendTransactionRequest.Transaction transaction = 2;
+ */
+ bdchain.api.grpc.txledger.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder();
+}
diff --git a/src/main/java/bdchain/api/grpc/SendTransactionResponse.java b/src/main/java/bdchain/api/grpc/txledger/SendTransactionResponse.java
similarity index 71%
rename from src/main/java/bdchain/api/grpc/SendTransactionResponse.java
rename to src/main/java/bdchain/api/grpc/txledger/SendTransactionResponse.java
index b3b1d0e..62c4d30 100644
--- a/src/main/java/bdchain/api/grpc/SendTransactionResponse.java
+++ b/src/main/java/bdchain/api/grpc/txledger/SendTransactionResponse.java
@@ -1,14 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
/**
- * Protobuf type {@code bdchain.api.SendTransactionResponse}
+ * Protobuf type {@code bdchain.api.txledger.SendTransactionResponse}
*/
public final class SendTransactionResponse extends
com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:bdchain.api.SendTransactionResponse)
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.SendTransactionResponse)
SendTransactionResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use SendTransactionResponse.newBuilder() to construct.
@@ -49,7 +49,7 @@ private static final long serialVersionUID = 0L;
break;
}
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
@@ -69,15 +69,15 @@ private static final long serialVersionUID = 0L;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.SendTransactionResponse.class, bdchain.api.grpc.SendTransactionResponse.Builder.class);
+ bdchain.api.grpc.txledger.SendTransactionResponse.class, bdchain.api.grpc.txledger.SendTransactionResponse.Builder.class);
}
public static final int HASH_FIELD_NUMBER = 1;
@@ -129,16 +129,15 @@ private static final long serialVersionUID = 0L;
if (obj == this) {
return true;
}
- if (!(obj instanceof bdchain.api.grpc.SendTransactionResponse)) {
+ if (!(obj instanceof bdchain.api.grpc.txledger.SendTransactionResponse)) {
return super.equals(obj);
}
- bdchain.api.grpc.SendTransactionResponse other = (bdchain.api.grpc.SendTransactionResponse) obj;
+ bdchain.api.grpc.txledger.SendTransactionResponse other = (bdchain.api.grpc.txledger.SendTransactionResponse) obj;
- boolean result = true;
- result = result && getHash()
- .equals(other.getHash());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -155,69 +154,69 @@ private static final long serialVersionUID = 0L;
return hash;
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(byte[] data)
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionResponse parseDelimitedFrom(java.io.InputStream input)
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionResponse parseDelimitedFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
- public static bdchain.api.grpc.SendTransactionResponse parseFrom(
+ public static bdchain.api.grpc.txledger.SendTransactionResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -230,7 +229,7 @@ private static final long serialVersionUID = 0L;
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(bdchain.api.grpc.SendTransactionResponse prototype) {
+ public static Builder newBuilder(bdchain.api.grpc.txledger.SendTransactionResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -246,26 +245,26 @@ private static final long serialVersionUID = 0L;
return builder;
}
/**
- * Protobuf type {@code bdchain.api.SendTransactionResponse}
+ * Protobuf type {@code bdchain.api.txledger.SendTransactionResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:bdchain.api.SendTransactionResponse)
- bdchain.api.grpc.SendTransactionResponseOrBuilder {
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.SendTransactionResponse)
+ bdchain.api.grpc.txledger.SendTransactionResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_fieldAccessorTable
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- bdchain.api.grpc.SendTransactionResponse.class, bdchain.api.grpc.SendTransactionResponse.Builder.class);
+ bdchain.api.grpc.txledger.SendTransactionResponse.class, bdchain.api.grpc.txledger.SendTransactionResponse.Builder.class);
}
- // Construct using bdchain.api.grpc.SendTransactionResponse.newBuilder()
+ // Construct using bdchain.api.grpc.txledger.SendTransactionResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
@@ -291,17 +290,17 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_descriptor;
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_SendTransactionResponse_descriptor;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionResponse getDefaultInstanceForType() {
- return bdchain.api.grpc.SendTransactionResponse.getDefaultInstance();
+ public bdchain.api.grpc.txledger.SendTransactionResponse getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.SendTransactionResponse.getDefaultInstance();
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionResponse build() {
- bdchain.api.grpc.SendTransactionResponse result = buildPartial();
+ public bdchain.api.grpc.txledger.SendTransactionResponse build() {
+ bdchain.api.grpc.txledger.SendTransactionResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
@@ -309,8 +308,8 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionResponse buildPartial() {
- bdchain.api.grpc.SendTransactionResponse result = new bdchain.api.grpc.SendTransactionResponse(this);
+ public bdchain.api.grpc.txledger.SendTransactionResponse buildPartial() {
+ bdchain.api.grpc.txledger.SendTransactionResponse result = new bdchain.api.grpc.txledger.SendTransactionResponse(this);
result.hash_ = hash_;
onBuilt();
return result;
@@ -318,48 +317,48 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof bdchain.api.grpc.SendTransactionResponse) {
- return mergeFrom((bdchain.api.grpc.SendTransactionResponse)other);
+ if (other instanceof bdchain.api.grpc.txledger.SendTransactionResponse) {
+ return mergeFrom((bdchain.api.grpc.txledger.SendTransactionResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
- public Builder mergeFrom(bdchain.api.grpc.SendTransactionResponse other) {
- if (other == bdchain.api.grpc.SendTransactionResponse.getDefaultInstance()) return this;
+ public Builder mergeFrom(bdchain.api.grpc.txledger.SendTransactionResponse other) {
+ if (other == bdchain.api.grpc.txledger.SendTransactionResponse.getDefaultInstance()) return this;
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
@@ -378,11 +377,11 @@ private static final long serialVersionUID = 0L;
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- bdchain.api.grpc.SendTransactionResponse parsedMessage = null;
+ bdchain.api.grpc.txledger.SendTransactionResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (bdchain.api.grpc.SendTransactionResponse) e.getUnfinishedMessage();
+ parsedMessage = (bdchain.api.grpc.txledger.SendTransactionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
@@ -423,7 +422,7 @@ private static final long serialVersionUID = 0L;
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
@java.lang.Override
@@ -433,16 +432,16 @@ private static final long serialVersionUID = 0L;
}
- // @@protoc_insertion_point(builder_scope:bdchain.api.SendTransactionResponse)
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.SendTransactionResponse)
}
- // @@protoc_insertion_point(class_scope:bdchain.api.SendTransactionResponse)
- private static final bdchain.api.grpc.SendTransactionResponse DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.SendTransactionResponse)
+ private static final bdchain.api.grpc.txledger.SendTransactionResponse DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new bdchain.api.grpc.SendTransactionResponse();
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.SendTransactionResponse();
}
- public static bdchain.api.grpc.SendTransactionResponse getDefaultInstance() {
+ public static bdchain.api.grpc.txledger.SendTransactionResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@@ -467,7 +466,7 @@ private static final long serialVersionUID = 0L;
}
@java.lang.Override
- public bdchain.api.grpc.SendTransactionResponse getDefaultInstanceForType() {
+ public bdchain.api.grpc.txledger.SendTransactionResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
diff --git a/src/main/java/bdchain/api/grpc/SendTransactionResponseOrBuilder.java b/src/main/java/bdchain/api/grpc/txledger/SendTransactionResponseOrBuilder.java
similarity index 69%
rename from src/main/java/bdchain/api/grpc/SendTransactionResponseOrBuilder.java
rename to src/main/java/bdchain/api/grpc/txledger/SendTransactionResponseOrBuilder.java
index a24bc80..05dd04d 100644
--- a/src/main/java/bdchain/api/grpc/SendTransactionResponseOrBuilder.java
+++ b/src/main/java/bdchain/api/grpc/txledger/SendTransactionResponseOrBuilder.java
@@ -1,10 +1,10 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
public interface SendTransactionResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:bdchain.api.SendTransactionResponse)
+ // @@protoc_insertion_point(interface_extends:bdchain.api.txledger.SendTransactionResponse)
com.google.protobuf.MessageOrBuilder {
/**
diff --git a/src/main/java/bdchain/api/grpc/txledger/Transaction.java b/src/main/java/bdchain/api/grpc/txledger/Transaction.java
new file mode 100644
index 0000000..1d112fd
--- /dev/null
+++ b/src/main/java/bdchain/api/grpc/txledger/Transaction.java
@@ -0,0 +1,1289 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: bdchain/api/tx_ledger.proto
+
+package bdchain.api.grpc.txledger;
+
+/**
+ * Protobuf type {@code bdchain.api.txledger.Transaction}
+ */
+public final class Transaction extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:bdchain.api.txledger.Transaction)
+ TransactionOrBuilder {
+private static final long serialVersionUID = 0L;
+ // Use Transaction.newBuilder() to construct.
+ private Transaction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Transaction() {
+ blockHash_ = com.google.protobuf.ByteString.EMPTY;
+ hash_ = com.google.protobuf.ByteString.EMPTY;
+ type_ = 0;
+ from_ = com.google.protobuf.ByteString.EMPTY;
+ to_ = com.google.protobuf.ByteString.EMPTY;
+ data_ = com.google.protobuf.ByteString.EMPTY;
+ v_ = com.google.protobuf.ByteString.EMPTY;
+ r_ = com.google.protobuf.ByteString.EMPTY;
+ s_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Transaction(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+
+ blockHash_ = input.readBytes();
+ break;
+ }
+ case 16: {
+
+ index_ = input.readUInt32();
+ break;
+ }
+ case 26: {
+
+ hash_ = input.readBytes();
+ break;
+ }
+ case 32: {
+ int rawValue = input.readEnum();
+
+ type_ = rawValue;
+ break;
+ }
+ case 42: {
+
+ from_ = input.readBytes();
+ break;
+ }
+ case 48: {
+
+ nonce_ = input.readUInt64();
+ break;
+ }
+ case 58: {
+
+ to_ = input.readBytes();
+ break;
+ }
+ case 66: {
+
+ data_ = input.readBytes();
+ break;
+ }
+ case 74: {
+
+ v_ = input.readBytes();
+ break;
+ }
+ case 82: {
+
+ r_ = input.readBytes();
+ break;
+ }
+ case 90: {
+
+ s_ = input.readBytes();
+ break;
+ }
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Transaction_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Transaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.Transaction.class, bdchain.api.grpc.txledger.Transaction.Builder.class);
+ }
+
+ public static final int BLOCK_HASH_FIELD_NUMBER = 1;
+ private com.google.protobuf.ByteString blockHash_;
+ /**
+ *
+ * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
+ *
+ *
+ * bytes block_hash = 1;
+ */
+ public com.google.protobuf.ByteString getBlockHash() {
+ return blockHash_;
+ }
+
+ public static final int INDEX_FIELD_NUMBER = 2;
+ private int index_;
+ /**
+ *
+ * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
+ *
+ *
+ * uint32 index = 2;
+ */
+ public int getIndex() {
+ return index_;
+ }
+
+ public static final int HASH_FIELD_NUMBER = 3;
+ private com.google.protobuf.ByteString hash_;
+ /**
+ *
+ * 事务的哈希
+ *
+ *
+ * bytes hash = 3;
+ */
+ public com.google.protobuf.ByteString getHash() {
+ return hash_;
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 4;
+ private int type_;
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public int getTypeValue() {
+ return type_;
+ }
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public bdchain.api.grpc.common.TransactionType getType() {
+ @SuppressWarnings("deprecation")
+ bdchain.api.grpc.common.TransactionType result = bdchain.api.grpc.common.TransactionType.valueOf(type_);
+ return result == null ? bdchain.api.grpc.common.TransactionType.UNRECOGNIZED : result;
+ }
+
+ public static final int FROM_FIELD_NUMBER = 5;
+ private com.google.protobuf.ByteString from_;
+ /**
+ *
+ * 发送账户地址
+ *
+ *
+ * bytes from = 5;
+ */
+ public com.google.protobuf.ByteString getFrom() {
+ return from_;
+ }
+
+ public static final int NONCE_FIELD_NUMBER = 6;
+ private long nonce_;
+ /**
+ *
+ * 这条事务之前发送者所发送的事务数量
+ *
+ *
+ * uint64 nonce = 6;
+ */
+ public long getNonce() {
+ return nonce_;
+ }
+
+ public static final int TO_FIELD_NUMBER = 7;
+ private com.google.protobuf.ByteString to_;
+ /**
+ *
+ * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
+ *
+ *
+ * bytes to = 7;
+ */
+ public com.google.protobuf.ByteString getTo() {
+ return to_;
+ }
+
+ public static final int DATA_FIELD_NUMBER = 8;
+ private com.google.protobuf.ByteString data_;
+ /**
+ *
+ * 数据或合约代码
+ *
+ *
+ * bytes data = 8;
+ */
+ public com.google.protobuf.ByteString getData() {
+ return data_;
+ }
+
+ public static final int V_FIELD_NUMBER = 9;
+ private com.google.protobuf.ByteString v_;
+ /**
+ *
+ * ECDSA recovery id
+ *
+ *
+ * bytes v = 9;
+ */
+ public com.google.protobuf.ByteString getV() {
+ return v_;
+ }
+
+ public static final int R_FIELD_NUMBER = 10;
+ private com.google.protobuf.ByteString r_;
+ /**
+ *
+ * ECDSA signature r
+ *
+ *
+ * bytes r = 10;
+ */
+ public com.google.protobuf.ByteString getR() {
+ return r_;
+ }
+
+ public static final int S_FIELD_NUMBER = 11;
+ private com.google.protobuf.ByteString s_;
+ /**
+ *
+ * ECDSA signature s
+ *
+ *
+ * bytes s = 11;
+ */
+ public com.google.protobuf.ByteString getS() {
+ return s_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!blockHash_.isEmpty()) {
+ output.writeBytes(1, blockHash_);
+ }
+ if (index_ != 0) {
+ output.writeUInt32(2, index_);
+ }
+ if (!hash_.isEmpty()) {
+ output.writeBytes(3, hash_);
+ }
+ if (type_ != bdchain.api.grpc.common.TransactionType.RECORD.getNumber()) {
+ output.writeEnum(4, type_);
+ }
+ if (!from_.isEmpty()) {
+ output.writeBytes(5, from_);
+ }
+ if (nonce_ != 0L) {
+ output.writeUInt64(6, nonce_);
+ }
+ if (!to_.isEmpty()) {
+ output.writeBytes(7, to_);
+ }
+ if (!data_.isEmpty()) {
+ output.writeBytes(8, data_);
+ }
+ if (!v_.isEmpty()) {
+ output.writeBytes(9, v_);
+ }
+ if (!r_.isEmpty()) {
+ output.writeBytes(10, r_);
+ }
+ if (!s_.isEmpty()) {
+ output.writeBytes(11, s_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!blockHash_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(1, blockHash_);
+ }
+ if (index_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(2, index_);
+ }
+ if (!hash_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(3, hash_);
+ }
+ if (type_ != bdchain.api.grpc.common.TransactionType.RECORD.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(4, type_);
+ }
+ if (!from_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(5, from_);
+ }
+ if (nonce_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt64Size(6, nonce_);
+ }
+ if (!to_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(7, to_);
+ }
+ if (!data_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(8, data_);
+ }
+ if (!v_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(9, v_);
+ }
+ if (!r_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(10, r_);
+ }
+ if (!s_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(11, s_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof bdchain.api.grpc.txledger.Transaction)) {
+ return super.equals(obj);
+ }
+ bdchain.api.grpc.txledger.Transaction other = (bdchain.api.grpc.txledger.Transaction) obj;
+
+ if (!getBlockHash()
+ .equals(other.getBlockHash())) return false;
+ if (getIndex()
+ != other.getIndex()) return false;
+ if (!getHash()
+ .equals(other.getHash())) return false;
+ if (type_ != other.type_) return false;
+ if (!getFrom()
+ .equals(other.getFrom())) return false;
+ if (getNonce()
+ != other.getNonce()) return false;
+ if (!getTo()
+ .equals(other.getTo())) return false;
+ if (!getData()
+ .equals(other.getData())) return false;
+ if (!getV()
+ .equals(other.getV())) return false;
+ if (!getR()
+ .equals(other.getR())) return false;
+ if (!getS()
+ .equals(other.getS())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + BLOCK_HASH_FIELD_NUMBER;
+ hash = (53 * hash) + getBlockHash().hashCode();
+ hash = (37 * hash) + INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + getIndex();
+ hash = (37 * hash) + HASH_FIELD_NUMBER;
+ hash = (53 * hash) + getHash().hashCode();
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + type_;
+ hash = (37 * hash) + FROM_FIELD_NUMBER;
+ hash = (53 * hash) + getFrom().hashCode();
+ hash = (37 * hash) + NONCE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getNonce());
+ hash = (37 * hash) + TO_FIELD_NUMBER;
+ hash = (53 * hash) + getTo().hashCode();
+ hash = (37 * hash) + DATA_FIELD_NUMBER;
+ hash = (53 * hash) + getData().hashCode();
+ hash = (37 * hash) + V_FIELD_NUMBER;
+ hash = (53 * hash) + getV().hashCode();
+ hash = (37 * hash) + R_FIELD_NUMBER;
+ hash = (53 * hash) + getR().hashCode();
+ hash = (37 * hash) + S_FIELD_NUMBER;
+ hash = (53 * hash) + getS().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static bdchain.api.grpc.txledger.Transaction parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(bdchain.api.grpc.txledger.Transaction prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code bdchain.api.txledger.Transaction}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:bdchain.api.txledger.Transaction)
+ bdchain.api.grpc.txledger.TransactionOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Transaction_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Transaction_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ bdchain.api.grpc.txledger.Transaction.class, bdchain.api.grpc.txledger.Transaction.Builder.class);
+ }
+
+ // Construct using bdchain.api.grpc.txledger.Transaction.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ blockHash_ = com.google.protobuf.ByteString.EMPTY;
+
+ index_ = 0;
+
+ hash_ = com.google.protobuf.ByteString.EMPTY;
+
+ type_ = 0;
+
+ from_ = com.google.protobuf.ByteString.EMPTY;
+
+ nonce_ = 0L;
+
+ to_ = com.google.protobuf.ByteString.EMPTY;
+
+ data_ = com.google.protobuf.ByteString.EMPTY;
+
+ v_ = com.google.protobuf.ByteString.EMPTY;
+
+ r_ = com.google.protobuf.ByteString.EMPTY;
+
+ s_ = com.google.protobuf.ByteString.EMPTY;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return bdchain.api.grpc.txledger.TransactionLedgerProto.internal_static_bdchain_api_txledger_Transaction_descriptor;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Transaction getDefaultInstanceForType() {
+ return bdchain.api.grpc.txledger.Transaction.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Transaction build() {
+ bdchain.api.grpc.txledger.Transaction result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Transaction buildPartial() {
+ bdchain.api.grpc.txledger.Transaction result = new bdchain.api.grpc.txledger.Transaction(this);
+ result.blockHash_ = blockHash_;
+ result.index_ = index_;
+ result.hash_ = hash_;
+ result.type_ = type_;
+ result.from_ = from_;
+ result.nonce_ = nonce_;
+ result.to_ = to_;
+ result.data_ = data_;
+ result.v_ = v_;
+ result.r_ = r_;
+ result.s_ = s_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.setField(field, value);
+ }
+ @java.lang.Override
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+ @java.lang.Override
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof bdchain.api.grpc.txledger.Transaction) {
+ return mergeFrom((bdchain.api.grpc.txledger.Transaction)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(bdchain.api.grpc.txledger.Transaction other) {
+ if (other == bdchain.api.grpc.txledger.Transaction.getDefaultInstance()) return this;
+ if (other.getBlockHash() != com.google.protobuf.ByteString.EMPTY) {
+ setBlockHash(other.getBlockHash());
+ }
+ if (other.getIndex() != 0) {
+ setIndex(other.getIndex());
+ }
+ if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
+ setHash(other.getHash());
+ }
+ if (other.type_ != 0) {
+ setTypeValue(other.getTypeValue());
+ }
+ if (other.getFrom() != com.google.protobuf.ByteString.EMPTY) {
+ setFrom(other.getFrom());
+ }
+ if (other.getNonce() != 0L) {
+ setNonce(other.getNonce());
+ }
+ if (other.getTo() != com.google.protobuf.ByteString.EMPTY) {
+ setTo(other.getTo());
+ }
+ if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
+ setData(other.getData());
+ }
+ if (other.getV() != com.google.protobuf.ByteString.EMPTY) {
+ setV(other.getV());
+ }
+ if (other.getR() != com.google.protobuf.ByteString.EMPTY) {
+ setR(other.getR());
+ }
+ if (other.getS() != com.google.protobuf.ByteString.EMPTY) {
+ setS(other.getS());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ bdchain.api.grpc.txledger.Transaction parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (bdchain.api.grpc.txledger.Transaction) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
+ *
+ *
+ * bytes block_hash = 1;
+ */
+ public com.google.protobuf.ByteString getBlockHash() {
+ return blockHash_;
+ }
+ /**
+ *
+ * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
+ *
+ *
+ * bytes block_hash = 1;
+ */
+ public Builder setBlockHash(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ blockHash_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 事务所在的区块的哈希,当事务处于待确认状态时为`null`
+ *
+ *
+ * bytes block_hash = 1;
+ */
+ public Builder clearBlockHash() {
+
+ blockHash_ = getDefaultInstance().getBlockHash();
+ onChanged();
+ return this;
+ }
+
+ private int index_ ;
+ /**
+ *
+ * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
+ *
+ *
+ * uint32 index = 2;
+ */
+ public int getIndex() {
+ return index_;
+ }
+ /**
+ *
+ * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
+ *
+ *
+ * uint32 index = 2;
+ */
+ public Builder setIndex(int value) {
+
+ index_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 事务在区块中的位置 index,当事务处于待确认状态时为`null`
+ *
+ *
+ * uint32 index = 2;
+ */
+ public Builder clearIndex() {
+
+ index_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 事务的哈希
+ *
+ *
+ * bytes hash = 3;
+ */
+ public com.google.protobuf.ByteString getHash() {
+ return hash_;
+ }
+ /**
+ *
+ * 事务的哈希
+ *
+ *
+ * bytes hash = 3;
+ */
+ public Builder setHash(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ hash_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 事务的哈希
+ *
+ *
+ * bytes hash = 3;
+ */
+ public Builder clearHash() {
+
+ hash_ = getDefaultInstance().getHash();
+ onChanged();
+ return this;
+ }
+
+ private int type_ = 0;
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public int getTypeValue() {
+ return type_;
+ }
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public Builder setTypeValue(int value) {
+ type_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public bdchain.api.grpc.common.TransactionType getType() {
+ @SuppressWarnings("deprecation")
+ bdchain.api.grpc.common.TransactionType result = bdchain.api.grpc.common.TransactionType.valueOf(type_);
+ return result == null ? bdchain.api.grpc.common.TransactionType.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public Builder setType(bdchain.api.grpc.common.TransactionType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 事务类型
+ *
+ *
+ * .bdchain.api.common.TransactionType type = 4;
+ */
+ public Builder clearType() {
+
+ type_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString from_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 发送账户地址
+ *
+ *
+ * bytes from = 5;
+ */
+ public com.google.protobuf.ByteString getFrom() {
+ return from_;
+ }
+ /**
+ *
+ * 发送账户地址
+ *
+ *
+ * bytes from = 5;
+ */
+ public Builder setFrom(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ from_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 发送账户地址
+ *
+ *
+ * bytes from = 5;
+ */
+ public Builder clearFrom() {
+
+ from_ = getDefaultInstance().getFrom();
+ onChanged();
+ return this;
+ }
+
+ private long nonce_ ;
+ /**
+ *
+ * 这条事务之前发送者所发送的事务数量
+ *
+ *
+ * uint64 nonce = 6;
+ */
+ public long getNonce() {
+ return nonce_;
+ }
+ /**
+ *
+ * 这条事务之前发送者所发送的事务数量
+ *
+ *
+ * uint64 nonce = 6;
+ */
+ public Builder setNonce(long value) {
+
+ nonce_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 这条事务之前发送者所发送的事务数量
+ *
+ *
+ * uint64 nonce = 6;
+ */
+ public Builder clearNonce() {
+
+ nonce_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString to_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
+ *
+ *
+ * bytes to = 7;
+ */
+ public com.google.protobuf.ByteString getTo() {
+ return to_;
+ }
+ /**
+ *
+ * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
+ *
+ *
+ * bytes to = 7;
+ */
+ public Builder setTo(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ to_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 接收账户地址,或者调用的合约地址,或者`null`如为合约创建
+ *
+ *
+ * bytes to = 7;
+ */
+ public Builder clearTo() {
+
+ to_ = getDefaultInstance().getTo();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * 数据或合约代码
+ *
+ *
+ * bytes data = 8;
+ */
+ public com.google.protobuf.ByteString getData() {
+ return data_;
+ }
+ /**
+ *
+ * 数据或合约代码
+ *
+ *
+ * bytes data = 8;
+ */
+ public Builder setData(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ data_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * 数据或合约代码
+ *
+ *
+ * bytes data = 8;
+ */
+ public Builder clearData() {
+
+ data_ = getDefaultInstance().getData();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString v_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * ECDSA recovery id
+ *
+ *
+ * bytes v = 9;
+ */
+ public com.google.protobuf.ByteString getV() {
+ return v_;
+ }
+ /**
+ *
+ * ECDSA recovery id
+ *
+ *
+ * bytes v = 9;
+ */
+ public Builder setV(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ v_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * ECDSA recovery id
+ *
+ *
+ * bytes v = 9;
+ */
+ public Builder clearV() {
+
+ v_ = getDefaultInstance().getV();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString r_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * ECDSA signature r
+ *
+ *
+ * bytes r = 10;
+ */
+ public com.google.protobuf.ByteString getR() {
+ return r_;
+ }
+ /**
+ *
+ * ECDSA signature r
+ *
+ *
+ * bytes r = 10;
+ */
+ public Builder setR(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ r_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * ECDSA signature r
+ *
+ *
+ * bytes r = 10;
+ */
+ public Builder clearR() {
+
+ r_ = getDefaultInstance().getR();
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString s_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * ECDSA signature s
+ *
+ *
+ * bytes s = 11;
+ */
+ public com.google.protobuf.ByteString getS() {
+ return s_;
+ }
+ /**
+ *
+ * ECDSA signature s
+ *
+ *
+ * bytes s = 11;
+ */
+ public Builder setS(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ s_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * ECDSA signature s
+ *
+ *
+ * bytes s = 11;
+ */
+ public Builder clearS() {
+
+ s_ = getDefaultInstance().getS();
+ onChanged();
+ return this;
+ }
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:bdchain.api.txledger.Transaction)
+ }
+
+ // @@protoc_insertion_point(class_scope:bdchain.api.txledger.Transaction)
+ private static final bdchain.api.grpc.txledger.Transaction DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new bdchain.api.grpc.txledger.Transaction();
+ }
+
+ public static bdchain.api.grpc.txledger.Transaction getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public Transaction parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Transaction(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public bdchain.api.grpc.txledger.Transaction getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java b/src/main/java/bdchain/api/grpc/txledger/TransactionLedgerGrpc.java
similarity index 53%
rename from src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java
rename to src/main/java/bdchain/api/grpc/txledger/TransactionLedgerGrpc.java
index 3a37001..e66472c 100644
--- a/src/main/java/bdchain/api/grpc/TransactionLedgerGrpc.java
+++ b/src/main/java/bdchain/api/grpc/txledger/TransactionLedgerGrpc.java
@@ -1,4 +1,4 @@
-package bdchain.api.grpc;
+package bdchain.api.grpc.txledger;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
@@ -18,39 +18,39 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.15.0)",
+ value = "by gRPC proto compiler (version 1.20.0)",
comments = "Source: bdchain/api/tx_ledger.proto")
public final class TransactionLedgerGrpc {
private TransactionLedgerGrpc() {}
- public static final String SERVICE_NAME = "bdchain.api.TransactionLedger";
+ public static final String SERVICE_NAME = "bdchain.api.txledger.TransactionLedger";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getClientVersionMethod;
+ bdchain.api.grpc.common.ClientVersionResponse> getClientVersionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientVersion",
requestType = com.google.protobuf.Empty.class,
- responseType = bdchain.api.grpc.ClientVersionResponse.class,
+ responseType = bdchain.api.grpc.common.ClientVersionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getClientVersionMethod() {
- io.grpc.MethodDescriptor getClientVersionMethod;
+ bdchain.api.grpc.common.ClientVersionResponse> getClientVersionMethod() {
+ io.grpc.MethodDescriptor getClientVersionMethod;
if ((getClientVersionMethod = TransactionLedgerGrpc.getClientVersionMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getClientVersionMethod = TransactionLedgerGrpc.getClientVersionMethod) == null) {
TransactionLedgerGrpc.getClientVersionMethod = getClientVersionMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.TransactionLedger", "ClientVersion"))
+ "bdchain.api.txledger.TransactionLedger", "ClientVersion"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()))
+ bdchain.api.grpc.common.ClientVersionResponse.getDefaultInstance()))
.setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("ClientVersion"))
.build();
}
@@ -59,30 +59,30 @@ public final class TransactionLedgerGrpc {
return getClientVersionMethod;
}
- private static volatile io.grpc.MethodDescriptor getCreateLedgerMethod;
+ private static volatile io.grpc.MethodDescriptor getCreateLedgerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateLedger",
- requestType = bdchain.api.grpc.CreateLedgerRequest.class,
- responseType = bdchain.api.grpc.CreateLedgerResponse.class,
+ requestType = bdchain.api.grpc.txledger.CreateLedgerRequest.class,
+ responseType = bdchain.api.grpc.txledger.CreateLedgerResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
- public static io.grpc.MethodDescriptor getCreateLedgerMethod() {
- io.grpc.MethodDescriptor getCreateLedgerMethod;
+ public static io.grpc.MethodDescriptor getCreateLedgerMethod() {
+ io.grpc.MethodDescriptor getCreateLedgerMethod;
if ((getCreateLedgerMethod = TransactionLedgerGrpc.getCreateLedgerMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getCreateLedgerMethod = TransactionLedgerGrpc.getCreateLedgerMethod) == null) {
TransactionLedgerGrpc.getCreateLedgerMethod = getCreateLedgerMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
- "bdchain.api.TransactionLedger", "CreateLedger"))
+ "bdchain.api.txledger.TransactionLedger", "CreateLedger"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.CreateLedgerRequest.getDefaultInstance()))
+ bdchain.api.grpc.txledger.CreateLedgerRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- bdchain.api.grpc.CreateLedgerResponse.getDefaultInstance()))
+ bdchain.api.grpc.txledger.CreateLedgerResponse.getDefaultInstance()))
.setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("CreateLedger"))
.build();
}
@@ -92,29 +92,29 @@ public final class TransactionLedgerGrpc {
}
private static volatile io.grpc.MethodDescriptor getGetLedgersMethod;
+ bdchain.api.grpc.txledger.GetLedgersResponse> getGetLedgersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetLedgers",
requestType = com.google.protobuf.Empty.class,
- responseType = bdchain.api.grpc.GetLedgersResponse.class,
+ responseType = bdchain.api.grpc.txledger.GetLedgersResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getGetLedgersMethod() {
- io.grpc.MethodDescriptor getGetLedgersMethod;
+ bdchain.api.grpc.txledger.GetLedgersResponse> getGetLedgersMethod() {
+ io.grpc.MethodDescriptor getGetLedgersMethod;
if ((getGetLedgersMethod = TransactionLedgerGrpc.getGetLedgersMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getGetLedgersMethod = TransactionLedgerGrpc.getGetLedgersMethod) == null) {
TransactionLedgerGrpc.getGetLedgersMethod = getGetLedgersMethod =
- io.grpc.MethodDescriptor.newBuilder()
+ io.grpc.MethodDescriptor.