Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,37 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetPathElementsResponse> getGetPath
return getGetPathElementsMethod;
}

private static volatile io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse> getGetStatusMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "getStatus",
requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest.class,
responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse> getGetStatusMethod() {
io.grpc.MethodDescriptor<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse> getGetStatusMethod;
if ((getGetStatusMethod = PlatformGrpc.getGetStatusMethod) == null) {
synchronized (PlatformGrpc.class) {
if ((getGetStatusMethod = PlatformGrpc.getGetStatusMethod) == null) {
PlatformGrpc.getGetStatusMethod = getGetStatusMethod =
io.grpc.MethodDescriptor.<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "getStatus"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse.getDefaultInstance()))
.setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getStatus"))
.build();
}
}
}
return getGetStatusMethod;
}

/**
* Creates a new async stub that supports all call types for the service
*/
Expand Down Expand Up @@ -1104,6 +1135,13 @@ public void getPathElements(org.dash.platform.dapi.v0.PlatformOuterClass.GetPath
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPathElementsMethod(), responseObserver);
}

/**
*/
public void getStatus(org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest request,
io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStatusMethod(), responseObserver);
}

@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
Expand Down Expand Up @@ -1295,6 +1333,13 @@ public void getPathElements(org.dash.platform.dapi.v0.PlatformOuterClass.GetPath
org.dash.platform.dapi.v0.PlatformOuterClass.GetPathElementsRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetPathElementsResponse>(
this, METHODID_GET_PATH_ELEMENTS)))
.addMethod(
getGetStatusMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest,
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse>(
this, METHODID_GET_STATUS)))
.build();
}
}
Expand Down Expand Up @@ -1543,6 +1588,14 @@ public void getPathElements(org.dash.platform.dapi.v0.PlatformOuterClass.GetPath
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetPathElementsMethod(), getCallOptions()), request, responseObserver);
}

/**
*/
public void getStatus(org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest request,
io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetStatusMethod(), getCallOptions()), request, responseObserver);
}
}

/**
Expand Down Expand Up @@ -1762,6 +1815,13 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetPathElementsResponse getP
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetPathElementsMethod(), getCallOptions(), request);
}

/**
*/
public org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse getStatus(org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetStatusMethod(), getCallOptions(), request);
}
}

/**
Expand Down Expand Up @@ -2008,6 +2068,14 @@ public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetPathElementsMethod(), getCallOptions()), request);
}

/**
*/
public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse> getStatus(
org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetStatusMethod(), getCallOptions()), request);
}
}

private static final int METHODID_BROADCAST_STATE_TRANSITION = 0;
Expand Down Expand Up @@ -2037,6 +2105,7 @@ public com.google.common.util.concurrent.ListenableFuture<org.dash.platform.dapi
private static final int METHODID_GET_PREFUNDED_SPECIALIZED_BALANCE = 24;
private static final int METHODID_GET_TOTAL_CREDITS_IN_PLATFORM = 25;
private static final int METHODID_GET_PATH_ELEMENTS = 26;
private static final int METHODID_GET_STATUS = 27;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -2163,6 +2232,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.getPathElements((org.dash.platform.dapi.v0.PlatformOuterClass.GetPathElementsRequest) request,
(io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetPathElementsResponse>) responseObserver);
break;
case METHODID_GET_STATUS:
serviceImpl.getStatus((org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusRequest) request,
(io.grpc.stub.StreamObserver<org.dash.platform.dapi.v0.PlatformOuterClass.GetStatusResponse>) responseObserver);
break;
default:
throw new AssertionError();
}
Expand Down Expand Up @@ -2251,6 +2324,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getGetPrefundedSpecializedBalanceMethod())
.addMethod(getGetTotalCreditsInPlatformMethod())
.addMethod(getGetPathElementsMethod())
.addMethod(getGetStatusMethod())
.build();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ const {
GetIdentityKeysResponse: PBJSGetIdentityKeysResponse,
GetTotalCreditsInPlatformRequest: PBJSGetTotalCreditsInPlatformRequest,
GetTotalCreditsInPlatformResponse: PBJSGetTotalCreditsInPlatformResponse,
GetStatusRequest: PBJSGetStatusRequest,
GetStatusResponse: PBJSGetStatusResponse,
},
},
},
Expand All @@ -85,6 +87,7 @@ const {
GetIdentityNonceResponse: ProtocGetIdentityNonceResponse,
GetIdentityKeysResponse: ProtocGetIdentityKeysResponse,
GetTotalCreditsInPlatformResponse: ProtocGetTotalCreditsInPlatformResponse,
GetStatusResponse: ProtocGetStatusResponse,
} = require('./platform_protoc');

const getPlatformDefinition = require('../../../../lib/getPlatformDefinition');
Expand Down Expand Up @@ -179,6 +182,10 @@ class PlatformPromiseClient {
this.client.getTotalCreditsInPlatform.bind(this.client),
);

this.client.getStatus = promisify(
this.client.getStatus.bind(this.client),
);

this.protocolVersion = undefined;
}

Expand Down Expand Up @@ -726,6 +733,35 @@ class PlatformPromiseClient {
);
}

getStatus(
getStatusRequest,
metadata = {},
options = {},
) {
if (!isObject(metadata)) {
throw new Error('metadata must be an object');
}

return this.client.getStatus(
getStatusRequest,
convertObjectToMetadata(metadata),
{
interceptors: [
jsonToProtobufInterceptorFactory(
jsonToProtobufFactory(
ProtocGetStatusResponse,
PBJSGetStatusResponse,
),
protobufToJsonFactory(
PBJSGetStatusRequest,
),
),
],
...options,
},
);
}

/**
* @param {string} protocolVersion
*/
Expand Down
Loading