Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ swift.swiftdoc
*.a
*.d

# macOS Finder metadata (icon positions, view options)
.DS_Store

# IDE and local files
.idea
.build
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@

## Synonym Fork Additions

- Added pre-flight probe correlation: `Event::ProbeSuccessful` and `Event::ProbeFailed` (from LDK
probe lifecycle), plus `ProbeHandle` (`payment_id`, synthetic `payment_hash`) returned by
`Bolt11Payment::send_probes`, `send_probes_using_amount`, and `SpontaneousPayment::send_probes`
(one handle per probe path). Match handles to events by `payment_id` (and optionally
`payment_hash`); these are not the BOLT11 invoice payment hash. UniFFI: `dictionary ProbeHandle`
in `ldk_node.udl`.
- Added `connection_timeout_secs` field to `ElectrumSyncConfig` (default: 10 s). This bounds
Electrum socket operations for both the BDK on-chain and LDK tx-sync clients, preventing Tokio's
blocking thread pool from being exhausted by threads stuck on dead sockets under total packet
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import PackageDescription

let tag = "v0.7.0-rc.36"
let checksum = "de56fe19149808ccc5e517047ea7bf6b4d5d2c2e33d3ad539ef0155bf1aec8f7"
let checksum = "e46e7c75c03831175b437fe032cef1cd43ba5c171871f82c4337a4bd5da62f5f"
let url = "https://github.com/synonymdev/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"

let package = Package(
Expand Down
7 changes: 7 additions & 0 deletions bindings/kotlin/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# ktlint uses EditorConfig for indentation. Without this file it defaults to
# 2 spaces for Kotlin script, while Gradle/IntelliJ convention here is 4 spaces.
root = true

[*.{kt,kts}]
indent_style = space
indent_size = 4
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ interface Bolt11PaymentInterface {
fun `send`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?): PaymentId

@Throws(NodeException::class)
fun `sendProbes`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?)
fun `sendProbes`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?): List<ProbeHandle>

@Throws(NodeException::class)
fun `sendProbesUsingAmount`(`invoice`: Bolt11Invoice, `amountMsat`: kotlin.ULong, `routeParameters`: RouteParametersConfig?)
fun `sendProbesUsingAmount`(`invoice`: Bolt11Invoice, `amountMsat`: kotlin.ULong, `routeParameters`: RouteParametersConfig?): List<ProbeHandle>

@Throws(NodeException::class)
fun `sendUsingAmount`(`invoice`: Bolt11Invoice, `amountMsat`: kotlin.ULong, `routeParameters`: RouteParametersConfig?): PaymentId
Expand Down Expand Up @@ -650,7 +650,7 @@ interface SpontaneousPaymentInterface {
fun `send`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey, `routeParameters`: RouteParametersConfig?): PaymentId

@Throws(NodeException::class)
fun `sendProbes`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey)
fun `sendProbes`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey): List<ProbeHandle>

@Throws(NodeException::class)
fun `sendWithCustomTlvs`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey, `routeParameters`: RouteParametersConfig?, `customTlvs`: List<CustomTlvRecord>): PaymentId
Expand Down Expand Up @@ -1114,6 +1114,16 @@ data class PeerDetails (



@kotlinx.serialization.Serializable
data class ProbeHandle (
val `paymentHash`: PaymentHash,
val `paymentId`: PaymentId
) {
companion object
}



@kotlinx.serialization.Serializable
data class RouteHintHop (
val `srcNodeId`: PublicKey,
Expand Down Expand Up @@ -1497,6 +1507,19 @@ sealed class Event {
) : Event() {
}
@kotlinx.serialization.Serializable
data class ProbeSuccessful(
val `paymentId`: PaymentId,
val `paymentHash`: PaymentHash,
) : Event() {
}
@kotlinx.serialization.Serializable
data class ProbeFailed(
val `paymentId`: PaymentId,
val `paymentHash`: PaymentHash,
val `shortChannelId`: kotlin.ULong?,
) : Event() {
}
@kotlinx.serialization.Serializable
data class ChannelPending(
val `channelId`: ChannelId,
val `userChannelId`: UserChannelId,
Expand Down Expand Up @@ -2247,6 +2270,8 @@ enum class WordCount {








Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ interface Bolt11PaymentInterface {
fun `send`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?): PaymentId

@Throws(NodeException::class)
fun `sendProbes`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?)
fun `sendProbes`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?): List<ProbeHandle>

@Throws(NodeException::class)
fun `sendProbesUsingAmount`(`invoice`: Bolt11Invoice, `amountMsat`: kotlin.ULong, `routeParameters`: RouteParametersConfig?)
fun `sendProbesUsingAmount`(`invoice`: Bolt11Invoice, `amountMsat`: kotlin.ULong, `routeParameters`: RouteParametersConfig?): List<ProbeHandle>

@Throws(NodeException::class)
fun `sendUsingAmount`(`invoice`: Bolt11Invoice, `amountMsat`: kotlin.ULong, `routeParameters`: RouteParametersConfig?): PaymentId
Expand Down Expand Up @@ -650,7 +650,7 @@ interface SpontaneousPaymentInterface {
fun `send`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey, `routeParameters`: RouteParametersConfig?): PaymentId

@Throws(NodeException::class)
fun `sendProbes`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey)
fun `sendProbes`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey): List<ProbeHandle>

@Throws(NodeException::class)
fun `sendWithCustomTlvs`(`amountMsat`: kotlin.ULong, `nodeId`: PublicKey, `routeParameters`: RouteParametersConfig?, `customTlvs`: List<CustomTlvRecord>): PaymentId
Expand Down Expand Up @@ -1114,6 +1114,16 @@ data class PeerDetails (



@kotlinx.serialization.Serializable
data class ProbeHandle (
val `paymentHash`: PaymentHash,
val `paymentId`: PaymentId
) {
companion object
}



@kotlinx.serialization.Serializable
data class RouteHintHop (
val `srcNodeId`: PublicKey,
Expand Down Expand Up @@ -1497,6 +1507,19 @@ sealed class Event {
) : Event() {
}
@kotlinx.serialization.Serializable
data class ProbeSuccessful(
val `paymentId`: PaymentId,
val `paymentHash`: PaymentHash,
) : Event() {
}
@kotlinx.serialization.Serializable
data class ProbeFailed(
val `paymentId`: PaymentId,
val `paymentHash`: PaymentHash,
val `shortChannelId`: kotlin.ULong?,
) : Event() {
}
@kotlinx.serialization.Serializable
data class ChannelPending(
val `channelId`: ChannelId,
val `userChannelId`: UserChannelId,
Expand Down Expand Up @@ -2247,6 +2270,8 @@ enum class WordCount {








Expand Down
Loading
Loading