public class SynchronousInvoicesAPI extends SynchronousAPI
channel, DEFAULT_MAX_INBOUND_MESSAGE_SIZE, log, performValidation, statusExceptionWrapper, wrapperFactory
Constructor and Description |
---|
SynchronousInvoicesAPI(io.grpc.ManagedChannel channel)
Constructor used for setting up a connection using a GRPC managed channel that
can be customized.
|
SynchronousInvoicesAPI(java.lang.String host,
int port,
java.io.File trustedServerCertificate,
java.io.File macaroonFile)
Minimal constructor for setting up a connection with LND Application.
|
SynchronousInvoicesAPI(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 |
---|---|
AddHoldInvoiceResp |
addHoldInvoice(AddHoldInvoiceRequest request)
Method to send a addHoldInvoice request.
|
AddHoldInvoiceResp |
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)
Method to generate a addHoldInvoice request.
|
CancelInvoiceResp |
cancelInvoice(byte[] paymentHash)
Method to generate a cancelInvoice request.
|
CancelInvoiceResp |
cancelInvoice(CancelInvoiceMsg request)
Method to send a cancelInvoice request.
|
protected InvoicesGrpc.InvoicesBlockingStub |
getStub() |
Invoice |
lookupInvoiceV2(byte[] paymentHash,
byte[] paymentAddr,
byte[] setId,
LookupModifier lookupModifier)
Method to generate a lookupInvoiceV2 request.
|
Invoice |
lookupInvoiceV2(LookupInvoiceMsg request)
Method to send a lookupInvoiceV2 request.
|
SettleInvoiceResp |
settleInvoice(byte[] preimage)
Method to generate a settleInvoice request.
|
SettleInvoiceResp |
settleInvoice(SettleInvoiceMsg request)
Method to send a settleInvoice request.
|
java.util.Iterator<Invoice> |
subscribeSingleInvoice(byte[] rHash)
Method to generate a subscribeSingleInvoice request.
|
java.util.Iterator<Invoice> |
subscribeSingleInvoice(SubscribeSingleInvoiceRequest request)
Method to send a subscribeSingleInvoice request.
|
processRepeatableResponse, processResponse
close, isPerformValidation, processRequest, setPerformValidation, validate
public SynchronousInvoicesAPI(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 SynchronousInvoicesAPI(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 SynchronousInvoicesAPI(io.grpc.ManagedChannel channel)
channel
- the managed channel to use.public CancelInvoiceResp cancelInvoice(byte[] paymentHash) 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.InvoicesBlockingStub.cancelInvoice(InvoicesOuterClass.CancelInvoiceMsg)
public CancelInvoiceResp cancelInvoice(CancelInvoiceMsg 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.InvoicesGrpc.InvoicesBlockingStub.cancelInvoice(InvoicesOuterClass.CancelInvoiceMsg)
public AddHoldInvoiceResp 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) 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.InvoicesBlockingStub.addHoldInvoice(InvoicesOuterClass.AddHoldInvoiceRequest)
public AddHoldInvoiceResp addHoldInvoice(AddHoldInvoiceRequest 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.InvoicesGrpc.InvoicesBlockingStub.addHoldInvoice(InvoicesOuterClass.AddHoldInvoiceRequest)
public SettleInvoiceResp settleInvoice(byte[] preimage) 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.InvoicesBlockingStub.settleInvoice(InvoicesOuterClass.SettleInvoiceMsg)
public SettleInvoiceResp settleInvoice(SettleInvoiceMsg 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.InvoicesGrpc.InvoicesBlockingStub.settleInvoice(InvoicesOuterClass.SettleInvoiceMsg)
public java.util.Iterator<Invoice> subscribeSingleInvoice(byte[] rHash) 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.InvoicesBlockingStub.subscribeSingleInvoice(InvoicesOuterClass.SubscribeSingleInvoiceRequest)
public java.util.Iterator<Invoice> subscribeSingleInvoice(SubscribeSingleInvoiceRequest 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.InvoicesGrpc.InvoicesBlockingStub.subscribeSingleInvoice(InvoicesOuterClass.SubscribeSingleInvoiceRequest)
public Invoice lookupInvoiceV2(byte[] paymentHash, byte[] paymentAddr, byte[] setId, LookupModifier lookupModifier) 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.InvoicesBlockingStub.lookupInvoiceV2(InvoicesOuterClass.LookupInvoiceMsg)
public Invoice lookupInvoiceV2(LookupInvoiceMsg 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.InvoicesGrpc.InvoicesBlockingStub.lookupInvoiceV2(InvoicesOuterClass.LookupInvoiceMsg)
protected InvoicesGrpc.InvoicesBlockingStub getStub()