class EclairRpcClient extends EclairApi with NativeProcessFactory with StartStopAsync[EclairRpcClient]
- Alphabetic
- By Inheritance
- EclairRpcClient
- StartStopAsync
- StartStop
- NativeProcessFactory
- BitcoinSLogger
- EclairApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new EclairRpcClient(instance: EclairInstance, binary: Option[File] = None)(implicit system: ActorSystem)
- binary
Path to Eclair Jar. If not present, reads environment variable
ECLAIR_PATH
Type Members
- case class RpcError(error: String) extends Product with Serializable
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 allChannels(): Future[Vector[ChannelDesc]]
- Definition Classes
- EclairRpcClient → EclairApi
- def allNodes(): Future[Vector[NodeInfo]]
- Definition Classes
- EclairRpcClient → EclairApi
- def allUpdates(nodeId: NodeId): Future[Vector[ChannelUpdate]]
- Definition Classes
- EclairRpcClient → EclairApi
- def allUpdates(): Future[Vector[ChannelUpdate]]
- Definition Classes
- EclairRpcClient → EclairApi
- def allUpdates(nodeIdOpt: Option[NodeId] = None): Future[Vector[ChannelUpdate]]
- Definition Classes
- EclairApi
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
- Definition Classes
- EclairRpcClient → EclairApi
- def audit(): Future[AuditResult]
List all sent/received/relayed payments
List all sent/received/relayed payments
- Definition Classes
- EclairRpcClient → EclairApi
- def channel(channelId: ChannelId): Future[ChannelResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def channelStats(): Future[Vector[ChannelStats]]
- Definition Classes
- EclairRpcClient → EclairApi
- def channels(nodeId: NodeId): Future[Vector[ChannelInfo]]
- Definition Classes
- EclairRpcClient → EclairApi
- def channels(): Future[Vector[ChannelInfo]]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def close(channelId: ChannelId, scriptPubKey: ScriptPubKey): Future[ChannelCommandResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def close(channelId: ChannelId): Future[ChannelCommandResult]
- def cmd: Vector[String]
The command to start the daemon on the underlying OS
The command to start the daemon on the underlying OS
- Definition Classes
- EclairRpcClient → NativeProcessFactory
- def connect(nodeId: NodeId): Future[Unit]
- Definition Classes
- EclairRpcClient → EclairApi
- def connect(uri: NodeUri): Future[Unit]
- Definition Classes
- EclairRpcClient → EclairApi
- def connect(nodeId: NodeId, host: String, port: Int): Future[Unit]
- Definition Classes
- EclairRpcClient → EclairApi
- def connect(nodeId: NodeId, addr: InetSocketAddress): Future[Unit]
- Definition Classes
- EclairRpcClient → EclairApi
- def connectToWebSocket(eventHandler: (WebSocketEvent) => Unit): Future[Unit]
Connects to the Eclair web socket end point and passes WebSocketEvents to the given eventHandler
Connects to the Eclair web socket end point and passes WebSocketEvents to the given eventHandler
- Definition Classes
- EclairRpcClient → EclairApi
- def createInvoice(description: String, amountMsat: Option[MilliSatoshis], expireIn: Option[FiniteDuration], fallbackAddress: Option[Address], paymentPreimage: Option[PaymentPreimage]): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def createInvoice(description: String, amountMsat: MilliSatoshis, expireIn: FiniteDuration, paymentPreimage: PaymentPreimage): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def createInvoice(description: String, amountMsat: MilliSatoshis, paymentPreimage: PaymentPreimage): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def createInvoice(description: String, amountMsat: MilliSatoshis, expireIn: FiniteDuration): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def createInvoice(description: String, amountMsat: MilliSatoshis): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def createInvoice(description: String): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def disconnect(nodeId: NodeId): Future[Unit]
- Definition Classes
- EclairRpcClient → EclairApi
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- implicit val executionContext: ExecutionContext
- Definition Classes
- EclairRpcClient → NativeProcessFactory → EclairApi
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def findRoute(invoice: LnInvoice, amountMsat: Option[MilliSatoshis]): Future[Vector[Route]]
- def findRoute(invoice: LnInvoice, amount: MilliSatoshis): Future[Vector[Route]]
- Definition Classes
- EclairRpcClient → EclairApi
- def findRoute(invoice: LnInvoice): Future[Vector[Route]]
- Definition Classes
- EclairRpcClient → EclairApi
- def findRoute(nodeId: NodeId, amountMsat: MilliSatoshis): Future[Vector[Route]]
- Definition Classes
- EclairRpcClient → EclairApi
- def forceClose(shortChannelId: ShortChannelId): Future[ChannelCommandResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def forceClose(channelId: ChannelId): Future[ChannelCommandResult]
- Definition Classes
- EclairRpcClient → EclairApi
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDaemon: EclairInstance
- def getInfo: Future[GetInfoResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def getInvoice(paymentHash: Sha256Digest): Future[LnInvoice]
- Definition Classes
- EclairRpcClient → EclairApi
- def getNewAddress(): Future[BitcoinAddress]
- Definition Classes
- EclairRpcClient → EclairApi
- def getNodeURI: Future[NodeUri]
- Definition Classes
- EclairRpcClient → EclairApi
- def getPeers: Future[Vector[PeerInfo]]
- Definition Classes
- EclairRpcClient → EclairApi
- def getReceivedInfo(invoice: LnInvoice): Future[Option[IncomingPayment]]
- Definition Classes
- EclairRpcClient → EclairApi
- def getReceivedInfo(paymentHash: Sha256Digest): Future[Option[IncomingPayment]]
- Definition Classes
- EclairRpcClient → EclairApi
- def getSentInfo(id: PaymentId): Future[Vector[OutgoingPayment]]
- Definition Classes
- EclairRpcClient → EclairApi
- def getSentInfo(paymentHash: Sha256Digest): Future[Vector[OutgoingPayment]]
- Definition Classes
- EclairRpcClient → EclairApi
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def help: Future[Vector[String]]
- val instance: EclairInstance
- def isAlive(): Boolean
- Definition Classes
- NativeProcessFactory
- def isConnected(nodeId: NodeId): Future[Boolean]
- Definition Classes
- EclairRpcClient → EclairApi
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isStarted(): Future[Boolean]
Boolean check to verify the state of the client
Boolean check to verify the state of the client
- returns
Future Boolean representing if client has started
- def isStopped: Future[Boolean]
Checks to see if the client stopped successfully
- def listInvoices(from: Option[Instant], to: Option[Instant]): Future[Vector[LnInvoice]]
- Definition Classes
- EclairRpcClient → EclairApi
- def listPendingInvoices(from: Option[Instant], to: Option[Instant]): Future[Vector[LnInvoice]]
- Definition Classes
- EclairRpcClient → EclairApi
- def logger: Logger
- Definition Classes
- BitcoinSLogger
- def monitorInvoice(lnInvoice: LnInvoice, interval: FiniteDuration = 1.second, maxAttempts: Int = 60): 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
- Definition Classes
- EclairRpcClient → EclairApi
- def monitorSentPayment(paymentId: PaymentId, interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
Pings eclair to see if a invoice has been paid If the invoice has been paid or the payment has failed, we publish a OutgoingPayment event to the ActorSystem's ActorSystem.eventStream
Pings eclair to see if a invoice has been paid If the invoice has been paid or the payment has failed, we publish a OutgoingPayment event to the ActorSystem's ActorSystem.eventStream
We also return a Future[PaymentResult] that is completed when one of three things is true
- The payment has succeeded 2. The payment has failed 3. We have attempted to query the eclair more than maxAttempts, and the payment is still pending
- paymentId
the payment id returnned by payInvoice
- interval
the ping interval
- maxAttempts
the maximum number of pings
- Definition Classes
- EclairRpcClient → EclairApi
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- Definition Classes
- EclairRpcClient → EclairApi
- def networkFees(from: Option[FiniteDuration], to: Option[FiniteDuration]): Future[Vector[NetworkFeesResult]]
- Definition Classes
- EclairRpcClient → EclairApi
- def nodeId(): Future[NodeId]
- Definition Classes
- EclairApi
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def onChainBalance(): Future[OnChainBalance]
- Definition Classes
- EclairRpcClient → EclairApi
- def onChainTransactions(count: Int = 10, skip: Int = 0): Future[Vector[WalletTransaction]]
- Definition Classes
- EclairRpcClient → EclairApi
- def open(nodeId: NodeId, fundingSatoshis: CurrencyUnit, feerateSatPerByte: SatoshisPerByte, channelFlags: Byte): Future[FundedChannelId]
- def open(nodeId: NodeId, fundingSatoshis: CurrencyUnit, pushMsat: MilliSatoshis = MilliSatoshis.zero, feerateSatPerByte: SatoshisPerByte, channelFlags: Byte): Future[FundedChannelId]
- def open(nodeId: NodeId, funding: CurrencyUnit, pushMsat: MilliSatoshis, feerateSatPerByte: SatoshisPerByte): Future[FundedChannelId]
- def open(nodeId: NodeId, funding: CurrencyUnit, pushMsat: MilliSatoshis): Future[FundedChannelId]
- def open(nodeId: NodeId, funding: CurrencyUnit): Future[FundedChannelId]
- def open(nodeId: NodeId, funding: CurrencyUnit, pushMsat: Option[MilliSatoshis], feerateSatPerByte: Option[SatoshisPerByte], channelFlags: Option[Byte], openTimeout: Option[FiniteDuration]): Future[FundedChannelId]
- Definition Classes
- EclairRpcClient → EclairApi
- def parseInvoice(invoice: LnInvoice): Future[InvoiceResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def payAndMonitorInvoice(invoice: LnInvoice, amount: MilliSatoshis, externalId: Option[String], interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
- Definition Classes
- EclairApi
- def payAndMonitorInvoice(invoice: LnInvoice, externalId: Option[String], interval: FiniteDuration, maxAttempts: Int): Future[OutgoingPayment]
- Definition Classes
- EclairApi
- def payInvoice(invoice: LnInvoice, amountMsat: Option[MilliSatoshis], maxAttempts: Option[Int], feeThresholdSat: Option[Satoshis], maxFeePct: Option[Int], externalId: Option[String]): Future[PaymentId]
- Definition Classes
- EclairRpcClient → EclairApi
- def payInvoice(invoice: LnInvoice, amount: MilliSatoshis, externalId: Option[String]): Future[PaymentId]
- Definition Classes
- EclairRpcClient → EclairApi
- def payInvoice(invoice: LnInvoice, externalId: Option[String]): Future[PaymentId]
- Definition Classes
- EclairRpcClient → EclairApi
- def payInvoice(invoice: LnInvoice, amount: MilliSatoshis): Future[PaymentId]
- Definition Classes
- EclairRpcClient → EclairApi
- def payInvoice(invoice: LnInvoice): Future[PaymentId]
- Definition Classes
- EclairRpcClient → EclairApi
- implicit val rpcErrorReads: Reads[RpcError]
- def sendOnChain(address: BitcoinAddress, amount: Satoshis, confirmationTarget: Int): Future[DoubleSha256DigestBE]
- Definition Classes
- EclairRpcClient → EclairApi
- def sendToNode(nodeId: NodeId, amountMsat: MilliSatoshis, maxAttempts: Option[Int], feeThresholdSat: Option[Satoshis], maxFeePct: Option[Int], externalId: Option[String]): Future[PaymentId]
- Definition Classes
- EclairRpcClient → EclairApi
- 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
Documented by not implemented in Eclair
- Definition Classes
- EclairRpcClient → EclairApi
- def start(): Future[EclairRpcClient]
Starts eclair on the local system.
Starts eclair on the local system.
- returns
a future of the started EclairRpcClient when eclair is fully started. If eclair has not successfully started in 60 seconds the future times out.
- Definition Classes
- EclairRpcClient → StartStop
- def startBinary(): Future[Unit]
Starts the binary by spinning up a new process
Starts the binary by spinning up a new process
- Definition Classes
- NativeProcessFactory
- def stop(): Future[EclairRpcClient]
Returns a Future EclairRpcClient if able to shut down Eclair instance, inherits from the StartStop trait
Returns a Future EclairRpcClient if able to shut down Eclair instance, inherits from the StartStop trait
- returns
A future EclairRpcClient that is stopped
- Definition Classes
- EclairRpcClient → StartStop
- def stopBinary(): Future[Unit]
Stops the binary by destroying the underlying operating system process
Stops the binary by destroying the underlying operating system process
If the client is a remote client (not started on the host operating system) this method is a no-op
- Definition Classes
- NativeProcessFactory
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def updateRelayFee(nodeIds: Vector[NodeId], feeBaseMsat: MilliSatoshis, feeProportionalMillionths: Long): Future[UpdateRelayFeeResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def updateRelayFee(nodeId: NodeId, feeBaseMsat: MilliSatoshis, feeProportionalMillionths: Long): Future[UpdateRelayFeeResult]
- Definition Classes
- EclairRpcClient → EclairApi
- def usableBalances(): Future[Vector[UsableBalancesResult]]
- Definition Classes
- EclairRpcClient → EclairApi
- 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()