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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.7.0-rc.22 (Synonym Fork)
# 0.7.0-rc.24 (Synonym Fork)

## Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = ["bindings/uniffi-bindgen"]

[package]
name = "ldk-node"
version = "0.7.0-rc.22"
version = "0.7.0-rc.24"
authors = ["Elias Rohrer <dev@tnull.de>"]
homepage = "https://lightningdevkit.org/"
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.7.0-rc.22"
let checksum = "3ec3b86365ecfb925cf00c5268bf92176188f06db04a4775c76f249e2cffabfd"
let tag = "v0.7.0-rc.24"
let checksum = "2d8518370aaaea4c39be8c7128f3bc311fbeb6411680ac66d4551e51db2cf7e4"
let url = "https://github.com/synonymdev/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
libraryVersion=0.7.0-rc.22
libraryVersion=0.7.0-rc.24
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,16 @@ internal typealias UniffiVTableCallbackInterfaceVssHeaderProviderUniffiByValue =
















Expand Down Expand Up @@ -2192,6 +2202,19 @@ internal interface UniffiLib : Library {
`ptr`: Pointer?,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_add_address_type_to_monitor(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`seedBytes`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_add_address_type_to_monitor_with_mnemonic(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`mnemonic`: RustBufferByValue,
`passphrase`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_announcement_addresses(
`ptr`: Pointer?,
uniffiCallStatus: UniffiRustCallStatus,
Expand Down Expand Up @@ -2334,11 +2357,29 @@ internal interface UniffiLib : Library {
`paymentId`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_node_remove_address_type_from_monitor(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_remove_payment(
`ptr`: Pointer?,
`paymentId`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_set_primary_address_type(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`seedBytes`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_set_primary_address_type_with_mnemonic(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`mnemonic`: RustBufferByValue,
`passphrase`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_node_sign_message(
`ptr`: Pointer?,
`msg`: RustBufferByValue,
Expand Down Expand Up @@ -3141,6 +3182,10 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_ldk_node_checksum_method_networkgraph_node(
): Short
fun uniffi_ldk_node_checksum_method_node_add_address_type_to_monitor(
): Short
fun uniffi_ldk_node_checksum_method_node_add_address_type_to_monitor_with_mnemonic(
): Short
fun uniffi_ldk_node_checksum_method_node_announcement_addresses(
): Short
fun uniffi_ldk_node_checksum_method_node_bolt11_payment(
Expand Down Expand Up @@ -3201,8 +3246,14 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_ldk_node_checksum_method_node_payment(
): Short
fun uniffi_ldk_node_checksum_method_node_remove_address_type_from_monitor(
): Short
fun uniffi_ldk_node_checksum_method_node_remove_payment(
): Short
fun uniffi_ldk_node_checksum_method_node_set_primary_address_type(
): Short
fun uniffi_ldk_node_checksum_method_node_set_primary_address_type_with_mnemonic(
): Short
fun uniffi_ldk_node_checksum_method_node_sign_message(
): Short
fun uniffi_ldk_node_checksum_method_node_splice_in(
Expand Down Expand Up @@ -3654,6 +3705,12 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_ldk_node_checksum_method_networkgraph_node() != 48925.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_add_address_type_to_monitor() != 14706.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_add_address_type_to_monitor_with_mnemonic() != 4517.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_announcement_addresses() != 61426.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -3744,9 +3801,18 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_ldk_node_checksum_method_node_payment() != 60296.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_remove_address_type_from_monitor() != 37081.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_remove_payment() != 47952.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_set_primary_address_type() != 11005.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_set_primary_address_type_with_mnemonic() != 50783.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_node_sign_message() != 49319.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -6887,6 +6953,35 @@ open class Node: Disposable, NodeInterface {
}


@Throws(NodeException::class)
override fun `addAddressTypeToMonitor`(`addressType`: AddressType, `seedBytes`: List<kotlin.UByte>) {
callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_node_add_address_type_to_monitor(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterSequenceUByte.lower(`seedBytes`),
uniffiRustCallStatus,
)
}
}
}

@Throws(NodeException::class)
override fun `addAddressTypeToMonitorWithMnemonic`(`addressType`: AddressType, `mnemonic`: Mnemonic, `passphrase`: kotlin.String?) {
callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_node_add_address_type_to_monitor_with_mnemonic(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterTypeMnemonic.lower(`mnemonic`),
FfiConverterOptionalString.lower(`passphrase`),
uniffiRustCallStatus,
)
}
}
}

override fun `announcementAddresses`(): List<SocketAddress>? {
return FfiConverterOptionalSequenceTypeSocketAddress.lift(callWithPointer {
uniffiRustCall { uniffiRustCallStatus ->
Expand Down Expand Up @@ -7257,6 +7352,19 @@ open class Node: Disposable, NodeInterface {
})
}

@Throws(NodeException::class)
override fun `removeAddressTypeFromMonitor`(`addressType`: AddressType) {
callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_node_remove_address_type_from_monitor(
it,
FfiConverterTypeAddressType.lower(`addressType`),
uniffiRustCallStatus,
)
}
}
}

@Throws(NodeException::class)
override fun `removePayment`(`paymentId`: PaymentId) {
callWithPointer {
Expand All @@ -7270,6 +7378,35 @@ open class Node: Disposable, NodeInterface {
}
}

@Throws(NodeException::class)
override fun `setPrimaryAddressType`(`addressType`: AddressType, `seedBytes`: List<kotlin.UByte>) {
callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_node_set_primary_address_type(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterSequenceUByte.lower(`seedBytes`),
uniffiRustCallStatus,
)
}
}
}

@Throws(NodeException::class)
override fun `setPrimaryAddressTypeWithMnemonic`(`addressType`: AddressType, `mnemonic`: Mnemonic, `passphrase`: kotlin.String?) {
callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_node_set_primary_address_type_with_mnemonic(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterTypeMnemonic.lower(`mnemonic`),
FfiConverterOptionalString.lower(`passphrase`),
uniffiRustCallStatus,
)
}
}
}

override fun `signMessage`(`msg`: List<kotlin.UByte>): kotlin.String {
return FfiConverterString.lift(callWithPointer {
uniffiRustCall { uniffiRustCallStatus ->
Expand Down Expand Up @@ -11319,6 +11456,10 @@ object FfiConverterTypeNodeError : FfiConverterRustBuffer<NodeException> {
61 -> NodeException.CoinSelectionFailed(FfiConverterString.read(buf))
62 -> NodeException.InvalidMnemonic(FfiConverterString.read(buf))
63 -> NodeException.BackgroundSyncNotEnabled(FfiConverterString.read(buf))
64 -> NodeException.AddressTypeAlreadyMonitored(FfiConverterString.read(buf))
65 -> NodeException.AddressTypeIsPrimary(FfiConverterString.read(buf))
66 -> NodeException.AddressTypeNotMonitored(FfiConverterString.read(buf))
67 -> NodeException.InvalidSeedBytes(FfiConverterString.read(buf))
else -> throw RuntimeException("invalid error enum value, something is very wrong!!")
}
}
Expand Down Expand Up @@ -11581,6 +11722,22 @@ object FfiConverterTypeNodeError : FfiConverterRustBuffer<NodeException> {
buf.putInt(63)
Unit
}
is NodeException.AddressTypeAlreadyMonitored -> {
buf.putInt(64)
Unit
}
is NodeException.AddressTypeIsPrimary -> {
buf.putInt(65)
Unit
}
is NodeException.AddressTypeNotMonitored -> {
buf.putInt(66)
Unit
}
is NodeException.InvalidSeedBytes -> {
buf.putInt(67)
Unit
}
}.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ interface NetworkGraphInterface {

interface NodeInterface {

@Throws(NodeException::class)
fun `addAddressTypeToMonitor`(`addressType`: AddressType, `seedBytes`: List<kotlin.UByte>)

@Throws(NodeException::class)
fun `addAddressTypeToMonitorWithMnemonic`(`addressType`: AddressType, `mnemonic`: Mnemonic, `passphrase`: kotlin.String?)

fun `announcementAddresses`(): List<SocketAddress>?

fun `bolt11Payment`(): Bolt11Payment
Expand Down Expand Up @@ -484,9 +490,18 @@ interface NodeInterface {

fun `payment`(`paymentId`: PaymentId): PaymentDetails?

@Throws(NodeException::class)
fun `removeAddressTypeFromMonitor`(`addressType`: AddressType)

@Throws(NodeException::class)
fun `removePayment`(`paymentId`: PaymentId)

@Throws(NodeException::class)
fun `setPrimaryAddressType`(`addressType`: AddressType, `seedBytes`: List<kotlin.UByte>)

@Throws(NodeException::class)
fun `setPrimaryAddressTypeWithMnemonic`(`addressType`: AddressType, `mnemonic`: Mnemonic, `passphrase`: kotlin.String?)

fun `signMessage`(`msg`: List<kotlin.UByte>): kotlin.String

@Throws(NodeException::class)
Expand Down Expand Up @@ -1842,6 +1857,14 @@ sealed class NodeException(message: String): kotlin.Exception(message) {

class BackgroundSyncNotEnabled(message: String) : NodeException(message)

class AddressTypeAlreadyMonitored(message: String) : NodeException(message)

class AddressTypeIsPrimary(message: String) : NodeException(message)

class AddressTypeNotMonitored(message: String) : NodeException(message)

class InvalidSeedBytes(message: String) : NodeException(message)

}


Expand Down
2 changes: 1 addition & 1 deletion bindings/kotlin/ldk-node-jvm/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx1536m
kotlin.code.style=official
libraryVersion=0.7.0-rc.22
libraryVersion=0.7.0-rc.24
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,12 @@ interface NetworkGraphInterface {

interface NodeInterface {

@Throws(NodeException::class)
fun `addAddressTypeToMonitor`(`addressType`: AddressType, `seedBytes`: List<kotlin.UByte>)

@Throws(NodeException::class)
fun `addAddressTypeToMonitorWithMnemonic`(`addressType`: AddressType, `mnemonic`: Mnemonic, `passphrase`: kotlin.String?)

fun `announcementAddresses`(): List<SocketAddress>?

fun `bolt11Payment`(): Bolt11Payment
Expand Down Expand Up @@ -484,9 +490,18 @@ interface NodeInterface {

fun `payment`(`paymentId`: PaymentId): PaymentDetails?

@Throws(NodeException::class)
fun `removeAddressTypeFromMonitor`(`addressType`: AddressType)

@Throws(NodeException::class)
fun `removePayment`(`paymentId`: PaymentId)

@Throws(NodeException::class)
fun `setPrimaryAddressType`(`addressType`: AddressType, `seedBytes`: List<kotlin.UByte>)

@Throws(NodeException::class)
fun `setPrimaryAddressTypeWithMnemonic`(`addressType`: AddressType, `mnemonic`: Mnemonic, `passphrase`: kotlin.String?)

fun `signMessage`(`msg`: List<kotlin.UByte>): kotlin.String

@Throws(NodeException::class)
Expand Down Expand Up @@ -1842,6 +1857,14 @@ sealed class NodeException(message: String): kotlin.Exception(message) {

class BackgroundSyncNotEnabled(message: String) : NodeException(message)

class AddressTypeAlreadyMonitored(message: String) : NodeException(message)

class AddressTypeIsPrimary(message: String) : NodeException(message)

class AddressTypeNotMonitored(message: String) : NodeException(message)

class InvalidSeedBytes(message: String) : NodeException(message)

}


Expand Down
Loading