Update gRPC API

This commit is contained in:
Nex 2018-10-11 16:30:37 +08:00
parent a36b581741
commit 8bbe9ae173
10 changed files with 2607 additions and 67 deletions

View File

@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.14.0)",
value = "by gRPC proto compiler (version 1.15.0)",
comments = "Source: bdchain/api/ac_chain.proto")
public final class AccountingChainGrpc {
@ -27,6 +27,38 @@ public final class AccountingChainGrpc {
public static final String SERVICE_NAME = "bdchain.api.AccountingChain";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
bdchain.api.grpc.ClientVersionResponse> getClientVersionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientVersion",
requestType = com.google.protobuf.Empty.class,
responseType = bdchain.api.grpc.ClientVersionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
bdchain.api.grpc.ClientVersionResponse> getClientVersionMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, bdchain.api.grpc.ClientVersionResponse> getClientVersionMethod;
if ((getClientVersionMethod = AccountingChainGrpc.getClientVersionMethod) == null) {
synchronized (AccountingChainGrpc.class) {
if ((getClientVersionMethod = AccountingChainGrpc.getClientVersionMethod) == null) {
AccountingChainGrpc.getClientVersionMethod = getClientVersionMethod =
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, bdchain.api.grpc.ClientVersionResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.AccountingChain", "ClientVersion"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()))
.setSchemaDescriptor(new AccountingChainMethodDescriptorSupplier("ClientVersion"))
.build();
}
}
}
return getClientVersionMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.BlockNumberRequest,
bdchain.api.grpc.BlockNumberResponse> getBlockNumberMethod;
@ -246,6 +278,13 @@ public final class AccountingChainGrpc {
*/
public static abstract class AccountingChainImplBase implements io.grpc.BindableService {
/**
*/
public void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.ClientVersionResponse> responseObserver) {
asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver);
}
/**
*/
public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
@ -290,6 +329,13 @@ public final class AccountingChainGrpc {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getClientVersionMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
bdchain.api.grpc.ClientVersionResponse>(
this, METHODID_CLIENT_VERSION)))
.addMethod(
getBlockNumberMethod(),
asyncUnaryCall(
@ -354,6 +400,14 @@ public final class AccountingChainGrpc {
return new AccountingChainStub(channel, callOptions);
}
/**
*/
public void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.ClientVersionResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void blockNumber(bdchain.api.grpc.BlockNumberRequest request,
@ -421,6 +475,13 @@ public final class AccountingChainGrpc {
return new AccountingChainBlockingStub(channel, callOptions);
}
/**
*/
public bdchain.api.grpc.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getClientVersionMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.BlockNumberResponse blockNumber(bdchain.api.grpc.BlockNumberRequest request) {
@ -482,6 +543,14 @@ public final class AccountingChainGrpc {
return new AccountingChainFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.ClientVersionResponse> clientVersion(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.BlockNumberResponse> blockNumber(
@ -531,12 +600,13 @@ public final class AccountingChainGrpc {
}
}
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 int METHODID_CLIENT_VERSION = 0;
private static final int METHODID_BLOCK_NUMBER = 1;
private static final int METHODID_GET_BLOCK_BY_NUMBER = 2;
private static final int METHODID_GET_BLOCK_BY_HASH = 3;
private static final int METHODID_GET_TRANSACTION_BY_HASH = 4;
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_NUMBER_AND_INDEX = 5;
private static final int METHODID_GET_TRANSACTION_BY_BLOCK_HASH_AND_INDEX = 6;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
@ -555,6 +625,10 @@ public final class AccountingChainGrpc {
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_CLIENT_VERSION:
serviceImpl.clientVersion((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.ClientVersionResponse>) responseObserver);
break;
case METHODID_BLOCK_NUMBER:
serviceImpl.blockNumber((bdchain.api.grpc.BlockNumberRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.BlockNumberResponse>) responseObserver);
@ -640,6 +714,7 @@ public final class AccountingChainGrpc {
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AccountingChainFileDescriptorSupplier())
.addMethod(getClientVersionMethod())
.addMethod(getBlockNumberMethod())
.addMethod(getGetBlockByNumberMethod())
.addMethod(getGetBlockByHashMethod())

View File

@ -69,47 +69,50 @@ public final class AccountingChainProto {
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\307\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\022Z\n\024GetTransactionByHa" +
"sh\022(.bdchain.api.GetTransactionByHashReq" +
"uest\032\030.bdchain.api.Transaction\022x\n#GetTra" +
"nsactionByBlockNumberAndIndex\0227.bdchain." +
"api.GetTransactionByBlockNumberAndIndexR" +
"equest\032\030.bdchain.api.Transaction\022t\n!GetT" +
"ransactionByBlockHashAndIndex\0225.bdchain." +
"api.GetTransactionByBlockHashAndIndexReq" +
"uest\032\030.bdchain.api.TransactionB@\n\020bdchai" +
"n.api.grpcB\024AccountingChainProtoP\001Z\024bdch" +
"ain/api/ac_chainb\006proto3"
"i\032\033google/protobuf/empty.proto\032\030bdchain/" +
"api/common.proto\"\330\001\n\013Transaction\022\024\n\014bloc" +
"k_number\030\001 \001(\004\022\022\n\nblock_hash\030\002 \001(\014\022\r\n\005in" +
"dex\030\003 \001(\r\022\014\n\004hash\030\004 \001(\014\022*\n\004type\030\005 \001(\0162\034." +
"bdchain.api.TransactionType\022\014\n\004from\030\006 \001(" +
"\014\022\r\n\005nonce\030\007 \001(\004\022\n\n\002to\030\010 \001(\014\022\014\n\004data\030\t \001" +
"(\014\022\t\n\001v\030\n \001(\014\022\t\n\001r\030\013 \001(\014\022\t\n\001s\030\014 \001(\014\"\323\001\n\005" +
"Block\022\016\n\006number\030\001 \001(\004\022\014\n\004hash\030\002 \001(\014\022\023\n\013p" +
"arent_hash\030\003 \001(\014\022\017\n\007witness\030\004 \001(\014\022\021\n\ttim" +
"estamp\030\005 \001(\004\022\014\n\004size\030\006 \001(\004\022\031\n\021transactio" +
"ns_root\030\007 \001(\014\022.\n\014transactions\030\010 \003(\0132\030.bd" +
"chain.api.Transaction\022\032\n\022transaction_has" +
"hes\030\t \003(\014\"$\n\022BlockNumberRequest\022\016\n\006ledge" +
"r\030\001 \001(\t\"+\n\023BlockNumberResponse\022\024\n\014block_" +
"number\030\001 \001(\004\"S\n\027GetBlockByNumberRequest\022" +
"\016\n\006ledger\030\001 \001(\t\022\016\n\006number\030\002 \001(\004\022\030\n\020full_" +
"transaction\030\003 \001(\010\"O\n\025GetBlockByHashReque" +
"st\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\022\030\n\020full" +
"_transaction\030\003 \001(\010\";\n\033GetTransactionByHa" +
"shRequest\022\016\n\006ledger\030\001 \001(\t\022\014\n\004hash\030\002 \001(\014\"" +
"a\n*GetTransactionByBlockNumberAndIndexRe" +
"quest\022\016\n\006ledger\030\001 \001(\t\022\024\n\014block_number\030\002 " +
"\001(\004\022\r\n\005index\030\003 \001(\r\"]\n(GetTransactionByBl" +
"ockHashAndIndexRequest\022\016\n\006ledger\030\001 \001(\t\022\022" +
"\n\nblock_hash\030\002 \001(\014\022\r\n\005index\030\003 \001(\r2\224\005\n\017Ac" +
"countingChain\022K\n\rClientVersion\022\026.google." +
"protobuf.Empty\032\".bdchain.api.ClientVersi" +
"onResponse\022P\n\013BlockNumber\022\037.bdchain.api." +
"BlockNumberRequest\032 .bdchain.api.BlockNu" +
"mberResponse\022L\n\020GetBlockByNumber\022$.bdcha" +
"in.api.GetBlockByNumberRequest\032\022.bdchain" +
".api.Block\022H\n\016GetBlockByHash\022\".bdchain.a" +
"pi.GetBlockByHashRequest\032\022.bdchain.api.B" +
"lock\022Z\n\024GetTransactionByHash\022(.bdchain.a" +
"pi.GetTransactionByHashRequest\032\030.bdchain" +
".api.Transaction\022x\n#GetTransactionByBloc" +
"kNumberAndIndex\0227.bdchain.api.GetTransac" +
"tionByBlockNumberAndIndexRequest\032\030.bdcha" +
"in.api.Transaction\022t\n!GetTransactionByBl" +
"ockHashAndIndex\0225.bdchain.api.GetTransac" +
"tionByBlockHashAndIndexRequest\032\030.bdchain" +
".api.TransactionBD\n\020bdchain.api.grpcB\024Ac" +
"countingChainProtoP\001Z\030bdchain/api/grpc/a" +
"cchainb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@ -122,6 +125,7 @@ public final class AccountingChainProto {
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.EmptyProto.getDescriptor(),
bdchain.api.grpc.CommonProto.getDescriptor(),
}, assigner);
internal_static_bdchain_api_Transaction_descriptor =
@ -178,6 +182,7 @@ public final class AccountingChainProto {
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bdchain_api_GetTransactionByBlockHashAndIndexRequest_descriptor,
new java.lang.String[] { "Ledger", "BlockHash", "Index", });
com.google.protobuf.EmptyProto.getDescriptor();
bdchain.api.grpc.CommonProto.getDescriptor();
}

View File

@ -0,0 +1,569 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
package bdchain.api.grpc;
/**
* Protobuf type {@code bdchain.api.ClientVersionResponse}
*/
public final class ClientVersionResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:bdchain.api.ClientVersionResponse)
ClientVersionResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClientVersionResponse.newBuilder() to construct.
private ClientVersionResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private ClientVersionResponse() {
version_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClientVersionResponse(
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();
version_ = 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.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.ClientVersionResponse.class, bdchain.api.grpc.ClientVersionResponse.Builder.class);
}
public static final int VERSION_FIELD_NUMBER = 1;
private volatile java.lang.Object version_;
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
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();
version_ = s;
return s;
}
}
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = 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 (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_);
}
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.ClientVersionResponse)) {
return super.equals(obj);
}
bdchain.api.grpc.ClientVersionResponse other = (bdchain.api.grpc.ClientVersionResponse) obj;
boolean result = true;
result = result && getVersion()
.equals(other.getVersion());
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) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static bdchain.api.grpc.ClientVersionResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static bdchain.api.grpc.ClientVersionResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static bdchain.api.grpc.ClientVersionResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static bdchain.api.grpc.ClientVersionResponse 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.ClientVersionResponse 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.ClientVersionResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:bdchain.api.ClientVersionResponse)
bdchain.api.grpc.ClientVersionResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
bdchain.api.grpc.ClientVersionResponse.class, bdchain.api.grpc.ClientVersionResponse.Builder.class);
}
// Construct using bdchain.api.grpc.ClientVersionResponse.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();
version_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return bdchain.api.grpc.CommonProto.internal_static_bdchain_api_ClientVersionResponse_descriptor;
}
@java.lang.Override
public bdchain.api.grpc.ClientVersionResponse getDefaultInstanceForType() {
return bdchain.api.grpc.ClientVersionResponse.getDefaultInstance();
}
@java.lang.Override
public bdchain.api.grpc.ClientVersionResponse build() {
bdchain.api.grpc.ClientVersionResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public bdchain.api.grpc.ClientVersionResponse buildPartial() {
bdchain.api.grpc.ClientVersionResponse result = new bdchain.api.grpc.ClientVersionResponse(this);
result.version_ = version_;
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.ClientVersionResponse) {
return mergeFrom((bdchain.api.grpc.ClientVersionResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(bdchain.api.grpc.ClientVersionResponse other) {
if (other == bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()) return this;
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
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.ClientVersionResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (bdchain.api.grpc.ClientVersionResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object version_ = "";
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = 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.ClientVersionResponse)
}
// @@protoc_insertion_point(class_scope:bdchain.api.ClientVersionResponse)
private static final bdchain.api.grpc.ClientVersionResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new bdchain.api.grpc.ClientVersionResponse();
}
public static bdchain.api.grpc.ClientVersionResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<ClientVersionResponse>
PARSER = new com.google.protobuf.AbstractParser<ClientVersionResponse>() {
@java.lang.Override
public ClientVersionResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ClientVersionResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<ClientVersionResponse> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<ClientVersionResponse> getParserForType() {
return PARSER;
}
@java.lang.Override
public bdchain.api.grpc.ClientVersionResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}

View File

@ -0,0 +1,27 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/common.proto
package bdchain.api.grpc;
public interface ClientVersionResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.ClientVersionResponse)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
java.lang.String getVersion();
/**
* <pre>
* 节点客户端版本
* </pre>
*
* <code>string version = 1;</code>
*/
com.google.protobuf.ByteString
getVersionBytes();
}

View File

@ -14,6 +14,11 @@ public final class CommonProto {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bdchain_api_ClientVersionResponse_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
@ -23,11 +28,13 @@ public final class CommonProto {
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"
"\n\030bdchain/api/common.proto\022\013bdchain.api\"" +
"(\n\025ClientVersionResponse\022\017\n\007version\030\001 \001(" +
"\t*Z\n\017TransactionType\022\n\n\006RECORD\020\000\022\013\n\007MESS" +
"AGE\020\001\022\025\n\021CONTRACT_CREATION\020\002\022\027\n\023CONTRACT" +
"_INVOCATION\020\003B:\n\020bdchain.api.grpcB\013Commo" +
"nProtoP\001Z\027bdchain/api/grpc/commonb\006proto" +
"3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@ -41,6 +48,12 @@ public final class CommonProto {
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_bdchain_api_ClientVersionResponse_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_bdchain_api_ClientVersionResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bdchain_api_ClientVersionResponse_descriptor,
new java.lang.String[] { "Version", });
}
// @@protoc_insertion_point(outer_class_scope)

View File

@ -0,0 +1,71 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/error_details.proto
package bdchain.api.grpc;
public final class ErrorDetailsProto {
private ErrorDetailsProto() {}
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_InvalidArgument_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bdchain_api_InvalidArgument_fieldAccessorTable;
static final com.google.protobuf.Descriptors.Descriptor
internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor;
static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_bdchain_api_InvalidArgument_FieldViolation_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\037bdchain/api/error_details.proto\022\013bdcha" +
"in.api\"\216\001\n\017InvalidArgument\022E\n\020field_viol" +
"ations\030\001 \003(\0132+.bdchain.api.InvalidArgume" +
"nt.FieldViolation\0324\n\016FieldViolation\022\r\n\005f" +
"ield\030\001 \001(\t\022\023\n\013description\030\002 \001(\tBD\n\020bdcha" +
"in.api.grpcB\021ErrorDetailsProtoP\001Z\033bdchai" +
"n/api/grpc/errdetailsb\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_bdchain_api_InvalidArgument_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_bdchain_api_InvalidArgument_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bdchain_api_InvalidArgument_descriptor,
new java.lang.String[] { "FieldViolations", });
internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor =
internal_static_bdchain_api_InvalidArgument_descriptor.getNestedTypes().get(0);
internal_static_bdchain_api_InvalidArgument_FieldViolation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_bdchain_api_InvalidArgument_FieldViolation_descriptor,
new java.lang.String[] { "Field", "Description", });
}
// @@protoc_insertion_point(outer_class_scope)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: bdchain/api/error_details.proto
package bdchain.api.grpc;
public interface InvalidArgumentOrBuilder extends
// @@protoc_insertion_point(interface_extends:bdchain.api.InvalidArgument)
com.google.protobuf.MessageOrBuilder {
/**
* <pre>
* Describes all violations in a client request.
* </pre>
*
* <code>repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
java.util.List<bdchain.api.grpc.InvalidArgument.FieldViolation>
getFieldViolationsList();
/**
* <pre>
* Describes all violations in a client request.
* </pre>
*
* <code>repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
bdchain.api.grpc.InvalidArgument.FieldViolation getFieldViolations(int index);
/**
* <pre>
* Describes all violations in a client request.
* </pre>
*
* <code>repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
int getFieldViolationsCount();
/**
* <pre>
* Describes all violations in a client request.
* </pre>
*
* <code>repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
java.util.List<? extends bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder>
getFieldViolationsOrBuilderList();
/**
* <pre>
* Describes all violations in a client request.
* </pre>
*
* <code>repeated .bdchain.api.InvalidArgument.FieldViolation field_violations = 1;</code>
*/
bdchain.api.grpc.InvalidArgument.FieldViolationOrBuilder getFieldViolationsOrBuilder(
int index);
}

View File

@ -18,7 +18,7 @@ import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.14.0)",
value = "by gRPC proto compiler (version 1.15.0)",
comments = "Source: bdchain/api/tx_ledger.proto")
public final class TransactionLedgerGrpc {
@ -27,6 +27,38 @@ public final class TransactionLedgerGrpc {
public static final String SERVICE_NAME = "bdchain.api.TransactionLedger";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
bdchain.api.grpc.ClientVersionResponse> getClientVersionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ClientVersion",
requestType = com.google.protobuf.Empty.class,
responseType = bdchain.api.grpc.ClientVersionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
bdchain.api.grpc.ClientVersionResponse> getClientVersionMethod() {
io.grpc.MethodDescriptor<com.google.protobuf.Empty, bdchain.api.grpc.ClientVersionResponse> getClientVersionMethod;
if ((getClientVersionMethod = TransactionLedgerGrpc.getClientVersionMethod) == null) {
synchronized (TransactionLedgerGrpc.class) {
if ((getClientVersionMethod = TransactionLedgerGrpc.getClientVersionMethod) == null) {
TransactionLedgerGrpc.getClientVersionMethod = getClientVersionMethod =
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, bdchain.api.grpc.ClientVersionResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"bdchain.api.TransactionLedger", "ClientVersion"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
bdchain.api.grpc.ClientVersionResponse.getDefaultInstance()))
.setSchemaDescriptor(new TransactionLedgerMethodDescriptorSupplier("ClientVersion"))
.build();
}
}
}
return getClientVersionMethod;
}
private static volatile io.grpc.MethodDescriptor<bdchain.api.grpc.CreateLedgerRequest,
bdchain.api.grpc.CreateLedgerResponse> getCreateLedgerMethod;
@ -150,6 +182,13 @@ public final class TransactionLedgerGrpc {
*/
public static abstract class TransactionLedgerImplBase implements io.grpc.BindableService {
/**
*/
public void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.ClientVersionResponse> responseObserver) {
asyncUnimplementedUnaryCall(getClientVersionMethod(), responseObserver);
}
/**
*/
public void createLedger(bdchain.api.grpc.CreateLedgerRequest request,
@ -173,6 +212,13 @@ public final class TransactionLedgerGrpc {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getClientVersionMethod(),
asyncUnaryCall(
new MethodHandlers<
com.google.protobuf.Empty,
bdchain.api.grpc.ClientVersionResponse>(
this, METHODID_CLIENT_VERSION)))
.addMethod(
getCreateLedgerMethod(),
asyncUnaryCall(
@ -216,6 +262,14 @@ public final class TransactionLedgerGrpc {
return new TransactionLedgerStub(channel, callOptions);
}
/**
*/
public void clientVersion(com.google.protobuf.Empty request,
io.grpc.stub.StreamObserver<bdchain.api.grpc.ClientVersionResponse> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public void createLedger(bdchain.api.grpc.CreateLedgerRequest request,
@ -259,6 +313,13 @@ public final class TransactionLedgerGrpc {
return new TransactionLedgerBlockingStub(channel, callOptions);
}
/**
*/
public bdchain.api.grpc.ClientVersionResponse clientVersion(com.google.protobuf.Empty request) {
return blockingUnaryCall(
getChannel(), getClientVersionMethod(), getCallOptions(), request);
}
/**
*/
public bdchain.api.grpc.CreateLedgerResponse createLedger(bdchain.api.grpc.CreateLedgerRequest request) {
@ -299,6 +360,14 @@ public final class TransactionLedgerGrpc {
return new TransactionLedgerFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.ClientVersionResponse> clientVersion(
com.google.protobuf.Empty request) {
return futureUnaryCall(
getChannel().newCall(getClientVersionMethod(), getCallOptions()), request);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture<bdchain.api.grpc.CreateLedgerResponse> createLedger(
@ -324,9 +393,10 @@ public final class TransactionLedgerGrpc {
}
}
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 int METHODID_CLIENT_VERSION = 0;
private static final int METHODID_CREATE_LEDGER = 1;
private static final int METHODID_GET_LEDGERS = 2;
private static final int METHODID_SEND_TRANSACTION = 3;
private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
@ -345,6 +415,10 @@ public final class TransactionLedgerGrpc {
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
switch (methodId) {
case METHODID_CLIENT_VERSION:
serviceImpl.clientVersion((com.google.protobuf.Empty) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.ClientVersionResponse>) responseObserver);
break;
case METHODID_CREATE_LEDGER:
serviceImpl.createLedger((bdchain.api.grpc.CreateLedgerRequest) request,
(io.grpc.stub.StreamObserver<bdchain.api.grpc.CreateLedgerResponse>) responseObserver);
@ -418,6 +492,7 @@ public final class TransactionLedgerGrpc {
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new TransactionLedgerFileDescriptorSupplier())
.addMethod(getClientVersionMethod())
.addMethod(getCreateLedgerMethod())
.addMethod(getGetLedgersMethod())
.addMethod(getSendTransactionMethod())

View File

@ -64,16 +64,18 @@ public final class TransactionLedgerProto {
"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"
"Response\022\014\n\004hash\030\001 \001(\0142\332\002\n\021TransactionLe" +
"dger\022K\n\rClientVersion\022\026.google.protobuf." +
"Empty\032\".bdchain.api.ClientVersionRespons" +
"e\022S\n\014CreateLedger\022 .bdchain.api.CreateLe" +
"dgerRequest\032!.bdchain.api.CreateLedgerRe" +
"sponse\022E\n\nGetLedgers\022\026.google.protobuf.E" +
"mpty\032\037.bdchain.api.GetLedgersResponse\022\\\n" +
"\017SendTransaction\022#.bdchain.api.SendTrans" +
"actionRequest\032$.bdchain.api.SendTransact" +
"ionResponseBG\n\020bdchain.api.grpcB\026Transac" +
"tionLedgerProtoP\001Z\031bdchain/api/grpc/txle" +
"dgerb\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {