Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 0.7.0-rc.37 (Synonym Fork)
# 0.7.0-rc.38 (Synonym Fork)

## Bug Fixes

Expand Down Expand Up @@ -58,6 +58,12 @@

## Synonym Fork Additions

- Added `AddressInfo` (`index`, `address`, `keychain`) and `KeychainKind`.
- Added `OnchainPayment` methods `new_address_info`, `new_address_info_for_type`,
`address_info_for_type_at_index`, `address_infos_for_type`, and
`reveal_receive_addresses_to`. Address peek APIs support external receive and
internal change keychains without advancing wallet cursors. Batch address peek
requests are capped at 10,000 addresses per call.
- Added pre-flight probe correlation: `Event::ProbeSuccessful` and `Event::ProbeFailed` (from LDK
probe lifecycle), plus `ProbeHandle` (`payment_id`, synthetic `payment_hash`) values returned
for probes actually dispatched by `Bolt11Payment::send_probes`, `send_probes_using_amount`, and
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.37"
version = "0.7.0-rc.38"
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.37"
let checksum = "31ca289fb94221bf1a0077532a868d1e19912f19760735697023066b1160eea7"
let tag = "v0.7.0-rc.38"
Comment thread
ovitrif marked this conversation as resolved.
Outdated
let checksum = "9b4e5427af6f534df17514da643b33a60df96ebf1a1993b8d1ee734a953c2fe4"
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 @@ -3,4 +3,4 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
group=com.synonym
version=0.7.0-rc.37
version=0.7.0-rc.38
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,16 @@ internal typealias UniffiVTableCallbackInterfaceVssHeaderProviderUniffiByValue =
















Expand Down Expand Up @@ -2551,6 +2561,21 @@ internal interface UniffiLib : Library {
`destinationAddress`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_onchainpayment_address_info_for_type_at_index(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`keychain`: RustBufferByValue,
`index`: Int,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_onchainpayment_address_infos_for_type(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`keychain`: RustBufferByValue,
`startIndex`: Int,
`count`: Int,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_onchainpayment_bump_fee_by_rbf(
`ptr`: Pointer?,
`txid`: RustBufferByValue,
Expand Down Expand Up @@ -2591,6 +2616,21 @@ internal interface UniffiLib : Library {
`addressType`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_onchainpayment_new_address_info(
`ptr`: Pointer?,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_onchainpayment_new_address_info_for_type(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
uniffiCallStatus: UniffiRustCallStatus,
): RustBufferByValue
fun uniffi_ldk_node_fn_method_onchainpayment_reveal_receive_addresses_to(
`ptr`: Pointer?,
`addressType`: RustBufferByValue,
`index`: Int,
uniffiCallStatus: UniffiRustCallStatus,
): Unit
fun uniffi_ldk_node_fn_method_onchainpayment_select_utxos_with_algorithm(
`ptr`: Pointer?,
`targetAmountSats`: Long,
Expand Down Expand Up @@ -3324,6 +3364,10 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_accelerate_by_cpfp(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_address_info_for_type_at_index(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_address_infos_for_type(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_bump_fee_by_rbf(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_calculate_cpfp_fee_rate(
Expand All @@ -3338,6 +3382,12 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_new_address_for_type(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_new_address_info(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_new_address_info_for_type(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_reveal_receive_addresses_to(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_select_utxos_with_algorithm(
): Short
fun uniffi_ldk_node_checksum_method_onchainpayment_send_all_to_address(
Expand Down Expand Up @@ -3914,6 +3964,12 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_accelerate_by_cpfp() != 31954.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_address_info_for_type_at_index() != 42692.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_address_infos_for_type() != 3701.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_bump_fee_by_rbf() != 53877.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand All @@ -3935,6 +3991,15 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_new_address_for_type() != 9083.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_new_address_info() != 9889.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_new_address_info_for_type() != 62171.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_reveal_receive_addresses_to() != 44189.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_select_utxos_with_algorithm() != 14084.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -8060,6 +8125,37 @@ open class OnchainPayment: Disposable, OnchainPaymentInterface {
})
}

@Throws(NodeException::class)
override fun `addressInfoForTypeAtIndex`(`addressType`: AddressType, `keychain`: KeychainKind, `index`: kotlin.UInt): AddressInfo {
return FfiConverterTypeAddressInfo.lift(callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_onchainpayment_address_info_for_type_at_index(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterTypeKeychainKind.lower(`keychain`),
FfiConverterUInt.lower(`index`),
uniffiRustCallStatus,
)
}
})
}

@Throws(NodeException::class)
override fun `addressInfosForType`(`addressType`: AddressType, `keychain`: KeychainKind, `startIndex`: kotlin.UInt, `count`: kotlin.UInt): List<AddressInfo> {
return FfiConverterSequenceTypeAddressInfo.lift(callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_onchainpayment_address_infos_for_type(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterTypeKeychainKind.lower(`keychain`),
FfiConverterUInt.lower(`startIndex`),
FfiConverterUInt.lower(`count`),
uniffiRustCallStatus,
)
}
})
}

@Throws(NodeException::class)
override fun `bumpFeeByRbf`(`txid`: Txid, `feeRate`: FeeRate): Txid {
return FfiConverterTypeTxid.lift(callWithPointer {
Expand Down Expand Up @@ -8156,6 +8252,45 @@ open class OnchainPayment: Disposable, OnchainPaymentInterface {
})
}

@Throws(NodeException::class)
override fun `newAddressInfo`(): AddressInfo {
return FfiConverterTypeAddressInfo.lift(callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_onchainpayment_new_address_info(
it,
uniffiRustCallStatus,
)
}
})
}

@Throws(NodeException::class)
override fun `newAddressInfoForType`(`addressType`: AddressType): AddressInfo {
return FfiConverterTypeAddressInfo.lift(callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_onchainpayment_new_address_info_for_type(
it,
FfiConverterTypeAddressType.lower(`addressType`),
uniffiRustCallStatus,
)
}
})
}

@Throws(NodeException::class)
override fun `revealReceiveAddressesTo`(`addressType`: AddressType, `index`: kotlin.UInt) {
callWithPointer {
uniffiRustCallWithError(NodeExceptionErrorHandler) { uniffiRustCallStatus ->
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_onchainpayment_reveal_receive_addresses_to(
it,
FfiConverterTypeAddressType.lower(`addressType`),
FfiConverterUInt.lower(`index`),
uniffiRustCallStatus,
)
}
}
}

@Throws(NodeException::class)
override fun `selectUtxosWithAlgorithm`(`targetAmountSats`: kotlin.ULong, `feeRate`: FeeRate?, `algorithm`: CoinSelectionAlgorithm, `utxos`: List<SpendableUtxo>?): List<SpendableUtxo> {
return FfiConverterSequenceTypeSpendableUtxo.lift(callWithPointer {
Expand Down Expand Up @@ -9047,6 +9182,31 @@ object FfiConverterTypeVssHeaderProvider: FfiConverter<VssHeaderProvider, Pointe



object FfiConverterTypeAddressInfo: FfiConverterRustBuffer<AddressInfo> {
override fun read(buf: ByteBuffer): AddressInfo {
return AddressInfo(
FfiConverterUInt.read(buf),
FfiConverterTypeAddress.read(buf),
FfiConverterTypeKeychainKind.read(buf),
)
}

override fun allocationSize(value: AddressInfo) = (
FfiConverterUInt.allocationSize(value.`index`) +
FfiConverterTypeAddress.allocationSize(value.`address`) +
FfiConverterTypeKeychainKind.allocationSize(value.`keychain`)
)

override fun write(value: AddressInfo, buf: ByteBuffer) {
FfiConverterUInt.write(value.`index`, buf)
FfiConverterTypeAddress.write(value.`address`, buf)
FfiConverterTypeKeychainKind.write(value.`keychain`, buf)
}
}




object FfiConverterTypeAddressTypeBalance: FfiConverterRustBuffer<AddressTypeBalance> {
override fun read(buf: ByteBuffer): AddressTypeBalance {
return AddressTypeBalance(
Expand Down Expand Up @@ -11214,6 +11374,24 @@ object FfiConverterTypeEvent : FfiConverterRustBuffer<Event>{



object FfiConverterTypeKeychainKind: FfiConverterRustBuffer<KeychainKind> {
override fun read(buf: ByteBuffer) = try {
KeychainKind.entries[buf.getInt() - 1]
} catch (e: IndexOutOfBoundsException) {
throw RuntimeException("invalid enum value, something is very wrong!!", e)
}

override fun allocationSize(value: KeychainKind) = 4UL

override fun write(value: KeychainKind, buf: ByteBuffer) {
buf.putInt(value.ordinal + 1)
}
}





object FfiConverterTypeLSPS1PaymentState: FfiConverterRustBuffer<Lsps1PaymentState> {
override fun read(buf: ByteBuffer) = try {
Lsps1PaymentState.entries[buf.getInt() - 1]
Expand Down Expand Up @@ -13732,6 +13910,31 @@ object FfiConverterSequenceString: FfiConverterRustBuffer<List<kotlin.String>> {



object FfiConverterSequenceTypeAddressInfo: FfiConverterRustBuffer<List<AddressInfo>> {
override fun read(buf: ByteBuffer): List<AddressInfo> {
val len = buf.getInt()
return List<AddressInfo>(len) {
FfiConverterTypeAddressInfo.read(buf)
}
}

override fun allocationSize(value: List<AddressInfo>): ULong {
val sizeForLength = 4UL
val sizeForItems = value.sumOf { FfiConverterTypeAddressInfo.allocationSize(it) }
return sizeForLength + sizeForItems
}

override fun write(value: List<AddressInfo>, buf: ByteBuffer) {
buf.putInt(value.size)
value.iterator().forEach {
FfiConverterTypeAddressInfo.write(it, buf)
}
}
}




object FfiConverterSequenceTypeChannelDetails: FfiConverterRustBuffer<List<ChannelDetails>> {
override fun read(buf: ByteBuffer): List<ChannelDetails> {
val len = buf.getInt()
Expand Down
Loading
Loading