Package net.osslabz.lnd.api
Class InvoicesApi
java.lang.Object
net.osslabz.lnd.api.InvoicesApi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAddHoldInvoice creates a hold invoice.okhttp3.CalladdHoldInvoiceAsync(InvoicesrpcAddHoldInvoiceRequest body, ApiCallback<InvoicesrpcAddHoldInvoiceResp> _callback) AddHoldInvoice creates a hold invoice.okhttp3.CalladdHoldInvoiceCall(InvoicesrpcAddHoldInvoiceRequest body, ApiCallback _callback) Build call for addHoldInvoiceAddHoldInvoice creates a hold invoice.CancelInvoice cancels a currently open invoice.okhttp3.CallcancelInvoiceAsync(InvoicesrpcCancelInvoiceMsg body, ApiCallback<Object> _callback) CancelInvoice cancels a currently open invoice.okhttp3.CallcancelInvoiceCall(InvoicesrpcCancelInvoiceMsg body, ApiCallback _callback) Build call for cancelInvoiceCancelInvoice cancels a currently open invoice.intlookupInvoiceV2(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier) LookupInvoiceV2 attempts to look up at invoice.okhttp3.CalllookupInvoiceV2Async(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier, ApiCallback<LnrpcInvoice> _callback) LookupInvoiceV2 attempts to look up at invoice.okhttp3.CalllookupInvoiceV2Call(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier, ApiCallback _callback) Build call for lookupInvoiceV2lookupInvoiceV2WithHttpInfo(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier) LookupInvoiceV2 attempts to look up at invoice.voidsetApiClient(ApiClient apiClient) voidsetCustomBaseUrl(String customBaseUrl) voidsetHostIndex(int hostIndex) SettleInvoice settles an accepted invoice.okhttp3.CallsettleInvoiceAsync(InvoicesrpcSettleInvoiceMsg body, ApiCallback<Object> _callback) SettleInvoice settles an accepted invoice.okhttp3.CallsettleInvoiceCall(InvoicesrpcSettleInvoiceMsg body, ApiCallback _callback) Build call for settleInvoiceSettleInvoice settles an accepted invoice.subscribeSingleInvoice(byte[] rHash) SubscribeSingleInvoice returns a uni-directional stream (server -> client) to notify the client of state transitions of the specified invoice.okhttp3.CallsubscribeSingleInvoiceAsync(byte[] rHash, ApiCallback<StreamResultOfLnrpcInvoice> _callback) SubscribeSingleInvoice returns a uni-directional stream (server -> client) to notify the client of state transitions of the specified invoice.okhttp3.CallsubscribeSingleInvoiceCall(byte[] rHash, ApiCallback _callback) Build call for subscribeSingleInvoicesubscribeSingleInvoiceWithHttpInfo(byte[] rHash) SubscribeSingleInvoice returns a uni-directional stream (server -> client) to notify the client of state transitions of the specified invoice.
-
Constructor Details
-
InvoicesApi
public InvoicesApi() -
InvoicesApi
-
-
Method Details
-
getApiClient
-
setApiClient
-
getHostIndex
public int getHostIndex() -
setHostIndex
public void setHostIndex(int hostIndex) -
getCustomBaseUrl
-
setCustomBaseUrl
-
addHoldInvoiceCall
public okhttp3.Call addHoldInvoiceCall(InvoicesrpcAddHoldInvoiceRequest body, ApiCallback _callback) throws ApiException Build call for addHoldInvoice- Parameters:
body- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
addHoldInvoice
public InvoicesrpcAddHoldInvoiceResp addHoldInvoice(InvoicesrpcAddHoldInvoiceRequest body) throws ApiException AddHoldInvoice creates a hold invoice. It ties the invoice to the hash supplied in the request.- Parameters:
body- (required)- Returns:
- InvoicesrpcAddHoldInvoiceResp
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
addHoldInvoiceWithHttpInfo
public ApiResponse<InvoicesrpcAddHoldInvoiceResp> addHoldInvoiceWithHttpInfo(InvoicesrpcAddHoldInvoiceRequest body) throws ApiException AddHoldInvoice creates a hold invoice. It ties the invoice to the hash supplied in the request.- Parameters:
body- (required)- Returns:
- ApiResponse<InvoicesrpcAddHoldInvoiceResp>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
addHoldInvoiceAsync
public okhttp3.Call addHoldInvoiceAsync(InvoicesrpcAddHoldInvoiceRequest body, ApiCallback<InvoicesrpcAddHoldInvoiceResp> _callback) throws ApiException AddHoldInvoice creates a hold invoice. It ties the invoice to the hash supplied in the request. (asynchronously)- Parameters:
body- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
cancelInvoiceCall
public okhttp3.Call cancelInvoiceCall(InvoicesrpcCancelInvoiceMsg body, ApiCallback _callback) throws ApiException Build call for cancelInvoice- Parameters:
body- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
cancelInvoice
CancelInvoice cancels a currently open invoice. If the invoice is already canceled, this call will succeed. If the invoice is already settled, it will fail.- Parameters:
body- (required)- Returns:
- Object
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
cancelInvoiceWithHttpInfo
public ApiResponse<Object> cancelInvoiceWithHttpInfo(InvoicesrpcCancelInvoiceMsg body) throws ApiException CancelInvoice cancels a currently open invoice. If the invoice is already canceled, this call will succeed. If the invoice is already settled, it will fail.- Parameters:
body- (required)- Returns:
- ApiResponse<Object>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
cancelInvoiceAsync
public okhttp3.Call cancelInvoiceAsync(InvoicesrpcCancelInvoiceMsg body, ApiCallback<Object> _callback) throws ApiException CancelInvoice cancels a currently open invoice. If the invoice is already canceled, this call will succeed. If the invoice is already settled, it will fail. (asynchronously)- Parameters:
body- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
lookupInvoiceV2Call
public okhttp3.Call lookupInvoiceV2Call(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier, ApiCallback _callback) throws ApiException Build call for lookupInvoiceV2- Parameters:
paymentHash- When using REST, this field must be encoded as base64. (optional)paymentAddr- (optional)setId- (optional)lookupModifier- - DEFAULT: The default look up modifier, no look up behavior is changed. - HTLC_SET_ONLY: Indicates that when a look up is done based on a set_id, then only that set of HTLCs related to that set ID should be returned. - HTLC_SET_BLANK: Indicates that when a look up is done using a payment_addr, then no HTLCs related to the payment_addr should be returned. This is useful when one wants to be able to obtain the set of associated setIDs with a given invoice, then look up the sub-invoices \"projected\" by that set ID. (optional, default to DEFAULT)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
lookupInvoiceV2
public LnrpcInvoice lookupInvoiceV2(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier) throws ApiException LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced using either its payment hash, payment address, or set ID.- Parameters:
paymentHash- When using REST, this field must be encoded as base64. (optional)paymentAddr- (optional)setId- (optional)lookupModifier- - DEFAULT: The default look up modifier, no look up behavior is changed. - HTLC_SET_ONLY: Indicates that when a look up is done based on a set_id, then only that set of HTLCs related to that set ID should be returned. - HTLC_SET_BLANK: Indicates that when a look up is done using a payment_addr, then no HTLCs related to the payment_addr should be returned. This is useful when one wants to be able to obtain the set of associated setIDs with a given invoice, then look up the sub-invoices \"projected\" by that set ID. (optional, default to DEFAULT)- Returns:
- LnrpcInvoice
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
lookupInvoiceV2WithHttpInfo
public ApiResponse<LnrpcInvoice> lookupInvoiceV2WithHttpInfo(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier) throws ApiException LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced using either its payment hash, payment address, or set ID.- Parameters:
paymentHash- When using REST, this field must be encoded as base64. (optional)paymentAddr- (optional)setId- (optional)lookupModifier- - DEFAULT: The default look up modifier, no look up behavior is changed. - HTLC_SET_ONLY: Indicates that when a look up is done based on a set_id, then only that set of HTLCs related to that set ID should be returned. - HTLC_SET_BLANK: Indicates that when a look up is done using a payment_addr, then no HTLCs related to the payment_addr should be returned. This is useful when one wants to be able to obtain the set of associated setIDs with a given invoice, then look up the sub-invoices \"projected\" by that set ID. (optional, default to DEFAULT)- Returns:
- ApiResponse<LnrpcInvoice>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
lookupInvoiceV2Async
public okhttp3.Call lookupInvoiceV2Async(byte[] paymentHash, byte[] paymentAddr, byte[] setId, String lookupModifier, ApiCallback<LnrpcInvoice> _callback) throws ApiException LookupInvoiceV2 attempts to look up at invoice. An invoice can be refrenced using either its payment hash, payment address, or set ID. (asynchronously)- Parameters:
paymentHash- When using REST, this field must be encoded as base64. (optional)paymentAddr- (optional)setId- (optional)lookupModifier- - DEFAULT: The default look up modifier, no look up behavior is changed. - HTLC_SET_ONLY: Indicates that when a look up is done based on a set_id, then only that set of HTLCs related to that set ID should be returned. - HTLC_SET_BLANK: Indicates that when a look up is done using a payment_addr, then no HTLCs related to the payment_addr should be returned. This is useful when one wants to be able to obtain the set of associated setIDs with a given invoice, then look up the sub-invoices \"projected\" by that set ID. (optional, default to DEFAULT)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
settleInvoiceCall
public okhttp3.Call settleInvoiceCall(InvoicesrpcSettleInvoiceMsg body, ApiCallback _callback) throws ApiException Build call for settleInvoice- Parameters:
body- (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
settleInvoice
SettleInvoice settles an accepted invoice. If the invoice is already settled, this call will succeed.- Parameters:
body- (required)- Returns:
- Object
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
settleInvoiceWithHttpInfo
public ApiResponse<Object> settleInvoiceWithHttpInfo(InvoicesrpcSettleInvoiceMsg body) throws ApiException SettleInvoice settles an accepted invoice. If the invoice is already settled, this call will succeed.- Parameters:
body- (required)- Returns:
- ApiResponse<Object>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
settleInvoiceAsync
public okhttp3.Call settleInvoiceAsync(InvoicesrpcSettleInvoiceMsg body, ApiCallback<Object> _callback) throws ApiException SettleInvoice settles an accepted invoice. If the invoice is already settled, this call will succeed. (asynchronously)- Parameters:
body- (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-
subscribeSingleInvoiceCall
public okhttp3.Call subscribeSingleInvoiceCall(byte[] rHash, ApiCallback _callback) throws ApiException Build call for subscribeSingleInvoice- Parameters:
rHash- Hash corresponding to the (hold) invoice to subscribe to. When using REST, this field must be encoded as base64url. (required)_callback- Callback for upload/download progress- Returns:
- Call to execute
- Throws:
ApiException- If fail to serialize the request body object
-
subscribeSingleInvoice
SubscribeSingleInvoice returns a uni-directional stream (server -> client) to notify the client of state transitions of the specified invoice. Initially the current invoice state is always sent out.- Parameters:
rHash- Hash corresponding to the (hold) invoice to subscribe to. When using REST, this field must be encoded as base64url. (required)- Returns:
- StreamResultOfLnrpcInvoice
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
subscribeSingleInvoiceWithHttpInfo
public ApiResponse<StreamResultOfLnrpcInvoice> subscribeSingleInvoiceWithHttpInfo(byte[] rHash) throws ApiException SubscribeSingleInvoice returns a uni-directional stream (server -> client) to notify the client of state transitions of the specified invoice. Initially the current invoice state is always sent out.- Parameters:
rHash- Hash corresponding to the (hold) invoice to subscribe to. When using REST, this field must be encoded as base64url. (required)- Returns:
- ApiResponse<StreamResultOfLnrpcInvoice>
- Throws:
ApiException- If fail to call the API, e.g. server error or cannot deserialize the response body
-
subscribeSingleInvoiceAsync
public okhttp3.Call subscribeSingleInvoiceAsync(byte[] rHash, ApiCallback<StreamResultOfLnrpcInvoice> _callback) throws ApiException SubscribeSingleInvoice returns a uni-directional stream (server -> client) to notify the client of state transitions of the specified invoice. Initially the current invoice state is always sent out. (asynchronously)- Parameters:
rHash- Hash corresponding to the (hold) invoice to subscribe to. When using REST, this field must be encoded as base64url. (required)_callback- The callback to be executed when the API call finishes- Returns:
- The request call
- Throws:
ApiException- If fail to process the API call, e.g. serializing the request body object
-