Outgoing Payment Packet
object OutgoingPaymentPacket
Content copied to clipboard
Functions
build Command
Link copied to clipboard
fun buildCommand(paymentId: UUID, paymentHash: ByteVector32, hops: List<ChannelHop>, finalPayload: PaymentOnion.FinalPayload): Pair<CMD_ADD_HTLC, SharedSecrets>
Content copied to clipboard
Build the command to add an HTLC with the given final payload and using the provided hops.
build Htlc Failure
Link copied to clipboard
fun buildHtlcFailure(nodeSecret: PrivateKey, paymentHash: ByteVector32, onion: OnionRoutingPacket, reason: CMD_FAIL_HTLC.Reason): Either<FailureMessage, ByteVector>
Content copied to clipboard
build Packet
Link copied to clipboard
fun buildPacket(paymentHash: ByteVector32, hops: List<Hop>, finalPayload: PaymentOnion.FinalPayload, payloadLength: Int): Triple<MilliSatoshi, CltvExpiry, PacketAndSecrets>
Content copied to clipboard
Build an encrypted onion packet with the given final payload.
build Trampoline To Legacy Packet
Link copied to clipboard
fun buildTrampolineToLegacyPacket(invoice: PaymentRequest, hops: List<NodeHop>, finalPayload: PaymentOnion.FinalPayload): Triple<MilliSatoshi, CltvExpiry, PacketAndSecrets>
Content copied to clipboard
Build an encrypted trampoline onion packet when the final recipient doesn't support trampoline. The next-to-last trampoline node payload will contain instructions to convert to a legacy payment.