public static final class NeutrinoKitGrpc.NeutrinoKitStub extends io.grpc.stub.AbstractAsyncStub<NeutrinoKitGrpc.NeutrinoKitStub>
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.
Modifier and Type | Method and Description |
---|---|
void |
addPeer(Neutrino.AddPeerRequest request,
io.grpc.stub.StreamObserver<Neutrino.AddPeerResponse> responseObserver)
AddPeer adds a new peer that has already been connected to the server.
|
protected NeutrinoKitGrpc.NeutrinoKitStub |
build(io.grpc.Channel channel,
io.grpc.CallOptions callOptions) |
void |
disconnectPeer(Neutrino.DisconnectPeerRequest request,
io.grpc.stub.StreamObserver<Neutrino.DisconnectPeerResponse> responseObserver)
DisconnectPeer disconnects a peer by target address.
|
void |
getBlock(Neutrino.GetBlockRequest request,
io.grpc.stub.StreamObserver<Neutrino.GetBlockResponse> responseObserver)
GetBlock returns a block with a particular block hash.
|
void |
getBlockHash(Neutrino.GetBlockHashRequest request,
io.grpc.stub.StreamObserver<Neutrino.GetBlockHashResponse> responseObserver)
Deprecated.
|
void |
getBlockHeader(Neutrino.GetBlockHeaderRequest request,
io.grpc.stub.StreamObserver<Neutrino.GetBlockHeaderResponse> responseObserver)
GetBlockHeader returns a block header with a particular block hash.
|
void |
getCFilter(Neutrino.GetCFilterRequest request,
io.grpc.stub.StreamObserver<Neutrino.GetCFilterResponse> responseObserver)
GetCFilter returns a compact filter from a block.
|
void |
isBanned(Neutrino.IsBannedRequest request,
io.grpc.stub.StreamObserver<Neutrino.IsBannedResponse> responseObserver)
IsBanned returns true if the peer is banned, otherwise false.
|
void |
status(Neutrino.StatusRequest request,
io.grpc.stub.StreamObserver<Neutrino.StatusResponse> responseObserver)
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.
|
protected NeutrinoKitGrpc.NeutrinoKitStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
build
in class io.grpc.stub.AbstractStub<NeutrinoKitGrpc.NeutrinoKitStub>
public void status(Neutrino.StatusRequest request, io.grpc.stub.StreamObserver<Neutrino.StatusResponse> responseObserver)
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.
public void addPeer(Neutrino.AddPeerRequest request, io.grpc.stub.StreamObserver<Neutrino.AddPeerResponse> responseObserver)
AddPeer adds a new peer that has already been connected to the server.
public void disconnectPeer(Neutrino.DisconnectPeerRequest request, io.grpc.stub.StreamObserver<Neutrino.DisconnectPeerResponse> responseObserver)
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.
public void isBanned(Neutrino.IsBannedRequest request, io.grpc.stub.StreamObserver<Neutrino.IsBannedResponse> responseObserver)
IsBanned returns true if the peer is banned, otherwise false.
public void getBlockHeader(Neutrino.GetBlockHeaderRequest request, io.grpc.stub.StreamObserver<Neutrino.GetBlockHeaderResponse> responseObserver)
GetBlockHeader returns a block header with a particular block hash.
public void getBlock(Neutrino.GetBlockRequest request, io.grpc.stub.StreamObserver<Neutrino.GetBlockResponse> responseObserver)
GetBlock returns a block with a particular block hash.
public void getCFilter(Neutrino.GetCFilterRequest request, io.grpc.stub.StreamObserver<Neutrino.GetCFilterResponse> responseObserver)
GetCFilter returns a compact filter from a block.
@Deprecated public void getBlockHash(Neutrino.GetBlockHashRequest request, io.grpc.stub.StreamObserver<Neutrino.GetBlockHashResponse> responseObserver)
Deprecated, use chainrpc.GetBlockHash instead. GetBlockHash returns the header hash of a block at a given height.