IncomingPaymentHandler

class IncomingPaymentHandler(nodeParams: NodeParams, walletParams: WalletParams, db: IncomingPaymentsDb)

Types

Companion
Link copied to clipboard
common
object Companion
ProcessAddResult
Link copied to clipboard
common
sealed class ProcessAddResult

Functions

checkPaymentsTimeout
Link copied to clipboard
common
fun checkPaymentsTimeout(currentTimestampSeconds: Long): List<PeerEvent>
createInvoice
Link copied to clipboard
common
suspend fun createInvoice(paymentPreimage: ByteVector32, amount: MilliSatoshi?, description: String, extraHops: List<List<PaymentRequest.TaggedField.ExtraHop>>, expirySeconds: Long? = null, timestampSeconds: Long = currentTimestampSeconds()): PaymentRequest
process
Link copied to clipboard
common
suspend fun process(channelId: ByteVector32, action: ChannelAction.Storage.StoreIncomingAmount)

Save the "received-with" details of an incoming amount.

suspend fun process(payToOpenRequest: PayToOpenRequest, currentBlockHeight: Int): IncomingPaymentHandler.ProcessAddResult

Process an incoming pay-to-open request. This is very similar to the processing of an htlc.

suspend fun process(htlc: UpdateAddHtlc, currentBlockHeight: Int): IncomingPaymentHandler.ProcessAddResult

Process an incoming htlc. Before calling this, the htlc must be committed and ack-ed by both sides.

purgeExpiredPayments
Link copied to clipboard
common
suspend fun purgeExpiredPayments(fromCreatedAt: Long = 0, toCreatedAt: Long = currentTimestampMillis()): Int

Purge all expired unpaid normal payments with creation times in the given time range.

Properties

db
Link copied to clipboard
common
val db: IncomingPaymentsDb
nodeParams
Link copied to clipboard
common
val nodeParams: NodeParams
walletParams
Link copied to clipboard
common
val walletParams: WalletParams