public class AsynchronousInvoicesAPI extends AsynchronousAPI
channel, DEFAULT_MAX_INBOUND_MESSAGE_SIZE, log, performValidation, statusExceptionWrapper, wrapperFactory
Constructor and Description |
---|
AsynchronousInvoicesAPI(io.grpc.ManagedChannel channel)
Constructor used for setting up a connection using a GRPC managed channel that
can be customized.
|
AsynchronousInvoicesAPI(java.lang.String host,
int port,
java.io.File trustedServerCertificate,
java.io.File macaroonFile)
Minimal constructor for setting up a connection with LND Application.
|
AsynchronousInvoicesAPI(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 |
---|---|
void |
addHoldInvoice(AddHoldInvoiceRequest request,
io.grpc.stub.StreamObserver<AddHoldInvoiceResp> responseObserver)
Method to send a addHoldInvoice request.
|
void |
addHoldInvoice(java.lang.String memo,
byte[] hash,
java.lang.Long value,
java.lang.Long valueMsat,
byte[] descriptionHash,
java.lang.Long expiry,
java.lang.String fallbackAddr,
java.lang.Long cltvExpiry,
java.util.List<RouteHint> routeHints,
java.lang.Boolean priv,
io.grpc.stub.StreamObserver<AddHoldInvoiceResp> responseObserver)
Method to generate a addHoldInvoice request.
|
void |
cancelInvoice(byte[] paymentHash,
io.grpc.stub.StreamObserver<CancelInvoiceResp> responseObserver)
Method to generate a cancelInvoice request.
|
void |
cancelInvoice(CancelInvoiceMsg request,
io.grpc.stub.StreamObserver<CancelInvoiceResp> responseObserver)
Method to send a cancelInvoice request.
|
protected InvoicesGrpc.InvoicesStub |
getStub() |
void |
lookupInvoiceV2(byte[] paymentHash,
byte[] paymentAddr,
byte[] setId,
LookupModifier lookupModifier,
io.grpc.stub.StreamObserver<Invoice> responseObserver)
Method to generate a lookupInvoiceV2 request.
|
void |
lookupInvoiceV2(LookupInvoiceMsg request,
io.grpc.stub.StreamObserver<Invoice> responseObserver)
Method to send a lookupInvoiceV2 request.
|
void |
settleInvoice(byte[] preimage,
io.grpc.stub.StreamObserver<SettleInvoiceResp> responseObserver)
Method to generate a settleInvoice request.
|
void |
settleInvoice(SettleInvoiceMsg request,
io.grpc.stub.StreamObserver<SettleInvoiceResp> responseObserver)
Method to send a settleInvoice request.
|
void |
subscribeSingleInvoice(byte[] rHash,
io.grpc.stub.StreamObserver<Invoice> responseObserver)
Method to generate a subscribeSingleInvoice request.
|
void |
subscribeSingleInvoice(SubscribeSingleInvoiceRequest request,
io.grpc.stub.StreamObserver<Invoice> responseObserver)
Method to send a subscribeSingleInvoice request.
|
processResponse
close, isPerformValidation, processRequest, setPerformValidation, validate
public AsynchronousInvoicesAPI(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 AsynchronousInvoicesAPI(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 AsynchronousInvoicesAPI(io.grpc.ManagedChannel channel)
channel
- the managed channel to use.public void cancelInvoice(byte[] paymentHash, io.grpc.stub.StreamObserver<CancelInvoiceResp> responseObserver) 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.InvoicesGrpc.InvoicesStub.cancelInvoice(InvoicesOuterClass.CancelInvoiceMsg, io.grpc.stub.StreamObserver)
public void cancelInvoice(CancelInvoiceMsg request, io.grpc.stub.StreamObserver<CancelInvoiceResp> responseObserver) 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.InvoicesGrpc.InvoicesStub.cancelInvoice(InvoicesOuterClass.CancelInvoiceMsg,io.grpc.stub.StreamObserver)
public void addHoldInvoice(java.lang.String memo, byte[] hash, java.lang.Long value, java.lang.Long valueMsat, byte[] descriptionHash, java.lang.Long expiry, java.lang.String fallbackAddr, java.lang.Long cltvExpiry, java.util.List<RouteHint> routeHints, java.lang.Boolean priv, io.grpc.stub.StreamObserver<AddHoldInvoiceResp> responseObserver) 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.InvoicesGrpc.InvoicesStub.addHoldInvoice(InvoicesOuterClass.AddHoldInvoiceRequest, io.grpc.stub.StreamObserver)
public void addHoldInvoice(AddHoldInvoiceRequest request, io.grpc.stub.StreamObserver<AddHoldInvoiceResp> responseObserver) 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.InvoicesGrpc.InvoicesStub.addHoldInvoice(InvoicesOuterClass.AddHoldInvoiceRequest,io.grpc.stub.StreamObserver)
public void settleInvoice(byte[] preimage, io.grpc.stub.StreamObserver<SettleInvoiceResp> responseObserver) 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.InvoicesGrpc.InvoicesStub.settleInvoice(InvoicesOuterClass.SettleInvoiceMsg, io.grpc.stub.StreamObserver)
public void settleInvoice(SettleInvoiceMsg request, io.grpc.stub.StreamObserver<SettleInvoiceResp> responseObserver) 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.InvoicesGrpc.InvoicesStub.settleInvoice(InvoicesOuterClass.SettleInvoiceMsg,io.grpc.stub.StreamObserver)
public void subscribeSingleInvoice(byte[] rHash, io.grpc.stub.StreamObserver<Invoice> responseObserver) 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.InvoicesGrpc.InvoicesStub.subscribeSingleInvoice(InvoicesOuterClass.SubscribeSingleInvoiceRequest, io.grpc.stub.StreamObserver)
public void subscribeSingleInvoice(SubscribeSingleInvoiceRequest request, io.grpc.stub.StreamObserver<Invoice> responseObserver) 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.InvoicesGrpc.InvoicesStub.subscribeSingleInvoice(InvoicesOuterClass.SubscribeSingleInvoiceRequest,io.grpc.stub.StreamObserver)
public void lookupInvoiceV2(byte[] paymentHash, byte[] paymentAddr, byte[] setId, LookupModifier lookupModifier, io.grpc.stub.StreamObserver<Invoice> responseObserver) 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.InvoicesGrpc.InvoicesStub.lookupInvoiceV2(InvoicesOuterClass.LookupInvoiceMsg, io.grpc.stub.StreamObserver)
public void lookupInvoiceV2(LookupInvoiceMsg request, io.grpc.stub.StreamObserver<Invoice> responseObserver) 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.InvoicesGrpc.InvoicesStub.lookupInvoiceV2(InvoicesOuterClass.LookupInvoiceMsg,io.grpc.stub.StreamObserver)
protected InvoicesGrpc.InvoicesStub getStub()