public class SynchronousNeutrinoAPI extends SynchronousAPI
channel, DEFAULT_MAX_INBOUND_MESSAGE_SIZE, log, performValidation, statusExceptionWrapper, wrapperFactory| Constructor and Description |
|---|
SynchronousNeutrinoAPI(io.grpc.ManagedChannel channel)
Constructor used for setting up a connection using a GRPC managed channel that
can be customized.
|
SynchronousNeutrinoAPI(java.lang.String host,
int port,
java.io.File trustedServerCertificate,
java.io.File macaroonFile)
Minimal constructor for setting up a connection with LND Application.
|
SynchronousNeutrinoAPI(java.lang.String host,
int port,
io.grpc.netty.shaded.io.netty.handler.ssl.SslContext sslContext,
MacaroonContext macaroonContext)
Constructor for setting up a connection with LND Application with more flexible
SSL context parameters.
|
| Modifier and Type | Method and Description |
|---|---|
AddPeerResponse |
addPeer(AddPeerRequest request)
Method to send a addPeer request.
|
AddPeerResponse |
addPeer(java.lang.String peerAddrs)
Method to generate a addPeer request.
|
DisconnectPeerResponse |
disconnectPeer(DisconnectPeerRequest request)
Method to send a disconnectPeer request.
|
DisconnectPeerResponse |
disconnectPeer(java.lang.String peerAddrs)
Method to generate a disconnectPeer request.
|
GetBlockResponse |
getBlock(GetBlockRequest request)
Method to send a getBlock request.
|
GetBlockResponse |
getBlock(java.lang.String hash)
Method to generate a getBlock request.
|
GetBlockHashResponse |
getBlockHash(GetBlockHashRequest request)
Method to send a getBlockHash request.
|
GetBlockHashResponse |
getBlockHash(java.lang.Integer height)
Method to generate a getBlockHash request.
|
GetBlockHeaderResponse |
getBlockHeader(GetBlockHeaderRequest request)
Method to send a getBlockHeader request.
|
GetBlockHeaderResponse |
getBlockHeader(java.lang.String hash)
Method to generate a getBlockHeader request.
|
GetCFilterResponse |
getCFilter(GetCFilterRequest request)
Method to send a getCFilter request.
|
GetCFilterResponse |
getCFilter(java.lang.String hash)
Method to generate a getCFilter request.
|
protected NeutrinoKitGrpc.NeutrinoKitBlockingStub |
getStub() |
IsBannedResponse |
isBanned(IsBannedRequest request)
Method to send a isBanned request.
|
IsBannedResponse |
isBanned(java.lang.String peerAddrs)
Method to generate a isBanned request.
|
StatusResponse |
status()
Method to generate a status request.
|
StatusResponse |
status(StatusRequest request)
Method to send a status request.
|
processRepeatableResponse, processResponseclose, isPerformValidation, processRequest, setPerformValidation, validatepublic SynchronousNeutrinoAPI(java.lang.String host,
int port,
java.io.File trustedServerCertificate,
java.io.File macaroonFile)
throws javax.net.ssl.SSLException,
ClientSideException
host - the hostname of ldn applicationport - the port of the application.trustedServerCertificate - a link of the SSL certificate used by the LND Application.macaroonFile - the file pointing to the macaroon to use, or null if no macaroons are used.javax.net.ssl.SSLException - if problems occurred setting up the SSL Connection.ClientSideException - if problems occurred reading the macaroon file.public SynchronousNeutrinoAPI(java.lang.String host,
int port,
io.grpc.netty.shaded.io.netty.handler.ssl.SslContext sslContext,
MacaroonContext macaroonContext)
host - the hostname of ldn applicationport - the port of the application.sslContext - the SSL Context used when connecting the LND Application.macaroonContext - the macaroon context to use.public SynchronousNeutrinoAPI(io.grpc.ManagedChannel channel)
channel - the managed channel to use.public GetBlockHeaderResponse getBlockHeader(java.lang.String hash) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getBlockHeader(Neutrino.GetBlockHeaderRequest)public GetBlockHeaderResponse getBlockHeader(GetBlockHeaderRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getBlockHeader(Neutrino.GetBlockHeaderRequest)public GetCFilterResponse getCFilter(java.lang.String hash) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getCFilter(Neutrino.GetCFilterRequest)public GetCFilterResponse getCFilter(GetCFilterRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getCFilter(Neutrino.GetCFilterRequest)public GetBlockHashResponse getBlockHash(java.lang.Integer height) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getBlockHash(Neutrino.GetBlockHashRequest)public GetBlockHashResponse getBlockHash(GetBlockHashRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getBlockHash(Neutrino.GetBlockHashRequest)public DisconnectPeerResponse disconnectPeer(java.lang.String peerAddrs) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.disconnectPeer(Neutrino.DisconnectPeerRequest)public DisconnectPeerResponse disconnectPeer(DisconnectPeerRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.disconnectPeer(Neutrino.DisconnectPeerRequest)public AddPeerResponse addPeer(java.lang.String peerAddrs) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.addPeer(Neutrino.AddPeerRequest)public AddPeerResponse addPeer(AddPeerRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.addPeer(Neutrino.AddPeerRequest)public IsBannedResponse isBanned(java.lang.String peerAddrs) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.isBanned(Neutrino.IsBannedRequest)public IsBannedResponse isBanned(IsBannedRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.isBanned(Neutrino.IsBannedRequest)public GetBlockResponse getBlock(java.lang.String hash) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getBlock(Neutrino.GetBlockRequest)public GetBlockResponse getBlock(GetBlockRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.getBlock(Neutrino.GetBlockRequest)public StatusResponse status() throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.status(Neutrino.StatusRequest)public StatusResponse status(StatusRequest request) throws StatusException, ValidationException
StatusException - if problems occurred in underlying GRPC call. Can be of one of three sub exceptions
ValidationException - if validation problems found in request or response data.NeutrinoKitGrpc.NeutrinoKitBlockingStub.status(Neutrino.StatusRequest)protected NeutrinoKitGrpc.NeutrinoKitBlockingStub getStub()