Packages

trait EclairApi extends AnyRef

This trait defines methods to interact with the Eclair lightning node via its API.

See also

https://acinq.github.io/eclair/

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EclairApi
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def allChannels(): Future[Vector[ChannelDesc]]
  2. abstract def allNodes(): Future[Vector[NodeInfo]]
  3. abstract def allUpdates(nodeId: NodeId): Future[Vector[ChannelUpdate]]
  4. abstract def allUpdates(): Future[Vector[ChannelUpdate]]
  5. abstract def audit(from: Option[Instant], to: Option[Instant]): Future[AuditResult]

    List all sent/received/relayed payments in the given interval

    List all sent/received/relayed payments in the given interval

    from

    start timestamp

    to

    end timestamp

  6. abstract def audit(): Future[AuditResult]

    List all sent/received/relayed payments

  7. abstract def channel(id: ChannelId): Future[ChannelResult]
  8. abstract def channelStats(): Future[Vector[ChannelStats]]
  9. abstract def channels(nodeId: NodeId): Future[Vector[ChannelInfo]]
  10. abstract def close(id: ChannelId, spk: ScriptPubKey): Future[ChannelCommandResult]
  11. abstract def connect(nodeId: NodeId): Future[Unit]
  12. abstract def connect(nodeId: NodeId, addr: InetSocketAddress): Future[Unit]
  13. abstract def connect(nodeId: NodeId, host: String, port: Int): Future[Unit]
  14. abstract def connect(nodeURI: NodeUri): Future[Unit]
  15. abstract def connectToWebSocket(eventHandler: (WebSocketEvent) => Unit): Future[Unit]

    Connects to the Eclair web socket end point and passes WebSocketEvents to the given eventHandler

  16. abstract def createInvoice(description: String, amountMsat: Option[MilliSatoshis], expireIn: Option[FiniteDuration], fallbackAddress: Option[Address], paymentPreimage: Option[PaymentPreimage]): Future[LnInvoice]
  17. abstract def createInvoice(description: String, amountMsat: MilliSatoshis, expireIn: FiniteDuration, paymentPreimage: PaymentPreimage): Future[LnInvoice]
  18. abstract def createInvoice(description: String, amountMsat: MilliSatoshis, paymentPreimage: PaymentPreimage): Future[LnInvoice]
  19. abstract def createInvoice(description: String, amountMsat: MilliSatoshis, expireIn: FiniteDuration): Future[LnInvoice]
  20. abstract def createInvoice(description: String, amountMsat: MilliSatoshis): Future[LnInvoice]
  21. abstract def createInvoice(description: String): Future[LnInvoice]
  22. abstract def disconnect(nodeId: NodeId): Future[Unit]
  23. implicit abstract def executionContext: ExecutionContext
  24. abstract def findRoute(invoice: LnInvoice, amountMsat: MilliSatoshis): Future[Vector[Route]]
  25. abstract def findRoute(invoice: LnInvoice): Future[Vector[Route]]
  26. abstract def findRoute(nodeId: NodeId, amountMsat: MilliSatoshis): Future[Vector[Route]]
  27. abstract def forceClose(shortChannelId: ShortChannelId): Future[ChannelCommandResult]
  28. abstract def forceClose(channelId: ChannelId): Future[ChannelCommandResult]
  29. abstract def getInfo: Future[GetInfoResult]
  30. abstract def getInvoice(paymentHash: Sha256Digest): Future[LnInvoice]
  31. abstract def getNewAddress(): Future[BitcoinAddress]
  32. abstract def getNodeURI: Future[NodeUri]
  33. abstract def getPeers: Future[Vector[PeerInfo]]
  34. abstract def getReceivedInfo(invoice: LnInvoice): Future[Option[IncomingPayment]]
  35. abstract def getReceivedInfo(paymentHash: Sha256Digest): Future[Option[IncomingPayment]]
  36. abstract def getSentInfo(id: PaymentId): Future[Vector[OutgoingPayment]]
  37. abstract def getSentInfo(paymentHash: Sha256Digest): Future[Vector[OutgoingPayment]]
  38. abstract def isConnected(nodeId: NodeId): Future[Boolean]
  39. abstract def listInvoices(from: Option[Instant], to: Option[Instant]): Future[Vector[LnInvoice]]
  40. abstract def listPendingInvoices(from: Option[Instant], to: Option[Instant]): Future[Vector[LnInvoice]]
  41. abstract def monitorInvoice(lnInvoice: LnInvoice, interval: FiniteDuration, maxAttempts: Int): Future[IncomingPayment]

    Returns a future that is completed when this invoice has been paid too.

    Returns a future that is completed when this invoice has been paid too. This also publishes the received payment result to the event bush when the payment is received

    lnInvoice

    the invoice to monitor

    maxAttempts

    the number of attempts we ping eclair until we fail the returned future. Pinging occurrs every 1 second

  42. abstract def monitorSentPayment(paymentId: PaymentId, interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]

    Pings eclair to see if a invoice has been paid and returns PaymentResult

    Pings eclair to see if a invoice has been paid and returns PaymentResult

    paymentId

    the payment id returnned by payInvoice

    interval

    the ping interval

    maxAttempts

    the maximum number of pings

  43. abstract def network: LnParams

    The network that this EclairApi is running on.

    The network that this EclairApi is running on. This is not available directly from the eclair api, but is a very useful helper method

  44. abstract def networkFees(from: Option[FiniteDuration], to: Option[FiniteDuration]): Future[Vector[NetworkFeesResult]]
  45. abstract def onChainBalance(): Future[OnChainBalance]
  46. abstract def onChainTransactions(count: Int, skip: Int): Future[Vector[WalletTransaction]]
  47. abstract def open(nodeId: NodeId, funding: CurrencyUnit, pushMsat: Option[MilliSatoshis], feerateSatPerByte: Option[SatoshisPerByte], channelFlags: Option[Byte], openTimeout: Option[FiniteDuration]): Future[FundedChannelId]
  48. abstract def parseInvoice(invoice: LnInvoice): Future[InvoiceResult]
  49. abstract def payInvoice(invoice: LnInvoice, amountMsat: Option[MilliSatoshis], maxAttempts: Option[Int], feeThresholdSat: Option[Satoshis], maxFeePct: Option[Int], externalId: Option[String]): Future[PaymentId]
  50. abstract def payInvoice(invoice: LnInvoice, amount: MilliSatoshis, externalId: Option[String]): Future[PaymentId]
  51. abstract def payInvoice(invoice: LnInvoice, externalId: Option[String]): Future[PaymentId]
  52. abstract def payInvoice(invoice: LnInvoice, amount: MilliSatoshis): Future[PaymentId]
  53. abstract def payInvoice(invoice: LnInvoice): Future[PaymentId]
  54. abstract def sendOnChain(address: BitcoinAddress, amount: Satoshis, confirmationTarget: Int): Future[DoubleSha256DigestBE]
  55. abstract def sendToNode(nodeId: NodeId, amountMsat: MilliSatoshis, maxAttempts: Option[Int], feeThresholdSat: Option[Satoshis], maxFeePct: Option[Int], externalId: Option[String]): Future[PaymentId]
  56. abstract def sendToRoute(invoice: LnInvoice, route: Route, amountMsat: MilliSatoshis, paymentHash: Sha256Digest, finalCltvExpiry: Long, recipientAmountMsat: Option[MilliSatoshis], parentId: Option[PaymentId], externalId: Option[String]): Future[SendToRouteResult]

    Documented by not implemented in Eclair

  57. abstract def updateRelayFee(nodeIds: Vector[NodeId], feeBaseMsat: MilliSatoshis, feePropertionalMillionths: Long): Future[UpdateRelayFeeResult]
  58. abstract def updateRelayFee(nodeId: NodeId, feeBaseMsat: MilliSatoshis, feeProportionalMillionths: Long): Future[UpdateRelayFeeResult]
  59. abstract def usableBalances(): Future[Vector[UsableBalancesResult]]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def allUpdates(nodeIdOpt: Option[NodeId] = None): Future[Vector[ChannelUpdate]]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def nodeId(): Future[NodeId]
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def payAndMonitorInvoice(invoice: LnInvoice, amount: MilliSatoshis, externalId: Option[String], interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
  18. def payAndMonitorInvoice(invoice: LnInvoice, externalId: Option[String], interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped