Skip to content

Commit 696a5f2

Browse files
committed
chore: update bindings
- Updates bindings - Bumps version to 0.6.1-rc.2
1 parent 22a5d77 commit 696a5f2

File tree

9 files changed

+45
-5
lines changed

9 files changed

+45
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ldk-node"
3-
version = "0.6.1-rc.1"
3+
version = "0.6.1-rc.2"
44
authors = ["Elias Rohrer <[email protected]>"]
55
homepage = "https://lightningdevkit.org/"
66
license = "MIT OR Apache-2.0"

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import PackageDescription
55

6-
let tag = "v0.6.1-rc.1"
7-
let checksum = "3c86024c00328d9a98a50d6e2c2808766d21e070bb49b7ceba1b2a3a1d708e5b"
6+
let tag = "v0.6.1-rc.2"
7+
let checksum = "c7c6373886f0a6d673d0921c8ffd57bb2ad9e3df07ec4e62ee937d83c1f79496"
88
let url = "https://github.com/synonymdev/ldk-node/releases/download/\(tag)/LDKNodeFFI.xcframework.zip"
99

1010
let package = Package(

bindings/kotlin/ldk-node-android/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Publishing new version guide.
3131
- add dependency in `libs.versions.toml`:
3232
```toml
3333
# by tag
34-
ldk-node-android = { module = "com.github.synonymdev:ldk-node", version = "v0.6.1-rc.1"
34+
ldk-node-android = { module = "com.github.synonymdev:ldk-node", version = "v0.6.1-rc.2"
3535

3636
# or by branch
3737
ldk-node-android = { module = "com.github.synonymdev:ldk-node", version = "main-SNAPSHOT"

bindings/kotlin/ldk-node-android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536m
22
android.useAndroidX=true
33
android.enableJetifier=true
44
kotlin.code.style=official
5-
libraryVersion=v0.6.1-rc.1
5+
libraryVersion=v0.6.1-rc.2
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.kt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,8 @@ internal open class UniffiVTableCallbackInterfaceVssHeaderProvider(
10141014

10151015

10161016

1017+
1018+
10171019

10181020

10191021

@@ -1309,6 +1311,8 @@ internal interface UniffiLib : Library {
13091311
): RustBuffer.ByValue
13101312
fun uniffi_ldk_node_fn_method_onchainpayment_calculate_cpfp_fee_rate(`ptr`: Pointer,`parentTxid`: RustBuffer.ByValue,`urgent`: Byte,uniffi_out_err: UniffiRustCallStatus,
13111313
): Pointer
1314+
fun uniffi_ldk_node_fn_method_onchainpayment_calculate_total_fee(`ptr`: Pointer,`address`: RustBuffer.ByValue,`amountSats`: Long,`feeRate`: RustBuffer.ByValue,`utxosToSpend`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
1315+
): Long
13121316
fun uniffi_ldk_node_fn_method_onchainpayment_list_spendable_outputs(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
13131317
): RustBuffer.ByValue
13141318
fun uniffi_ldk_node_fn_method_onchainpayment_new_address(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
@@ -1675,6 +1679,8 @@ internal interface UniffiLib : Library {
16751679
): Short
16761680
fun uniffi_ldk_node_checksum_method_onchainpayment_calculate_cpfp_fee_rate(
16771681
): Short
1682+
fun uniffi_ldk_node_checksum_method_onchainpayment_calculate_total_fee(
1683+
): Short
16781684
fun uniffi_ldk_node_checksum_method_onchainpayment_list_spendable_outputs(
16791685
): Short
16801686
fun uniffi_ldk_node_checksum_method_onchainpayment_new_address(
@@ -2048,6 +2054,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
20482054
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_calculate_cpfp_fee_rate() != 32879.toShort()) {
20492055
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
20502056
}
2057+
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_calculate_total_fee() != 57218.toShort()) {
2058+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
2059+
}
20512060
if (lib.uniffi_ldk_node_checksum_method_onchainpayment_list_spendable_outputs() != 19144.toShort()) {
20522061
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
20532062
}
@@ -6072,6 +6081,8 @@ public interface OnchainPaymentInterface {
60726081

60736082
fun `calculateCpfpFeeRate`(`parentTxid`: Txid, `urgent`: kotlin.Boolean): FeeRate
60746083

6084+
fun `calculateTotalFee`(`address`: Address, `amountSats`: kotlin.ULong, `feeRate`: FeeRate?, `utxosToSpend`: List<SpendableUtxo>?): kotlin.ULong
6085+
60756086
fun `listSpendableOutputs`(): List<SpendableUtxo>
60766087

60776088
fun `newAddress`(): Address
@@ -6206,6 +6217,19 @@ open class OnchainPayment: Disposable, AutoCloseable, OnchainPaymentInterface {
62066217

62076218

62086219

6220+
@Throws(NodeException::class)override fun `calculateTotalFee`(`address`: Address, `amountSats`: kotlin.ULong, `feeRate`: FeeRate?, `utxosToSpend`: List<SpendableUtxo>?): kotlin.ULong {
6221+
return FfiConverterULong.lift(
6222+
callWithPointer {
6223+
uniffiRustCallWithError(NodeException) { _status ->
6224+
UniffiLib.INSTANCE.uniffi_ldk_node_fn_method_onchainpayment_calculate_total_fee(
6225+
it, FfiConverterTypeAddress.lower(`address`),FfiConverterULong.lower(`amountSats`),FfiConverterOptionalTypeFeeRate.lower(`feeRate`),FfiConverterOptionalSequenceTypeSpendableUtxo.lower(`utxosToSpend`),_status)
6226+
}
6227+
}
6228+
)
6229+
}
6230+
6231+
6232+
62096233
@Throws(NodeException::class)override fun `listSpendableOutputs`(): List<SpendableUtxo> {
62106234
return FfiConverterSequenceTypeSpendableUtxo.lift(
62116235
callWithPointer {

bindings/swift/Sources/LDKNode/LDKNode.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,6 +2505,8 @@ public protocol OnchainPaymentProtocol : AnyObject {
25052505

25062506
func calculateCpfpFeeRate(parentTxid: Txid, urgent: Bool) throws -> FeeRate
25072507

2508+
func calculateTotalFee(address: Address, amountSats: UInt64, feeRate: FeeRate?, utxosToSpend: [SpendableUtxo]?) throws -> UInt64
2509+
25082510
func listSpendableOutputs() throws -> [SpendableUtxo]
25092511

25102512
func newAddress() throws -> Address
@@ -2586,6 +2588,17 @@ open func calculateCpfpFeeRate(parentTxid: Txid, urgent: Bool)throws -> FeeRate
25862588
})
25872589
}
25882590

2591+
open func calculateTotalFee(address: Address, amountSats: UInt64, feeRate: FeeRate?, utxosToSpend: [SpendableUtxo]?)throws -> UInt64 {
2592+
return try FfiConverterUInt64.lift(try rustCallWithError(FfiConverterTypeNodeError.lift) {
2593+
uniffi_ldk_node_fn_method_onchainpayment_calculate_total_fee(self.uniffiClonePointer(),
2594+
FfiConverterTypeAddress.lower(address),
2595+
FfiConverterUInt64.lower(amountSats),
2596+
FfiConverterOptionTypeFeeRate.lower(feeRate),
2597+
FfiConverterOptionSequenceTypeSpendableUtxo.lower(utxosToSpend),$0
2598+
)
2599+
})
2600+
}
2601+
25892602
open func listSpendableOutputs()throws -> [SpendableUtxo] {
25902603
return try FfiConverterSequenceTypeSpendableUtxo.lift(try rustCallWithError(FfiConverterTypeNodeError.lift) {
25912604
uniffi_ldk_node_fn_method_onchainpayment_list_spendable_outputs(self.uniffiClonePointer(),$0
@@ -10057,6 +10070,9 @@ private var initializationResult: InitializationResult {
1005710070
if (uniffi_ldk_node_checksum_method_onchainpayment_calculate_cpfp_fee_rate() != 32879) {
1005810071
return InitializationResult.apiChecksumMismatch
1005910072
}
10073+
if (uniffi_ldk_node_checksum_method_onchainpayment_calculate_total_fee() != 57218) {
10074+
return InitializationResult.apiChecksumMismatch
10075+
}
1006010076
if (uniffi_ldk_node_checksum_method_onchainpayment_list_spendable_outputs() != 19144) {
1006110077
return InitializationResult.apiChecksumMismatch
1006210078
}

0 commit comments

Comments
 (0)