Add generated Java classes

This commit is contained in:
Nex 2018-09-11 22:31:21 +08:00
parent 519bbfd21e
commit 81bb3b2618
37 changed files with 13344 additions and 0 deletions

View File

@ -0,0 +1,655 @@
package bdchain.api.grpc;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.14.0)",
comments = "Source: bdchain/api/ac_chain.proto")
public final class AccountingChainGrpc {
private AccountingChainGrpc() {}
public static final String SERVICE_NAME = "bdchain.api.AccountingChain";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest,
bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "BlockNumber",
requestType = bdchain.api.grpc.BlockNumberRequest.class,
responseType = bdchain.api.grpc.BlockNumberResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest,
bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest, bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod;
if ((getBlockNumberMethod = AccountingChainGrpc.getBlockNumberMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getBlockNumberMethod = AccountingChainGrpc.getBlockNumberMethod) == null) {
AccountingChainGrpc.getBlockNumberMethod = getBlockNumberMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.BlockNumberRequest, bdchain.api.grpc.BlockNumberResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "BlockNumber"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.BlockNumberRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.BlockNumberResponse.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("BlockNumber"))
.build();
}
}
}
return getBlockNumberMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByNumberRequest,
bdchain.api.grpc.Block> getGetBlockByNumberMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlockByNumber",
requestType = bdchain.api.grpc.GetBlockByNumberRequest.class,
responseType = bdchain.api.grpc.Block.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByNumberRequest,
bdchain.api.grpc.Block> getGetBlockByNumberMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByNumberRequest, bdchain.api.grpc.Block> getGetBlockByNumberMethod;
if ((getGetBlockByNumberMethod = AccountingChainGrpc.getGetBlockByNumberMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetBlockByNumberMethod = AccountingChainGrpc.getGetBlockByNumberMethod) == null) {
AccountingChainGrpc.getGetBlockByNumberMethod = getGetBlockByNumberMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetBlockByNumberRequest, bdchain.api.grpc.Block>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "GetBlockByNumber"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.Block.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetBlockByNumber"))
.build();
}
}
}
return getGetBlockByNumberMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByHashRequest,
bdchain.api.grpc.Block> getGetBlockByHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetBlockByHash",
requestType = bdchain.api.grpc.GetBlockByHashRequest.class,
responseType = bdchain.api.grpc.Block.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByHashRequest,
bdchain.api.grpc.Block> getGetBlockByHashMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.GetBlockByHashRequest, bdchain.api.grpc.Block> getGetBlockByHashMethod;
if ((getGetBlockByHashMethod = AccountingChainGrpc.getGetBlockByHashMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetBlockByHashMethod = AccountingChainGrpc.getGetBlockByHashMethod) == null) {
AccountingChainGrpc.getGetBlockByHashMethod = getGetBlockByHashMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetBlockByHashRequest, bdchain.api.grpc.Block>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "GetBlockByHash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.Block.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetBlockByHash"))
.build();
}
}
}
return getGetBlockByHashMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByHashRequest,
bdchain.api.grpc.Block> getGetTransactionByHashMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByHash",
requestType = bdchain.api.grpc.GetTransactionByHashRequest.class,
responseType = bdchain.api.grpc.Block.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByHashRequest,
bdchain.api.grpc.Block> getGetTransactionByHashMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByHashRequest, bdchain.api.grpc.Block> getGetTransactionByHashMethod;
if ((getGetTransactionByHashMethod = AccountingChainGrpc.getGetTransactionByHashMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetTransactionByHashMethod = AccountingChainGrpc.getGetTransactionByHashMethod) == null) {
AccountingChainGrpc.getGetTransactionByHashMethod = getGetTransactionByHashMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetTransactionByHashRequest, bdchain.api.grpc.Block>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "GetTransactionByHash"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.Block.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByHash"))
.build();
}
}
}
return getGetTransactionByHashMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
bdchain.api.grpc.Transaction> getGetTransactionByBlockNumberAndIndexMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockNumberAndIndex",
requestType = bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class,
responseType = bdchain.api.grpc.Transaction.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
bdchain.api.grpc.Transaction> getGetTransactionByBlockNumberAndIndexMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest, bdchain.api.grpc.Transaction> getGetTransactionByBlockNumberAndIndexMethod;
if ((getGetTransactionByBlockNumberAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetTransactionByBlockNumberAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod) == null) {
AccountingChainGrpc.getGetTransactionByBlockNumberAndIndexMethod = getGetTransactionByBlockNumberAndIndexMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest, bdchain.api.grpc.Transaction>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "GetTransactionByBlockNumberAndIndex"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.Transaction.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByBlockNumberAndIndex"))
.build();
}
}
}
return getGetTransactionByBlockNumberAndIndexMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
bdchain.api.grpc.Transaction> getGetTransactionByBlockHashAndIndexMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetTransactionByBlockHashAndIndex",
requestType = bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class,
responseType = bdchain.api.grpc.Transaction.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
bdchain.api.grpc.Transaction> getGetTransactionByBlockHashAndIndexMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest, bdchain.api.grpc.Transaction> getGetTransactionByBlockHashAndIndexMethod;
if ((getGetTransactionByBlockHashAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getGetTransactionByBlockHashAndIndexMethod = AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod) == null) {
AccountingChainGrpc.getGetTransactionByBlockHashAndIndexMethod = getGetTransactionByBlockHashAndIndexMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest, bdchain.api.grpc.Transaction>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "GetTransactionByBlockHashAndIndex"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.Transaction.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("GetTransactionByBlockHashAndIndex"))
.build();
}
}
}
return getGetTransactionByBlockHashAndIndexMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static AccountingChainStub newStub(io.grpc.Channel channel) {
return new AccountingChainStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AccountingChainBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new AccountingChainBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static AccountingChainFutureStub newFutureStub(
io.grpc.Channel channel) {
return new AccountingChainFutureStub(channel);
}
/**
*/
public static abstract class AccountingChainImplBase implements io.grpc.BindableService {
/**
*/
public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse> responseObserver) {
asyncUnimplementedUnaryCall(getBlockNumberMethod(), responseObserver);
}
/**
*/
public void getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
asyncUnimplementedUnaryCall(getGetBlockByNumberMethod(), responseObserver);
}
/**
*/
public void getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
asyncUnimplementedUnaryCall(getGetBlockByHashMethod(), responseObserver);
}
/**
*/
public void getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByHashMethod(), responseObserver);
}
/**
*/
public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByBlockNumberAndIndexMethod(), responseObserver);
}
/**
*/
public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
asyncUnimplementedUnaryCall(getGetTransactionByBlockHashAndIndexMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getBlockNumberMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.BlockNumberRequest,
bdchain.api.grpc.BlockNumberResponse>(
this, METHODID_BLOCK_NUMBER)))
.addMethod(
getGetBlockByNumberMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.GetBlockByNumberRequest,
bdchain.api.grpc.Block>(
this, METHODID_GET_BLOCK_BY_NUMBER)))
.addMethod(
getGetBlockByHashMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.GetBlockByHashRequest,
bdchain.api.grpc.Block>(
this, METHODID_GET_BLOCK_BY_HASH)))
.addMethod(
getGetTransactionByHashMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.GetTransactionByHashRequest,
bdchain.api.grpc.Block>(
this, METHODID_GET_TRANSACTION_BY_HASH)))
.addMethod(
getGetTransactionByBlockNumberAndIndexMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest,
bdchain.api.grpc.Transaction>(
this, METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX)))
.addMethod(
getGetTransactionByBlockHashAndIndexMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest,
bdchain.api.grpc.Transaction>(
this, METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX)))
.build();
}
}
/**
*/
public static final class AccountingChainStub extends io.grpc.stub.AbstractStub<AccountingChainStub> {
private AccountingChainStub(io.grpc.Channel channel) {
super(channel);
}
private AccountingChainStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AccountingChainStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AccountingChainStub(channel, callOptions);
}
/**
*/
public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getBlockNumberMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetBlockByNumberMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Block> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class AccountingChainBlockingStub extends io.grpc.stub.AbstractStub<AccountingChainBlockingStub> {
private AccountingChainBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private AccountingChainBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AccountingChainBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AccountingChainBlockingStub(channel, callOptions);
}
/**
*/
public bdchain.api.grpc.BlockNumberResponse blockNumber(bdchain.api.grpc.BlockNumberRequest request) {
return blockingUnaryCall(
getChannel(), getBlockNumberMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.Block getBlockByNumber(bdchain.api.grpc.GetBlockByNumberRequest request) {
return blockingUnaryCall(
getChannel(), getGetBlockByNumberMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.Block getBlockByHash(bdchain.api.grpc.GetBlockByHashRequest request) {
return blockingUnaryCall(
getChannel(), getGetBlockByHashMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.Block getTransactionByHash(bdchain.api.grpc.GetTransactionByHashRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByHashMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.Transaction getTransactionByBlockNumberAndIndex(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.Transaction getTransactionByBlockHashAndIndex(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request) {
return blockingUnaryCall(
getChannel(), getGetTransactionByBlockHashAndIndexMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class AccountingChainFutureStub extends io.grpc.stub.AbstractStub<AccountingChainFutureStub> {
private AccountingChainFutureStub(io.grpc.Channel channel) {
super(channel);
}
private AccountingChainFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AccountingChainFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new AccountingChainFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.BlockNumberResponse> blockNumber(
bdchain.api.grpc.BlockNumberRequest request) {
return futureUnaryCall(
getChannel().newCall(getBlockNumberMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Block> getBlockByNumber(
bdchain.api.grpc.GetBlockByNumberRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetBlockByNumberMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Block> getBlockByHash(
bdchain.api.grpc.GetBlockByHashRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetBlockByHashMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Block> getTransactionByHash(
bdchain.api.grpc.GetTransactionByHashRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByHashMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Transaction> getTransactionByBlockNumberAndIndex(
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByBlockNumberAndIndexMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.Transaction> getTransactionByBlockHashAndIndex(
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetTransactionByBlockHashAndIndexMethod(), getCallOptions()), request);
}
}
private static final int METHODID_BLOCK_NUMBER = 0;
private static final int METHODID_GET_BLOCK_BY_NUMBER = 1;
private static final int METHODID_GET_BLOCK_BY_HASH = 2;
private static final int METHODID_GET_TRANSACTION_BY_HASH = 3;
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX = 4;
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 5;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final AccountingChainImplBase serviceImpl;
private final int methodId;
MethodHandlers(AccountingChainImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_BLOCK_NUMBER:
serviceImpl.blockNumber((bdchain.api.grpc.BlockNumberRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse>) responseObserver);
break;
case METHODID_GET_BLOCK_BY_NUMBER:
serviceImpl.getBlockByNumber((bdchain.api.grpc.GetBlockByNumberRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Block>) responseObserver);
break;
case METHODID_GET_BLOCK_BY_HASH:
serviceImpl.getBlockByHash((bdchain.api.grpc.GetBlockByHashRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Block>) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_HASH:
serviceImpl.getTransactionByHash((bdchain.api.grpc.GetTransactionByHashRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Block>) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX:
serviceImpl.getTransactionByBlockNumberAndIndex((bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction>) responseObserver);
break;
case METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX:
serviceImpl.getTransactionByBlockHashAndIndex((bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.Transaction>) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class AccountingChainBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AccountingChainBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return bdchain.api.grpc.AccountingChainProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("AccountingChain");
}
}
private static final class AccountingChainFileDescriptorSupplier
extends AccountingChainBaseDescriptorSupplier {
AccountingChainFileDescriptorSupplier() {}
}
private static final class AccountingChainMethodDescriptorSupplier
extends AccountingChainBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
AccountingChainMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (AccountingChainGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AccountingChainFileDescriptorSupplier())
.addMethod(getBlockNumberMethod())
.addMethod(getGetBlockByNumberMethod())
.addMethod(getGetBlockByHashMethod())
.addMethod(getGetTransactionByHashMethod())
.addMethod(getGetTransactionByBlockNumberAndIndexMethod())
.addMethod(getGetTransactionByBlockHashAndIndexMethod())
.build();
}
}
}
return result;
}
}

View File

@ -0,0 +1,185 @@
// 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\030bdchain/api/common.proto\"\330\001\n\013Transact" +
"ion\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\022*\n\004ty" +
"pe\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\005Block\022\016\n\006number\030\001 \001(\004\022\014\n\004hash" +
"\030\002 \001(\014\022\023\n\013parent_hash\030\003 \001(\014\022\017\n\007witness\030\004" +
" \001(\014\022\021\n\ttimestamp\030\005 \001(\004\022\014\n\004size\030\006 \001(\004\022\031\n" +
"\021transactions_root\030\007 \001(\014\022.\n\014transactions" +
"\030\010 \003(\0132\030.bdchain.api.Transaction\022\032\n\022tran" +
"saction_hashes\030\t \003(\014\"$\n\022BlockNumberReque" +
"st\022\016\n\006ledger\030\001 \001(\t\"+\n\023BlockNumberRespons" +
"e\022\024\n\014block_number\030\001 \001(\004\"S\n\027GetBlockByNum" +
"berRequest\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\025GetBlock" +
"ByHashRequest\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\033GetTran" +
"sactionByHashRequest\022\016\n\006ledger\030\001 \001(\t\022\014\n\004" +
"hash\030\002 \001(\014\"a\n*GetTransactionByBlockNumbe" +
"rAndIndexRequest\022\016\n\006ledger\030\001 \001(\t\022\024\n\014bloc" +
"k_number\030\002 \001(\004\022\r\n\005index\030\003 \001(\r\"]\n(GetTran" +
"sactionByBlockHashAndIndexRequest\022\016\n\006led" +
"ger\030\001 \001(\t\022\022\n\nblock_hash\030\002 \001(\014\022\r\n\005index\030\003" +
" \001(\r2\301\004\n\017AccountingChain\022P\n\013BlockNumber\022" +
"\037.bdchain.api.BlockNumberRequest\032 .bdcha" +
"in.api.BlockNumberResponse\022L\n\020GetBlockBy" +
"Number\022$.bdchain.api.GetBlockByNumberReq" +
"uest\032\022.bdchain.api.Block\022H\n\016GetBlockByHa" +
"sh\022\".bdchain.api.GetBlockByHashRequest\032\022" +
".bdchain.api.Block\022T\n\024GetTransactionByHa" +
"sh\022(.bdchain.api.GetTransactionByHashReq" +
"uest\032\022.bdchain.api.Block\022x\n#GetTransacti" +
"onByBlockNumberAndIndex\0227.bdchain.api.Ge" +
"tTransactionByBlockNumberAndIndexRequest" +
"\032\030.bdchain.api.Transaction\022t\n!GetTransac" +
"tionByBlockHashAndIndex\0225.bdchain.api.Ge" +
"tTransactionByBlockHashAndIndexRequest\032\030" +
".bdchain.api.TransactionB@\n\020bdchain.api." +
"grpcB\024AccountingChainProtoP\001Z\024bdchain/ap" +
"i/ac_chainb\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[] {
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", });
bdchain.api.grpc.CommonProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,541 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.BlockNumberRequest}
*/
public final class BlockNumberRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.BlockNumberRequest)
BlockNumberRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use BlockNumberRequest.newBuilder() to construct.
private BlockNumberRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BlockNumberRequest() {
ledger_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BlockNumberRequest(
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 (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.BlockNumberRequest.class, bdchain.api.grpc.BlockNumberRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
private volatile java.lang.Object ledger_;
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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.BlockNumberRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.BlockNumberRequest other = (bdchain.api.grpc.BlockNumberRequest) obj;
boolean result = true;
result = result && getLedger()
.equals(other.getLedger());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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.BlockNumberRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.BlockNumberRequest 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.BlockNumberRequest 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.BlockNumberRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.BlockNumberRequest)
bdchain.api.grpc.BlockNumberRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.BlockNumberRequest.class, bdchain.api.grpc.BlockNumberRequest.Builder.class);
}
// Construct using bdchain.api.grpc.BlockNumberRequest.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.AccountingChainProto.internal_static_bdchain_api_BlockNumberRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberRequest getDefaultInstanceForType() {
return bdchain.api.grpc.BlockNumberRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberRequest build() {
bdchain.api.grpc.BlockNumberRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberRequest buildPartial() {
bdchain.api.grpc.BlockNumberRequest result = new bdchain.api.grpc.BlockNumberRequest(this);
result.ledger_ = ledger_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.BlockNumberRequest other) {
if (other == bdchain.api.grpc.BlockNumberRequest.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.BlockNumberRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.BlockNumberRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ledger_ = "";
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ledger_ = value;
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder clearLedger() {
ledger_ = getDefaultInstance().getLedger();
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
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.setUnknownFieldsProto3(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.BlockNumberRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.BlockNumberRequest)
private static final bdchain.api.grpc.BlockNumberRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.BlockNumberRequest();
}
public static bdchain.api.grpc.BlockNumberRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BlockNumberRequest>
PARSER = new com.google.protobuf.AbstractParser<BlockNumberRequest>() {
@java.lang.Override
public BlockNumberRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlockNumberRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<BlockNumberRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BlockNumberRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,19 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface BlockNumberRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.BlockNumberRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
}

View File

@ -0,0 +1,473 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.BlockNumberResponse}
*/
public final class BlockNumberResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.BlockNumberResponse)
BlockNumberResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use BlockNumberResponse.newBuilder() to construct.
private BlockNumberResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private BlockNumberResponse() {
blockNumber_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BlockNumberResponse(
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: {
blockNumber_ = input.readUInt64();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.BlockNumberResponse.class, bdchain.api.grpc.BlockNumberResponse.Builder.class);
}
public static final int BLOCK_NUMBER_FIELD_NUMBER = 1;
private long blockNumber_;
/**
* <code>uint64 block_number = 1;</code>
*/
public long getBlockNumber() {
return blockNumber_;
}
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 (blockNumber_ != 0L) {
output.writeUInt64(1, blockNumber_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (blockNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, blockNumber_);
}
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.BlockNumberResponse)) {
return super.equals(obj);
}
bdchain.api.grpc.BlockNumberResponse other = (bdchain.api.grpc.BlockNumberResponse) obj;
boolean result = true;
result = result && (getBlockNumber()
== other.getBlockNumber());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BLOCK_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockNumber());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.BlockNumberResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.BlockNumberResponse 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.BlockNumberResponse 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.BlockNumberResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.BlockNumberResponse)
bdchain.api.grpc.BlockNumberResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.BlockNumberResponse.class, bdchain.api.grpc.BlockNumberResponse.Builder.class);
}
// Construct using bdchain.api.grpc.BlockNumberResponse.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();
blockNumber_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_BlockNumberResponse_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberResponse getDefaultInstanceForType() {
return bdchain.api.grpc.BlockNumberResponse.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberResponse build() {
bdchain.api.grpc.BlockNumberResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberResponse buildPartial() {
bdchain.api.grpc.BlockNumberResponse result = new bdchain.api.grpc.BlockNumberResponse(this);
result.blockNumber_ = blockNumber_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.BlockNumberResponse other) {
if (other == bdchain.api.grpc.BlockNumberResponse.getDefaultInstance()) return this;
if (other.getBlockNumber() != 0L) {
setBlockNumber(other.getBlockNumber());
}
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.BlockNumberResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.BlockNumberResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long blockNumber_ ;
/**
* <code>uint64 block_number = 1;</code>
*/
public long getBlockNumber() {
return blockNumber_;
}
/**
* <code>uint64 block_number = 1;</code>
*/
public Builder setBlockNumber(long value) {
blockNumber_ = value;
onChanged();
return this;
}
/**
* <code>uint64 block_number = 1;</code>
*/
public Builder clearBlockNumber() {
blockNumber_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.BlockNumberResponse)
}
// @@protoc_insertion_point(class_scope:bdchain.api.BlockNumberResponse)
private static final bdchain.api.grpc.BlockNumberResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.BlockNumberResponse();
}
public static bdchain.api.grpc.BlockNumberResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<BlockNumberResponse>
PARSER = new com.google.protobuf.AbstractParser<BlockNumberResponse>() {
@java.lang.Override
public BlockNumberResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BlockNumberResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<BlockNumberResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<BlockNumberResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.BlockNumberResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface BlockNumberResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.BlockNumberResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>uint64 block_number = 1;</code>
*/
long getBlockNumber();
}

View File

@ -0,0 +1,141 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface BlockOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.Block)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* 区块号当区块处于待确认状态时为`null`
* </pre>
*
* <code>uint64 number = 1;</code>
*/
long getNumber();
/**
* <pre>
* 区块的哈希当区块处于待确认状态时为`null`
* </pre>
*
* <code>bytes hash = 2;</code>
*/
com.google.protobuf.ByteString getHash();
/**
* <pre>
* 父区块的哈希
* </pre>
*
* <code>bytes parent_hash = 3;</code>
*/
com.google.protobuf.ByteString getParentHash();
/**
* <pre>
* 见证者账户地址
* </pre>
*
* <code>bytes witness = 4;</code>
*/
com.google.protobuf.ByteString getWitness();
/**
* <pre>
* 区块产生时的UNIX时间戳
* </pre>
*
* <code>uint64 timestamp = 5;</code>
*/
long getTimestamp();
/**
* <pre>
* 区块大小的字节数
* </pre>
*
* <code>uint64 size = 6;</code>
*/
long getSize();
/**
* <pre>
* 区块的事务树根
* </pre>
*
* <code>bytes transactions_root = 7;</code>
*/
com.google.protobuf.ByteString getTransactionsRoot();
/**
* <pre>
* 事务对象的数组或为空
* </pre>
*
* <code>repeated .bdchain.api.Transaction transactions = 8;</code>
*/
java.util.List<bdchain.api.grpc.Transaction>
getTransactionsList();
/**
* <pre>
* 事务对象的数组或为空
* </pre>
*
* <code>repeated .bdchain.api.Transaction transactions = 8;</code>
*/
bdchain.api.grpc.Transaction getTransactions(int index);
/**
* <pre>
* 事务对象的数组或为空
* </pre>
*
* <code>repeated .bdchain.api.Transaction transactions = 8;</code>
*/
int getTransactionsCount();
/**
* <pre>
* 事务对象的数组或为空
* </pre>
*
* <code>repeated .bdchain.api.Transaction transactions = 8;</code>
*/
java.util.List<? extends bdchain.api.grpc.TransactionOrBuilder>
getTransactionsOrBuilderList();
/**
* <pre>
* 事务对象的数组或为空
* </pre>
*
* <code>repeated .bdchain.api.Transaction transactions = 8;</code>
*/
bdchain.api.grpc.TransactionOrBuilder getTransactionsOrBuilder(
int index);
/**
* <pre>
* 32字节的交易哈希的数组或为空
* </pre>
*
* <code>repeated bytes transaction_hashes = 9;</code>
*/
java.util.List<com.google.protobuf.ByteString> getTransactionHashesList();
/**
* <pre>
* 32字节的交易哈希的数组或为空
* </pre>
*
* <code>repeated bytes transaction_hashes = 9;</code>
*/
int getTransactionHashesCount();
/**
* <pre>
* 32字节的交易哈希的数组或为空
* </pre>
*
* <code>repeated bytes transaction_hashes = 9;</code>
*/
com.google.protobuf.ByteString getTransactionHashes(int index);
}

View File

@ -0,0 +1,47 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
package bdchain.api.grpc;
public final class CommonProto {
private CommonProto() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\030bdchain/api/common.proto\022\013bdchain.api*" +
"Z\n\017TransactionType\022\n\n\006RECORD\020\000\022\013\n\007MESSAG" +
"E\020\001\022\025\n\021CONTRACT_CREATION\020\002\022\027\n\023CONTRACT_I" +
"NVOCATION\020\003B5\n\020bdchain.api.grpcB\013CommonP" +
"rotoP\001Z\022bdchain/api/commonb\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[] {
}, assigner);
}
// @@protoc_insertion_point(outer_class_scope)
}

View File

@ -0,0 +1,541 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.CreateLedgerRequest}
*/
public final class CreateLedgerRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.CreateLedgerRequest)
CreateLedgerRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateLedgerRequest.newBuilder() to construct.
private CreateLedgerRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CreateLedgerRequest() {
name_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CreateLedgerRequest(
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();
name_ = s;
break;
}
default: {
if (!parseUnknownFieldProto3(
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.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.CreateLedgerRequest.class, bdchain.api.grpc.CreateLedgerRequest.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* <code>string name = 1;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
* <code>string name = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = 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 (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
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.CreateLedgerRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.CreateLedgerRequest other = (bdchain.api.grpc.CreateLedgerRequest) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.CreateLedgerRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.CreateLedgerRequest 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.CreateLedgerRequest 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.CreateLedgerRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.CreateLedgerRequest)
bdchain.api.grpc.CreateLedgerRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.CreateLedgerRequest.class, bdchain.api.grpc.CreateLedgerRequest.Builder.class);
}
// Construct using bdchain.api.grpc.CreateLedgerRequest.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();
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerRequest getDefaultInstanceForType() {
return bdchain.api.grpc.CreateLedgerRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerRequest build() {
bdchain.api.grpc.CreateLedgerRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerRequest buildPartial() {
bdchain.api.grpc.CreateLedgerRequest result = new bdchain.api.grpc.CreateLedgerRequest(this);
result.name_ = name_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.CreateLedgerRequest other) {
if (other == bdchain.api.grpc.CreateLedgerRequest.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
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.CreateLedgerRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.CreateLedgerRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
* <code>string name = 1;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>string name = 1;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>string name = 1;</code>
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* <code>string name = 1;</code>
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* <code>string name = 1;</code>
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.CreateLedgerRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.CreateLedgerRequest)
private static final bdchain.api.grpc.CreateLedgerRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.CreateLedgerRequest();
}
public static bdchain.api.grpc.CreateLedgerRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CreateLedgerRequest>
PARSER = new com.google.protobuf.AbstractParser<CreateLedgerRequest>() {
@java.lang.Override
public CreateLedgerRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CreateLedgerRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<CreateLedgerRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CreateLedgerRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,19 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
public interface CreateLedgerRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.CreateLedgerRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string name = 1;</code>
*/
java.lang.String getName();
/**
* <code>string name = 1;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
}

View File

@ -0,0 +1,473 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.CreateLedgerResponse}
*/
public final class CreateLedgerResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.CreateLedgerResponse)
CreateLedgerResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateLedgerResponse.newBuilder() to construct.
private CreateLedgerResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private CreateLedgerResponse() {
ok_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CreateLedgerResponse(
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: {
ok_ = input.readBool();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.CreateLedgerResponse.class, bdchain.api.grpc.CreateLedgerResponse.Builder.class);
}
public static final int OK_FIELD_NUMBER = 1;
private boolean ok_;
/**
* <code>bool ok = 1;</code>
*/
public boolean getOk() {
return ok_;
}
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 (ok_ != false) {
output.writeBool(1, ok_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (ok_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, ok_);
}
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.CreateLedgerResponse)) {
return super.equals(obj);
}
bdchain.api.grpc.CreateLedgerResponse other = (bdchain.api.grpc.CreateLedgerResponse) obj;
boolean result = true;
result = result && (getOk()
== other.getOk());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + OK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getOk());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.CreateLedgerResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.CreateLedgerResponse 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.CreateLedgerResponse 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.CreateLedgerResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.CreateLedgerResponse)
bdchain.api.grpc.CreateLedgerResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.CreateLedgerResponse.class, bdchain.api.grpc.CreateLedgerResponse.Builder.class);
}
// Construct using bdchain.api.grpc.CreateLedgerResponse.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();
ok_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_CreateLedgerResponse_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerResponse getDefaultInstanceForType() {
return bdchain.api.grpc.CreateLedgerResponse.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerResponse build() {
bdchain.api.grpc.CreateLedgerResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerResponse buildPartial() {
bdchain.api.grpc.CreateLedgerResponse result = new bdchain.api.grpc.CreateLedgerResponse(this);
result.ok_ = ok_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.CreateLedgerResponse other) {
if (other == bdchain.api.grpc.CreateLedgerResponse.getDefaultInstance()) return this;
if (other.getOk() != false) {
setOk(other.getOk());
}
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.CreateLedgerResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.CreateLedgerResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private boolean ok_ ;
/**
* <code>bool ok = 1;</code>
*/
public boolean getOk() {
return ok_;
}
/**
* <code>bool ok = 1;</code>
*/
public Builder setOk(boolean value) {
ok_ = value;
onChanged();
return this;
}
/**
* <code>bool ok = 1;</code>
*/
public Builder clearOk() {
ok_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.CreateLedgerResponse)
}
// @@protoc_insertion_point(class_scope:bdchain.api.CreateLedgerResponse)
private static final bdchain.api.grpc.CreateLedgerResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.CreateLedgerResponse();
}
public static bdchain.api.grpc.CreateLedgerResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<CreateLedgerResponse>
PARSER = new com.google.protobuf.AbstractParser<CreateLedgerResponse>() {
@java.lang.Override
public CreateLedgerResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CreateLedgerResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<CreateLedgerResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<CreateLedgerResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.CreateLedgerResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
public interface CreateLedgerResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.CreateLedgerResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>bool ok = 1;</code>
*/
boolean getOk();
}

View File

@ -0,0 +1,661 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.GetBlockByHashRequest}
*/
public final class GetBlockByHashRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.GetBlockByHashRequest)
GetBlockByHashRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetBlockByHashRequest.newBuilder() to construct.
private GetBlockByHashRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetBlockByHashRequest() {
ledger_ = "";
hash_ = com.google.protobuf.ByteString.EMPTY;
fullTransaction_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetBlockByHashRequest(
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 18: {
hash_ = input.readBytes();
break;
}
case 24: {
fullTransaction_ = input.readBool();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetBlockByHashRequest.class, bdchain.api.grpc.GetBlockByHashRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
private volatile java.lang.Object ledger_;
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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 HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString hash_;
/**
* <code>bytes hash = 2;</code>
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
public static final int FULL_TRANSACTION_FIELD_NUMBER = 3;
private boolean fullTransaction_;
/**
* <code>bool full_transaction = 3;</code>
*/
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 (!hash_.isEmpty()) {
output.writeBytes(2, hash_);
}
if (fullTransaction_ != false) {
output.writeBool(3, 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 (!hash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, hash_);
}
if (fullTransaction_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, 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.GetBlockByHashRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.GetBlockByHashRequest other = (bdchain.api.grpc.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;
}
@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) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash().hashCode();
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.GetBlockByHashRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.GetBlockByHashRequest 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.GetBlockByHashRequest 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.GetBlockByHashRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.GetBlockByHashRequest)
bdchain.api.grpc.GetBlockByHashRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetBlockByHashRequest.class, bdchain.api.grpc.GetBlockByHashRequest.Builder.class);
}
// Construct using bdchain.api.grpc.GetBlockByHashRequest.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_ = "";
hash_ = com.google.protobuf.ByteString.EMPTY;
fullTransaction_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByHashRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByHashRequest getDefaultInstanceForType() {
return bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByHashRequest build() {
bdchain.api.grpc.GetBlockByHashRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByHashRequest buildPartial() {
bdchain.api.grpc.GetBlockByHashRequest result = new bdchain.api.grpc.GetBlockByHashRequest(this);
result.ledger_ = ledger_;
result.hash_ = hash_;
result.fullTransaction_ = fullTransaction_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.GetBlockByHashRequest other) {
if (other == bdchain.api.grpc.GetBlockByHashRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
}
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
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.GetBlockByHashRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.GetBlockByHashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ledger_ = "";
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ledger_ = value;
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder clearLedger() {
ledger_ = getDefaultInstance().getLedger();
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ledger_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
* <code>bytes hash = 2;</code>
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
/**
* <code>bytes hash = 2;</code>
*/
public Builder setHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
hash_ = value;
onChanged();
return this;
}
/**
* <code>bytes hash = 2;</code>
*/
public Builder clearHash() {
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
}
private boolean fullTransaction_ ;
/**
* <code>bool full_transaction = 3;</code>
*/
public boolean getFullTransaction() {
return fullTransaction_;
}
/**
* <code>bool full_transaction = 3;</code>
*/
public Builder setFullTransaction(boolean value) {
fullTransaction_ = value;
onChanged();
return this;
}
/**
* <code>bool full_transaction = 3;</code>
*/
public Builder clearFullTransaction() {
fullTransaction_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.GetBlockByHashRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.GetBlockByHashRequest)
private static final bdchain.api.grpc.GetBlockByHashRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.GetBlockByHashRequest();
}
public static bdchain.api.grpc.GetBlockByHashRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetBlockByHashRequest>
PARSER = new com.google.protobuf.AbstractParser<GetBlockByHashRequest>() {
@java.lang.Override
public GetBlockByHashRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetBlockByHashRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetBlockByHashRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetBlockByHashRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByHashRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,29 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface GetBlockByHashRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.GetBlockByHashRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
/**
* <code>bytes hash = 2;</code>
*/
com.google.protobuf.ByteString getHash();
/**
* <code>bool full_transaction = 3;</code>
*/
boolean getFullTransaction();
}

View File

@ -0,0 +1,659 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.GetBlockByNumberRequest}
*/
public final class GetBlockByNumberRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.GetBlockByNumberRequest)
GetBlockByNumberRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetBlockByNumberRequest.newBuilder() to construct.
private GetBlockByNumberRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetBlockByNumberRequest() {
ledger_ = "";
number_ = 0L;
fullTransaction_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetBlockByNumberRequest(
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: {
number_ = input.readUInt64();
break;
}
case 24: {
fullTransaction_ = input.readBool();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetBlockByNumberRequest.class, bdchain.api.grpc.GetBlockByNumberRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
private volatile java.lang.Object ledger_;
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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 NUMBER_FIELD_NUMBER = 2;
private long number_;
/**
* <code>uint64 number = 2;</code>
*/
public long getNumber() {
return number_;
}
public static final int FULL_TRANSACTION_FIELD_NUMBER = 3;
private boolean fullTransaction_;
/**
* <code>bool full_transaction = 3;</code>
*/
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 (number_ != 0L) {
output.writeUInt64(2, number_);
}
if (fullTransaction_ != false) {
output.writeBool(3, 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 (number_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, number_);
}
if (fullTransaction_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, 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.GetBlockByNumberRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.GetBlockByNumberRequest other = (bdchain.api.grpc.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;
}
@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) + NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNumber());
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.GetBlockByNumberRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.GetBlockByNumberRequest 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.GetBlockByNumberRequest 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.GetBlockByNumberRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.GetBlockByNumberRequest)
bdchain.api.grpc.GetBlockByNumberRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetBlockByNumberRequest.class, bdchain.api.grpc.GetBlockByNumberRequest.Builder.class);
}
// Construct using bdchain.api.grpc.GetBlockByNumberRequest.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_ = "";
number_ = 0L;
fullTransaction_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetBlockByNumberRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByNumberRequest getDefaultInstanceForType() {
return bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByNumberRequest build() {
bdchain.api.grpc.GetBlockByNumberRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByNumberRequest buildPartial() {
bdchain.api.grpc.GetBlockByNumberRequest result = new bdchain.api.grpc.GetBlockByNumberRequest(this);
result.ledger_ = ledger_;
result.number_ = number_;
result.fullTransaction_ = fullTransaction_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.GetBlockByNumberRequest other) {
if (other == bdchain.api.grpc.GetBlockByNumberRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
}
if (other.getNumber() != 0L) {
setNumber(other.getNumber());
}
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.GetBlockByNumberRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.GetBlockByNumberRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ledger_ = "";
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ledger_ = value;
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder clearLedger() {
ledger_ = getDefaultInstance().getLedger();
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ledger_ = value;
onChanged();
return this;
}
private long number_ ;
/**
* <code>uint64 number = 2;</code>
*/
public long getNumber() {
return number_;
}
/**
* <code>uint64 number = 2;</code>
*/
public Builder setNumber(long value) {
number_ = value;
onChanged();
return this;
}
/**
* <code>uint64 number = 2;</code>
*/
public Builder clearNumber() {
number_ = 0L;
onChanged();
return this;
}
private boolean fullTransaction_ ;
/**
* <code>bool full_transaction = 3;</code>
*/
public boolean getFullTransaction() {
return fullTransaction_;
}
/**
* <code>bool full_transaction = 3;</code>
*/
public Builder setFullTransaction(boolean value) {
fullTransaction_ = value;
onChanged();
return this;
}
/**
* <code>bool full_transaction = 3;</code>
*/
public Builder clearFullTransaction() {
fullTransaction_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.GetBlockByNumberRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.GetBlockByNumberRequest)
private static final bdchain.api.grpc.GetBlockByNumberRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.GetBlockByNumberRequest();
}
public static bdchain.api.grpc.GetBlockByNumberRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetBlockByNumberRequest>
PARSER = new com.google.protobuf.AbstractParser<GetBlockByNumberRequest>() {
@java.lang.Override
public GetBlockByNumberRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetBlockByNumberRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetBlockByNumberRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetBlockByNumberRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.GetBlockByNumberRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,29 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface GetBlockByNumberRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.GetBlockByNumberRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
/**
* <code>uint64 number = 2;</code>
*/
long getNumber();
/**
* <code>bool full_transaction = 3;</code>
*/
boolean getFullTransaction();
}

View File

@ -0,0 +1,586 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.GetLedgersResponse}
*/
public final class GetLedgersResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.GetLedgersResponse)
GetLedgersResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetLedgersResponse.newBuilder() to construct.
private GetLedgersResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetLedgersResponse() {
ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetLedgersResponse(
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();
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
ledgers_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
ledgers_.add(s);
break;
}
default: {
if (!parseUnknownFieldProto3(
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) == 0x00000001)) {
ledgers_ = ledgers_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetLedgersResponse.class, bdchain.api.grpc.GetLedgersResponse.Builder.class);
}
public static final int LEDGERS_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList ledgers_;
/**
* <code>repeated string ledgers = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getLedgersList() {
return ledgers_;
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public int getLedgersCount() {
return ledgers_.size();
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public java.lang.String getLedgers(int index) {
return ledgers_.get(index);
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public com.google.protobuf.ByteString
getLedgersBytes(int index) {
return ledgers_.getByteString(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 < ledgers_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledgers_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < ledgers_.size(); i++) {
dataSize += computeStringSizeNoTag(ledgers_.getRaw(i));
}
size += dataSize;
size += 1 * getLedgersList().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.GetLedgersResponse)) {
return super.equals(obj);
}
bdchain.api.grpc.GetLedgersResponse other = (bdchain.api.grpc.GetLedgersResponse) obj;
boolean result = true;
result = result && getLedgersList()
.equals(other.getLedgersList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getLedgersCount() > 0) {
hash = (37 * hash) + LEDGERS_FIELD_NUMBER;
hash = (53 * hash) + getLedgersList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.GetLedgersResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.GetLedgersResponse 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.GetLedgersResponse 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.GetLedgersResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.GetLedgersResponse)
bdchain.api.grpc.GetLedgersResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetLedgersResponse.class, bdchain.api.grpc.GetLedgersResponse.Builder.class);
}
// Construct using bdchain.api.grpc.GetLedgersResponse.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();
ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_GetLedgersResponse_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.GetLedgersResponse getDefaultInstanceForType() {
return bdchain.api.grpc.GetLedgersResponse.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.GetLedgersResponse build() {
bdchain.api.grpc.GetLedgersResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.GetLedgersResponse buildPartial() {
bdchain.api.grpc.GetLedgersResponse result = new bdchain.api.grpc.GetLedgersResponse(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
ledgers_ = ledgers_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.ledgers_ = ledgers_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.GetLedgersResponse other) {
if (other == bdchain.api.grpc.GetLedgersResponse.getDefaultInstance()) return this;
if (!other.ledgers_.isEmpty()) {
if (ledgers_.isEmpty()) {
ledgers_ = other.ledgers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLedgersIsMutable();
ledgers_.addAll(other.ledgers_);
}
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.GetLedgersResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.GetLedgersResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureLedgersIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
ledgers_ = new com.google.protobuf.LazyStringArrayList(ledgers_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public com.google.protobuf.ProtocolStringList
getLedgersList() {
return ledgers_.getUnmodifiableView();
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public int getLedgersCount() {
return ledgers_.size();
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public java.lang.String getLedgers(int index) {
return ledgers_.get(index);
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public com.google.protobuf.ByteString
getLedgersBytes(int index) {
return ledgers_.getByteString(index);
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public Builder setLedgers(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLedgersIsMutable();
ledgers_.set(index, value);
onChanged();
return this;
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public Builder addLedgers(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLedgersIsMutable();
ledgers_.add(value);
onChanged();
return this;
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public Builder addAllLedgers(
java.lang.Iterable<java.lang.String> values) {
ensureLedgersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, ledgers_);
onChanged();
return this;
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public Builder clearLedgers() {
ledgers_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* <code>repeated string ledgers = 1;</code>
*/
public Builder addLedgersBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureLedgersIsMutable();
ledgers_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.GetLedgersResponse)
}
// @@protoc_insertion_point(class_scope:bdchain.api.GetLedgersResponse)
private static final bdchain.api.grpc.GetLedgersResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.GetLedgersResponse();
}
public static bdchain.api.grpc.GetLedgersResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetLedgersResponse>
PARSER = new com.google.protobuf.AbstractParser<GetLedgersResponse>() {
@java.lang.Override
public GetLedgersResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetLedgersResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetLedgersResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetLedgersResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.GetLedgersResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,28 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
public interface GetLedgersResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.GetLedgersResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>repeated string ledgers = 1;</code>
*/
java.util.List<java.lang.String>
getLedgersList();
/**
* <code>repeated string ledgers = 1;</code>
*/
int getLedgersCount();
/**
* <code>repeated string ledgers = 1;</code>
*/
java.lang.String getLedgers(int index);
/**
* <code>repeated string ledgers = 1;</code>
*/
com.google.protobuf.ByteString
getLedgersBytes(int index);
}

View File

@ -0,0 +1,660 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.GetTransactionByBlockHashAndIndexRequest}
*/
public final class GetTransactionByBlockHashAndIndexRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
GetTransactionByBlockHashAndIndexRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTransactionByBlockHashAndIndexRequest.newBuilder() to construct.
private GetTransactionByBlockHashAndIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetTransactionByBlockHashAndIndexRequest() {
ledger_ = "";
blockHash_ = com.google.protobuf.ByteString.EMPTY;
index_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetTransactionByBlockHashAndIndexRequest(
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 18: {
blockHash_ = input.readBytes();
break;
}
case 24: {
index_ = input.readUInt32();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
private volatile java.lang.Object ledger_;
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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 BLOCK_HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString blockHash_;
/**
* <code>bytes block_hash = 2;</code>
*/
public com.google.protobuf.ByteString getBlockHash() {
return blockHash_;
}
public static final int INDEX_FIELD_NUMBER = 3;
private int index_;
/**
* <code>uint32 index = 3;</code>
*/
public int getIndex() {
return 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 (!getLedgerBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (!blockHash_.isEmpty()) {
output.writeBytes(2, blockHash_);
}
if (index_ != 0) {
output.writeUInt32(3, index_);
}
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 (!blockHash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, blockHash_);
}
if (index_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, index_);
}
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.GetTransactionByBlockHashAndIndexRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest other = (bdchain.api.grpc.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;
}
@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) + BLOCK_HASH_FIELD_NUMBER;
hash = (53 * hash) + getBlockHash().hashCode();
hash = (37 * hash) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + getIndex();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest 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.GetTransactionByBlockHashAndIndexRequest 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.GetTransactionByBlockHashAndIndexRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.Builder.class);
}
// Construct using bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.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_ = "";
blockHash_ = com.google.protobuf.ByteString.EMPTY;
index_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest getDefaultInstanceForType() {
return bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest build() {
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest buildPartial() {
bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest result = new bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest(this);
result.ledger_ = ledger_;
result.blockHash_ = blockHash_;
result.index_ = index_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest other) {
if (other == bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
}
if (other.getBlockHash() != com.google.protobuf.ByteString.EMPTY) {
setBlockHash(other.getBlockHash());
}
if (other.getIndex() != 0) {
setIndex(other.getIndex());
}
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.GetTransactionByBlockHashAndIndexRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ledger_ = "";
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ledger_ = value;
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder clearLedger() {
ledger_ = getDefaultInstance().getLedger();
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ledger_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString blockHash_ = com.google.protobuf.ByteString.EMPTY;
/**
* <code>bytes block_hash = 2;</code>
*/
public com.google.protobuf.ByteString getBlockHash() {
return blockHash_;
}
/**
* <code>bytes block_hash = 2;</code>
*/
public Builder setBlockHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
blockHash_ = value;
onChanged();
return this;
}
/**
* <code>bytes block_hash = 2;</code>
*/
public Builder clearBlockHash() {
blockHash_ = getDefaultInstance().getBlockHash();
onChanged();
return this;
}
private int index_ ;
/**
* <code>uint32 index = 3;</code>
*/
public int getIndex() {
return index_;
}
/**
* <code>uint32 index = 3;</code>
*/
public Builder setIndex(int value) {
index_ = value;
onChanged();
return this;
}
/**
* <code>uint32 index = 3;</code>
*/
public Builder clearIndex() {
index_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.GetTransactionByBlockHashAndIndexRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
private static final bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest();
}
public static bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetTransactionByBlockHashAndIndexRequest>
PARSER = new com.google.protobuf.AbstractParser<GetTransactionByBlockHashAndIndexRequest>() {
@java.lang.Override
public GetTransactionByBlockHashAndIndexRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetTransactionByBlockHashAndIndexRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetTransactionByBlockHashAndIndexRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetTransactionByBlockHashAndIndexRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockHashAndIndexRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,29 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface GetTransactionByBlockHashAndIndexRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.GetTransactionByBlockHashAndIndexRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
/**
* <code>bytes block_hash = 2;</code>
*/
com.google.protobuf.ByteString getBlockHash();
/**
* <code>uint32 index = 3;</code>
*/
int getIndex();
}

View File

@ -0,0 +1,658 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.GetTransactionByBlockNumberAndIndexRequest}
*/
public final class GetTransactionByBlockNumberAndIndexRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
GetTransactionByBlockNumberAndIndexRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTransactionByBlockNumberAndIndexRequest.newBuilder() to construct.
private GetTransactionByBlockNumberAndIndexRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetTransactionByBlockNumberAndIndexRequest() {
ledger_ = "";
blockNumber_ = 0L;
index_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetTransactionByBlockNumberAndIndexRequest(
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: {
blockNumber_ = input.readUInt64();
break;
}
case 24: {
index_ = input.readUInt32();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
private volatile java.lang.Object ledger_;
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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 BLOCK_NUMBER_FIELD_NUMBER = 2;
private long blockNumber_;
/**
* <code>uint64 block_number = 2;</code>
*/
public long getBlockNumber() {
return blockNumber_;
}
public static final int INDEX_FIELD_NUMBER = 3;
private int index_;
/**
* <code>uint32 index = 3;</code>
*/
public int getIndex() {
return 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 (!getLedgerBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ledger_);
}
if (blockNumber_ != 0L) {
output.writeUInt64(2, blockNumber_);
}
if (index_ != 0) {
output.writeUInt32(3, index_);
}
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 (blockNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, blockNumber_);
}
if (index_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, index_);
}
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.GetTransactionByBlockNumberAndIndexRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest other = (bdchain.api.grpc.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;
}
@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) + BLOCK_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getBlockNumber());
hash = (37 * hash) + INDEX_FIELD_NUMBER;
hash = (53 * hash) + getIndex();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest 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.GetTransactionByBlockNumberAndIndexRequest 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.GetTransactionByBlockNumberAndIndexRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.class, bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.Builder.class);
}
// Construct using bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.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_ = "";
blockNumber_ = 0L;
index_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByBlockNumberAndIndexRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest getDefaultInstanceForType() {
return bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest build() {
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest buildPartial() {
bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest result = new bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest(this);
result.ledger_ = ledger_;
result.blockNumber_ = blockNumber_;
result.index_ = index_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest other) {
if (other == bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
}
if (other.getBlockNumber() != 0L) {
setBlockNumber(other.getBlockNumber());
}
if (other.getIndex() != 0) {
setIndex(other.getIndex());
}
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.GetTransactionByBlockNumberAndIndexRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ledger_ = "";
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ledger_ = value;
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder clearLedger() {
ledger_ = getDefaultInstance().getLedger();
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ledger_ = value;
onChanged();
return this;
}
private long blockNumber_ ;
/**
* <code>uint64 block_number = 2;</code>
*/
public long getBlockNumber() {
return blockNumber_;
}
/**
* <code>uint64 block_number = 2;</code>
*/
public Builder setBlockNumber(long value) {
blockNumber_ = value;
onChanged();
return this;
}
/**
* <code>uint64 block_number = 2;</code>
*/
public Builder clearBlockNumber() {
blockNumber_ = 0L;
onChanged();
return this;
}
private int index_ ;
/**
* <code>uint32 index = 3;</code>
*/
public int getIndex() {
return index_;
}
/**
* <code>uint32 index = 3;</code>
*/
public Builder setIndex(int value) {
index_ = value;
onChanged();
return this;
}
/**
* <code>uint32 index = 3;</code>
*/
public Builder clearIndex() {
index_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.GetTransactionByBlockNumberAndIndexRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
private static final bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest();
}
public static bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetTransactionByBlockNumberAndIndexRequest>
PARSER = new com.google.protobuf.AbstractParser<GetTransactionByBlockNumberAndIndexRequest>() {
@java.lang.Override
public GetTransactionByBlockNumberAndIndexRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetTransactionByBlockNumberAndIndexRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetTransactionByBlockNumberAndIndexRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetTransactionByBlockNumberAndIndexRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByBlockNumberAndIndexRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,29 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface GetTransactionByBlockNumberAndIndexRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.GetTransactionByBlockNumberAndIndexRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
/**
* <code>uint64 block_number = 2;</code>
*/
long getBlockNumber();
/**
* <code>uint32 index = 3;</code>
*/
int getIndex();
}

View File

@ -0,0 +1,602 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.GetTransactionByHashRequest}
*/
public final class GetTransactionByHashRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.GetTransactionByHashRequest)
GetTransactionByHashRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTransactionByHashRequest.newBuilder() to construct.
private GetTransactionByHashRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private GetTransactionByHashRequest() {
ledger_ = "";
hash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetTransactionByHashRequest(
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 18: {
hash_ = input.readBytes();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetTransactionByHashRequest.class, bdchain.api.grpc.GetTransactionByHashRequest.Builder.class);
}
public static final int LEDGER_FIELD_NUMBER = 1;
private volatile java.lang.Object ledger_;
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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 HASH_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString hash_;
/**
* <code>bytes hash = 2;</code>
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
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 (!hash_.isEmpty()) {
output.writeBytes(2, hash_);
}
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 (!hash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, hash_);
}
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.GetTransactionByHashRequest)) {
return super.equals(obj);
}
bdchain.api.grpc.GetTransactionByHashRequest other = (bdchain.api.grpc.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;
}
@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) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.GetTransactionByHashRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.GetTransactionByHashRequest 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.GetTransactionByHashRequest 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.GetTransactionByHashRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.GetTransactionByHashRequest)
bdchain.api.grpc.GetTransactionByHashRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.GetTransactionByHashRequest.class, bdchain.api.grpc.GetTransactionByHashRequest.Builder.class);
}
// Construct using bdchain.api.grpc.GetTransactionByHashRequest.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_ = "";
hash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.AccountingChainProto.internal_static_bdchain_api_GetTransactionByHashRequest_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByHashRequest getDefaultInstanceForType() {
return bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByHashRequest build() {
bdchain.api.grpc.GetTransactionByHashRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByHashRequest buildPartial() {
bdchain.api.grpc.GetTransactionByHashRequest result = new bdchain.api.grpc.GetTransactionByHashRequest(this);
result.ledger_ = ledger_;
result.hash_ = hash_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.GetTransactionByHashRequest other) {
if (other == bdchain.api.grpc.GetTransactionByHashRequest.getDefaultInstance()) return this;
if (!other.getLedger().isEmpty()) {
ledger_ = other.ledger_;
onChanged();
}
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
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.GetTransactionByHashRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.GetTransactionByHashRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object ledger_ = "";
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
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;
}
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ledger_ = value;
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder clearLedger() {
ledger_ = getDefaultInstance().getLedger();
onChanged();
return this;
}
/**
* <code>string ledger = 1;</code>
*/
public Builder setLedgerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ledger_ = value;
onChanged();
return this;
}
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
* <code>bytes hash = 2;</code>
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
/**
* <code>bytes hash = 2;</code>
*/
public Builder setHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
hash_ = value;
onChanged();
return this;
}
/**
* <code>bytes hash = 2;</code>
*/
public Builder clearHash() {
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.GetTransactionByHashRequest)
}
// @@protoc_insertion_point(class_scope:bdchain.api.GetTransactionByHashRequest)
private static final bdchain.api.grpc.GetTransactionByHashRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.GetTransactionByHashRequest();
}
public static bdchain.api.grpc.GetTransactionByHashRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<GetTransactionByHashRequest>
PARSER = new com.google.protobuf.AbstractParser<GetTransactionByHashRequest>() {
@java.lang.Override
public GetTransactionByHashRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GetTransactionByHashRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<GetTransactionByHashRequest> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<GetTransactionByHashRequest> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.GetTransactionByHashRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,24 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface GetTransactionByHashRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.GetTransactionByHashRequest)
com.google.protobuf.MessageOrBuilder {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
/**
* <code>bytes hash = 2;</code>
*/
com.google.protobuf.ByteString getHash();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
// 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 {
/**
* <code>string ledger = 1;</code>
*/
java.lang.String getLedger();
/**
* <code>string ledger = 1;</code>
*/
com.google.protobuf.ByteString
getLedgerBytes();
/**
* <code>.bdchain.api.SendTransactionRequest.Transaction transaction = 2;</code>
*/
boolean hasTransaction();
/**
* <code>.bdchain.api.SendTransactionRequest.Transaction transaction = 2;</code>
*/
bdchain.api.grpc.SendTransactionRequest.Transaction getTransaction();
/**
* <code>.bdchain.api.SendTransactionRequest.Transaction transaction = 2;</code>
*/
bdchain.api.grpc.SendTransactionRequest.TransactionOrBuilder getTransactionOrBuilder();
}

View File

@ -0,0 +1,475 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.SendTransactionResponse}
*/
public final class SendTransactionResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.SendTransactionResponse)
SendTransactionResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use SendTransactionResponse.newBuilder() to construct.
private SendTransactionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private SendTransactionResponse() {
hash_ = com.google.protobuf.ByteString.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SendTransactionResponse(
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: {
hash_ = input.readBytes();
break;
}
default: {
if (!parseUnknownFieldProto3(
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.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.SendTransactionResponse.class, bdchain.api.grpc.SendTransactionResponse.Builder.class);
}
public static final int HASH_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString hash_;
/**
* <code>bytes hash = 1;</code>
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
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 (!hash_.isEmpty()) {
output.writeBytes(1, hash_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!hash_.isEmpty()) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(1, hash_);
}
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.SendTransactionResponse)) {
return super.equals(obj);
}
bdchain.api.grpc.SendTransactionResponse other = (bdchain.api.grpc.SendTransactionResponse) obj;
boolean result = true;
result = result && getHash()
.equals(other.getHash());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HASH_FIELD_NUMBER;
hash = (53 * hash) + getHash().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.SendTransactionResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.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(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.SendTransactionResponse 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.SendTransactionResponse 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.SendTransactionResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.SendTransactionResponse)
bdchain.api.grpc.SendTransactionResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.SendTransactionResponse.class, bdchain.api.grpc.SendTransactionResponse.Builder.class);
}
// Construct using bdchain.api.grpc.SendTransactionResponse.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();
hash_ = com.google.protobuf.ByteString.EMPTY;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.TransactionLedgerProto.internal_static_bdchain_api_SendTransactionResponse_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.SendTransactionResponse getDefaultInstanceForType() {
return bdchain.api.grpc.SendTransactionResponse.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.SendTransactionResponse build() {
bdchain.api.grpc.SendTransactionResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.SendTransactionResponse buildPartial() {
bdchain.api.grpc.SendTransactionResponse result = new bdchain.api.grpc.SendTransactionResponse(this);
result.hash_ = hash_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) 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);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.SendTransactionResponse other) {
if (other == bdchain.api.grpc.SendTransactionResponse.getDefaultInstance()) return this;
if (other.getHash() != com.google.protobuf.ByteString.EMPTY) {
setHash(other.getHash());
}
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.SendTransactionResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.SendTransactionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.ByteString hash_ = com.google.protobuf.ByteString.EMPTY;
/**
* <code>bytes hash = 1;</code>
*/
public com.google.protobuf.ByteString getHash() {
return hash_;
}
/**
* <code>bytes hash = 1;</code>
*/
public Builder setHash(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
hash_ = value;
onChanged();
return this;
}
/**
* <code>bytes hash = 1;</code>
*/
public Builder clearHash() {
hash_ = getDefaultInstance().getHash();
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(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.SendTransactionResponse)
}
// @@protoc_insertion_point(class_scope:bdchain.api.SendTransactionResponse)
private static final bdchain.api.grpc.SendTransactionResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.SendTransactionResponse();
}
public static bdchain.api.grpc.SendTransactionResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<SendTransactionResponse>
PARSER = new com.google.protobuf.AbstractParser<SendTransactionResponse>() {
@java.lang.Override
public SendTransactionResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SendTransactionResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<SendTransactionResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<SendTransactionResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.SendTransactionResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,14 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/tx_ledger.proto
package bdchain.api.grpc;
public interface SendTransactionResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.SendTransactionResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <code>bytes hash = 1;</code>
*/
com.google.protobuf.ByteString getHash();
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,430 @@
package bdchain.api.grpc;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.14.0)",
comments = "Source: bdchain/api/tx_ledger.proto")
public final class TransactionLedgerGrpc {
private TransactionLedgerGrpc() {}
public static final String SERVICE_NAME = "bdchain.api.TransactionLedger";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.CreateLedgerRequest,
bdchain.api.grpc.CreateLedgerResponse> getCreateLedgerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateLedger",
requestType = bdchain.api.grpc.CreateLedgerRequest.class,
responseType = bdchain.api.grpc.CreateLedgerResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.CreateLedgerRequest,
bdchain.api.grpc.CreateLedgerResponse> getCreateLedgerMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.CreateLedgerRequest, bdchain.api.grpc.CreateLedgerResponse> getCreateLedgerMethod;
if ((getCreateLedgerMethod = TransactionLedgerGrpc.getCreateLedgerMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getCreateLedgerMethod = TransactionLedgerGrpc.getCreateLedgerMethod) == null) {
TransactionLedgerGrpc.getCreateLedgerMethod = getCreateLedgerMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.CreateLedgerRequest, bdchain.api.grpc.CreateLedgerResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.TransactionLedger", "CreateLedger"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.CreateLedgerRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.CreateLedgerResponse.getDefaultInstance()))
.setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("CreateLedger"))
.build();
}
}
}
return getCreateLedgerMethod;
}
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
bdchain.api.grpc.GetLedgersResponse> getGetLedgersMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetLedgers",
requestType = com.google.protobuf.Empty.class,
responseType = bdchain.api.grpc.GetLedgersResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
bdchain.api.grpc.GetLedgersResponse> getGetLedgersMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, bdchain.api.grpc.GetLedgersResponse> getGetLedgersMethod;
if ((getGetLedgersMethod = TransactionLedgerGrpc.getGetLedgersMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getGetLedgersMethod = TransactionLedgerGrpc.getGetLedgersMethod) == null) {
TransactionLedgerGrpc.getGetLedgersMethod = getGetLedgersMethod =
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, bdchain.api.grpc.GetLedgersResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.TransactionLedger", "GetLedgers"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.GetLedgersResponse.getDefaultInstance()))
.setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("GetLedgers"))
.build();
}
}
}
return getGetLedgersMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.SendTransactionRequest,
bdchain.api.grpc.SendTransactionResponse> getSendTransactionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SendTransaction",
requestType = bdchain.api.grpc.SendTransactionRequest.class,
responseType = bdchain.api.grpc.SendTransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<bdchain.api.grpc.SendTransactionRequest,
bdchain.api.grpc.SendTransactionResponse> getSendTransactionMethod() {
io.grpc.MethodDescriptor<bdchain.api.grpc.SendTransactionRequest, bdchain.api.grpc.SendTransactionResponse> getSendTransactionMethod;
if ((getSendTransactionMethod = TransactionLedgerGrpc.getSendTransactionMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getSendTransactionMethod = TransactionLedgerGrpc.getSendTransactionMethod) == null) {
TransactionLedgerGrpc.getSendTransactionMethod = getSendTransactionMethod =
io.grpc.MethodDescriptor.<bdchain.api.grpc.SendTransactionRequest, bdchain.api.grpc.SendTransactionResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.TransactionLedger", "SendTransaction"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.SendTransactionRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.SendTransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("SendTransaction"))
.build();
}
}
}
return getSendTransactionMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static TransactionLedgerStub newStub(io.grpc.Channel channel) {
return new TransactionLedgerStub(channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static TransactionLedgerBlockingStub newBlockingStub(
io.grpc.Channel channel) {
return new TransactionLedgerBlockingStub(channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static TransactionLedgerFutureStub newFutureStub(
io.grpc.Channel channel) {
return new TransactionLedgerFutureStub(channel);
}
/**
*/
public static abstract class TransactionLedgerImplBase implements io.grpc.BindableService {
/**
*/
public void createLedger(bdchain.api.grpc.CreateLedgerRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.CreateLedgerResponse> responseObserver) {
asyncUnimplementedUnaryCall(getCreateLedgerMethod(), responseObserver);
}
/**
*/
public void getLedgers(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.GetLedgersResponse> responseObserver) {
asyncUnimplementedUnaryCall(getGetLedgersMethod(), responseObserver);
}
/**
*/
public void sendTransaction(bdchain.api.grpc.SendTransactionRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.SendTransactionResponse> responseObserver) {
asyncUnimplementedUnaryCall(getSendTransactionMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateLedgerMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.CreateLedgerRequest,
bdchain.api.grpc.CreateLedgerResponse>(
this, METHODID_CREATE_LEDGER)))
.addMethod(
getGetLedgersMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
bdchain.api.grpc.GetLedgersResponse>(
this, METHODID_GET_LEDGERS)))
.addMethod(
getSendTransactionMethod(),
asyncUnaryCall(
new MethodHandlers<
bdchain.api.grpc.SendTransactionRequest,
bdchain.api.grpc.SendTransactionResponse>(
this, METHODID_SEND_TRANSACTION)))
.build();
}
}
/**
*/
public static final class TransactionLedgerStub extends io.grpc.stub.AbstractStub<TransactionLedgerStub> {
private TransactionLedgerStub(io.grpc.Channel channel) {
super(channel);
}
private TransactionLedgerStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TransactionLedgerStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new TransactionLedgerStub(channel, callOptions);
}
/**
*/
public void createLedger(bdchain.api.grpc.CreateLedgerRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.CreateLedgerResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getCreateLedgerMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void getLedgers(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.GetLedgersResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getGetLedgersMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void sendTransaction(bdchain.api.grpc.SendTransactionRequest request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.SendTransactionResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getSendTransactionMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class TransactionLedgerBlockingStub extends io.grpc.stub.AbstractStub<TransactionLedgerBlockingStub> {
private TransactionLedgerBlockingStub(io.grpc.Channel channel) {
super(channel);
}
private TransactionLedgerBlockingStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TransactionLedgerBlockingStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new TransactionLedgerBlockingStub(channel, callOptions);
}
/**
*/
public bdchain.api.grpc.CreateLedgerResponse createLedger(bdchain.api.grpc.CreateLedgerRequest request) {
return blockingUnaryCall(
getChannel(), getCreateLedgerMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.GetLedgersResponse getLedgers(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getGetLedgersMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.SendTransactionResponse sendTransaction(bdchain.api.grpc.SendTransactionRequest request) {
return blockingUnaryCall(
getChannel(), getSendTransactionMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class TransactionLedgerFutureStub extends io.grpc.stub.AbstractStub<TransactionLedgerFutureStub> {
private TransactionLedgerFutureStub(io.grpc.Channel channel) {
super(channel);
}
private TransactionLedgerFutureStub(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TransactionLedgerFutureStub build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) {
return new TransactionLedgerFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.CreateLedgerResponse> createLedger(
bdchain.api.grpc.CreateLedgerRequest request) {
return futureUnaryCall(
getChannel().newCall(getCreateLedgerMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.GetLedgersResponse> getLedgers(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getGetLedgersMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.SendTransactionResponse> sendTransaction(
bdchain.api.grpc.SendTransactionRequest request) {
return futureUnaryCall(
getChannel().newCall(getSendTransactionMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_LEDGER = 0;
private static final int METHODID_GET_LEDGERS = 1;
private static final int METHODID_SEND_TRANSACTION = 2;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
private final TransactionLedgerImplBase serviceImpl;
private final int methodId;
MethodHandlers(TransactionLedgerImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_CREATE_LEDGER:
serviceImpl.createLedger((bdchain.api.grpc.CreateLedgerRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.CreateLedgerResponse>) responseObserver);
break;
case METHODID_GET_LEDGERS:
serviceImpl.getLedgers((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.GetLedgersResponse>) responseObserver);
break;
case METHODID_SEND_TRANSACTION:
serviceImpl.sendTransaction((bdchain.api.grpc.SendTransactionRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.SendTransactionResponse>) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver<Req> invoke(
io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
private static abstract class TransactionLedgerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
TransactionLedgerBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return bdchain.api.grpc.TransactionLedgerProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("TransactionLedger");
}
}
private static final class TransactionLedgerFileDescriptorSupplier
extends TransactionLedgerBaseDescriptorSupplier {
TransactionLedgerFileDescriptorSupplier() {}
}
private static final class TransactionLedgerMethodDescriptorSupplier
extends TransactionLedgerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
TransactionLedgerMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (TransactionLedgerGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new TransactionLedgerFileDescriptorSupplier())
.addMethod(getCreateLedgerMethod())
.addMethod(getGetLedgersMethod())
.addMethod(getSendTransactionMethod())
.build();
}
}
}
return result;
}
}

View File

@ -0,0 +1,133 @@
// 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\215\002\n\021TransactionLe" +
"dger\022S\n\014CreateLedger\022 .bdchain.api.Creat" +
"eLedgerRequest\032!.bdchain.api.CreateLedge" +
"rResponse\022E\n\nGetLedgers\022\026.google.protobu" +
"f.Empty\032\037.bdchain.api.GetLedgersResponse" +
"\022\\\n\017SendTransaction\022#.bdchain.api.SendTr" +
"ansactionRequest\032$.bdchain.api.SendTrans" +
"actionResponseBC\n\020bdchain.api.grpcB\026Tran" +
"sactionLedgerProtoP\001Z\025bdchain/api/tx_led" +
"gerb\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)
}

View File

@ -0,0 +1,125 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/ac_chain.proto
package bdchain.api.grpc;
public interface TransactionOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.Transaction)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* 事务所在的区块的区块号当事务处于待确认状态时为`null`
* </pre>
*
* <code>uint64 block_number = 1;</code>
*/
long getBlockNumber();
/**
* <pre>
* 事务所在的区块的哈希当事务处于待确认状态时为`null`
* </pre>
*
* <code>bytes block_hash = 2;</code>
*/
com.google.protobuf.ByteString getBlockHash();
/**
* <pre>
* 事务在区块中的位置index当事务处于待确认状态时为`null`
* </pre>
*
* <code>uint32 index = 3;</code>
*/
int getIndex();
/**
* <pre>
* 事务的哈希
* </pre>
*
* <code>bytes hash = 4;</code>
*/
com.google.protobuf.ByteString getHash();
/**
* <pre>
* 事务类型
* </pre>
*
* <code>.bdchain.api.TransactionType type = 5;</code>
*/
int getTypeValue();
/**
* <pre>
* 事务类型
* </pre>
*
* <code>.bdchain.api.TransactionType type = 5;</code>
*/
bdchain.api.grpc.TransactionType getType();
/**
* <pre>
* 发送账户地址
* </pre>
*
* <code>bytes from = 6;</code>
*/
com.google.protobuf.ByteString getFrom();
/**
* <pre>
* 这条事务之前发送者所发送的事务数量
* </pre>
*
* <code>uint64 nonce = 7;</code>
*/
long getNonce();
/**
* <pre>
* 接收账户地址或者调用的合约地址或者`null`如为合约创建
* </pre>
*
* <code>bytes to = 8;</code>
*/
com.google.protobuf.ByteString getTo();
/**
* <pre>
* 数据或合约代码
* </pre>
*
* <code>bytes data = 9;</code>
*/
com.google.protobuf.ByteString getData();
/**
* <pre>
* ECDSA recovery id
* </pre>
*
* <code>bytes v = 10;</code>
*/
com.google.protobuf.ByteString getV();
/**
* <pre>
* ECDSA signature r
* </pre>
*
* <code>bytes r = 11;</code>
*/
com.google.protobuf.ByteString getR();
/**
* <pre>
* ECDSA signature s
* </pre>
*
* <code>bytes s = 12;</code>
*/
com.google.protobuf.ByteString getS();
}

View File

@ -0,0 +1,157 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
package bdchain.api.grpc;
/**
* <pre>
* 事务类型
* </pre>
*
* Protobuf enum {@code bdchain.api.TransactionType}
*/
public enum TransactionType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <pre>
* 通用数据记录
* </pre>
*
* <code>RECORD = 0;</code>
*/
RECORD(0),
/**
* <pre>
* 消息
* </pre>
*
* <code>MESSAGE = 1;</code>
*/
MESSAGE(1),
/**
* <pre>
* 合约创建
* </pre>
*
* <code>CONTRACT_CREATION = 2;</code>
*/
CONTRACT_CREATION(2),
/**
* <pre>
* 合约调用
* </pre>
*
* <code>CONTRACT_INVOCATION = 3;</code>
*/
CONTRACT_INVOCATION(3),
UNRECOGNIZED(-1),
;
/**
* <pre>
* 通用数据记录
* </pre>
*
* <code>RECORD = 0;</code>
*/
public static final int RECORD_VALUE = 0;
/**
* <pre>
* 消息
* </pre>
*
* <code>MESSAGE = 1;</code>
*/
public static final int MESSAGE_VALUE = 1;
/**
* <pre>
* 合约创建
* </pre>
*
* <code>CONTRACT_CREATION = 2;</code>
*/
public static final int CONTRACT_CREATION_VALUE = 2;
/**
* <pre>
* 合约调用
* </pre>
*
* <code>CONTRACT_INVOCATION = 3;</code>
*/
public static final int CONTRACT_INVOCATION_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TransactionType valueOf(int value) {
return forNumber(value);
}
public static TransactionType forNumber(int value) {
switch (value) {
case 0: return RECORD;
case 1: return MESSAGE;
case 2: return CONTRACT_CREATION;
case 3: return CONTRACT_INVOCATION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<TransactionType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TransactionType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<TransactionType>() {
public TransactionType findValueByNumber(int number) {
return TransactionType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return bdchain.api.grpc.CommonProto.getDescriptor().getEnumTypes().get(0);
}
private static final TransactionType[] VALUES = values();
public static TransactionType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TransactionType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:bdchain.api.TransactionType)
}

View File

@ -0,0 +1,433 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
package com.google.protobuf;
/**
* <pre>
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
* The JSON representation for `Empty` is empty JSON object `{}`.
* </pre>
*
* Protobuf type {@code google.protobuf.Empty}
*/
public final class Empty extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.protobuf.Empty)
EmptyOrBuilder {
private static final long serialVersionUID = 0L;
// Use Empty.newBuilder() to construct.
private Empty(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Empty() {
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Empty(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
default: {
if (!parseUnknownFieldProto3(
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 com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class);
}
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 {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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 com.google.protobuf.Empty)) {
return super.equals(obj);
}
com.google.protobuf.Empty other = (com.google.protobuf.Empty) obj;
boolean result = true;
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.protobuf.Empty parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.protobuf.Empty parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.protobuf.Empty parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.protobuf.Empty parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.protobuf.Empty parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.protobuf.Empty parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.protobuf.Empty parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.protobuf.Empty 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 com.google.protobuf.Empty parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.protobuf.Empty 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 com.google.protobuf.Empty parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.protobuf.Empty 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(com.google.protobuf.Empty 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;
}
/**
* <pre>
* A generic empty message that you can re-use to avoid defining duplicated
* empty messages in your APIs. A typical example is to use it as the request
* or the response type of an API method. For instance:
* service Foo {
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
* }
* The JSON representation for `Empty` is empty JSON object `{}`.
* </pre>
*
* Protobuf type {@code google.protobuf.Empty}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:google.protobuf.Empty)
com.google.protobuf.EmptyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.protobuf.Empty.class, com.google.protobuf.Empty.Builder.class);
}
// Construct using com.google.protobuf.Empty.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();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.protobuf.EmptyProto.internal_static_google_protobuf_Empty_descriptor;
}
@java.lang.Override
public com.google.protobuf.Empty getDefaultInstanceForType() {
return com.google.protobuf.Empty.getDefaultInstance();
}
@java.lang.Override
public com.google.protobuf.Empty build() {
com.google.protobuf.Empty result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.protobuf.Empty buildPartial() {
com.google.protobuf.Empty result = new com.google.protobuf.Empty(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return (Builder) super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) 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);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.protobuf.Empty) {
return mergeFrom((com.google.protobuf.Empty)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.protobuf.Empty other) {
if (other == com.google.protobuf.Empty.getDefaultInstance()) return this;
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 {
com.google.protobuf.Empty parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.protobuf.Empty) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.protobuf.Empty)
}
// @@protoc_insertion_point(class_scope:google.protobuf.Empty)
private static final com.google.protobuf.Empty DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.protobuf.Empty();
}
public static com.google.protobuf.Empty getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Empty>
PARSER = new com.google.protobuf.AbstractParser<Empty>() {
@java.lang.Override
public Empty parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Empty(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Empty> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Empty> getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Empty getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,9 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
package com.google.protobuf;
public interface EmptyOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.protobuf.Empty)
com.google.protobuf.MessageOrBuilder {
}

View File

@ -0,0 +1,58 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/empty.proto
package com.google.protobuf;
public final class EmptyProto {
private EmptyProto() {}
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_google_protobuf_Empty_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_protobuf_Empty_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\033google/protobuf/empty.proto\022\017google.pr" +
"otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n" +
"EmptyProtoP\001Z\'github.com/golang/protobuf" +
"/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf" +
".WellKnownTypesb\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[] {
}, assigner);
internal_static_google_protobuf_Empty_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_protobuf_Empty_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_protobuf_Empty_descriptor,
new java.lang.String[] { });
}
// @@protoc_insertion_point(outer_class_scope)
}