trait EclairApi extends AnyRef
This trait defines methods to interact with the Eclair lightning node via its API.
- See also
- Alphabetic
- By Inheritance
- EclairApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def allChannels(): Future[Vector[ChannelDesc]]
- abstract def allNodes(): Future[Vector[NodeInfo]]
- abstract def allUpdates(nodeId: NodeId): Future[Vector[ChannelUpdate]]
- abstract def allUpdates(): Future[Vector[ChannelUpdate]]
- 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
- abstract def audit(): Future[AuditResult]
List all sent/received/relayed payments
- abstract def channel(id: ChannelId): Future[ChannelResult]
- abstract def channelStats(): Future[Vector[ChannelStats]]
- abstract def channels(nodeId: NodeId): Future[Vector[ChannelInfo]]
- abstract def close(id: ChannelId, spk: ScriptPubKey): Future[ChannelCommandResult]
- abstract def connect(nodeId: NodeId): Future[Unit]
- abstract def connect(nodeId: NodeId, addr: InetSocketAddress): Future[Unit]
- abstract def connect(nodeId: NodeId, host: String, port: Int): Future[Unit]
- abstract def connect(nodeURI: NodeUri): Future[Unit]
- abstract def connectToWebSocket(eventHandler: (WebSocketEvent) => Unit): Future[Unit]
Connects to the Eclair web socket end point and passes WebSocketEvents to the given eventHandler
- abstract def createInvoice(description: String, amountMsat: Option[MilliSatoshis], expireIn: Option[FiniteDuration], fallbackAddress: Option[Address], paymentPreimage: Option[PaymentPreimage]): Future[LnInvoice]
- abstract def createInvoice(description: String, amountMsat: MilliSatoshis, expireIn: FiniteDuration, paymentPreimage: PaymentPreimage): Future[LnInvoice]
- abstract def createInvoice(description: String, amountMsat: MilliSatoshis, paymentPreimage: PaymentPreimage): Future[LnInvoice]
- abstract def createInvoice(description: String, amountMsat: MilliSatoshis, expireIn: FiniteDuration): Future[LnInvoice]
- abstract def createInvoice(description: String, amountMsat: MilliSatoshis): Future[LnInvoice]
- abstract def createInvoice(description: String): Future[LnInvoice]
- abstract def disconnect(nodeId: NodeId): Future[Unit]
- implicit abstract def executionContext: ExecutionContext
- abstract def findRoute(invoice: LnInvoice, amountMsat: MilliSatoshis): Future[NodeRoute]
- abstract def findRoute(invoice: LnInvoice): Future[NodeRoute]
- abstract def findRoute(nodeId: NodeId, amountMsat: MilliSatoshis): Future[NodeRoute]
- abstract def forceClose(shortChannelId: ShortChannelId): Future[ChannelCommandResult]
- abstract def forceClose(channelId: ChannelId): Future[ChannelCommandResult]
- abstract def getInfo: Future[GetInfoResult]
- abstract def getInvoice(paymentHash: Sha256Digest): Future[LnInvoice]
- abstract def getNewAddress(): Future[BitcoinAddress]
- abstract def getNodeURI: Future[NodeUri]
- abstract def getPeers: Future[Vector[PeerInfo]]
- abstract def getReceivedInfo(invoice: LnInvoice): Future[Option[IncomingPayment]]
- abstract def getReceivedInfo(paymentHash: Sha256Digest): Future[Option[IncomingPayment]]
- abstract def getSentInfo(id: PaymentId): Future[Vector[OutgoingPayment]]
- abstract def getSentInfo(paymentHash: Sha256Digest): Future[Vector[OutgoingPayment]]
- abstract def isConnected(nodeId: NodeId): Future[Boolean]
- abstract def listInvoices(from: Option[Instant], to: Option[Instant]): Future[Vector[LnInvoice]]
- abstract def listPendingInvoices(from: Option[Instant], to: Option[Instant]): Future[Vector[LnInvoice]]
- 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
- 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
- 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
- abstract def networkFees(from: Option[FiniteDuration], to: Option[FiniteDuration]): Future[Vector[NetworkFeesResult]]
- abstract def onChainBalance(): Future[OnChainBalance]
- abstract def onChainTransactions(): Future[Vector[WalletTransaction]]
- abstract def open(nodeId: NodeId, funding: CurrencyUnit, pushMsat: Option[MilliSatoshis], feerateSatPerByte: Option[SatoshisPerByte], channelFlags: Option[Byte], openTimeout: Option[FiniteDuration]): Future[FundedChannelId]
- abstract def parseInvoice(invoice: LnInvoice): Future[InvoiceResult]
- abstract def payInvoice(invoice: LnInvoice, amountMsat: Option[MilliSatoshis], maxAttempts: Option[Int], feeThresholdSat: Option[Satoshis], maxFeePct: Option[Int], externalId: Option[String]): Future[PaymentId]
- abstract def payInvoice(invoice: LnInvoice, amount: MilliSatoshis, externalId: Option[String]): Future[PaymentId]
- abstract def payInvoice(invoice: LnInvoice, externalId: Option[String]): Future[PaymentId]
- abstract def payInvoice(invoice: LnInvoice, amount: MilliSatoshis): Future[PaymentId]
- abstract def payInvoice(invoice: LnInvoice): Future[PaymentId]
- abstract def sendOnChain(address: BitcoinAddress, amount: Satoshis, confirmationTarget: Int): Future[DoubleSha256DigestBE]
- abstract def sendToNode(nodeId: NodeId, amountMsat: MilliSatoshis, maxAttempts: Option[Int], feeThresholdSat: Option[Satoshis], maxFeePct: Option[Int], externalId: Option[String]): Future[PaymentId]
- 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
- abstract def updateRelayFee(nodeIds: Vector[NodeId], feeBaseMsat: MilliSatoshis, feePropertionalMillionths: Long): Future[UpdateRelayFeeResult]
- abstract def updateRelayFee(nodeId: NodeId, feeBaseMsat: MilliSatoshis, feeProportionalMillionths: Long): Future[UpdateRelayFeeResult]
- abstract def usableBalances(): Future[Vector[UsableBalancesResult]]
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def allUpdates(nodeIdOpt: Option[NodeId] = None): Future[Vector[ChannelUpdate]]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nodeId(): Future[NodeId]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def payAndMonitorInvoice(invoice: LnInvoice, amount: MilliSatoshis, externalId: Option[String], interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
- def payAndMonitorInvoice(invoice: LnInvoice, externalId: Option[String], interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()