Package

fr.acinq.eclair

db

Permalink

package db

Visibility
  1. Public
  2. All

Type Members

  1. trait AuditDb extends Closeable

    Permalink
  2. sealed trait BackupEvent extends AnyRef

    Permalink
  3. class BackupHandler extends Actor with RequiresMessageQueue[BoundedMessageQueueSemantics] with ActorLogging

    Permalink

    This actor will synchronously make a backup of the database it was initialized with whenever it receives a ChannelPersisted event.

    This actor will synchronously make a backup of the database it was initialized with whenever it receives a ChannelPersisted event. To avoid piling up messages and entering an endless backup loop, it is supposed to be used with a bounded mailbox with a single item:

    backup-mailbox { mailbox-type = "akka.dispatch.BoundedMailbox" mailbox-capacity = 1 mailbox-push-timeout-time = 0 }

    Messages that cannot be processed will be sent to dead letters

  4. case class ChannelLifecycleEvent(channelId: ByteVector32, remoteNodeId: PublicKey, capacity: Satoshi, isFunder: Boolean, isPrivate: Boolean, event: String) extends Product with Serializable

    Permalink
  5. trait ChannelsDb extends Closeable

    Permalink
  6. trait Databases extends AnyRef

    Permalink
  7. case class FailureSummary(failureType: FailureType.Value, failureMessage: String, failedRoute: List[HopSummary]) extends Product with Serializable

    Permalink

    A minimal representation of a payment failure (suitable to store in a database).

  8. case class HopSummary(nodeId: PublicKey, nextNodeId: PublicKey, shortChannelId: Option[ShortChannelId] = None) extends Product with Serializable

    Permalink

    A minimal representation of a hop in a payment route (suitable to store in a database).

  9. case class IncomingPayment(paymentRequest: PaymentRequest, paymentPreimage: ByteVector32, paymentType: String, createdAt: Long, status: IncomingPaymentStatus) extends Product with Serializable

    Permalink

    An incoming payment received by this node.

    An incoming payment received by this node. At first it is in a pending state once the payment request has been generated, then will become either a success (if we receive a valid HTLC) or a failure (if the payment request expires).

    paymentRequest

    Bolt 11 payment request.

    paymentPreimage

    pre-image associated with the payment request's payment_hash.

    paymentType

    distinguish different payment types (standard, swaps, etc).

    createdAt

    absolute time in milli-seconds since UNIX epoch when the payment request was generated.

    status

    current status of the payment.

  10. sealed trait IncomingPaymentStatus extends AnyRef

    Permalink
  11. trait IncomingPaymentsDb extends AnyRef

    Permalink
  12. trait NetworkDb extends Closeable

    Permalink
  13. case class NetworkFee(remoteNodeId: PublicKey, channelId: ByteVector32, txId: ByteVector32, fee: Satoshi, txType: String, timestamp: Long) extends Product with Serializable

    Permalink
  14. case class OutgoingPayment(id: UUID, parentId: UUID, externalId: Option[String], paymentHash: ByteVector32, paymentType: String, amount: MilliSatoshi, recipientAmount: MilliSatoshi, recipientNodeId: PublicKey, createdAt: Long, paymentRequest: Option[PaymentRequest], status: OutgoingPaymentStatus) extends Product with Serializable

    Permalink

    An outgoing payment sent by this node.

    An outgoing payment sent by this node. At first it is in a pending state, then will become either a success or a failure.

    id

    internal payment identifier.

    parentId

    internal identifier of a parent payment, or id if single-part payment.

    externalId

    external payment identifier: lets lightning applications reconcile payments with their own db.

    paymentHash

    payment_hash.

    paymentType

    distinguish different payment types (standard, swaps, etc).

    amount

    amount that will be received by the target node, will be different from recipientAmount for trampoline payments.

    recipientAmount

    amount that will be received by the final recipient.

    recipientNodeId

    id of the final recipient.

    createdAt

    absolute time in milli-seconds since UNIX epoch when the payment was created.

    paymentRequest

    Bolt 11 payment request (if paying from an invoice).

    status

    current status of the payment.

  15. sealed trait OutgoingPaymentStatus extends AnyRef

    Permalink
  16. trait OutgoingPaymentsDb extends AnyRef

    Permalink
  17. trait PaymentsDb extends IncomingPaymentsDb with OutgoingPaymentsDb with PaymentsOverviewDb with Closeable

    Permalink
  18. trait PaymentsOverviewDb extends AnyRef

    Permalink
  19. trait PeersDb extends Closeable

    Permalink
  20. trait PendingRelayDb extends Closeable

    Permalink

    This database stores CMD_FULFILL_HTLC and CMD_FAIL_HTLC that we have received from downstream (either directly via UpdateFulfillHtlc or by extracting the value from the blockchain).

    This database stores CMD_FULFILL_HTLC and CMD_FAIL_HTLC that we have received from downstream (either directly via UpdateFulfillHtlc or by extracting the value from the blockchain).

    This means that this database is only used in the context of *relaying* payments.

    We need to be sure that if downstream is able to pull funds from us, we can always do the same from upstream, otherwise we lose money. Hence the need for persistence to handle all corner cases.

  21. case class PlainIncomingPayment(paymentHash: ByteVector32, paymentType: String, finalAmount: Option[MilliSatoshi], paymentRequest: Option[String], status: IncomingPaymentStatus, createdAt: Long, completedAt: Option[Long], expireAt: Option[Long]) extends PlainPayment with Product with Serializable

    Permalink
  22. case class PlainOutgoingPayment(parentId: Option[UUID], externalId: Option[String], paymentHash: ByteVector32, paymentType: String, finalAmount: Option[MilliSatoshi], paymentRequest: Option[String], status: OutgoingPaymentStatus, createdAt: Long, completedAt: Option[Long]) extends PlainPayment with Product with Serializable

    Permalink
  23. sealed trait PlainPayment extends AnyRef

    Permalink

    Generic payment trait holding only the minimum information in the most plain type possible.

    Generic payment trait holding only the minimum information in the most plain type possible. Notably, payment request is kept as a String, because deserialization is costly.

    This object should only be used for a high level snapshot of the payments stored in the payment database.

    Payment status should be of the correct type, but may not contain all the required data (routes, failures...).

  24. case class Stats(channelId: ByteVector32, avgPaymentAmount: Satoshi, paymentCount: Int, relayFee: Satoshi, networkFee: Satoshi) extends Product with Serializable

    Permalink

Value Members

  1. object BackupCompleted extends BackupEvent with Product with Serializable

    Permalink
  2. object BackupHandler

    Permalink
  3. object Databases extends Logging

    Permalink
  4. object FailureSummary extends Serializable

    Permalink
  5. object FailureType extends Enumeration

    Permalink
  6. object HopSummary extends Serializable

    Permalink
  7. object IncomingPaymentStatus

    Permalink
  8. object OutgoingPaymentStatus

    Permalink
  9. object PaymentType extends Product with Serializable

    Permalink
  10. package sqlite

    Permalink

Ungrouped