Skip to content

Commit a902708

Browse files
committed
chore: generate bindings
1 parent 8f4ea38 commit a902708

12 files changed

Lines changed: 502 additions & 129 deletions

File tree

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import PackageDescription
55

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

1010
let package = Package(

bindings/kotlin/.editorconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# ktlint uses EditorConfig for indentation. Without this file it defaults to
2+
# 2 spaces for Kotlin script, while Gradle/IntelliJ convention here is 4 spaces.
3+
root = true
4+
5+
[*.{kt,kts}]
6+
indent_style = space
7+
indent_size = 4
Binary file not shown.
Binary file not shown.
Binary file not shown.

bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.android.kt

Lines changed: 127 additions & 41 deletions
Large diffs are not rendered by default.

bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.common.kt

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ interface Bolt11PaymentInterface {
185185
fun `send`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?): PaymentId
186186

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

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

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

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

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

11151115

11161116

1117+
@kotlinx.serialization.Serializable
1118+
data class ProbeHandle (
1119+
val `paymentHash`: PaymentHash,
1120+
val `paymentId`: PaymentId
1121+
) {
1122+
companion object
1123+
}
1124+
1125+
1126+
11171127
@kotlinx.serialization.Serializable
11181128
data class RouteHintHop (
11191129
val `srcNodeId`: PublicKey,
@@ -1497,6 +1507,19 @@ sealed class Event {
14971507
) : Event() {
14981508
}
14991509
@kotlinx.serialization.Serializable
1510+
data class ProbeSuccessful(
1511+
val `paymentId`: PaymentId,
1512+
val `paymentHash`: PaymentHash,
1513+
) : Event() {
1514+
}
1515+
@kotlinx.serialization.Serializable
1516+
data class ProbeFailed(
1517+
val `paymentId`: PaymentId,
1518+
val `paymentHash`: PaymentHash,
1519+
val `shortChannelId`: kotlin.ULong?,
1520+
) : Event() {
1521+
}
1522+
@kotlinx.serialization.Serializable
15001523
data class ChannelPending(
15011524
val `channelId`: ChannelId,
15021525
val `userChannelId`: UserChannelId,
@@ -2247,6 +2270,8 @@ enum class WordCount {
22472270

22482271

22492272

2273+
2274+
22502275

22512276

22522277

bindings/kotlin/ldk-node-jvm/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.common.kt

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ interface Bolt11PaymentInterface {
185185
fun `send`(`invoice`: Bolt11Invoice, `routeParameters`: RouteParametersConfig?): PaymentId
186186

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

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

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

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

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

11151115

11161116

1117+
@kotlinx.serialization.Serializable
1118+
data class ProbeHandle (
1119+
val `paymentHash`: PaymentHash,
1120+
val `paymentId`: PaymentId
1121+
) {
1122+
companion object
1123+
}
1124+
1125+
1126+
11171127
@kotlinx.serialization.Serializable
11181128
data class RouteHintHop (
11191129
val `srcNodeId`: PublicKey,
@@ -1497,6 +1507,19 @@ sealed class Event {
14971507
) : Event() {
14981508
}
14991509
@kotlinx.serialization.Serializable
1510+
data class ProbeSuccessful(
1511+
val `paymentId`: PaymentId,
1512+
val `paymentHash`: PaymentHash,
1513+
) : Event() {
1514+
}
1515+
@kotlinx.serialization.Serializable
1516+
data class ProbeFailed(
1517+
val `paymentId`: PaymentId,
1518+
val `paymentHash`: PaymentHash,
1519+
val `shortChannelId`: kotlin.ULong?,
1520+
) : Event() {
1521+
}
1522+
@kotlinx.serialization.Serializable
15001523
data class ChannelPending(
15011524
val `channelId`: ChannelId,
15021525
val `userChannelId`: UserChannelId,
@@ -2247,6 +2270,8 @@ enum class WordCount {
22472270

22482271

22492272

2273+
2274+
22502275

22512276

22522277

0 commit comments

Comments
 (0)