neutrinorpc.NeutrinoKit.scala Maven / Gradle / Ivy
The newest version!
// Generated by Pekko gRPC. DO NOT EDIT.
package neutrinorpc
import org.apache.pekko
import pekko.annotation.ApiMayChange
import pekko.grpc.PekkoGrpcGenerated
/**
* NeutrinoKit is a service that can be used to get information about the
* current state of the neutrino instance, fetch blocks and add/remove peers.
*/
@PekkoGrpcGenerated
trait NeutrinoKit {
/**
* Status returns the status of the light client neutrino instance,
* along with height and hash of the best block, and a list of connected
* peers.
*/
def status(in: neutrinorpc.StatusRequest): scala.concurrent.Future[neutrinorpc.StatusResponse]
/**
* AddPeer adds a new peer that has already been connected to the server.
*/
def addPeer(in: neutrinorpc.AddPeerRequest): scala.concurrent.Future[neutrinorpc.AddPeerResponse]
/**
* DisconnectPeer disconnects a peer by target address. Both outbound and
* inbound nodes will be searched for the target node. An error message will
* be returned if the peer was not found.
*/
def disconnectPeer(in: neutrinorpc.DisconnectPeerRequest): scala.concurrent.Future[neutrinorpc.DisconnectPeerResponse]
/**
* IsBanned returns true if the peer is banned, otherwise false.
*/
def isBanned(in: neutrinorpc.IsBannedRequest): scala.concurrent.Future[neutrinorpc.IsBannedResponse]
/**
* GetBlockHeader returns a block header with a particular block hash.
*/
def getBlockHeader(in: neutrinorpc.GetBlockHeaderRequest): scala.concurrent.Future[neutrinorpc.GetBlockHeaderResponse]
/**
* GetBlock returns a block with a particular block hash.
*/
def getBlock(in: neutrinorpc.GetBlockRequest): scala.concurrent.Future[neutrinorpc.GetBlockResponse]
/**
* GetCFilter returns a compact filter from a block.
*/
def getCFilter(in: neutrinorpc.GetCFilterRequest): scala.concurrent.Future[neutrinorpc.GetCFilterResponse]
/**
* Deprecated, use chainrpc.GetBlockHash instead.
* GetBlockHash returns the header hash of a block at a given height.
*/
def getBlockHash(in: neutrinorpc.GetBlockHashRequest): scala.concurrent.Future[neutrinorpc.GetBlockHashResponse]
}
@PekkoGrpcGenerated
object NeutrinoKit extends pekko.grpc.ServiceDescription {
val name = "neutrinorpc.NeutrinoKit"
val descriptor: com.google.protobuf.Descriptors.FileDescriptor =
neutrinorpc.NeutrinoProto.javaDescriptor;
object Serializers {
import pekko.grpc.scaladsl.ScalapbProtobufSerializer
val StatusRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.StatusRequest.messageCompanion)
val AddPeerRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.AddPeerRequest.messageCompanion)
val DisconnectPeerRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.DisconnectPeerRequest.messageCompanion)
val IsBannedRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.IsBannedRequest.messageCompanion)
val GetBlockHeaderRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetBlockHeaderRequest.messageCompanion)
val GetBlockRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetBlockRequest.messageCompanion)
val GetCFilterRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetCFilterRequest.messageCompanion)
val GetBlockHashRequestSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetBlockHashRequest.messageCompanion)
val StatusResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.StatusResponse.messageCompanion)
val AddPeerResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.AddPeerResponse.messageCompanion)
val DisconnectPeerResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.DisconnectPeerResponse.messageCompanion)
val IsBannedResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.IsBannedResponse.messageCompanion)
val GetBlockHeaderResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetBlockHeaderResponse.messageCompanion)
val GetBlockResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetBlockResponse.messageCompanion)
val GetCFilterResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetCFilterResponse.messageCompanion)
val GetBlockHashResponseSerializer = new ScalapbProtobufSerializer(neutrinorpc.GetBlockHashResponse.messageCompanion)
}
@ApiMayChange
@PekkoGrpcGenerated
object MethodDescriptors {
import pekko.grpc.internal.Marshaller
import io.grpc.MethodDescriptor
import Serializers._
val statusDescriptor: MethodDescriptor[neutrinorpc.StatusRequest, neutrinorpc.StatusResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "Status"))
.setRequestMarshaller(new Marshaller(StatusRequestSerializer))
.setResponseMarshaller(new Marshaller(StatusResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val addPeerDescriptor: MethodDescriptor[neutrinorpc.AddPeerRequest, neutrinorpc.AddPeerResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "AddPeer"))
.setRequestMarshaller(new Marshaller(AddPeerRequestSerializer))
.setResponseMarshaller(new Marshaller(AddPeerResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val disconnectPeerDescriptor: MethodDescriptor[neutrinorpc.DisconnectPeerRequest, neutrinorpc.DisconnectPeerResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "DisconnectPeer"))
.setRequestMarshaller(new Marshaller(DisconnectPeerRequestSerializer))
.setResponseMarshaller(new Marshaller(DisconnectPeerResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val isBannedDescriptor: MethodDescriptor[neutrinorpc.IsBannedRequest, neutrinorpc.IsBannedResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "IsBanned"))
.setRequestMarshaller(new Marshaller(IsBannedRequestSerializer))
.setResponseMarshaller(new Marshaller(IsBannedResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val getBlockHeaderDescriptor: MethodDescriptor[neutrinorpc.GetBlockHeaderRequest, neutrinorpc.GetBlockHeaderResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "GetBlockHeader"))
.setRequestMarshaller(new Marshaller(GetBlockHeaderRequestSerializer))
.setResponseMarshaller(new Marshaller(GetBlockHeaderResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val getBlockDescriptor: MethodDescriptor[neutrinorpc.GetBlockRequest, neutrinorpc.GetBlockResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "GetBlock"))
.setRequestMarshaller(new Marshaller(GetBlockRequestSerializer))
.setResponseMarshaller(new Marshaller(GetBlockResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val getCFilterDescriptor: MethodDescriptor[neutrinorpc.GetCFilterRequest, neutrinorpc.GetCFilterResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "GetCFilter"))
.setRequestMarshaller(new Marshaller(GetCFilterRequestSerializer))
.setResponseMarshaller(new Marshaller(GetCFilterResponseSerializer))
.setSampledToLocalTracing(true)
.build()
val getBlockHashDescriptor: MethodDescriptor[neutrinorpc.GetBlockHashRequest, neutrinorpc.GetBlockHashResponse] =
MethodDescriptor.newBuilder()
.setType(
MethodDescriptor.MethodType.UNARY
)
.setFullMethodName(MethodDescriptor.generateFullMethodName("neutrinorpc.NeutrinoKit", "GetBlockHash"))
.setRequestMarshaller(new Marshaller(GetBlockHashRequestSerializer))
.setResponseMarshaller(new Marshaller(GetBlockHashResponseSerializer))
.setSampledToLocalTracing(true)
.build()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy