Class InvoicesApi

java.lang.Object
net.osslabz.lnd.api.InvoicesApi

public class InvoicesApi extends Object
  • Constructor Details

    • InvoicesApi

      public InvoicesApi()
    • InvoicesApi

      public InvoicesApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • getHostIndex

      public int getHostIndex()
    • setHostIndex

      public void setHostIndex(int hostIndex)
    • getCustomBaseUrl

      public String getCustomBaseUrl()
    • setCustomBaseUrl

      public void setCustomBaseUrl(String customBaseUrl)
    • 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

      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

      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

      public Object cancelInvoice(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:
      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

      public Object settleInvoice(InvoicesrpcSettleInvoiceMsg body) throws ApiException
      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

      public StreamResultOfLnrpcInvoice subscribeSingleInvoice(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:
      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