diff --git a/Cargo.lock b/Cargo.lock index 1b75d94..8b0a72c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -475,7 +475,7 @@ dependencies = [ [[package]] name = "bitkitcore" -version = "0.1.64" +version = "0.1.66" dependencies = [ "android_logger", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index f35ca48..745cfc9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitkitcore" -version = "0.1.64" +version = "0.1.66" edition = "2021" [lib] diff --git a/Package.swift b/Package.swift index 350d303..246d7a9 100644 --- a/Package.swift +++ b/Package.swift @@ -3,8 +3,8 @@ import PackageDescription -let tag = "v0.1.64" -let checksum = "96b4fb9920ddf7515fb3623b257cc961483b60389af830b321d9ce513726b422" +let tag = "v0.1.66" +let checksum = "cc68047c13418f127114afb776faa460573d9d08f3571371f5ed6e94ed30c029" let url = "https://github.com/synonymdev/bitkit-core/releases/download/\(tag)/BitkitCore.xcframework.zip" let package = Package( diff --git a/bindings/android/gradle.properties b/bindings/android/gradle.properties index 63e176f..62cba1f 100644 --- a/bindings/android/gradle.properties +++ b/bindings/android/gradle.properties @@ -3,4 +3,4 @@ android.useAndroidX=true android.enableJetifier=true kotlin.code.style=official group=com.synonym -version=0.1.64 +version=0.1.66 diff --git a/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so index 5578bf1..c5c97f0 100755 Binary files a/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so index 0ce9f2b..acfc3e4 100755 Binary files a/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so index fdc3417..8a0afeb 100755 Binary files a/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so b/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so index 9da01b0..b9acdd9 100755 Binary files a/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so and b/bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so differ diff --git a/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt b/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt index d27f66d..03fb477 100644 --- a/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt +++ b/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt @@ -437,11 +437,11 @@ internal open class UniffiForeignFutureStruct( @JvmField public var `free`: UniffiForeignFutureFree?, ) : com.sun.jna.Structure() { internal constructor(): this( - + `handle` = 0.toLong(), - + `free` = null, - + ) internal class UniffiByValue( @@ -468,11 +468,11 @@ internal open class UniffiForeignFutureStructU8Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.toByte(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -502,11 +502,11 @@ internal open class UniffiForeignFutureStructI8Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.toByte(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -536,11 +536,11 @@ internal open class UniffiForeignFutureStructU16Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.toShort(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -570,11 +570,11 @@ internal open class UniffiForeignFutureStructI16Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.toShort(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -604,11 +604,11 @@ internal open class UniffiForeignFutureStructU32Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0, - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -638,11 +638,11 @@ internal open class UniffiForeignFutureStructI32Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0, - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -672,11 +672,11 @@ internal open class UniffiForeignFutureStructU64Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.toLong(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -706,11 +706,11 @@ internal open class UniffiForeignFutureStructI64Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.toLong(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -740,11 +740,11 @@ internal open class UniffiForeignFutureStructF32Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.0f, - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -774,11 +774,11 @@ internal open class UniffiForeignFutureStructF64Struct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = 0.0, - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -808,11 +808,11 @@ internal open class UniffiForeignFutureStructPointerStruct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = NullPointer, - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -842,11 +842,11 @@ internal open class UniffiForeignFutureStructRustBufferStruct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `returnValue` = RustBufferHelper.allocValue(), - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -875,9 +875,9 @@ internal open class UniffiForeignFutureStructVoidStruct( @JvmField public var `callStatus`: UniffiRustCallStatusByValue, ) : com.sun.jna.Structure() { internal constructor(): this( - + `callStatus` = UniffiRustCallStatusHelper.allocValue(), - + ) internal class UniffiByValue( @@ -898,6 +898,9 @@ internal typealias UniffiForeignFutureStructVoidUniffiByValue = UniffiForeignFut internal interface UniffiForeignFutureCompleteVoid: com.sun.jna.Callback { public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoidUniffiByValue,) } +internal interface UniffiCallbackInterfaceEventListenerMethod0: com.sun.jna.Callback { + public fun callback(`uniffiHandle`: Long,`watcherId`: RustBufferByValue,`event`: RustBufferByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod0: com.sun.jna.Callback { public fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) } @@ -937,6 +940,37 @@ internal interface UniffiCallbackInterfaceTrezorUiCallbackMethod0: com.sun.jna.C internal interface UniffiCallbackInterfaceTrezorUiCallbackMethod1: com.sun.jna.Callback { public fun callback(`uniffiHandle`: Long,`onDevice`: Byte,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) } +@Structure.FieldOrder("onEvent", "uniffiFree") +internal open class UniffiVTableCallbackInterfaceEventListenerStruct( + @JvmField public var `onEvent`: UniffiCallbackInterfaceEventListenerMethod0?, + @JvmField public var `uniffiFree`: UniffiCallbackInterfaceFree?, +) : com.sun.jna.Structure() { + internal constructor(): this( + + `onEvent` = null, + + `uniffiFree` = null, + + ) + + internal class UniffiByValue( + `onEvent`: UniffiCallbackInterfaceEventListenerMethod0?, + `uniffiFree`: UniffiCallbackInterfaceFree?, + ): UniffiVTableCallbackInterfaceEventListener(`onEvent`,`uniffiFree`,), Structure.ByValue +} + +internal typealias UniffiVTableCallbackInterfaceEventListener = UniffiVTableCallbackInterfaceEventListenerStruct + +internal fun UniffiVTableCallbackInterfaceEventListener.uniffiSetValue(other: UniffiVTableCallbackInterfaceEventListener) { + `onEvent` = other.`onEvent` + `uniffiFree` = other.`uniffiFree` +} +internal fun UniffiVTableCallbackInterfaceEventListener.uniffiSetValue(other: UniffiVTableCallbackInterfaceEventListenerUniffiByValue) { + `onEvent` = other.`onEvent` + `uniffiFree` = other.`uniffiFree` +} + +internal typealias UniffiVTableCallbackInterfaceEventListenerUniffiByValue = UniffiVTableCallbackInterfaceEventListenerStruct.UniffiByValue @Structure.FieldOrder("enumerateDevices", "openDevice", "closeDevice", "readChunk", "writeChunk", "getChunkSize", "callMessage", "getPairingCode", "saveThpCredential", "loadThpCredential", "logDebug", "uniffiFree") internal open class UniffiVTableCallbackInterfaceTrezorTransportCallbackStruct( @JvmField public var `enumerateDevices`: UniffiCallbackInterfaceTrezorTransportCallbackMethod0?, @@ -953,31 +987,31 @@ internal open class UniffiVTableCallbackInterfaceTrezorTransportCallbackStruct( @JvmField public var `uniffiFree`: UniffiCallbackInterfaceFree?, ) : com.sun.jna.Structure() { internal constructor(): this( - + `enumerateDevices` = null, - + `openDevice` = null, - + `closeDevice` = null, - + `readChunk` = null, - + `writeChunk` = null, - + `getChunkSize` = null, - + `callMessage` = null, - + `getPairingCode` = null, - + `saveThpCredential` = null, - + `loadThpCredential` = null, - + `logDebug` = null, - + `uniffiFree` = null, - + ) internal class UniffiByValue( @@ -1035,13 +1069,13 @@ internal open class UniffiVTableCallbackInterfaceTrezorUiCallbackStruct( @JvmField public var `uniffiFree`: UniffiCallbackInterfaceFree?, ) : com.sun.jna.Structure() { internal constructor(): this( - + `onPinRequest` = null, - + `onPassphraseRequest` = null, - + `uniffiFree` = null, - + ) internal class UniffiByValue( @@ -1423,6 +1457,17 @@ internal typealias UniffiVTableCallbackInterfaceTrezorUiCallbackUniffiByValue = + + + + + + + + + + + @@ -1693,6 +1738,15 @@ internal object IntegrityCheckingUniffiLib : Library { if (uniffi_bitkitcore_checksum_func_onchain_get_transaction_history() != 4452.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (uniffi_bitkitcore_checksum_func_onchain_start_watcher() != 58125.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers() != 28485.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } + if (uniffi_bitkitcore_checksum_func_onchain_stop_watcher() != 2426.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (uniffi_bitkitcore_checksum_func_open_channel() != 21402.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -1894,6 +1948,9 @@ internal object IntegrityCheckingUniffiLib : Library { if (uniffi_bitkitcore_checksum_func_wipe_all_transaction_details() != 65339.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } + if (uniffi_bitkitcore_checksum_method_eventlistener_on_event() != 35531.toShort()) { + throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + } if (uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices() != 18766.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -2156,6 +2213,15 @@ internal object IntegrityCheckingUniffiLib : Library { external fun uniffi_bitkitcore_checksum_func_onchain_get_transaction_history( ): Short @JvmStatic + external fun uniffi_bitkitcore_checksum_func_onchain_start_watcher( + ): Short + @JvmStatic + external fun uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers( + ): Short + @JvmStatic + external fun uniffi_bitkitcore_checksum_func_onchain_stop_watcher( + ): Short + @JvmStatic external fun uniffi_bitkitcore_checksum_func_open_channel( ): Short @JvmStatic @@ -2357,6 +2423,9 @@ internal object IntegrityCheckingUniffiLib : Library { external fun uniffi_bitkitcore_checksum_func_wipe_all_transaction_details( ): Short @JvmStatic + external fun uniffi_bitkitcore_checksum_method_eventlistener_on_event( + ): Short + @JvmStatic external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices( ): Short @JvmStatic @@ -2409,6 +2478,7 @@ internal object UniffiLib : Library { Native.register(UniffiLib::class.java, findLibraryName("bitkitcore")) // No need to check the contract version and checksums, since // we already did that with `IntegrityCheckingUniffiLib` above. + uniffiCallbackInterfaceEventListener.register(this) uniffiCallbackInterfaceTrezorTransportCallback.register(this) uniffiCallbackInterfaceTrezorUiCallback.register(this) } @@ -2417,6 +2487,27 @@ internal object UniffiLib : Library { UniffiCleaner.create() } @JvmStatic + external fun uniffi_bitkitcore_fn_clone_eventlistener( + `ptr`: Pointer?, + uniffiCallStatus: UniffiRustCallStatus, + ): Pointer? + @JvmStatic + external fun uniffi_bitkitcore_fn_free_eventlistener( + `ptr`: Pointer?, + uniffiCallStatus: UniffiRustCallStatus, + ): Unit + @JvmStatic + external fun uniffi_bitkitcore_fn_init_callback_vtable_eventlistener( + `vtable`: UniffiVTableCallbackInterfaceEventListener, + ): Unit + @JvmStatic + external fun uniffi_bitkitcore_fn_method_eventlistener_on_event( + `ptr`: Pointer?, + `watcherId`: RustBufferByValue, + `event`: RustBufferByValue, + uniffiCallStatus: UniffiRustCallStatus, + ): Unit + @JvmStatic external fun uniffi_bitkitcore_fn_clone_trezortransportcallback( `ptr`: Pointer?, uniffiCallStatus: UniffiRustCallStatus, @@ -2927,6 +3018,20 @@ internal object UniffiLib : Library { `scriptType`: RustBufferByValue, ): Long @JvmStatic + external fun uniffi_bitkitcore_fn_func_onchain_start_watcher( + `params`: RustBufferByValue, + `listener`: Pointer?, + ): Long + @JvmStatic + external fun uniffi_bitkitcore_fn_func_onchain_stop_all_watchers( + uniffiCallStatus: UniffiRustCallStatus, + ): Unit + @JvmStatic + external fun uniffi_bitkitcore_fn_func_onchain_stop_watcher( + `watcherId`: RustBufferByValue, + uniffiCallStatus: UniffiRustCallStatus, + ): Unit + @JvmStatic external fun uniffi_bitkitcore_fn_func_open_channel( `orderId`: RustBufferByValue, `connectionString`: RustBufferByValue, @@ -3829,6 +3934,206 @@ public object FfiConverterByteArray: FfiConverterRustBuffer { +/** + * Callback interface for receiving watcher events. + * + * Implement this trait in Swift/Kotlin/Python to receive typed notifications + * from xpub watchers. + */ +public open class EventListenerImpl: Disposable, EventListener { + + public constructor(pointer: Pointer) { + this.pointer = pointer + this.cleanable = UniffiLib.CLEANER.register(this, UniffiPointerDestroyer(pointer)) + } + + /** + * This constructor can be used to instantiate a fake object. Only used for tests. Any + * attempt to actually use an object constructed this way will fail as there is no + * connected Rust object. + */ + public constructor(noPointer: NoPointer) { + this.pointer = null + this.cleanable = UniffiLib.CLEANER.register(this, UniffiPointerDestroyer(null)) + } + + protected val pointer: Pointer? + protected val cleanable: UniffiCleaner.Cleanable + + private val wasDestroyed: kotlinx.atomicfu.AtomicBoolean = kotlinx.atomicfu.atomic(false) + private val callCounter: kotlinx.atomicfu.AtomicLong = kotlinx.atomicfu.atomic(1L) + + private val lock = kotlinx.atomicfu.locks.ReentrantLock() + + private fun synchronized(block: () -> T): T { + lock.lock() + try { + return block() + } finally { + lock.unlock() + } + } + + override fun destroy() { + // Only allow a single call to this method. + // TODO: maybe we should log a warning if called more than once? + if (this.wasDestroyed.compareAndSet(false, true)) { + // This decrement always matches the initial count of 1 given at creation time. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + override fun close() { + synchronized { this.destroy() } + } + + internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + // Check and increment the call counter, to keep the object alive. + // This needs a compare-and-set retry loop in case of concurrent updates. + do { + val c = this.callCounter.value + if (c == 0L) { + throw IllegalStateException("${this::class::simpleName} object has already been destroyed") + } + if (c == Long.MAX_VALUE) { + throw IllegalStateException("${this::class::simpleName} call counter would overflow") + } + } while (! this.callCounter.compareAndSet(c, c + 1L)) + // Now we can safely do the method call without the pointer being freed concurrently. + try { + return block(this.uniffiClonePointer()) + } finally { + // This decrement always matches the increment we performed above. + if (this.callCounter.decrementAndGet() == 0L) { + cleanable.clean() + } + } + } + + // Use a static inner class instead of a closure so as not to accidentally + // capture `this` as part of the cleanable's action. + private class UniffiPointerDestroyer(private val pointer: Pointer?) : Disposable { + override fun destroy() { + pointer?.let { ptr -> + uniffiRustCall { status -> + UniffiLib.uniffi_bitkitcore_fn_free_eventlistener(ptr, status) + } + } + } + } + + public fun uniffiClonePointer(): Pointer { + return uniffiRustCall { status -> + UniffiLib.uniffi_bitkitcore_fn_clone_eventlistener(pointer!!, status) + }!! + } + + + /** + * Called when a watcher event occurs. + * + * `watcher_id` identifies which watcher produced the event. + * `event` is a typed enum — no JSON parsing needed. + */ + public override fun `onEvent`(`watcherId`: kotlin.String, `event`: WatcherEvent) { + callWithPointer { + uniffiRustCall { uniffiRustCallStatus -> + UniffiLib.uniffi_bitkitcore_fn_method_eventlistener_on_event( + it, + FfiConverterString.lower(`watcherId`), + FfiConverterTypeWatcherEvent.lower(`event`), + uniffiRustCallStatus, + ) + } + } + } + + + + + + + + public companion object + +} + + + + + +public object FfiConverterTypeEventListener: FfiConverter { + internal val handleMap = UniffiHandleMap() + + override fun lower(value: EventListener): Pointer { + return handleMap.insert(value).toPointer() + } + + override fun lift(value: Pointer): EventListener { + return EventListenerImpl(value) + } + + override fun read(buf: ByteBuffer): EventListener { + // The Rust code always writes pointers as 8 bytes, and will + // fail to compile if they don't fit. + return lift(buf.getLong().toPointer()) + } + + override fun allocationSize(value: EventListener): ULong = 8UL + + override fun write(value: EventListener, buf: ByteBuffer) { + // The Rust code always expects pointers written as 8 bytes, + // and will fail to compile if they don't fit. + buf.putLong(lower(value).toLong()) + } +} + + +// Put the implementation in an object so we don't pollute the top-level namespace +internal object uniffiCallbackInterfaceEventListener { + internal object `onEvent`: UniffiCallbackInterfaceEventListenerMethod0 { + override fun callback ( + `uniffiHandle`: Long, + `watcherId`: RustBufferByValue, + `event`: RustBufferByValue, + `uniffiOutReturn`: Pointer, + uniffiCallStatus: UniffiRustCallStatus, + ) { + val uniffiObj = FfiConverterTypeEventListener.handleMap.get(uniffiHandle) + val makeCall = { -> + uniffiObj.`onEvent`( + FfiConverterString.lift(`watcherId`), + FfiConverterTypeWatcherEvent.lift(`event`), + ) + } + val writeReturn = { _: Unit -> + @Suppress("UNUSED_EXPRESSION") + uniffiOutReturn + Unit + } + uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) + } + } + internal object uniffiFree: UniffiCallbackInterfaceFree { + override fun callback(handle: Long) { + FfiConverterTypeEventListener.handleMap.remove(handle) + } + } + + internal val vtable = UniffiVTableCallbackInterfaceEventListener( + `onEvent`, + uniffiFree, + ) + + internal fun register(lib: UniffiLib) { + lib.uniffi_bitkitcore_fn_init_callback_vtable_eventlistener(vtable) + } +} + + + /** * Callback interface for native Trezor transport operations * @@ -3941,7 +4246,7 @@ public open class TrezorTransportCallbackImpl: Disposable, TrezorTransportCallba }!! } - + /** * Enumerate all connected Trezor devices */ @@ -4156,13 +4461,13 @@ public open class TrezorTransportCallbackImpl: Disposable, TrezorTransportCallba } + + - - - - + + public companion object - + } @@ -4539,7 +4844,7 @@ public open class TrezorUiCallbackImpl: Disposable, TrezorUiCallback { }!! } - + /** * Called when the device requests a PIN. * @@ -4580,13 +4885,13 @@ public open class TrezorUiCallbackImpl: Disposable, TrezorUiCallback { } + + - - - - + + public companion object - + } @@ -7898,6 +8203,40 @@ public object FfiConverterTypeWalletParams: FfiConverterRustBuffer +public object FfiConverterTypeWatcherParams: FfiConverterRustBuffer { + override fun read(buf: ByteBuffer): WatcherParams { + return WatcherParams( + FfiConverterString.read(buf), + FfiConverterString.read(buf), + FfiConverterString.read(buf), + FfiConverterOptionalTypeNetwork.read(buf), + FfiConverterOptionalTypeAccountType.read(buf), + FfiConverterOptionalUInt.read(buf), + ) + } + + override fun allocationSize(value: WatcherParams): ULong = ( + FfiConverterString.allocationSize(value.`watcherId`) + + FfiConverterString.allocationSize(value.`extendedKey`) + + FfiConverterString.allocationSize(value.`electrumUrl`) + + FfiConverterOptionalTypeNetwork.allocationSize(value.`network`) + + FfiConverterOptionalTypeAccountType.allocationSize(value.`accountType`) + + FfiConverterOptionalUInt.allocationSize(value.`gapLimit`) + ) + + override fun write(value: WatcherParams, buf: ByteBuffer) { + FfiConverterString.write(value.`watcherId`, buf) + FfiConverterString.write(value.`extendedKey`, buf) + FfiConverterString.write(value.`electrumUrl`, buf) + FfiConverterOptionalTypeNetwork.write(value.`network`, buf) + FfiConverterOptionalTypeAccountType.write(value.`accountType`, buf) + FfiConverterOptionalUInt.write(value.`gapLimit`, buf) + } +} + + + + public object AccountInfoExceptionErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(errorBuf: RustBufferByValue): AccountInfoException = FfiConverterTypeAccountInfoError.lift(errorBuf) } @@ -7932,6 +8271,9 @@ public object FfiConverterTypeAccountInfoError : FfiConverterRustBuffer AccountInfoException.TransactionNotFound( FfiConverterString.read(buf), ) + 10 -> AccountInfoException.WatcherException( + FfiConverterString.read(buf), + ) else -> throw RuntimeException("invalid error enum value, something is very wrong!!") } } @@ -7983,6 +8325,11 @@ public object FfiConverterTypeAccountInfoError : FfiConverterRustBuffer ( + // Add the size for the Int that specifies the variant plus the size needed for all fields + 4UL + + FfiConverterString.allocationSize(value.`errorDetails`) + ) } } @@ -8033,6 +8380,11 @@ public object FfiConverterTypeAccountInfoError : FfiConverterRustBuffer { + buf.putInt(10) + FfiConverterString.write(value.`errorDetails`, buf) + Unit + } }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } } @@ -10178,6 +10530,94 @@ public object FfiConverterTypeWalletSelection : FfiConverterRustBuffer{ + override fun read(buf: ByteBuffer): WatcherEvent { + return when(buf.getInt()) { + 1 -> WatcherEvent.TransactionsChanged( + FfiConverterSequenceTypeHistoryTransaction.read(buf), + FfiConverterTypeWalletBalance.read(buf), + FfiConverterUInt.read(buf), + FfiConverterUInt.read(buf), + FfiConverterTypeAccountType.read(buf), + ) + 2 -> WatcherEvent.Error( + FfiConverterString.read(buf), + ) + 3 -> WatcherEvent.Disconnected( + FfiConverterString.read(buf), + ) + 4 -> WatcherEvent.Reconnected + else -> throw RuntimeException("invalid enum value, something is very wrong!!") + } + } + + override fun allocationSize(value: WatcherEvent): ULong = when(value) { + is WatcherEvent.TransactionsChanged -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterSequenceTypeHistoryTransaction.allocationSize(value.`transactions`) + + FfiConverterTypeWalletBalance.allocationSize(value.`balance`) + + FfiConverterUInt.allocationSize(value.`txCount`) + + FfiConverterUInt.allocationSize(value.`blockHeight`) + + FfiConverterTypeAccountType.allocationSize(value.`accountType`) + ) + } + is WatcherEvent.Error -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterString.allocationSize(value.`message`) + ) + } + is WatcherEvent.Disconnected -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + + FfiConverterString.allocationSize(value.`message`) + ) + } + is WatcherEvent.Reconnected -> { + // Add the size for the Int that specifies the variant plus the size needed for all fields + ( + 4UL + ) + } + } + + override fun write(value: WatcherEvent, buf: ByteBuffer) { + when(value) { + is WatcherEvent.TransactionsChanged -> { + buf.putInt(1) + FfiConverterSequenceTypeHistoryTransaction.write(value.`transactions`, buf) + FfiConverterTypeWalletBalance.write(value.`balance`, buf) + FfiConverterUInt.write(value.`txCount`, buf) + FfiConverterUInt.write(value.`blockHeight`, buf) + FfiConverterTypeAccountType.write(value.`accountType`, buf) + Unit + } + is WatcherEvent.Error -> { + buf.putInt(2) + FfiConverterString.write(value.`message`, buf) + Unit + } + is WatcherEvent.Disconnected -> { + buf.putInt(3) + FfiConverterString.write(value.`message`, buf) + Unit + } + is WatcherEvent.Reconnected -> { + buf.putInt(4) + Unit + } + }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } + } +} + + + + + public object FfiConverterTypeWordCount: FfiConverterRustBuffer { override fun read(buf: ByteBuffer): WordCount = try { WordCount.entries[buf.getInt() - 1] @@ -12455,7 +12895,7 @@ public suspend fun `approvePubkyAuth`(`authUrl`: kotlin.String, `secretKeyHex`: { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter PubkyExceptionErrorHandler, ) @@ -12472,7 +12912,7 @@ public suspend fun `blocktankRemoveAllCjitEntries`() { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -12489,7 +12929,7 @@ public suspend fun `blocktankRemoveAllOrders`() { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -12506,7 +12946,7 @@ public suspend fun `blocktankWipeAll`() { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -12553,7 +12993,7 @@ public suspend fun `cancelPubkyAuth`() { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter PubkyExceptionErrorHandler, ) @@ -13457,6 +13897,54 @@ public suspend fun `onchainGetTransactionHistory`(`extendedKey`: kotlin.String, ) } +/** + * Start monitoring an xpub for transaction activity via Electrum subscriptions. + * + * Each watcher receives its own listener — no global registration needed. + */ +@Throws(AccountInfoException::class, kotlin.coroutines.cancellation.CancellationException::class) +public suspend fun `onchainStartWatcher`(`params`: WatcherParams, `listener`: EventListener) { + return uniffiRustCallAsync( + UniffiLib.uniffi_bitkitcore_fn_func_onchain_start_watcher( + FfiConverterTypeWatcherParams.lower(`params`), + FfiConverterTypeEventListener.lower(`listener`), + ), + { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_bitkitcore_rust_future_free_void(future) }, + { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + AccountInfoExceptionErrorHandler, + ) +} + +/** + * Stop all active xpub watchers. + */ +public fun `onchainStopAllWatchers`() { + uniffiRustCall { uniffiRustCallStatus -> + UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_all_watchers( + uniffiRustCallStatus, + ) + } +} + +/** + * Stop a specific xpub watcher by ID. + */ +@Throws(AccountInfoException::class) +public fun `onchainStopWatcher`(`watcherId`: kotlin.String) { + uniffiRustCallWithError(AccountInfoExceptionErrorHandler) { uniffiRustCallStatus -> + UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_watcher( + FfiConverterString.lower(`watcherId`), + uniffiRustCallStatus, + ) + } +} + @Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) public suspend fun `openChannel`(`orderId`: kotlin.String, `connectionString`: kotlin.String): IBtOrder { return uniffiRustCallAsync( @@ -13554,7 +14042,7 @@ public suspend fun `pubkyPutWithSecretKey`(`secretKeyHex`: kotlin.String, `path` { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter PubkyExceptionErrorHandler, ) @@ -13573,7 +14061,7 @@ public suspend fun `pubkySessionDelete`(`sessionSecret`: kotlin.String, `path`: { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter PubkyExceptionErrorHandler, ) @@ -13611,7 +14099,7 @@ public suspend fun `pubkySessionPut`(`sessionSecret`: kotlin.String, `path`: kot { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter PubkyExceptionErrorHandler, ) @@ -13781,7 +14269,7 @@ public suspend fun `regtestMine`(`count`: kotlin.UInt?) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -13945,7 +14433,7 @@ public suspend fun `trezorClearCredentials`(`deviceId`: kotlin.String) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter TrezorExceptionErrorHandler, ) @@ -13994,7 +14482,7 @@ public suspend fun `trezorDisconnect`() { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter TrezorExceptionErrorHandler, ) @@ -14121,7 +14609,7 @@ public suspend fun `trezorInitialize`(`credentialPath`: kotlin.String?) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter TrezorExceptionErrorHandler, ) @@ -14360,7 +14848,7 @@ public suspend fun `updateBlocktankUrl`(`newUrl`: kotlin.String) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -14398,7 +14886,7 @@ public suspend fun `upsertCjitEntries`(`entries`: List) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -14436,7 +14924,7 @@ public suspend fun `upsertInfo`(`info`: IBtInfo) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) @@ -14474,7 +14962,7 @@ public suspend fun `upsertOrders`(`orders`: List) { { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_void(future) }, // lift function { Unit }, - + // Error FFI converter BlocktankExceptionErrorHandler, ) diff --git a/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt b/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt index 2bab934..7f80bb1 100644 --- a/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt +++ b/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt @@ -112,6 +112,28 @@ public object NoPointer + +/** + * Callback interface for receiving watcher events. + * + * Implement this trait in Swift/Kotlin/Python to receive typed notifications + * from xpub watchers. + */ +public interface EventListener { + + /** + * Called when a watcher event occurs. + * + * `watcher_id` identifies which watcher produced the event. + * `event` is a typed enum — no JSON parsing needed. + */ + public fun `onEvent`(`watcherId`: kotlin.String, `event`: WatcherEvent) + + public companion object +} + + + /** * Callback interface for native Trezor transport operations @@ -136,37 +158,37 @@ public object NoPointer * Use IOKit/CoreBluetooth with same service/characteristic UUIDs. */ public interface TrezorTransportCallback { - + /** * Enumerate all connected Trezor devices */ public fun `enumerateDevices`(): List - + /** * Open a connection to a device */ public fun `openDevice`(`path`: kotlin.String): TrezorTransportWriteResult - + /** * Close the connection to a device */ public fun `closeDevice`(`path`: kotlin.String): TrezorTransportWriteResult - + /** * Read a chunk of data from the device */ public fun `readChunk`(`path`: kotlin.String): TrezorTransportReadResult - + /** * Write a chunk of data to the device */ public fun `writeChunk`(`path`: kotlin.String, `data`: kotlin.ByteArray): TrezorTransportWriteResult - + /** * Get the chunk size for a device (64 for USB, 244 for Bluetooth) */ public fun `getChunkSize`(`path`: kotlin.String): kotlin.UInt - + /** * High-level message call for BLE/THP devices. * @@ -183,7 +205,7 @@ public interface TrezorTransportCallback { * * `data` - Serialized protobuf message data */ public fun `callMessage`(`path`: kotlin.String, `messageType`: kotlin.UShort, `data`: kotlin.ByteArray): TrezorCallMessageResult? - + /** * Get pairing code from user during BLE THP pairing. * @@ -196,7 +218,7 @@ public interface TrezorTransportCallback { * Returns the 6-digit code as a string, or empty string to cancel. */ public fun `getPairingCode`(): kotlin.String - + /** * Save THP pairing credentials for a device. * @@ -210,7 +232,7 @@ public interface TrezorTransportCallback { * Returns true if credentials were saved successfully. */ public fun `saveThpCredential`(`deviceId`: kotlin.String, `credentialJson`: kotlin.String): kotlin.Boolean - + /** * Load THP pairing credentials for a device. * @@ -223,7 +245,7 @@ public interface TrezorTransportCallback { * Returns the JSON string containing ThpCredentials, or None if not found. */ public fun `loadThpCredential`(`deviceId`: kotlin.String): kotlin.String? - + /** * Log a debug message from the Rust THP handshake layer. * @@ -236,7 +258,7 @@ public interface TrezorTransportCallback { * * `message` - Human-readable debug message */ public fun `logDebug`(`tag`: kotlin.String, `message`: kotlin.String) - + public companion object } @@ -250,7 +272,7 @@ public interface TrezorTransportCallback { * input UI when the device requests it during operations like signing. */ public interface TrezorUiCallback { - + /** * Called when the device requests a PIN. * @@ -258,7 +280,7 @@ public interface TrezorUiCallback { * Return empty string to cancel. */ public fun `onPinRequest`(): kotlin.String - + /** * Called when the device requests a passphrase. * @@ -270,7 +292,7 @@ public interface TrezorUiCallback { * `OnDevice` (defer entry to the Trezor), or `Cancel`. */ public fun `onPassphraseRequest`(`onDevice`: kotlin.Boolean): PassphraseResponse - + public companion object } @@ -285,11 +307,11 @@ public data class AccountAddresses ( /** * Used receive addresses (have at least one transaction) */ - val `used`: List, + val `used`: List, /** * Unused receive addresses (no transactions yet) */ - val `unused`: List, + val `unused`: List, /** * Change addresses */ @@ -308,19 +330,19 @@ public data class AccountInfoResult ( /** * The account structure with addresses and UTXOs */ - val `account`: ComposeAccount, + val `account`: ComposeAccount, /** * Total confirmed balance in satoshis */ - val `balance`: kotlin.ULong, + val `balance`: kotlin.ULong, /** * Number of UTXOs */ - val `utxoCount`: kotlin.UInt, + val `utxoCount`: kotlin.UInt, /** * The detected or specified account type */ - val `accountType`: AccountType, + val `accountType`: AccountType, /** * The current blockchain tip height */ @@ -339,39 +361,39 @@ public data class AccountUtxo ( /** * Transaction ID (hex) */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * Output index */ - val `vout`: kotlin.UInt, + val `vout`: kotlin.UInt, /** * Amount in satoshis */ - val `amount`: kotlin.ULong, + val `amount`: kotlin.ULong, /** * Block height where the UTXO was confirmed (0 if unconfirmed) */ - val `blockHeight`: kotlin.UInt, + val `blockHeight`: kotlin.UInt, /** * Address holding this UTXO */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * BIP32 derivation path (e.g., "m/84'/0'/0'/0/0") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Number of confirmations (0 if unconfirmed) */ - val `confirmations`: kotlin.UInt, + val `confirmations`: kotlin.UInt, /** * Whether this is a coinbase output */ - val `coinbase`: kotlin.Boolean, + val `coinbase`: kotlin.Boolean, /** * Whether this UTXO is owned by the account */ - val `own`: kotlin.Boolean, + val `own`: kotlin.Boolean, /** * Whether this UTXO must be included in the transaction */ @@ -384,7 +406,7 @@ public data class AccountUtxo ( @kotlinx.serialization.Serializable public data class ActivityTags ( - val `activityId`: kotlin.String, + val `activityId`: kotlin.String, val `tags`: List ) { public companion object @@ -400,11 +422,11 @@ public data class AddressInfo ( /** * The Bitcoin address */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * BIP32 derivation path */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Number of transfers (real count in `get_address_info`, 1/0 presence flag in `get_account_info`) */ @@ -417,9 +439,9 @@ public data class AddressInfo ( @kotlinx.serialization.Serializable public data class ChannelLiquidityOptions ( - val `defaultLspBalanceSat`: kotlin.ULong, - val `minLspBalanceSat`: kotlin.ULong, - val `maxLspBalanceSat`: kotlin.ULong, + val `defaultLspBalanceSat`: kotlin.ULong, + val `minLspBalanceSat`: kotlin.ULong, + val `maxLspBalanceSat`: kotlin.ULong, val `maxClientBalanceSat`: kotlin.ULong ) { public companion object @@ -429,10 +451,10 @@ public data class ChannelLiquidityOptions ( @kotlinx.serialization.Serializable public data class ChannelLiquidityParams ( - val `clientBalanceSat`: kotlin.ULong, - val `existingChannelsTotalSat`: kotlin.ULong, - val `minChannelSizeSat`: kotlin.ULong, - val `maxChannelSizeSat`: kotlin.ULong, + val `clientBalanceSat`: kotlin.ULong, + val `existingChannelsTotalSat`: kotlin.ULong, + val `minChannelSizeSat`: kotlin.ULong, + val `maxChannelSizeSat`: kotlin.ULong, val `satsPerEur`: kotlin.ULong ) { public companion object @@ -442,19 +464,19 @@ public data class ChannelLiquidityParams ( @kotlinx.serialization.Serializable public data class ClosedChannelDetails ( - val `channelId`: kotlin.String, - val `counterpartyNodeId`: kotlin.String, - val `fundingTxoTxid`: kotlin.String, - val `fundingTxoIndex`: kotlin.UInt, - val `channelValueSats`: kotlin.ULong, - val `closedAt`: kotlin.ULong, - val `outboundCapacityMsat`: kotlin.ULong, - val `inboundCapacityMsat`: kotlin.ULong, - val `counterpartyUnspendablePunishmentReserve`: kotlin.ULong, - val `unspendablePunishmentReserve`: kotlin.ULong, - val `forwardingFeeProportionalMillionths`: kotlin.UInt, - val `forwardingFeeBaseMsat`: kotlin.UInt, - val `channelName`: kotlin.String, + val `channelId`: kotlin.String, + val `counterpartyNodeId`: kotlin.String, + val `fundingTxoTxid`: kotlin.String, + val `fundingTxoIndex`: kotlin.UInt, + val `channelValueSats`: kotlin.ULong, + val `closedAt`: kotlin.ULong, + val `outboundCapacityMsat`: kotlin.ULong, + val `inboundCapacityMsat`: kotlin.ULong, + val `counterpartyUnspendablePunishmentReserve`: kotlin.ULong, + val `unspendablePunishmentReserve`: kotlin.ULong, + val `forwardingFeeProportionalMillionths`: kotlin.UInt, + val `forwardingFeeBaseMsat`: kotlin.UInt, + val `channelName`: kotlin.String, val `channelClosureReason`: kotlin.String ) { public companion object @@ -470,11 +492,11 @@ public data class ComposeAccount ( /** * Account derivation path (e.g., "m/84'/0'/0'") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Categorized addresses */ - val `addresses`: AccountAddresses, + val `addresses`: AccountAddresses, /** * Unspent transaction outputs */ @@ -493,15 +515,15 @@ public data class ComposeParams ( /** * Wallet configuration (key, server, network) */ - val `wallet`: WalletParams, + val `wallet`: WalletParams, /** * Desired transaction outputs */ - val `outputs`: List, + val `outputs`: List, /** * Fee rates to evaluate (sat/vB), one PSBT per rate */ - val `feeRates`: List, + val `feeRates`: List, /** * UTXO selection strategy (defaults to BranchAndBound) */ @@ -514,7 +536,7 @@ public data class ComposeParams ( @kotlinx.serialization.Serializable public data class CreateCjitOptions ( - val `source`: kotlin.String?, + val `source`: kotlin.String?, val `discountCode`: kotlin.String? ) { public companion object @@ -524,18 +546,18 @@ public data class CreateCjitOptions ( @kotlinx.serialization.Serializable public data class CreateOrderOptions ( - val `clientBalanceSat`: kotlin.ULong, - val `lspNodeId`: kotlin.String?, - val `couponCode`: kotlin.String, - val `source`: kotlin.String?, - val `discountCode`: kotlin.String?, - val `zeroConf`: kotlin.Boolean, - val `zeroConfPayment`: kotlin.Boolean?, - val `zeroReserve`: kotlin.Boolean, - val `clientNodeId`: kotlin.String?, - val `signature`: kotlin.String?, - val `timestamp`: kotlin.String?, - val `refundOnchainAddress`: kotlin.String?, + val `clientBalanceSat`: kotlin.ULong, + val `lspNodeId`: kotlin.String?, + val `couponCode`: kotlin.String, + val `source`: kotlin.String?, + val `discountCode`: kotlin.String?, + val `zeroConf`: kotlin.Boolean, + val `zeroConfPayment`: kotlin.Boolean?, + val `zeroReserve`: kotlin.Boolean, + val `clientNodeId`: kotlin.String?, + val `signature`: kotlin.String?, + val `timestamp`: kotlin.String?, + val `refundOnchainAddress`: kotlin.String?, val `announceChannel`: kotlin.Boolean ) { public companion object @@ -545,8 +567,8 @@ public data class CreateOrderOptions ( @kotlinx.serialization.Serializable public data class DefaultLspBalanceParams ( - val `clientBalanceSat`: kotlin.ULong, - val `maxChannelSizeSat`: kotlin.ULong, + val `clientBalanceSat`: kotlin.ULong, + val `maxChannelSizeSat`: kotlin.ULong, val `satsPerEur`: kotlin.ULong ) { public companion object @@ -565,8 +587,8 @@ public data class ErrorData ( @kotlinx.serialization.Serializable public data class FeeRates ( - val `fast`: kotlin.UInt, - val `mid`: kotlin.UInt, + val `fast`: kotlin.UInt, + val `mid`: kotlin.UInt, val `slow`: kotlin.UInt ) { public companion object @@ -576,7 +598,7 @@ public data class FeeRates ( @kotlinx.serialization.Serializable public data class FundingTx ( - val `id`: kotlin.String, + val `id`: kotlin.String, val `vout`: kotlin.ULong ) { public companion object @@ -589,11 +611,11 @@ public data class GetAddressResponse ( /** * The generated Bitcoin address as a string */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * The derivation path used to generate the address */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * The hexadecimal representation of the public key */ @@ -624,42 +646,42 @@ public data class HistoryTransaction ( /** * Transaction ID (hex) */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * Amount received by the wallet (sats) */ - val `received`: kotlin.ULong, + val `received`: kotlin.ULong, /** * Amount sent by the wallet (sats) — includes change sent back to self */ - val `sent`: kotlin.ULong, + val `sent`: kotlin.ULong, /** * Net value from wallet's perspective: received - sent (positive = inflow, negative = outflow) */ - val `net`: kotlin.Long, + val `net`: kotlin.Long, /** * Transaction fee in sats (None if not available, e.g. for received-only txs) */ - val `fee`: kotlin.ULong?, + val `fee`: kotlin.ULong?, /** * Display amount in sats: * - Received: the received value * - Sent: amount that left the wallet (sent - received - fee) * - SelfTransfer: the fee paid */ - val `amount`: kotlin.ULong, + val `amount`: kotlin.ULong, /** * Transaction direction */ - val `direction`: TxDirection, + val `direction`: TxDirection, /** * Block height (None if unconfirmed/mempool) */ - val `blockHeight`: kotlin.UInt?, + val `blockHeight`: kotlin.UInt?, /** * Block timestamp as unix epoch seconds (None if unconfirmed) */ - val `timestamp`: kotlin.ULong?, + val `timestamp`: kotlin.ULong?, /** * Number of confirmations (0 if unconfirmed) */ @@ -672,7 +694,7 @@ public data class HistoryTransaction ( @kotlinx.serialization.Serializable public data class IBt0ConfMinTxFeeWindow ( - val `satPerVbyte`: kotlin.Double, + val `satPerVbyte`: kotlin.Double, val `validityEndsAt`: kotlin.String ) { public companion object @@ -682,9 +704,9 @@ public data class IBt0ConfMinTxFeeWindow ( @kotlinx.serialization.Serializable public data class IBtBolt11Invoice ( - val `request`: kotlin.String, - val `state`: BtBolt11InvoiceState, - val `expiresAt`: kotlin.String, + val `request`: kotlin.String, + val `state`: BtBolt11InvoiceState, + val `expiresAt`: kotlin.String, val `updatedAt`: kotlin.String ) { public companion object @@ -694,13 +716,13 @@ public data class IBtBolt11Invoice ( @kotlinx.serialization.Serializable public data class IBtChannel ( - val `state`: BtOpenChannelState, - val `lspNodePubkey`: kotlin.String, - val `clientNodePubkey`: kotlin.String, - val `announceChannel`: kotlin.Boolean, - val `fundingTx`: FundingTx, - val `closingTxId`: kotlin.String?, - val `close`: IBtChannelClose?, + val `state`: BtOpenChannelState, + val `lspNodePubkey`: kotlin.String, + val `clientNodePubkey`: kotlin.String, + val `announceChannel`: kotlin.Boolean, + val `fundingTx`: FundingTx, + val `closingTxId`: kotlin.String?, + val `close`: IBtChannelClose?, val `shortChannelId`: kotlin.String? ) { public companion object @@ -710,9 +732,9 @@ public data class IBtChannel ( @kotlinx.serialization.Serializable public data class IBtChannelClose ( - val `txId`: kotlin.String, - val `closeType`: kotlin.String, - val `initiator`: kotlin.String, + val `txId`: kotlin.String, + val `closeType`: kotlin.String, + val `initiator`: kotlin.String, val `registeredAt`: kotlin.String ) { public companion object @@ -722,7 +744,7 @@ public data class IBtChannelClose ( @kotlinx.serialization.Serializable public data class IBtEstimateFeeResponse ( - val `feeSat`: kotlin.ULong, + val `feeSat`: kotlin.ULong, val `min0ConfTxFee`: IBt0ConfMinTxFeeWindow ) { public companion object @@ -732,9 +754,9 @@ public data class IBtEstimateFeeResponse ( @kotlinx.serialization.Serializable public data class IBtEstimateFeeResponse2 ( - val `feeSat`: kotlin.ULong, - val `networkFeeSat`: kotlin.ULong, - val `serviceFeeSat`: kotlin.ULong, + val `feeSat`: kotlin.ULong, + val `networkFeeSat`: kotlin.ULong, + val `serviceFeeSat`: kotlin.ULong, val `min0ConfTxFee`: IBt0ConfMinTxFeeWindow ) { public companion object @@ -744,10 +766,10 @@ public data class IBtEstimateFeeResponse2 ( @kotlinx.serialization.Serializable public data class IBtInfo ( - val `version`: kotlin.UInt, - val `nodes`: List, - val `options`: IBtInfoOptions, - val `versions`: IBtInfoVersions, + val `version`: kotlin.UInt, + val `nodes`: List, + val `options`: IBtInfoOptions, + val `versions`: IBtInfoVersions, val `onchain`: IBtInfoOnchain ) { public companion object @@ -757,7 +779,7 @@ public data class IBtInfo ( @kotlinx.serialization.Serializable public data class IBtInfoOnchain ( - val `network`: BitcoinNetworkEnum, + val `network`: BitcoinNetworkEnum, val `feeRates`: FeeRates ) { public companion object @@ -767,13 +789,13 @@ public data class IBtInfoOnchain ( @kotlinx.serialization.Serializable public data class IBtInfoOptions ( - val `minChannelSizeSat`: kotlin.ULong, - val `maxChannelSizeSat`: kotlin.ULong, - val `minExpiryWeeks`: kotlin.UInt, - val `maxExpiryWeeks`: kotlin.UInt, - val `minPaymentConfirmations`: kotlin.UInt, - val `minHighRiskPaymentConfirmations`: kotlin.UInt, - val `max0ConfClientBalanceSat`: kotlin.ULong, + val `minChannelSizeSat`: kotlin.ULong, + val `maxChannelSizeSat`: kotlin.ULong, + val `minExpiryWeeks`: kotlin.UInt, + val `maxExpiryWeeks`: kotlin.UInt, + val `minPaymentConfirmations`: kotlin.UInt, + val `minHighRiskPaymentConfirmations`: kotlin.UInt, + val `max0ConfClientBalanceSat`: kotlin.ULong, val `maxClientBalanceSat`: kotlin.ULong ) { public companion object @@ -783,8 +805,8 @@ public data class IBtInfoOptions ( @kotlinx.serialization.Serializable public data class IBtInfoVersions ( - val `http`: kotlin.String, - val `btc`: kotlin.String, + val `http`: kotlin.String, + val `btc`: kotlin.String, val `ln2`: kotlin.String ) { public companion object @@ -794,13 +816,13 @@ public data class IBtInfoVersions ( @kotlinx.serialization.Serializable public data class IBtOnchainTransaction ( - val `amountSat`: kotlin.ULong, - val `txId`: kotlin.String, - val `vout`: kotlin.UInt, - val `blockHeight`: kotlin.UInt?, - val `blockConfirmationCount`: kotlin.UInt, - val `feeRateSatPerVbyte`: kotlin.Double, - val `confirmed`: kotlin.Boolean, + val `amountSat`: kotlin.ULong, + val `txId`: kotlin.String, + val `vout`: kotlin.UInt, + val `blockHeight`: kotlin.UInt?, + val `blockConfirmationCount`: kotlin.UInt, + val `feeRateSatPerVbyte`: kotlin.Double, + val `confirmed`: kotlin.Boolean, val `suspicious0ConfReason`: kotlin.String ) { public companion object @@ -810,9 +832,9 @@ public data class IBtOnchainTransaction ( @kotlinx.serialization.Serializable public data class IBtOnchainTransactions ( - val `address`: kotlin.String, - val `confirmedSat`: kotlin.ULong, - val `requiredConfirmations`: kotlin.UInt, + val `address`: kotlin.String, + val `confirmedSat`: kotlin.ULong, + val `requiredConfirmations`: kotlin.UInt, val `transactions`: List ) { public companion object @@ -822,28 +844,28 @@ public data class IBtOnchainTransactions ( @kotlinx.serialization.Serializable public data class IBtOrder ( - val `id`: kotlin.String, - val `state`: BtOrderState, - val `state2`: BtOrderState2?, - val `feeSat`: kotlin.ULong, - val `networkFeeSat`: kotlin.ULong, - val `serviceFeeSat`: kotlin.ULong, - val `lspBalanceSat`: kotlin.ULong, - val `clientBalanceSat`: kotlin.ULong, - val `zeroConf`: kotlin.Boolean, - val `zeroReserve`: kotlin.Boolean, - val `clientNodeId`: kotlin.String?, - val `channelExpiryWeeks`: kotlin.UInt, - val `channelExpiresAt`: kotlin.String, - val `orderExpiresAt`: kotlin.String, - val `channel`: IBtChannel?, - val `lspNode`: ILspNode?, - val `lnurl`: kotlin.String?, - val `payment`: IBtPayment?, - val `couponCode`: kotlin.String?, - val `source`: kotlin.String?, - val `discount`: IDiscount?, - val `updatedAt`: kotlin.String, + val `id`: kotlin.String, + val `state`: BtOrderState, + val `state2`: BtOrderState2?, + val `feeSat`: kotlin.ULong, + val `networkFeeSat`: kotlin.ULong, + val `serviceFeeSat`: kotlin.ULong, + val `lspBalanceSat`: kotlin.ULong, + val `clientBalanceSat`: kotlin.ULong, + val `zeroConf`: kotlin.Boolean, + val `zeroReserve`: kotlin.Boolean, + val `clientNodeId`: kotlin.String?, + val `channelExpiryWeeks`: kotlin.UInt, + val `channelExpiresAt`: kotlin.String, + val `orderExpiresAt`: kotlin.String, + val `channel`: IBtChannel?, + val `lspNode`: ILspNode?, + val `lnurl`: kotlin.String?, + val `payment`: IBtPayment?, + val `couponCode`: kotlin.String?, + val `source`: kotlin.String?, + val `discount`: IDiscount?, + val `updatedAt`: kotlin.String, val `createdAt`: kotlin.String ) { public companion object @@ -853,12 +875,12 @@ public data class IBtOrder ( @kotlinx.serialization.Serializable public data class IBtPayment ( - val `state`: BtPaymentState, - val `state2`: BtPaymentState2?, - val `paidSat`: kotlin.ULong, - val `bolt11Invoice`: IBtBolt11Invoice?, - val `onchain`: IBtOnchainTransactions?, - val `isManuallyPaid`: kotlin.Boolean?, + val `state`: BtPaymentState, + val `state2`: BtPaymentState2?, + val `paidSat`: kotlin.ULong, + val `bolt11Invoice`: IBtBolt11Invoice?, + val `onchain`: IBtOnchainTransactions?, + val `isManuallyPaid`: kotlin.Boolean?, val `manualRefunds`: List? ) { public companion object @@ -868,23 +890,23 @@ public data class IBtPayment ( @kotlinx.serialization.Serializable public data class IcJitEntry ( - val `id`: kotlin.String, - val `state`: CJitStateEnum, - val `feeSat`: kotlin.ULong, - val `networkFeeSat`: kotlin.ULong, - val `serviceFeeSat`: kotlin.ULong, - val `channelSizeSat`: kotlin.ULong, - val `channelExpiryWeeks`: kotlin.UInt, - val `channelOpenError`: kotlin.String?, - val `nodeId`: kotlin.String, - val `invoice`: IBtBolt11Invoice, - val `channel`: IBtChannel?, - val `lspNode`: ILspNode, - val `couponCode`: kotlin.String, - val `source`: kotlin.String?, - val `discount`: IDiscount?, - val `expiresAt`: kotlin.String, - val `updatedAt`: kotlin.String, + val `id`: kotlin.String, + val `state`: CJitStateEnum, + val `feeSat`: kotlin.ULong, + val `networkFeeSat`: kotlin.ULong, + val `serviceFeeSat`: kotlin.ULong, + val `channelSizeSat`: kotlin.ULong, + val `channelExpiryWeeks`: kotlin.UInt, + val `channelOpenError`: kotlin.String?, + val `nodeId`: kotlin.String, + val `invoice`: IBtBolt11Invoice, + val `channel`: IBtChannel?, + val `lspNode`: ILspNode, + val `couponCode`: kotlin.String, + val `source`: kotlin.String?, + val `discount`: IDiscount?, + val `expiresAt`: kotlin.String, + val `updatedAt`: kotlin.String, val `createdAt`: kotlin.String ) { public companion object @@ -894,9 +916,9 @@ public data class IcJitEntry ( @kotlinx.serialization.Serializable public data class IDiscount ( - val `code`: kotlin.String, - val `absoluteSat`: kotlin.ULong, - val `relative`: kotlin.Double, + val `code`: kotlin.String, + val `absoluteSat`: kotlin.ULong, + val `relative`: kotlin.Double, val `overallSat`: kotlin.ULong ) { public companion object @@ -906,15 +928,15 @@ public data class IDiscount ( @kotlinx.serialization.Serializable public data class IGift ( - val `id`: kotlin.String, - val `nodeId`: kotlin.String, - val `orderId`: kotlin.String?, - val `order`: IGiftOrder?, - val `bolt11PaymentId`: kotlin.String?, - val `bolt11Payment`: IGiftPayment?, - val `appliedGiftCodeId`: kotlin.String?, - val `appliedGiftCode`: IGiftCode?, - val `createdAt`: kotlin.String?, + val `id`: kotlin.String, + val `nodeId`: kotlin.String, + val `orderId`: kotlin.String?, + val `order`: IGiftOrder?, + val `bolt11PaymentId`: kotlin.String?, + val `bolt11Payment`: IGiftPayment?, + val `appliedGiftCodeId`: kotlin.String?, + val `appliedGiftCode`: IGiftCode?, + val `createdAt`: kotlin.String?, val `updatedAt`: kotlin.String? ) { public companion object @@ -924,16 +946,16 @@ public data class IGift ( @kotlinx.serialization.Serializable public data class IGiftBolt11Invoice ( - val `id`: kotlin.String, - val `request`: kotlin.String, - val `state`: kotlin.String, - val `isHodlInvoice`: kotlin.Boolean?, - val `paymentHash`: kotlin.String?, - val `amountSat`: kotlin.ULong?, - val `amountMsat`: kotlin.String?, - val `internalNodePubkey`: kotlin.String?, - val `updatedAt`: kotlin.String?, - val `createdAt`: kotlin.String?, + val `id`: kotlin.String, + val `request`: kotlin.String, + val `state`: kotlin.String, + val `isHodlInvoice`: kotlin.Boolean?, + val `paymentHash`: kotlin.String?, + val `amountSat`: kotlin.ULong?, + val `amountMsat`: kotlin.String?, + val `internalNodePubkey`: kotlin.String?, + val `updatedAt`: kotlin.String?, + val `createdAt`: kotlin.String?, val `expiresAt`: kotlin.String? ) { public companion object @@ -943,14 +965,14 @@ public data class IGiftBolt11Invoice ( @kotlinx.serialization.Serializable public data class IGiftBtcAddress ( - val `id`: kotlin.String, - val `address`: kotlin.String, - val `transactions`: List, - val `allTransactions`: List, - val `isBlacklisted`: kotlin.Boolean?, - val `watchUntil`: kotlin.String?, - val `watchForBlockConfirmations`: kotlin.UInt?, - val `updatedAt`: kotlin.String?, + val `id`: kotlin.String, + val `address`: kotlin.String, + val `transactions`: List, + val `allTransactions`: List, + val `isBlacklisted`: kotlin.Boolean?, + val `watchUntil`: kotlin.String?, + val `watchForBlockConfirmations`: kotlin.UInt?, + val `updatedAt`: kotlin.String?, val `createdAt`: kotlin.String? ) { public companion object @@ -960,13 +982,13 @@ public data class IGiftBtcAddress ( @kotlinx.serialization.Serializable public data class IGiftCode ( - val `id`: kotlin.String, - val `code`: kotlin.String, - val `createdAt`: kotlin.String, - val `updatedAt`: kotlin.String, - val `expiresAt`: kotlin.String, - val `giftSat`: kotlin.ULong?, - val `scope`: kotlin.String?, + val `id`: kotlin.String, + val `code`: kotlin.String, + val `createdAt`: kotlin.String, + val `updatedAt`: kotlin.String, + val `expiresAt`: kotlin.String, + val `giftSat`: kotlin.ULong?, + val `scope`: kotlin.String?, val `maxCount`: kotlin.UInt? ) { public companion object @@ -976,8 +998,8 @@ public data class IGiftCode ( @kotlinx.serialization.Serializable public data class IGiftLspNode ( - val `alias`: kotlin.String, - val `pubkey`: kotlin.String, + val `alias`: kotlin.String, + val `pubkey`: kotlin.String, val `connectionStrings`: List ) { public companion object @@ -987,27 +1009,27 @@ public data class IGiftLspNode ( @kotlinx.serialization.Serializable public data class IGiftOrder ( - val `id`: kotlin.String, - val `state`: kotlin.String, - val `oldState`: kotlin.String?, - val `isChannelExpired`: kotlin.Boolean?, - val `isOrderExpired`: kotlin.Boolean?, - val `lspBalanceSat`: kotlin.ULong?, - val `clientBalanceSat`: kotlin.ULong?, - val `channelExpiryWeeks`: kotlin.UInt?, - val `zeroConf`: kotlin.Boolean?, - val `zeroReserve`: kotlin.Boolean?, - val `announced`: kotlin.Boolean?, - val `clientNodeId`: kotlin.String?, - val `channelExpiresAt`: kotlin.String?, - val `orderExpiresAt`: kotlin.String?, - val `feeSat`: kotlin.ULong?, - val `networkFeeSat`: kotlin.ULong?, - val `serviceFeeSat`: kotlin.ULong?, - val `payment`: IGiftPayment?, - val `lspNode`: IGiftLspNode?, - val `updatedAt`: kotlin.String?, - val `createdAt`: kotlin.String?, + val `id`: kotlin.String, + val `state`: kotlin.String, + val `oldState`: kotlin.String?, + val `isChannelExpired`: kotlin.Boolean?, + val `isOrderExpired`: kotlin.Boolean?, + val `lspBalanceSat`: kotlin.ULong?, + val `clientBalanceSat`: kotlin.ULong?, + val `channelExpiryWeeks`: kotlin.UInt?, + val `zeroConf`: kotlin.Boolean?, + val `zeroReserve`: kotlin.Boolean?, + val `announced`: kotlin.Boolean?, + val `clientNodeId`: kotlin.String?, + val `channelExpiresAt`: kotlin.String?, + val `orderExpiresAt`: kotlin.String?, + val `feeSat`: kotlin.ULong?, + val `networkFeeSat`: kotlin.ULong?, + val `serviceFeeSat`: kotlin.ULong?, + val `payment`: IGiftPayment?, + val `lspNode`: IGiftLspNode?, + val `updatedAt`: kotlin.String?, + val `createdAt`: kotlin.String?, val `nodeIdVerified`: kotlin.Boolean? ) { public companion object @@ -1017,25 +1039,25 @@ public data class IGiftOrder ( @kotlinx.serialization.Serializable public data class IGiftPayment ( - val `id`: kotlin.String, - val `state`: kotlin.String, - val `oldState`: kotlin.String?, - val `onchainState`: kotlin.String?, - val `lnState`: kotlin.String?, - val `paidOnchainSat`: kotlin.ULong?, - val `paidLnSat`: kotlin.ULong?, - val `paidSat`: kotlin.ULong?, - val `isOverpaid`: kotlin.Boolean?, - val `isRefunded`: kotlin.Boolean?, - val `overpaidAmountSat`: kotlin.ULong?, - val `requiredOnchainConfirmations`: kotlin.UInt?, - val `settlementState`: kotlin.String?, - val `expectedAmountSat`: kotlin.ULong?, - val `isManuallyPaid`: kotlin.Boolean?, - val `btcAddress`: IGiftBtcAddress?, - val `btcAddressId`: kotlin.String?, - val `bolt11Invoice`: IGiftBolt11Invoice?, - val `bolt11InvoiceId`: kotlin.String?, + val `id`: kotlin.String, + val `state`: kotlin.String, + val `oldState`: kotlin.String?, + val `onchainState`: kotlin.String?, + val `lnState`: kotlin.String?, + val `paidOnchainSat`: kotlin.ULong?, + val `paidLnSat`: kotlin.ULong?, + val `paidSat`: kotlin.ULong?, + val `isOverpaid`: kotlin.Boolean?, + val `isRefunded`: kotlin.Boolean?, + val `overpaidAmountSat`: kotlin.ULong?, + val `requiredOnchainConfirmations`: kotlin.UInt?, + val `settlementState`: kotlin.String?, + val `expectedAmountSat`: kotlin.ULong?, + val `isManuallyPaid`: kotlin.Boolean?, + val `btcAddress`: IGiftBtcAddress?, + val `btcAddressId`: kotlin.String?, + val `bolt11Invoice`: IGiftBolt11Invoice?, + val `bolt11InvoiceId`: kotlin.String?, val `manualRefunds`: List ) { public companion object @@ -1045,9 +1067,9 @@ public data class IGiftPayment ( @kotlinx.serialization.Serializable public data class ILspNode ( - val `alias`: kotlin.String, - val `pubkey`: kotlin.String, - val `connectionStrings`: List, + val `alias`: kotlin.String, + val `pubkey`: kotlin.String, + val `connectionStrings`: List, val `readonly`: kotlin.Boolean? ) { public companion object @@ -1057,12 +1079,12 @@ public data class ILspNode ( @kotlinx.serialization.Serializable public data class IManualRefund ( - val `amountSat`: kotlin.ULong, - val `target`: kotlin.String, - val `state`: ManualRefundStateEnum, - val `createdByName`: kotlin.String, - val `votedByName`: kotlin.String?, - val `reason`: kotlin.String?, + val `amountSat`: kotlin.ULong, + val `target`: kotlin.String, + val `state`: ManualRefundStateEnum, + val `createdByName`: kotlin.String, + val `votedByName`: kotlin.String?, + val `reason`: kotlin.String?, val `targetType`: kotlin.String ) { public companion object @@ -1075,7 +1097,7 @@ public data class LegacyRnCloseRecoveryScanResult ( /** * Total balance found in legacy RN P2WPKH close outputs (in satoshis). */ - val `totalAmount`: kotlin.ULong, + val `totalAmount`: kotlin.ULong, /** * Number of P2WPKH outputs found. */ @@ -1091,31 +1113,31 @@ public data class LegacyRnCloseRecoverySweepPreview ( /** * Fully signed raw sweep transaction hex. Broadcast only after user confirmation. */ - val `txHex`: kotlin.String, + val `txHex`: kotlin.String, /** * Transaction id of the sweep transaction. */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * Total input amount in satoshis. */ - val `totalAmount`: kotlin.ULong, + val `totalAmount`: kotlin.ULong, /** * Fee in satoshis. */ - val `estimatedFee`: kotlin.ULong, + val `estimatedFee`: kotlin.ULong, /** * Transaction virtual size in vbytes. */ - val `estimatedVsize`: kotlin.ULong, + val `estimatedVsize`: kotlin.ULong, /** * Number of recovered outputs swept. */ - val `outputsCount`: kotlin.UInt, + val `outputsCount`: kotlin.UInt, /** * Destination address receiving the sweep. */ - val `destinationAddress`: kotlin.String, + val `destinationAddress`: kotlin.String, /** * Amount sent to destination after fees. */ @@ -1128,18 +1150,18 @@ public data class LegacyRnCloseRecoverySweepPreview ( @kotlinx.serialization.Serializable public data class LightningActivity ( - val `id`: kotlin.String, - val `txType`: PaymentType, - val `status`: PaymentState, - val `value`: kotlin.ULong, - val `fee`: kotlin.ULong?, - val `invoice`: kotlin.String, - val `message`: kotlin.String, - val `timestamp`: kotlin.ULong, - val `preimage`: kotlin.String?, - val `contact`: kotlin.String?, - val `createdAt`: kotlin.ULong?, - val `updatedAt`: kotlin.ULong?, + val `id`: kotlin.String, + val `txType`: PaymentType, + val `status`: PaymentState, + val `value`: kotlin.ULong, + val `fee`: kotlin.ULong?, + val `invoice`: kotlin.String, + val `message`: kotlin.String, + val `timestamp`: kotlin.ULong, + val `preimage`: kotlin.String?, + val `contact`: kotlin.String?, + val `createdAt`: kotlin.ULong?, + val `updatedAt`: kotlin.ULong?, val `seenAt`: kotlin.ULong? ) { public companion object @@ -1149,14 +1171,14 @@ public data class LightningActivity ( @kotlinx.serialization.Serializable public data class LightningInvoice ( - val `bolt11`: kotlin.String, - val `paymentHash`: kotlin.ByteArray, - val `amountSatoshis`: kotlin.ULong, - val `timestampSeconds`: kotlin.ULong, - val `expirySeconds`: kotlin.ULong, - val `isExpired`: kotlin.Boolean, - val `description`: kotlin.String?, - val `networkType`: NetworkType, + val `bolt11`: kotlin.String, + val `paymentHash`: kotlin.ByteArray, + val `amountSatoshis`: kotlin.ULong, + val `timestampSeconds`: kotlin.ULong, + val `expirySeconds`: kotlin.ULong, + val `isExpired`: kotlin.Boolean, + val `description`: kotlin.String?, + val `networkType`: NetworkType, val `payeeNodeId`: kotlin.ByteArray? ) { override fun equals(other: Any?): Boolean { @@ -1198,8 +1220,8 @@ public data class LightningInvoice ( @kotlinx.serialization.Serializable public data class LnurlAddressData ( - val `uri`: kotlin.String, - val `domain`: kotlin.String, + val `uri`: kotlin.String, + val `domain`: kotlin.String, val `username`: kotlin.String ) { public companion object @@ -1209,9 +1231,9 @@ public data class LnurlAddressData ( @kotlinx.serialization.Serializable public data class LnurlAuthData ( - val `uri`: kotlin.String, - val `tag`: kotlin.String, - val `k1`: kotlin.String, + val `uri`: kotlin.String, + val `tag`: kotlin.String, + val `k1`: kotlin.String, val `domain`: kotlin.String ) { public companion object @@ -1221,9 +1243,9 @@ public data class LnurlAuthData ( @kotlinx.serialization.Serializable public data class LnurlChannelData ( - val `uri`: kotlin.String, - val `callback`: kotlin.String, - val `k1`: kotlin.String, + val `uri`: kotlin.String, + val `callback`: kotlin.String, + val `k1`: kotlin.String, val `tag`: kotlin.String ) { public companion object @@ -1233,13 +1255,13 @@ public data class LnurlChannelData ( @kotlinx.serialization.Serializable public data class LnurlPayData ( - val `uri`: kotlin.String, - val `callback`: kotlin.String, - val `minSendable`: kotlin.ULong, - val `maxSendable`: kotlin.ULong, - val `metadataStr`: kotlin.String, - val `commentAllowed`: kotlin.UInt?, - val `allowsNostr`: kotlin.Boolean, + val `uri`: kotlin.String, + val `callback`: kotlin.String, + val `minSendable`: kotlin.ULong, + val `maxSendable`: kotlin.ULong, + val `metadataStr`: kotlin.String, + val `commentAllowed`: kotlin.UInt?, + val `allowsNostr`: kotlin.Boolean, val `nostrPubkey`: kotlin.ByteArray? ) { override fun equals(other: Any?): Boolean { @@ -1279,12 +1301,12 @@ public data class LnurlPayData ( @kotlinx.serialization.Serializable public data class LnurlWithdrawData ( - val `uri`: kotlin.String, - val `callback`: kotlin.String, - val `k1`: kotlin.String, - val `defaultDescription`: kotlin.String, - val `minWithdrawable`: kotlin.ULong?, - val `maxWithdrawable`: kotlin.ULong, + val `uri`: kotlin.String, + val `callback`: kotlin.String, + val `k1`: kotlin.String, + val `defaultDescription`: kotlin.String, + val `minWithdrawable`: kotlin.ULong?, + val `maxWithdrawable`: kotlin.ULong, val `tag`: kotlin.String ) { public companion object @@ -1300,19 +1322,19 @@ public data class NativeDeviceInfo ( /** * Unique path/identifier for this device */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Transport type: "usb" or "bluetooth" */ - val `transportType`: kotlin.String, + val `transportType`: kotlin.String, /** * Optional device name (from BLE advertisement or USB descriptor) */ - val `name`: kotlin.String?, + val `name`: kotlin.String?, /** * USB Vendor ID (for USB devices) */ - val `vendorId`: kotlin.UShort?, + val `vendorId`: kotlin.UShort?, /** * USB Product ID (for USB devices) */ @@ -1325,10 +1347,10 @@ public data class NativeDeviceInfo ( @kotlinx.serialization.Serializable public data class OnChainInvoice ( - val `address`: kotlin.String, - val `amountSatoshis`: kotlin.ULong, - val `label`: kotlin.String?, - val `message`: kotlin.String?, + val `address`: kotlin.String, + val `amountSatoshis`: kotlin.ULong, + val `label`: kotlin.String?, + val `message`: kotlin.String?, val `params`: Map? ) { public companion object @@ -1338,25 +1360,25 @@ public data class OnChainInvoice ( @kotlinx.serialization.Serializable public data class OnchainActivity ( - val `id`: kotlin.String, - val `txType`: PaymentType, - val `txId`: kotlin.String, - val `value`: kotlin.ULong, - val `fee`: kotlin.ULong, - val `feeRate`: kotlin.ULong, - val `address`: kotlin.String, - val `confirmed`: kotlin.Boolean, - val `timestamp`: kotlin.ULong, - val `isBoosted`: kotlin.Boolean, - val `boostTxIds`: List, - val `isTransfer`: kotlin.Boolean, - val `doesExist`: kotlin.Boolean, - val `confirmTimestamp`: kotlin.ULong?, - val `channelId`: kotlin.String?, - val `transferTxId`: kotlin.String?, - val `contact`: kotlin.String?, - val `createdAt`: kotlin.ULong?, - val `updatedAt`: kotlin.ULong?, + val `id`: kotlin.String, + val `txType`: PaymentType, + val `txId`: kotlin.String, + val `value`: kotlin.ULong, + val `fee`: kotlin.ULong, + val `feeRate`: kotlin.ULong, + val `address`: kotlin.String, + val `confirmed`: kotlin.Boolean, + val `timestamp`: kotlin.ULong, + val `isBoosted`: kotlin.Boolean, + val `boostTxIds`: List, + val `isTransfer`: kotlin.Boolean, + val `doesExist`: kotlin.Boolean, + val `confirmTimestamp`: kotlin.ULong?, + val `channelId`: kotlin.String?, + val `transferTxId`: kotlin.String?, + val `contact`: kotlin.String?, + val `createdAt`: kotlin.ULong?, + val `updatedAt`: kotlin.ULong?, val `seenAt`: kotlin.ULong? ) { public companion object @@ -1366,15 +1388,15 @@ public data class OnchainActivity ( @kotlinx.serialization.Serializable public data class PreActivityMetadata ( - val `paymentId`: kotlin.String, - val `tags`: List, - val `paymentHash`: kotlin.String?, - val `txId`: kotlin.String?, - val `address`: kotlin.String?, - val `isReceive`: kotlin.Boolean, - val `feeRate`: kotlin.ULong, - val `isTransfer`: kotlin.Boolean, - val `channelId`: kotlin.String?, + val `paymentId`: kotlin.String, + val `tags`: List, + val `paymentHash`: kotlin.String?, + val `txId`: kotlin.String?, + val `address`: kotlin.String?, + val `isReceive`: kotlin.Boolean, + val `feeRate`: kotlin.ULong, + val `isTransfer`: kotlin.Boolean, + val `channelId`: kotlin.String?, val `createdAt`: kotlin.ULong ) { public companion object @@ -1399,19 +1421,19 @@ public data class PubkyAuthDetails ( /** * Whether this is a signin or signup flow. */ - val `kind`: PubkyAuthKind, + val `kind`: PubkyAuthKind, /** * Requested capabilities (e.g. `"/pub/pubky.app/:rw"`). */ - val `capabilities`: kotlin.String, + val `capabilities`: kotlin.String, /** * Relay URL used for the auth exchange. */ - val `relay`: kotlin.String, + val `relay`: kotlin.String, /** * Homeserver public key (z32-encoded). Present only for signup flows. */ - val `homeserver`: kotlin.String?, + val `homeserver`: kotlin.String?, /** * Signup token. Present only for signup flows. */ @@ -1424,10 +1446,10 @@ public data class PubkyAuthDetails ( @kotlinx.serialization.Serializable public data class PubkyProfile ( - val `name`: kotlin.String, - val `bio`: kotlin.String?, - val `image`: kotlin.String?, - val `links`: List?, + val `name`: kotlin.String, + val `bio`: kotlin.String?, + val `image`: kotlin.String?, + val `links`: List?, val `status`: kotlin.String? ) { public companion object @@ -1437,7 +1459,7 @@ public data class PubkyProfile ( @kotlinx.serialization.Serializable public data class PubkyProfileLink ( - val `title`: kotlin.String, + val `title`: kotlin.String, val `url`: kotlin.String ) { public companion object @@ -1453,19 +1475,19 @@ public data class SingleAddressInfoResult ( /** * The queried address */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * Total confirmed balance in satoshis */ - val `balance`: kotlin.ULong, + val `balance`: kotlin.ULong, /** * UTXOs for this address */ - val `utxos`: List, + val `utxos`: List, /** * Number of transactions involving this address */ - val `transfers`: kotlin.UInt, + val `transfers`: kotlin.UInt, /** * Current blockchain tip height */ @@ -1481,15 +1503,15 @@ public data class SweepResult ( /** * The transaction ID of the sweep transaction */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * The total amount swept (in satoshis) */ - val `amountSwept`: kotlin.ULong, + val `amountSwept`: kotlin.ULong, /** * The fee paid (in satoshis) */ - val `feePaid`: kotlin.ULong, + val `feePaid`: kotlin.ULong, /** * The number of UTXOs swept */ @@ -1505,27 +1527,27 @@ public data class SweepTransactionPreview ( /** * The PSBT (Partially Signed Bitcoin Transaction) in base64 format */ - val `psbt`: kotlin.String, + val `psbt`: kotlin.String, /** * The total amount available to sweep (in satoshis) */ - val `totalAmount`: kotlin.ULong, + val `totalAmount`: kotlin.ULong, /** * The estimated fee for the transaction (in satoshis) */ - val `estimatedFee`: kotlin.ULong, + val `estimatedFee`: kotlin.ULong, /** * The estimated virtual size of the transaction (in vbytes) */ - val `estimatedVsize`: kotlin.ULong, + val `estimatedVsize`: kotlin.ULong, /** * The number of UTXOs that will be swept */ - val `utxosCount`: kotlin.UInt, + val `utxosCount`: kotlin.UInt, /** * The destination address */ - val `destinationAddress`: kotlin.String, + val `destinationAddress`: kotlin.String, /** * The amount that will be sent to destination after fees (in satoshis) */ @@ -1541,31 +1563,31 @@ public data class SweepableBalances ( /** * Balance in legacy (P2PKH) addresses (in satoshis) */ - val `legacyBalance`: kotlin.ULong, + val `legacyBalance`: kotlin.ULong, /** * Balance in P2SH-SegWit (P2SH-P2WPKH) addresses (in satoshis) */ - val `p2shBalance`: kotlin.ULong, + val `p2shBalance`: kotlin.ULong, /** * Balance in Taproot (P2TR) addresses (in satoshis) */ - val `taprootBalance`: kotlin.ULong, + val `taprootBalance`: kotlin.ULong, /** * Total balance across all wallet types (in satoshis) */ - val `totalBalance`: kotlin.ULong, + val `totalBalance`: kotlin.ULong, /** * Number of UTXOs in legacy wallet */ - val `legacyUtxosCount`: kotlin.UInt, + val `legacyUtxosCount`: kotlin.UInt, /** * Number of UTXOs in P2SH-SegWit wallet */ - val `p2shUtxosCount`: kotlin.UInt, + val `p2shUtxosCount`: kotlin.UInt, /** * Number of UTXOs in Taproot wallet */ - val `taprootUtxosCount`: kotlin.UInt, + val `taprootUtxosCount`: kotlin.UInt, /** * Total number of UTXOs across all wallet types */ @@ -1584,63 +1606,63 @@ public data class TransactionDetail ( /** * Transaction ID (hex) */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * Amount received by the wallet (sats) */ - val `received`: kotlin.ULong, + val `received`: kotlin.ULong, /** * Amount sent by the wallet (sats) — includes change sent back to self */ - val `sent`: kotlin.ULong, + val `sent`: kotlin.ULong, /** * Net value from wallet's perspective: received - sent (positive = inflow, negative = outflow) */ - val `net`: kotlin.Long, + val `net`: kotlin.Long, /** * Display amount in sats (same semantics as HistoryTransaction.amount) */ - val `amount`: kotlin.ULong, + val `amount`: kotlin.ULong, /** * Transaction fee in sats (None if not available) */ - val `fee`: kotlin.ULong?, + val `fee`: kotlin.ULong?, /** * Transaction direction */ - val `direction`: TxDirection, + val `direction`: TxDirection, /** * Block height (None if unconfirmed/mempool) */ - val `blockHeight`: kotlin.UInt?, + val `blockHeight`: kotlin.UInt?, /** * Block timestamp as unix epoch seconds (None if unconfirmed) */ - val `timestamp`: kotlin.ULong?, + val `timestamp`: kotlin.ULong?, /** * Number of confirmations (0 if unconfirmed) */ - val `confirmations`: kotlin.UInt, + val `confirmations`: kotlin.UInt, /** * Transaction inputs */ - val `inputs`: List, + val `inputs`: List, /** * Transaction outputs */ - val `outputs`: List, + val `outputs`: List, /** * Serialized transaction size in bytes */ - val `size`: kotlin.UInt, + val `size`: kotlin.UInt, /** * Virtual size in vbytes (ceil(weight / 4)) */ - val `vsize`: kotlin.UInt, + val `vsize`: kotlin.UInt, /** * Transaction weight in weight units */ - val `weight`: kotlin.UInt, + val `weight`: kotlin.UInt, /** * Fee rate in sat/vB (fee / vsize), None if fee is unavailable or vsize is zero */ @@ -1659,7 +1681,7 @@ public data class TransactionDetails ( /** * The transaction ID. */ - val `txId`: kotlin.String, + val `txId`: kotlin.String, /** * The net amount in this transaction (in satoshis). * @@ -1668,11 +1690,11 @@ public data class TransactionDetails ( * * Note: This amount does NOT include transaction fees. */ - val `amountSats`: kotlin.Long, + val `amountSats`: kotlin.Long, /** * The transaction inputs with full details. */ - val `inputs`: List, + val `inputs`: List, /** * The transaction outputs with full details. */ @@ -1691,19 +1713,19 @@ public data class TransactionHistoryResult ( /** * All transactions, sorted: unconfirmed first, then by timestamp descending */ - val `transactions`: List, + val `transactions`: List, /** * Balance breakdown */ - val `balance`: WalletBalance, + val `balance`: WalletBalance, /** * Total number of transactions */ - val `txCount`: kotlin.UInt, + val `txCount`: kotlin.UInt, /** * Current blockchain tip height */ - val `blockHeight`: kotlin.UInt, + val `blockHeight`: kotlin.UInt, /** * The detected or specified account type */ @@ -1722,7 +1744,7 @@ public data class TrezorAddressResponse ( /** * The Bitcoin address */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * The serialized path (e.g., "m/84'/0'/0'/0/0") */ @@ -1741,15 +1763,15 @@ public data class TrezorCallMessageResult ( /** * Whether the call succeeded */ - val `success`: kotlin.Boolean, + val `success`: kotlin.Boolean, /** * Response message type */ - val `messageType`: kotlin.UShort, + val `messageType`: kotlin.UShort, /** * Response protobuf data */ - val `data`: kotlin.ByteArray, + val `data`: kotlin.ByteArray, /** * Error message (empty on success) */ @@ -1787,27 +1809,27 @@ public data class TrezorDeviceInfo ( /** * Unique identifier for the device */ - val `id`: kotlin.String, + val `id`: kotlin.String, /** * Transport type (USB or Bluetooth) */ - val `transportType`: TrezorTransportType, + val `transportType`: TrezorTransportType, /** * Device name (from BLE advertisement or USB descriptor) */ - val `name`: kotlin.String?, + val `name`: kotlin.String?, /** * Transport-specific path (used internally for connection) */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Device label (set by user during device setup) */ - val `label`: kotlin.String?, + val `label`: kotlin.String?, /** * Device model (e.g., "T2", "Safe 5", "Safe 7") */ - val `model`: kotlin.String?, + val `model`: kotlin.String?, /** * Whether the device is in bootloader mode */ @@ -1826,47 +1848,47 @@ public data class TrezorFeatures ( /** * Vendor string */ - val `vendor`: kotlin.String?, + val `vendor`: kotlin.String?, /** * Device model */ - val `model`: kotlin.String?, + val `model`: kotlin.String?, /** * Device label (set by user during device setup) */ - val `label`: kotlin.String?, + val `label`: kotlin.String?, /** * Device ID (unique per device) */ - val `deviceId`: kotlin.String?, + val `deviceId`: kotlin.String?, /** * Major firmware version */ - val `majorVersion`: kotlin.UInt?, + val `majorVersion`: kotlin.UInt?, /** * Minor firmware version */ - val `minorVersion`: kotlin.UInt?, + val `minorVersion`: kotlin.UInt?, /** * Patch firmware version */ - val `patchVersion`: kotlin.UInt?, + val `patchVersion`: kotlin.UInt?, /** * Whether PIN protection is enabled */ - val `pinProtection`: kotlin.Boolean?, + val `pinProtection`: kotlin.Boolean?, /** * Whether passphrase protection is enabled */ - val `passphraseProtection`: kotlin.Boolean?, + val `passphraseProtection`: kotlin.Boolean?, /** * Whether the device is initialized with a seed */ - val `initialized`: kotlin.Boolean?, + val `initialized`: kotlin.Boolean?, /** * Whether the device needs backup */ - val `needsBackup`: kotlin.Boolean?, + val `needsBackup`: kotlin.Boolean?, /** * Whether the device can accept passphrase entry on the device itself * (`Capability_PassphraseEntry`). When false/None, use host entry only. @@ -1886,15 +1908,15 @@ public data class TrezorGetAddressParams ( /** * BIP32 path (e.g., "m/84'/0'/0'/0/0") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Coin network (default: Bitcoin) */ - val `coin`: TrezorCoinType?, + val `coin`: TrezorCoinType?, /** * Whether to display the address on the device for confirmation */ - val `showOnTrezor`: kotlin.Boolean, + val `showOnTrezor`: kotlin.Boolean, /** * Script type (auto-detected from path if not specified) */ @@ -1913,11 +1935,11 @@ public data class TrezorGetPublicKeyParams ( /** * BIP32 path (e.g., "m/84'/0'/0'") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Coin network (default: Bitcoin) */ - val `coin`: TrezorCoinType?, + val `coin`: TrezorCoinType?, /** * Whether to display on device for confirmation */ @@ -1936,19 +1958,19 @@ public data class TrezorPrevTx ( /** * Transaction hash (hex encoded) */ - val `hash`: kotlin.String, + val `hash`: kotlin.String, /** * Transaction version */ - val `version`: kotlin.UInt, + val `version`: kotlin.UInt, /** * Lock time */ - val `lockTime`: kotlin.UInt, + val `lockTime`: kotlin.UInt, /** * Transaction inputs */ - val `inputs`: List, + val `inputs`: List, /** * Transaction outputs */ @@ -1967,15 +1989,15 @@ public data class TrezorPrevTxInput ( /** * Previous transaction hash (hex encoded) */ - val `prevHash`: kotlin.String, + val `prevHash`: kotlin.String, /** * Previous output index */ - val `prevIndex`: kotlin.UInt, + val `prevIndex`: kotlin.UInt, /** * Script signature (hex encoded) */ - val `scriptSig`: kotlin.String, + val `scriptSig`: kotlin.String, /** * Sequence number */ @@ -1994,7 +2016,7 @@ public data class TrezorPrevTxOutput ( /** * Amount in satoshis */ - val `amount`: kotlin.ULong, + val `amount`: kotlin.ULong, /** * Script pubkey (hex encoded) */ @@ -2013,27 +2035,27 @@ public data class TrezorPublicKeyResponse ( /** * Extended public key (xpub) */ - val `xpub`: kotlin.String, + val `xpub`: kotlin.String, /** * The serialized path (e.g., "m/84'/0'/0'") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Compressed public key (hex encoded) */ - val `publicKey`: kotlin.String, + val `publicKey`: kotlin.String, /** * Chain code (hex encoded) */ - val `chainCode`: kotlin.String, + val `chainCode`: kotlin.String, /** * Parent key fingerprint */ - val `fingerprint`: kotlin.UInt, + val `fingerprint`: kotlin.UInt, /** * Derivation depth */ - val `depth`: kotlin.UInt, + val `depth`: kotlin.UInt, /** * Master root fingerprint (from the device's master seed) */ @@ -2052,11 +2074,11 @@ public data class TrezorSignMessageParams ( /** * BIP32 path for the signing key (e.g., "m/84'/0'/0'/0/0") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Message to sign */ - val `message`: kotlin.String, + val `message`: kotlin.String, /** * Coin network (default: Bitcoin) */ @@ -2075,23 +2097,23 @@ public data class TrezorSignTxParams ( /** * Transaction inputs */ - val `inputs`: List, + val `inputs`: List, /** * Transaction outputs */ - val `outputs`: List, + val `outputs`: List, /** * Coin network (default: Bitcoin) */ - val `coin`: TrezorCoinType?, + val `coin`: TrezorCoinType?, /** * Lock time (default: 0) */ - val `lockTime`: kotlin.UInt?, + val `lockTime`: kotlin.UInt?, /** * Version (default: 2) */ - val `version`: kotlin.UInt?, + val `version`: kotlin.UInt?, /** * Previous transactions (for non-SegWit input verification) */ @@ -2110,7 +2132,7 @@ public data class TrezorSignedMessageResponse ( /** * Bitcoin address that signed the message */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * Signature (base64 encoded) */ @@ -2129,11 +2151,11 @@ public data class TrezorSignedTx ( /** * Signatures for each input (hex encoded) */ - val `signatures`: List, + val `signatures`: List, /** * Serialized transaction (hex) */ - val `serializedTx`: kotlin.String, + val `serializedTx`: kotlin.String, /** * Broadcast transaction ID (populated when push=true) */ @@ -2152,11 +2174,11 @@ public data class TrezorTransportReadResult ( /** * Whether the read succeeded */ - val `success`: kotlin.Boolean, + val `success`: kotlin.Boolean, /** * Data read (empty on failure) */ - val `data`: kotlin.ByteArray, + val `data`: kotlin.ByteArray, /** * Error message (empty on success) */ @@ -2192,7 +2214,7 @@ public data class TrezorTransportWriteResult ( /** * Whether the operation succeeded */ - val `success`: kotlin.Boolean, + val `success`: kotlin.Boolean, /** * Error message (empty on success) */ @@ -2211,31 +2233,31 @@ public data class TrezorTxInput ( /** * Previous transaction hash (hex, 32 bytes) */ - val `prevHash`: kotlin.String, + val `prevHash`: kotlin.String, /** * Previous output index */ - val `prevIndex`: kotlin.UInt, + val `prevIndex`: kotlin.UInt, /** * BIP32 derivation path (e.g., "m/84'/0'/0'/0/0") */ - val `path`: kotlin.String, + val `path`: kotlin.String, /** * Amount in satoshis */ - val `amount`: kotlin.ULong, + val `amount`: kotlin.ULong, /** * Script type */ - val `scriptType`: TrezorScriptType, + val `scriptType`: TrezorScriptType, /** * Sequence number (default: 0xFFFFFFFD for RBF) */ - val `sequence`: kotlin.UInt?, + val `sequence`: kotlin.UInt?, /** * Original transaction hash for RBF replacement (hex encoded) */ - val `origHash`: kotlin.String?, + val `origHash`: kotlin.String?, /** * Original input index for RBF replacement */ @@ -2254,27 +2276,27 @@ public data class TrezorTxOutput ( /** * Destination address (for external outputs) */ - val `address`: kotlin.String?, + val `address`: kotlin.String?, /** * BIP32 path (for change outputs) */ - val `path`: kotlin.String?, + val `path`: kotlin.String?, /** * Amount in satoshis */ - val `amount`: kotlin.ULong, + val `amount`: kotlin.ULong, /** * Script type (for change outputs) */ - val `scriptType`: TrezorScriptType?, + val `scriptType`: TrezorScriptType?, /** * OP_RETURN data (hex encoded, for data outputs) */ - val `opReturnData`: kotlin.String?, + val `opReturnData`: kotlin.String?, /** * Original transaction hash for RBF replacement (hex encoded) */ - val `origHash`: kotlin.String?, + val `origHash`: kotlin.String?, /** * Original output index for RBF replacement */ @@ -2293,15 +2315,15 @@ public data class TrezorVerifyMessageParams ( /** * Bitcoin address that signed the message */ - val `address`: kotlin.String, + val `address`: kotlin.String, /** * Signature (base64 encoded) */ - val `signature`: kotlin.String, + val `signature`: kotlin.String, /** * Original message */ - val `message`: kotlin.String, + val `message`: kotlin.String, /** * Coin network (default: Bitcoin) */ @@ -2320,19 +2342,19 @@ public data class TxDetailInput ( /** * Previous output transaction ID (hex) */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * Previous output index */ - val `vout`: kotlin.UInt, + val `vout`: kotlin.UInt, /** * Sequence number */ - val `sequence`: kotlin.UInt, + val `sequence`: kotlin.UInt, /** * Script signature (hex-encoded) */ - val `scriptSig`: kotlin.String, + val `scriptSig`: kotlin.String, /** * Witness stack (each element hex-encoded) */ @@ -2351,15 +2373,15 @@ public data class TxDetailOutput ( /** * Output value in sats */ - val `value`: kotlin.ULong, + val `value`: kotlin.ULong, /** * Script public key (hex-encoded) */ - val `scriptPubkey`: kotlin.String, + val `scriptPubkey`: kotlin.String, /** * Decoded address (None if script is not decodable to an address) */ - val `address`: kotlin.String?, + val `address`: kotlin.String?, /** * Whether this output belongs to the queried wallet */ @@ -2378,19 +2400,19 @@ public data class TxInput ( /** * The transaction ID of the previous output being spent. */ - val `txid`: kotlin.String, + val `txid`: kotlin.String, /** * The output index of the previous output being spent. */ - val `vout`: kotlin.UInt, + val `vout`: kotlin.UInt, /** * The script signature (hex-encoded). */ - val `scriptsig`: kotlin.String, + val `scriptsig`: kotlin.String, /** * The witness stack (hex-encoded strings). */ - val `witness`: List, + val `witness`: List, /** * The sequence number. */ @@ -2409,19 +2431,19 @@ public data class TxOutput ( /** * The script public key (hex-encoded). */ - val `scriptpubkey`: kotlin.String, + val `scriptpubkey`: kotlin.String, /** * The script public key type (e.g., "p2pkh", "p2sh", "p2wpkh", "p2wsh", "p2tr"). */ - val `scriptpubkeyType`: kotlin.String?, + val `scriptpubkeyType`: kotlin.String?, /** * The address corresponding to this script (if decodable). */ - val `scriptpubkeyAddress`: kotlin.String?, + val `scriptpubkeyAddress`: kotlin.String?, /** * The value in satoshis. */ - val `value`: kotlin.Long, + val `value`: kotlin.Long, /** * The output index in the transaction. */ @@ -2434,8 +2456,8 @@ public data class TxOutput ( @kotlinx.serialization.Serializable public data class ValidationResult ( - val `address`: kotlin.String, - val `network`: NetworkType, + val `address`: kotlin.String, + val `network`: NetworkType, val `addressType`: AddressType ) { public companion object @@ -2451,23 +2473,23 @@ public data class WalletBalance ( /** * Confirmed and spendable balance (sats) */ - val `confirmed`: kotlin.ULong, + val `confirmed`: kotlin.ULong, /** * Immature coinbase outputs (sats) */ - val `immature`: kotlin.ULong, + val `immature`: kotlin.ULong, /** * Unconfirmed UTXOs from trusted sources (own change) (sats) */ - val `trustedPending`: kotlin.ULong, + val `trustedPending`: kotlin.ULong, /** * Unconfirmed UTXOs from external sources (sats) */ - val `untrustedPending`: kotlin.ULong, + val `untrustedPending`: kotlin.ULong, /** * Total spendable: confirmed + trusted_pending (sats) */ - val `spendable`: kotlin.ULong, + val `spendable`: kotlin.ULong, /** * Grand total: all categories (sats) */ @@ -2486,19 +2508,19 @@ public data class WalletParams ( /** * Extended public key (xpub/ypub/zpub/tpub/upub/vpub) */ - val `extendedKey`: kotlin.String, + val `extendedKey`: kotlin.String, /** * Electrum server URL for wallet sync */ - val `electrumUrl`: kotlin.String, + val `electrumUrl`: kotlin.String, /** * Root fingerprint hex (e.g. "73c5da0a"). Required for hardware wallet signing. */ - val `fingerprint`: kotlin.String?, + val `fingerprint`: kotlin.String?, /** * Bitcoin network (auto-detected from key prefix if not specified) */ - val `network`: Network?, + val `network`: Network?, /** * Override account type for ambiguous key prefixes (xpub/tpub) */ @@ -2509,13 +2531,48 @@ public data class WalletParams ( +/** + * Parameters for starting an xpub transaction watcher. + */ +@kotlinx.serialization.Serializable +public data class WatcherParams ( + /** + * Caller-supplied identifier for this watcher. + */ + val `watcherId`: kotlin.String, + /** + * Extended public key (xpub/ypub/zpub/tpub/upub/vpub). + */ + val `extendedKey`: kotlin.String, + /** + * Electrum server URL (e.g. "ssl://electrum.example.com:50002"). + */ + val `electrumUrl`: kotlin.String, + /** + * Bitcoin network override (auto-detected from key prefix if None). + */ + val `network`: Network?, + /** + * Account type override (auto-detected from key prefix if None). + */ + val `accountType`: AccountType?, + /** + * Number of unused addresses to monitor beyond the last used (default 20). + */ + val `gapLimit`: kotlin.UInt? +) { + public companion object +} + + + /** * Errors specific to account info operations (BDK/Electrum-based). */ public sealed class AccountInfoException: kotlin.Exception() { - + /** * The provided extended public key is invalid or cannot be parsed */ @@ -2525,7 +2582,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * The provided address is invalid */ @@ -2535,7 +2592,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Electrum connection or query failed */ @@ -2545,7 +2602,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * BDK wallet creation or operation error */ @@ -2555,7 +2612,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Wallet sync with Electrum failed */ @@ -2565,7 +2622,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * The key type/prefix is not recognized */ @@ -2575,7 +2632,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Network mismatch between key prefix and specified network */ @@ -2585,7 +2642,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Invalid transaction ID provided */ @@ -2595,7 +2652,7 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * A valid transaction ID was not found in the wallet */ @@ -2605,7 +2662,17 @@ public sealed class AccountInfoException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + + /** + * Watcher lifecycle or subscription error + */ + public class WatcherException( + public val `errorDetails`: kotlin.String, + ) : AccountInfoException() { + override val message: String + get() = "errorDetails=${ `errorDetails` }" + } + } @@ -2619,7 +2686,7 @@ public sealed class AccountInfoException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class AccountType { - + /** * BIP44 legacy (P2PKH) — xpub/tpub prefix */ @@ -2656,7 +2723,7 @@ public sealed class Activity { val v1: LightningActivity, ) : Activity() { } - + } @@ -2666,56 +2733,56 @@ public sealed class Activity { public sealed class ActivityException: kotlin.Exception() { - + public class InvalidActivity( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InitializationException( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InsertException( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class RetrievalException( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class DataException( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class ConnectionException( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class SerializationException( public val `errorDetails`: kotlin.String, ) : ActivityException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + } @@ -2724,7 +2791,7 @@ public sealed class ActivityException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class ActivityFilter { - + ALL, LIGHTNING, ONCHAIN; @@ -2739,7 +2806,7 @@ public enum class ActivityFilter { @kotlinx.serialization.Serializable public enum class ActivityType { - + ONCHAIN, LIGHTNING; public companion object @@ -2752,43 +2819,43 @@ public enum class ActivityType { public sealed class AddressException: kotlin.Exception() { - + public class InvalidAddress( ) : AddressException() { override val message: String get() = "" } - + public class InvalidNetwork( ) : AddressException() { override val message: String get() = "" } - + public class MnemonicGenerationFailed( ) : AddressException() { override val message: String get() = "" } - + public class InvalidMnemonic( ) : AddressException() { override val message: String get() = "" } - + public class InvalidEntropy( ) : AddressException() { override val message: String get() = "" } - + public class AddressDerivationFailed( ) : AddressException() { override val message: String get() = "" } - + } @@ -2797,7 +2864,7 @@ public sealed class AddressException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class AddressType { - + P2PKH, P2SH, P2WPKH, @@ -2815,7 +2882,7 @@ public enum class AddressType { @kotlinx.serialization.Serializable public enum class BitcoinNetworkEnum { - + MAINNET, TESTNET, SIGNET, @@ -2830,70 +2897,70 @@ public enum class BitcoinNetworkEnum { public sealed class BlocktankException: kotlin.Exception() { - + public class HttpClient( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class BlocktankClient( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InvalidBlocktank( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InitializationException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InsertException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class RetrievalException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class DataException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class ConnectionException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class SerializationException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class ChannelOpen( public val `errorType`: BtChannelOrderErrorType, public val `errorDetails`: kotlin.String, @@ -2901,28 +2968,28 @@ public sealed class BlocktankException: kotlin.Exception() { override val message: String get() = "errorType=${ `errorType` }, errorDetails=${ `errorDetails` }" } - + public class OrderState( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InvalidParameter( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class DatabaseException( public val `errorDetails`: kotlin.String, ) : BlocktankException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + } @@ -2930,35 +2997,35 @@ public sealed class BlocktankException: kotlin.Exception() { public sealed class BroadcastException: kotlin.Exception() { - + public class InvalidHex( public val `errorDetails`: kotlin.String, ) : BroadcastException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InvalidTransaction( public val `errorDetails`: kotlin.String, ) : BroadcastException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class ElectrumException( public val `errorDetails`: kotlin.String, ) : BroadcastException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class TaskException( public val `errorDetails`: kotlin.String, ) : BroadcastException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + } @@ -2967,7 +3034,7 @@ public sealed class BroadcastException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class BtBolt11InvoiceState { - + PENDING, HOLDING, PAID, @@ -2983,7 +3050,7 @@ public enum class BtBolt11InvoiceState { @kotlinx.serialization.Serializable public enum class BtChannelOrderErrorType { - + WRONG_ORDER_STATE, PEER_NOT_REACHABLE, CHANNEL_REJECTED_BY_DESTINATION, @@ -3000,7 +3067,7 @@ public enum class BtChannelOrderErrorType { @kotlinx.serialization.Serializable public enum class BtOpenChannelState { - + OPENING, OPEN, CLOSED; @@ -3015,7 +3082,7 @@ public enum class BtOpenChannelState { @kotlinx.serialization.Serializable public enum class BtOrderState { - + CREATED, EXPIRED, OPEN, @@ -3031,7 +3098,7 @@ public enum class BtOrderState { @kotlinx.serialization.Serializable public enum class BtOrderState2 { - + CREATED, EXPIRED, EXECUTED, @@ -3047,7 +3114,7 @@ public enum class BtOrderState2 { @kotlinx.serialization.Serializable public enum class BtPaymentState { - + CREATED, PARTIALLY_PAID, PAID, @@ -3064,7 +3131,7 @@ public enum class BtPaymentState { @kotlinx.serialization.Serializable public enum class BtPaymentState2 { - + CREATED, PAID, REFUNDED, @@ -3081,7 +3148,7 @@ public enum class BtPaymentState2 { @kotlinx.serialization.Serializable public enum class CJitStateEnum { - + CREATED, COMPLETED, EXPIRED, @@ -3100,7 +3167,7 @@ public enum class CJitStateEnum { @kotlinx.serialization.Serializable public enum class CoinSelection { - + /** * Branch-and-bound (default). Minimizes change by searching for exact matches. */ @@ -3126,7 +3193,7 @@ public enum class CoinSelection { */ @kotlinx.serialization.Serializable public sealed class ComposeOutput { - + /** * Payment to a specific address with a fixed amount (satoshis) */@kotlinx.serialization.Serializable @@ -3135,7 +3202,7 @@ public sealed class ComposeOutput { val `amountSats`: kotlin.ULong, ) : ComposeOutput() { } - + /** * Send all remaining funds (after fees) to an address */@kotlinx.serialization.Serializable @@ -3143,7 +3210,7 @@ public sealed class ComposeOutput { val `address`: kotlin.String, ) : ComposeOutput() { } - + /** * OP_RETURN data output (hex-encoded payload) */@kotlinx.serialization.Serializable @@ -3151,7 +3218,7 @@ public sealed class ComposeOutput { val `dataHex`: kotlin.String, ) : ComposeOutput() { } - + } @@ -3164,7 +3231,7 @@ public sealed class ComposeOutput { */ @kotlinx.serialization.Serializable public sealed class ComposeResult { - + /** * Successfully built a signable PSBT */@kotlinx.serialization.Serializable @@ -3189,7 +3256,7 @@ public sealed class ComposeResult { val `totalSpent`: kotlin.ULong, ) : ComposeResult() { } - + /** * Composition failed (e.g. insufficient funds) */@kotlinx.serialization.Serializable @@ -3197,7 +3264,7 @@ public sealed class ComposeResult { val `error`: kotlin.String, ) : ComposeResult() { } - + } @@ -3207,28 +3274,28 @@ public sealed class ComposeResult { public sealed class DbException: kotlin.Exception() { - + public class DbActivityException( public val `errorDetails`: ActivityException, ) : DbException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class DbBlocktankException( public val `errorDetails`: BlocktankException, ) : DbException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class InitializationException( public val `errorDetails`: kotlin.String, ) : DbException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + } @@ -3236,25 +3303,25 @@ public sealed class DbException: kotlin.Exception() { public sealed class DecodingException: kotlin.Exception() { - + public class InvalidFormat( ) : DecodingException() { override val message: String get() = "" } - + public class InvalidNetwork( ) : DecodingException() { override val message: String get() = "" } - + public class InvalidAmount( ) : DecodingException() { override val message: String get() = "" } - + public class InvalidLnurlPayAmount( public val `amountSatoshis`: kotlin.ULong, public val `min`: kotlin.ULong, @@ -3263,56 +3330,56 @@ public sealed class DecodingException: kotlin.Exception() { override val message: String get() = "amountSatoshis=${ `amountSatoshis` }, min=${ `min` }, max=${ `max` }" } - + public class InvalidTimestamp( ) : DecodingException() { override val message: String get() = "" } - + public class InvalidChecksum( ) : DecodingException() { override val message: String get() = "" } - + public class InvalidResponse( ) : DecodingException() { override val message: String get() = "" } - + public class UnsupportedType( ) : DecodingException() { override val message: String get() = "" } - + public class InvalidAddress( ) : DecodingException() { override val message: String get() = "" } - + public class RequestFailed( ) : DecodingException() { override val message: String get() = "" } - + public class ClientCreationFailed( ) : DecodingException() { override val message: String get() = "" } - + public class InvoiceCreationFailed( public val `errorMessage`: kotlin.String, ) : DecodingException() { override val message: String get() = "errorMessage=${ `errorMessage` }" } - + } @@ -3320,31 +3387,31 @@ public sealed class DecodingException: kotlin.Exception() { public sealed class LnurlException: kotlin.Exception() { - + public class InvalidAddress( ) : LnurlException() { override val message: String get() = "" } - + public class ClientCreationFailed( ) : LnurlException() { override val message: String get() = "" } - + public class RequestFailed( ) : LnurlException() { override val message: String get() = "" } - + public class InvalidResponse( ) : LnurlException() { override val message: String get() = "" } - + public class InvalidAmount( public val `amountSatoshis`: kotlin.ULong, public val `min`: kotlin.ULong, @@ -3353,20 +3420,20 @@ public sealed class LnurlException: kotlin.Exception() { override val message: String get() = "amountSatoshis=${ `amountSatoshis` }, min=${ `min` }, max=${ `max` }" } - + public class InvoiceCreationFailed( public val `errorDetails`: kotlin.String, ) : LnurlException() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + public class AuthenticationFailed( ) : LnurlException() { override val message: String get() = "" } - + } @@ -3375,7 +3442,7 @@ public sealed class LnurlException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class ManualRefundStateEnum { - + CREATED, APPROVED, REJECTED, @@ -3391,7 +3458,7 @@ public enum class ManualRefundStateEnum { @kotlinx.serialization.Serializable public enum class Network { - + /** * Mainnet Bitcoin. */ @@ -3423,7 +3490,7 @@ public enum class Network { @kotlinx.serialization.Serializable public enum class NetworkType { - + BITCOIN, TESTNET, REGTEST, @@ -3438,21 +3505,21 @@ public enum class NetworkType { @kotlinx.serialization.Serializable public sealed class PassphraseResponse { - + /** * User cancelled — aborts the pending operation. */ @kotlinx.serialization.Serializable - public data object Cancel : PassphraseResponse() - - + public data object Cancel : PassphraseResponse() + + /** * Standard wallet — no passphrase, equivalent to `Some("")` on the device. */ @kotlinx.serialization.Serializable - public data object Standard : PassphraseResponse() - - + public data object Standard : PassphraseResponse() + + /** * Hidden wallet — derived from the passphrase entered on the host. */@kotlinx.serialization.Serializable @@ -3460,14 +3527,14 @@ public sealed class PassphraseResponse { val `value`: kotlin.String, ) : PassphraseResponse() { } - + /** * Enter the passphrase on the Trezor device itself instead of on the host. */ @kotlinx.serialization.Serializable - public data object OnDevice : PassphraseResponse() - - + public data object OnDevice : PassphraseResponse() + + } @@ -3478,7 +3545,7 @@ public sealed class PassphraseResponse { @kotlinx.serialization.Serializable public enum class PaymentState { - + PENDING, SUCCEEDED, FAILED; @@ -3493,7 +3560,7 @@ public enum class PaymentState { @kotlinx.serialization.Serializable public enum class PaymentType { - + SENT, RECEIVED; public companion object @@ -3510,7 +3577,7 @@ public enum class PaymentType { @kotlinx.serialization.Serializable public enum class PubkyAuthKind { - + SIGNIN, SIGNUP; public companion object @@ -3523,68 +3590,68 @@ public enum class PubkyAuthKind { public sealed class PubkyException: kotlin.Exception() { - + public class InvalidCapabilities( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + public class AuthFailed( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + public class NoActiveFlow( ) : PubkyException() { override val message: String get() = "" } - + public class ResolutionFailed( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + public class FetchFailed( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + public class ProfileNotFound( ) : PubkyException() { override val message: String get() = "" } - + public class ProfileParseFailed( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + public class KeyException( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + public class WriteFailed( public val `reason`: kotlin.String, ) : PubkyException() { override val message: String get() = "reason=${ `reason` }" } - + } @@ -3644,7 +3711,7 @@ public sealed class Scanner { val `amount`: kotlin.ULong, ) : Scanner() { } - + } @@ -3655,7 +3722,7 @@ public sealed class Scanner { @kotlinx.serialization.Serializable public enum class SortDirection { - + ASC, DESC; public companion object @@ -3668,26 +3735,26 @@ public enum class SortDirection { public sealed class SweepException: kotlin.Exception() { - + public class SweepFailed( public val v1: kotlin.String, ) : SweepException() { override val message: String get() = "v1=${ v1 }" } - + public class NoUtxosFound( ) : SweepException() { override val message: String get() = "" } - + public class InvalidMnemonic( ) : SweepException() { override val message: String get() = "" } - + } @@ -3699,7 +3766,7 @@ public sealed class SweepException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class TrezorCoinType { - + /** * Bitcoin mainnet */ @@ -3729,7 +3796,7 @@ public enum class TrezorCoinType { * Trezor-related errors exposed via FFI. */ public sealed class TrezorException: kotlin.Exception() { - + /** * Transport layer error (USB/Bluetooth communication) */ @@ -3739,7 +3806,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * No Trezor device found */ @@ -3748,7 +3815,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Device disconnected during operation */ @@ -3757,7 +3824,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Connection error */ @@ -3767,7 +3834,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Protocol error (encoding/decoding) */ @@ -3777,7 +3844,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Pairing required for Bluetooth connection */ @@ -3786,7 +3853,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Pairing failed */ @@ -3796,7 +3863,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * PIN is required */ @@ -3805,7 +3872,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * PIN entry cancelled */ @@ -3814,7 +3881,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Invalid PIN entered */ @@ -3823,7 +3890,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Passphrase is required */ @@ -3832,7 +3899,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Passphrase entry cancelled */ @@ -3841,7 +3908,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Action cancelled by user on device */ @@ -3850,7 +3917,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Operation timed out */ @@ -3859,7 +3926,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Invalid derivation path */ @@ -3869,7 +3936,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Device returned an error */ @@ -3879,7 +3946,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * Trezor manager not initialized */ @@ -3888,7 +3955,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * No device connected */ @@ -3897,7 +3964,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "" } - + /** * Session error */ @@ -3907,7 +3974,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + /** * IO error */ @@ -3917,7 +3984,7 @@ public sealed class TrezorException: kotlin.Exception() { override val message: String get() = "errorDetails=${ `errorDetails` }" } - + } @@ -3929,7 +3996,7 @@ public sealed class TrezorException: kotlin.Exception() { @kotlinx.serialization.Serializable public enum class TrezorScriptType { - + /** * P2PKH (legacy) */ @@ -3968,7 +4035,7 @@ public enum class TrezorScriptType { @kotlinx.serialization.Serializable public enum class TrezorTransportType { - + /** * USB connection */ @@ -3991,7 +4058,7 @@ public enum class TrezorTransportType { @kotlinx.serialization.Serializable public enum class TxDirection { - + /** * Wallet sent funds to an external address */ @@ -4023,14 +4090,14 @@ public enum class TxDirection { */ @kotlinx.serialization.Serializable public sealed class WalletSelection { - + /** * The standard wallet — no passphrase. */ @kotlinx.serialization.Serializable - public data object Standard : WalletSelection() - - + public data object Standard : WalletSelection() + + /** * A hidden wallet whose passphrase is entered on the host. */@kotlinx.serialization.Serializable @@ -4038,14 +4105,62 @@ public sealed class WalletSelection { val `passphrase`: kotlin.String, ) : WalletSelection() { } - + /** * A hidden wallet whose passphrase is entered on the Trezor itself. */ @kotlinx.serialization.Serializable - public data object OnDevice : WalletSelection() + public data object OnDevice : WalletSelection() + + +} + + + + +/** + * Events emitted by the onchain xpub watcher. + */ +@kotlinx.serialization.Serializable +public sealed class WatcherEvent { + + /** + * Transaction activity changed — contains full updated state. + */@kotlinx.serialization.Serializable + public data class TransactionsChanged( + val `transactions`: List, + val `balance`: WalletBalance, + val `txCount`: kotlin.UInt, + val `blockHeight`: kotlin.UInt, + val `accountType`: AccountType, + ) : WatcherEvent() { + } + + /** + * An error occurred in the watcher loop. + */@kotlinx.serialization.Serializable + public data class Error( + val `message`: kotlin.String, + ) : WatcherEvent() { + } + + /** + * Connection to the Electrum server was lost. + */@kotlinx.serialization.Serializable + public data class Disconnected( + val `message`: kotlin.String, + ) : WatcherEvent() { + } + + /** + * Connection to the Electrum server was restored. + */ + @kotlinx.serialization.Serializable + public data object Reconnected : WatcherEvent() + + } @@ -4056,7 +4171,7 @@ public sealed class WalletSelection { @kotlinx.serialization.Serializable public enum class WordCount { - + /** * 12-word mnemonic (128 bits of entropy) */ diff --git a/bindings/ios/BitkitCore.xcframework.zip b/bindings/ios/BitkitCore.xcframework.zip index f623d4e..817bc81 100644 Binary files a/bindings/ios/BitkitCore.xcframework.zip and b/bindings/ios/BitkitCore.xcframework.zip differ diff --git a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h b/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h index b445fda..adc6b27 100644 --- a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h +++ b/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h @@ -250,97 +250,112 @@ typedef struct UniffiForeignFutureStructVoid { typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t, UniffiForeignFutureStructVoid ); +#endif +#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 +#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 +typedef void (*UniffiCallbackInterfaceEventListenerMethod0)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, + RustCallStatus *_Nonnull uniffiCallStatus + ); + #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod1)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod1)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD2 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD2 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD3 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD3 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD4 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD4 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod4)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod4)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD5 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD5 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod5)(uint64_t, RustBuffer, uint32_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod5)(uint64_t, RustBuffer, uint32_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD6 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD6 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod6)(uint64_t, RustBuffer, uint16_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod6)(uint64_t, RustBuffer, uint16_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD7 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD7 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod7)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod7)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD8 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD8 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod8)(uint64_t, RustBuffer, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod8)(uint64_t, RustBuffer, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD9 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD9 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod9)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod9)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD10 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD10 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod10)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod10)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod1)(uint64_t, int8_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod1)(uint64_t, int8_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); +#endif +#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_EVENT_LISTENER +#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_EVENT_LISTENER +typedef struct UniffiVTableCallbackInterfaceEventListener { + UniffiCallbackInterfaceEventListenerMethod0 _Nonnull onEvent; + UniffiCallbackInterfaceFree _Nonnull uniffiFree; +} UniffiVTableCallbackInterfaceEventListener; + #endif #ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK #define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK @@ -368,6 +383,26 @@ typedef struct UniffiVTableCallbackInterfaceTrezorUiCallback { UniffiCallbackInterfaceFree _Nonnull uniffiFree; } UniffiVTableCallbackInterfaceTrezorUiCallback; +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_EVENTLISTENER +void*_Nonnull uniffi_bitkitcore_fn_clone_eventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_EVENTLISTENER +void uniffi_bitkitcore_fn_free_eventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_EVENTLISTENER +void uniffi_bitkitcore_fn_init_callback_vtable_eventlistener(const UniffiVTableCallbackInterfaceEventListener* _Nonnull vtable +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_EVENTLISTENER_ON_EVENT +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_EVENTLISTENER_ON_EVENT +void uniffi_bitkitcore_fn_method_eventlistener_on_event(void*_Nonnull ptr, RustBuffer watcher_id, RustBuffer event, RustCallStatus *_Nonnull out_status +); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORTRANSPORTCALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORTRANSPORTCALLBACK @@ -467,7 +502,7 @@ RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request(vo #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_WIPE_ALL void uniffi_bitkitcore_fn_func_activity_wipe_all(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA @@ -493,19 +528,19 @@ uint64_t uniffi_bitkitcore_fn_func_approve_pubky_auth(RustBuffer auth_url, RustB #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES uint64_t uniffi_bitkitcore_fn_func_blocktank_remove_all_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS uint64_t uniffi_bitkitcore_fn_func_blocktank_remove_all_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_WIPE_ALL uint64_t uniffi_bitkitcore_fn_func_blocktank_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION @@ -521,7 +556,7 @@ RustBuffer uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options(RustBuf #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CANCEL_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CANCEL_PUBKY_AUTH uint64_t uniffi_bitkitcore_fn_func_cancel_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CHECK_SWEEPABLE_BALANCES @@ -532,7 +567,7 @@ uint64_t uniffi_bitkitcore_fn_func_check_sweepable_balances(RustBuffer mnemonic_ #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_COMPLETE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_COMPLETE_PUBKY_AUTH uint64_t uniffi_bitkitcore_fn_func_complete_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CHANNEL_REQUEST_URL @@ -663,7 +698,7 @@ RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_tx_id(RustBuffer tx_id, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_ACTIVITIES_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_ACTIVITIES_TAGS RustBuffer uniffi_bitkitcore_fn_func_get_all_activities_tags(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_CLOSED_CHANNELS @@ -674,19 +709,19 @@ RustBuffer uniffi_bitkitcore_fn_func_get_all_closed_channels(RustBuffer sort_dir #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_PRE_ACTIVITY_METADATA RustBuffer uniffi_bitkitcore_fn_func_get_all_pre_activity_metadata(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_TRANSACTION_DETAILS RustBuffer uniffi_bitkitcore_fn_func_get_all_transaction_details(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_UNIQUE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_UNIQUE_TAGS RustBuffer uniffi_bitkitcore_fn_func_get_all_unique_tags(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_SUGGESTIONS @@ -697,7 +732,7 @@ RustBuffer uniffi_bitkitcore_fn_func_get_bip39_suggestions(RustBuffer partial_wo #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_WORDLIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_WORDLIST RustBuffer uniffi_bitkitcore_fn_func_get_bip39_wordlist(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CJIT_ENTRIES @@ -840,6 +875,22 @@ uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_detail(RustBuffer ext uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_history(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer network, RustBuffer script_type ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_START_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_START_WATCHER +uint64_t uniffi_bitkitcore_fn_func_onchain_start_watcher(RustBuffer params, void*_Nonnull listener +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_ALL_WATCHERS +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_ALL_WATCHERS +void uniffi_bitkitcore_fn_func_onchain_stop_all_watchers(RustCallStatus *_Nonnull out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_WATCHER +void uniffi_bitkitcore_fn_func_onchain_stop_watcher(RustBuffer watcher_id, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_OPEN_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_OPEN_CHANNEL uint64_t uniffi_bitkitcore_fn_func_open_channel(RustBuffer order_id, RustBuffer connection_string @@ -898,13 +949,13 @@ uint64_t uniffi_bitkitcore_fn_func_pubky_sign_up(RustBuffer secret_key_hex, Rust #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES uint64_t uniffi_bitkitcore_fn_func_refresh_active_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_ORDERS uint64_t uniffi_bitkitcore_fn_func_refresh_active_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGISTER_DEVICE @@ -995,7 +1046,7 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_connect(RustBuffer device_id, RustBuff #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_DISCONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_DISCONNECT uint64_t uniffi_bitkitcore_fn_func_trezor_disconnect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_ADDRESS @@ -1006,19 +1057,19 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_get_address(RustBuffer params #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_CONNECTED_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_CONNECTED_DEVICE uint64_t uniffi_bitkitcore_fn_func_trezor_get_connected_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_DEVICE_FINGERPRINT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_DEVICE_FINGERPRINT uint64_t uniffi_bitkitcore_fn_func_trezor_get_device_fingerprint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_FEATURES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_FEATURES uint64_t uniffi_bitkitcore_fn_func_trezor_get_features(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_PUBLIC_KEY @@ -1034,31 +1085,31 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_initialize(RustBuffer credential_path #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_BLE_AVAILABLE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_BLE_AVAILABLE int8_t uniffi_bitkitcore_fn_func_trezor_is_ble_available(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_CONNECTED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_CONNECTED uint64_t uniffi_bitkitcore_fn_func_trezor_is_connected(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_INITIALIZED uint64_t uniffi_bitkitcore_fn_func_trezor_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_LIST_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_LIST_DEVICES uint64_t uniffi_bitkitcore_fn_func_trezor_list_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SCAN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SCAN uint64_t uniffi_bitkitcore_fn_func_trezor_scan(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_TRANSPORT_CALLBACK @@ -1174,19 +1225,19 @@ void uniffi_bitkitcore_fn_func_validate_mnemonic(RustBuffer mnemonic_phrase, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_CLOSED_CHANNELS void uniffi_bitkitcore_fn_func_wipe_all_closed_channels(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_DATABASES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_DATABASES uint64_t uniffi_bitkitcore_fn_func_wipe_all_databases(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_TRANSACTION_DETAILS void uniffi_bitkitcore_fn_func_wipe_all_transaction_details(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_ALLOC @@ -1472,925 +1523,949 @@ void ffi_bitkitcore_rust_future_complete_void(uint64_t handle, RustCallStatus *_ #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_WIPE_ALL uint16_t uniffi_bitkitcore_checksum_func_activity_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_add_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_add_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_TAGS uint16_t uniffi_bitkitcore_checksum_func_add_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_APPROVE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_APPROVE_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_approve_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_blocktank_remove_all_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS uint16_t uniffi_bitkitcore_checksum_func_blocktank_remove_all_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_WIPE_ALL uint16_t uniffi_bitkitcore_checksum_func_blocktank_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BROADCAST_SWEEP_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BROADCAST_SWEEP_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_broadcast_sweep_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS uint16_t uniffi_bitkitcore_checksum_func_calculate_channel_liquidity_options(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CANCEL_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CANCEL_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_cancel_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CHECK_SWEEPABLE_BALANCES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CHECK_SWEEPABLE_BALANCES uint16_t uniffi_bitkitcore_checksum_func_check_sweepable_balances(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_COMPLETE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_COMPLETE_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_complete_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CHANNEL_REQUEST_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CHANNEL_REQUEST_URL uint16_t uniffi_bitkitcore_checksum_func_create_channel_request_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CJIT_ENTRY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CJIT_ENTRY uint16_t uniffi_bitkitcore_checksum_func_create_cjit_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_ORDER #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_ORDER uint16_t uniffi_bitkitcore_checksum_func_create_order(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_WITHDRAW_CALLBACK_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_WITHDRAW_CALLBACK_URL uint16_t uniffi_bitkitcore_checksum_func_create_withdraw_callback_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DECODE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DECODE uint16_t uniffi_bitkitcore_checksum_func_decode(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITY_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITY_BY_ID uint16_t uniffi_bitkitcore_checksum_func_delete_activity_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_delete_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_delete_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_derive_bitcoin_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESSES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESSES uint16_t uniffi_bitkitcore_checksum_func_derive_bitcoin_addresses(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_ONCHAIN_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_ONCHAIN_DESCRIPTOR uint16_t uniffi_bitkitcore_checksum_func_derive_onchain_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PRIVATE_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PRIVATE_KEY uint16_t uniffi_bitkitcore_checksum_func_derive_private_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PUBKY_SECRET_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PUBKY_SECRET_KEY uint16_t uniffi_bitkitcore_checksum_func_derive_pubky_secret_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ENTROPY_TO_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ENTROPY_TO_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_entropy_to_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE uint16_t uniffi_bitkitcore_checksum_func_estimate_order_fee(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE_FULL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE_FULL uint16_t uniffi_bitkitcore_checksum_func_estimate_order_fee_full(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_CONTACTS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_CONTACTS uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_contacts(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_file(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE_STRING #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE_STRING uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_file_string(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_PROFILE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_PROFILE uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_profile(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GENERATE_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GENERATE_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_generate_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_get_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_BY_TAG #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_BY_TAG uint16_t uniffi_bitkitcore_checksum_func_get_activities_by_tag(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_ID uint16_t uniffi_bitkitcore_checksum_func_get_activity_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_TX_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_TX_ID uint16_t uniffi_bitkitcore_checksum_func_get_activity_by_tx_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_ACTIVITIES_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_ACTIVITIES_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_all_activities_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_get_all_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_get_all_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_get_all_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_UNIQUE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_UNIQUE_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_all_unique_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_SUGGESTIONS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_SUGGESTIONS uint16_t uniffi_bitkitcore_checksum_func_get_bip39_suggestions(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_WORDLIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_WORDLIST uint16_t uniffi_bitkitcore_checksum_func_get_bip39_wordlist(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_get_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CLOSED_CHANNEL_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CLOSED_CHANNEL_BY_ID uint16_t uniffi_bitkitcore_checksum_func_get_closed_channel_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_LSP_BALANCE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_LSP_BALANCE uint16_t uniffi_bitkitcore_checksum_func_get_default_lsp_balance(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_GIFT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_GIFT uint16_t uniffi_bitkitcore_checksum_func_get_gift(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_INFO uint16_t uniffi_bitkitcore_checksum_func_get_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE uint16_t uniffi_bitkitcore_checksum_func_get_lnurl_invoice(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_MIN_ZERO_CONF_TX_FEE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_MIN_ZERO_CONF_TX_FEE uint16_t uniffi_bitkitcore_checksum_func_get_min_zero_conf_tx_fee(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ORDERS uint16_t uniffi_bitkitcore_checksum_func_get_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PAYMENT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PAYMENT uint16_t uniffi_bitkitcore_checksum_func_get_payment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_get_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_get_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_ORDER #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_ORDER uint16_t uniffi_bitkitcore_checksum_func_gift_order(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_PAY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_PAY uint16_t uniffi_bitkitcore_checksum_func_gift_pay(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INIT_DB #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INIT_DB uint16_t uniffi_bitkitcore_checksum_func_init_db(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INSERT_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INSERT_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_insert_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_ADDRESS_USED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_ADDRESS_USED uint16_t uniffi_bitkitcore_checksum_func_is_address_used(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_VALID_BIP39_WORD #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_VALID_BIP39_WORD uint16_t uniffi_bitkitcore_checksum_func_is_valid_bip39_word(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_LNURL_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_LNURL_AUTH uint16_t uniffi_bitkitcore_checksum_func_lnurl_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MARK_ACTIVITY_AS_SEEN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MARK_ACTIVITY_AS_SEEN uint16_t uniffi_bitkitcore_checksum_func_mark_activity_as_seen(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_ENTROPY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_ENTROPY uint16_t uniffi_bitkitcore_checksum_func_mnemonic_to_entropy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_SEED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_SEED uint16_t uniffi_bitkitcore_checksum_func_mnemonic_to_seed(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_BROADCAST_RAW_TX #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_BROADCAST_RAW_TX uint16_t uniffi_bitkitcore_checksum_func_onchain_broadcast_raw_tx(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_COMPOSE_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_COMPOSE_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_onchain_compose_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ACCOUNT_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ACCOUNT_INFO uint16_t uniffi_bitkitcore_checksum_func_onchain_get_account_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ADDRESS_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ADDRESS_INFO uint16_t uniffi_bitkitcore_checksum_func_onchain_get_address_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL uint16_t uniffi_bitkitcore_checksum_func_onchain_get_transaction_detail(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY uint16_t uniffi_bitkitcore_checksum_func_onchain_get_transaction_history(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_START_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_START_WATCHER +uint16_t uniffi_bitkitcore_checksum_func_onchain_start_watcher(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_ALL_WATCHERS +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_ALL_WATCHERS +uint16_t uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_WATCHER +uint16_t uniffi_bitkitcore_checksum_func_onchain_stop_watcher(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_OPEN_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_OPEN_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_open_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PARSE_PUBKY_AUTH_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PARSE_PUBKY_AUTH_URL uint16_t uniffi_bitkitcore_checksum_func_parse_pubky_auth_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP uint16_t uniffi_bitkitcore_checksum_func_prepare_legacy_rn_native_segwit_recovery_sweep(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_SWEEP_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_SWEEP_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_prepare_sweep_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET uint16_t uniffi_bitkitcore_checksum_func_pubky_public_key_from_secret(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUT_WITH_SECRET_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUT_WITH_SECRET_KEY uint16_t uniffi_bitkitcore_checksum_func_pubky_put_with_secret_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_DELETE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_DELETE uint16_t uniffi_bitkitcore_checksum_func_pubky_session_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_LIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_LIST uint16_t uniffi_bitkitcore_checksum_func_pubky_session_list(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_PUT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_PUT uint16_t uniffi_bitkitcore_checksum_func_pubky_session_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_IN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_IN uint16_t uniffi_bitkitcore_checksum_func_pubky_sign_in(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_UP #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_UP uint16_t uniffi_bitkitcore_checksum_func_pubky_sign_up(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_refresh_active_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_ORDERS uint16_t uniffi_bitkitcore_checksum_func_refresh_active_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGISTER_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGISTER_DEVICE uint16_t uniffi_bitkitcore_checksum_func_register_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_CLOSE_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_CLOSE_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_regtest_close_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_DEPOSIT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_DEPOSIT uint16_t uniffi_bitkitcore_checksum_func_regtest_deposit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_GET_PAYMENT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_GET_PAYMENT uint16_t uniffi_bitkitcore_checksum_func_regtest_get_payment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_MINE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_MINE uint16_t uniffi_bitkitcore_checksum_func_regtest_mine(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_PAY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_PAY uint16_t uniffi_bitkitcore_checksum_func_regtest_pay(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID uint16_t uniffi_bitkitcore_checksum_func_remove_closed_channel_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_remove_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_TAGS uint16_t uniffi_bitkitcore_checksum_func_remove_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_reset_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESOLVE_PUBKY_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESOLVE_PUBKY_URL uint16_t uniffi_bitkitcore_checksum_func_resolve_pubky_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS uint16_t uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_START_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_START_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_start_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TEST_NOTIFICATION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TEST_NOTIFICATION uint16_t uniffi_bitkitcore_checksum_func_test_notification(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE uint16_t uniffi_bitkitcore_checksum_func_trezor_account_type_to_script_type(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CLEAR_CREDENTIALS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CLEAR_CREDENTIALS uint16_t uniffi_bitkitcore_checksum_func_trezor_clear_credentials(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CONNECT uint16_t uniffi_bitkitcore_checksum_func_trezor_connect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_DISCONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_DISCONNECT uint16_t uniffi_bitkitcore_checksum_func_trezor_disconnect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_trezor_get_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_CONNECTED_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_CONNECTED_DEVICE uint16_t uniffi_bitkitcore_checksum_func_trezor_get_connected_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_DEVICE_FINGERPRINT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_DEVICE_FINGERPRINT uint16_t uniffi_bitkitcore_checksum_func_trezor_get_device_fingerprint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_FEATURES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_FEATURES uint16_t uniffi_bitkitcore_checksum_func_trezor_get_features(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_PUBLIC_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_PUBLIC_KEY uint16_t uniffi_bitkitcore_checksum_func_trezor_get_public_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_INITIALIZE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_INITIALIZE uint16_t uniffi_bitkitcore_checksum_func_trezor_initialize(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_BLE_AVAILABLE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_BLE_AVAILABLE uint16_t uniffi_bitkitcore_checksum_func_trezor_is_ble_available(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_CONNECTED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_CONNECTED uint16_t uniffi_bitkitcore_checksum_func_trezor_is_connected(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_INITIALIZED uint16_t uniffi_bitkitcore_checksum_func_trezor_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_LIST_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_LIST_DEVICES uint16_t uniffi_bitkitcore_checksum_func_trezor_list_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SCAN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SCAN uint16_t uniffi_bitkitcore_checksum_func_trezor_scan(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_TRANSPORT_CALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_TRANSPORT_CALLBACK uint16_t uniffi_bitkitcore_checksum_func_trezor_set_transport_callback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_UI_CALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_UI_CALLBACK uint16_t uniffi_bitkitcore_checksum_func_trezor_set_ui_callback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_MESSAGE uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_tx(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX_FROM_PSBT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX_FROM_PSBT uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_tx_from_psbt(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_VERIFY_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_VERIFY_MESSAGE uint16_t uniffi_bitkitcore_checksum_func_trezor_verify_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_update_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_BLOCKTANK_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_BLOCKTANK_URL uint16_t uniffi_bitkitcore_checksum_func_update_blocktank_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_upsert_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_upsert_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_upsert_closed_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_upsert_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_INFO uint16_t uniffi_bitkitcore_checksum_func_upsert_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_LIGHTNING_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_LIGHTNING_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_lightning_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ONCHAIN_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ONCHAIN_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_onchain_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ORDERS uint16_t uniffi_bitkitcore_checksum_func_upsert_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_upsert_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TAGS uint16_t uniffi_bitkitcore_checksum_func_upsert_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_upsert_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_BITCOIN_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_BITCOIN_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_validate_bitcoin_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_validate_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_wipe_all_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_DATABASES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_DATABASES uint16_t uniffi_bitkitcore_checksum_func_wipe_all_databases(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_wipe_all_transaction_details(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_EVENTLISTENER_ON_EVENT +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_EVENTLISTENER_ON_EVENT +uint16_t uniffi_bitkitcore_checksum_method_eventlistener_on_event(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_open_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_close_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_read_chunk(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_write_chunk(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_get_chunk_size(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_call_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_get_pairing_code(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_save_thp_credential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_load_thp_credential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_log_debug(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST uint16_t uniffi_bitkitcore_checksum_method_trezoruicallback_on_pin_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST uint16_t uniffi_bitkitcore_checksum_method_trezoruicallback_on_passphrase_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_UNIFFI_CONTRACT_VERSION #define UNIFFI_FFIDEF_FFI_BITKITCORE_UNIFFI_CONTRACT_VERSION uint32_t ffi_bitkitcore_uniffi_contract_version(void - + ); #endif diff --git a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/libbitkitcore.a b/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/libbitkitcore.a index e7fe1aa..58a5438 100644 Binary files a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/libbitkitcore.a and b/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/libbitkitcore.a differ diff --git a/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h b/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h index b445fda..adc6b27 100644 --- a/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h +++ b/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h @@ -250,97 +250,112 @@ typedef struct UniffiForeignFutureStructVoid { typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t, UniffiForeignFutureStructVoid ); +#endif +#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 +#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 +typedef void (*UniffiCallbackInterfaceEventListenerMethod0)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, + RustCallStatus *_Nonnull uniffiCallStatus + ); + #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod1)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod1)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD2 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD2 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD3 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD3 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD4 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD4 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod4)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod4)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD5 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD5 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod5)(uint64_t, RustBuffer, uint32_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod5)(uint64_t, RustBuffer, uint32_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD6 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD6 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod6)(uint64_t, RustBuffer, uint16_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod6)(uint64_t, RustBuffer, uint16_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD7 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD7 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod7)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod7)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD8 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD8 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod8)(uint64_t, RustBuffer, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod8)(uint64_t, RustBuffer, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD9 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD9 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod9)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod9)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD10 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD10 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod10)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod10)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod1)(uint64_t, int8_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod1)(uint64_t, int8_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); +#endif +#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_EVENT_LISTENER +#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_EVENT_LISTENER +typedef struct UniffiVTableCallbackInterfaceEventListener { + UniffiCallbackInterfaceEventListenerMethod0 _Nonnull onEvent; + UniffiCallbackInterfaceFree _Nonnull uniffiFree; +} UniffiVTableCallbackInterfaceEventListener; + #endif #ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK #define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK @@ -368,6 +383,26 @@ typedef struct UniffiVTableCallbackInterfaceTrezorUiCallback { UniffiCallbackInterfaceFree _Nonnull uniffiFree; } UniffiVTableCallbackInterfaceTrezorUiCallback; +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_EVENTLISTENER +void*_Nonnull uniffi_bitkitcore_fn_clone_eventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_EVENTLISTENER +void uniffi_bitkitcore_fn_free_eventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_EVENTLISTENER +void uniffi_bitkitcore_fn_init_callback_vtable_eventlistener(const UniffiVTableCallbackInterfaceEventListener* _Nonnull vtable +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_EVENTLISTENER_ON_EVENT +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_EVENTLISTENER_ON_EVENT +void uniffi_bitkitcore_fn_method_eventlistener_on_event(void*_Nonnull ptr, RustBuffer watcher_id, RustBuffer event, RustCallStatus *_Nonnull out_status +); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORTRANSPORTCALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORTRANSPORTCALLBACK @@ -467,7 +502,7 @@ RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request(vo #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_WIPE_ALL void uniffi_bitkitcore_fn_func_activity_wipe_all(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA @@ -493,19 +528,19 @@ uint64_t uniffi_bitkitcore_fn_func_approve_pubky_auth(RustBuffer auth_url, RustB #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES uint64_t uniffi_bitkitcore_fn_func_blocktank_remove_all_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS uint64_t uniffi_bitkitcore_fn_func_blocktank_remove_all_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_WIPE_ALL uint64_t uniffi_bitkitcore_fn_func_blocktank_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION @@ -521,7 +556,7 @@ RustBuffer uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options(RustBuf #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CANCEL_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CANCEL_PUBKY_AUTH uint64_t uniffi_bitkitcore_fn_func_cancel_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CHECK_SWEEPABLE_BALANCES @@ -532,7 +567,7 @@ uint64_t uniffi_bitkitcore_fn_func_check_sweepable_balances(RustBuffer mnemonic_ #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_COMPLETE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_COMPLETE_PUBKY_AUTH uint64_t uniffi_bitkitcore_fn_func_complete_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CHANNEL_REQUEST_URL @@ -663,7 +698,7 @@ RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_tx_id(RustBuffer tx_id, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_ACTIVITIES_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_ACTIVITIES_TAGS RustBuffer uniffi_bitkitcore_fn_func_get_all_activities_tags(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_CLOSED_CHANNELS @@ -674,19 +709,19 @@ RustBuffer uniffi_bitkitcore_fn_func_get_all_closed_channels(RustBuffer sort_dir #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_PRE_ACTIVITY_METADATA RustBuffer uniffi_bitkitcore_fn_func_get_all_pre_activity_metadata(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_TRANSACTION_DETAILS RustBuffer uniffi_bitkitcore_fn_func_get_all_transaction_details(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_UNIQUE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_UNIQUE_TAGS RustBuffer uniffi_bitkitcore_fn_func_get_all_unique_tags(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_SUGGESTIONS @@ -697,7 +732,7 @@ RustBuffer uniffi_bitkitcore_fn_func_get_bip39_suggestions(RustBuffer partial_wo #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_WORDLIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_WORDLIST RustBuffer uniffi_bitkitcore_fn_func_get_bip39_wordlist(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CJIT_ENTRIES @@ -840,6 +875,22 @@ uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_detail(RustBuffer ext uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_history(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer network, RustBuffer script_type ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_START_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_START_WATCHER +uint64_t uniffi_bitkitcore_fn_func_onchain_start_watcher(RustBuffer params, void*_Nonnull listener +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_ALL_WATCHERS +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_ALL_WATCHERS +void uniffi_bitkitcore_fn_func_onchain_stop_all_watchers(RustCallStatus *_Nonnull out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_WATCHER +void uniffi_bitkitcore_fn_func_onchain_stop_watcher(RustBuffer watcher_id, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_OPEN_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_OPEN_CHANNEL uint64_t uniffi_bitkitcore_fn_func_open_channel(RustBuffer order_id, RustBuffer connection_string @@ -898,13 +949,13 @@ uint64_t uniffi_bitkitcore_fn_func_pubky_sign_up(RustBuffer secret_key_hex, Rust #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES uint64_t uniffi_bitkitcore_fn_func_refresh_active_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_ORDERS uint64_t uniffi_bitkitcore_fn_func_refresh_active_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGISTER_DEVICE @@ -995,7 +1046,7 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_connect(RustBuffer device_id, RustBuff #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_DISCONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_DISCONNECT uint64_t uniffi_bitkitcore_fn_func_trezor_disconnect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_ADDRESS @@ -1006,19 +1057,19 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_get_address(RustBuffer params #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_CONNECTED_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_CONNECTED_DEVICE uint64_t uniffi_bitkitcore_fn_func_trezor_get_connected_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_DEVICE_FINGERPRINT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_DEVICE_FINGERPRINT uint64_t uniffi_bitkitcore_fn_func_trezor_get_device_fingerprint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_FEATURES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_FEATURES uint64_t uniffi_bitkitcore_fn_func_trezor_get_features(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_PUBLIC_KEY @@ -1034,31 +1085,31 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_initialize(RustBuffer credential_path #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_BLE_AVAILABLE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_BLE_AVAILABLE int8_t uniffi_bitkitcore_fn_func_trezor_is_ble_available(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_CONNECTED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_CONNECTED uint64_t uniffi_bitkitcore_fn_func_trezor_is_connected(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_INITIALIZED uint64_t uniffi_bitkitcore_fn_func_trezor_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_LIST_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_LIST_DEVICES uint64_t uniffi_bitkitcore_fn_func_trezor_list_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SCAN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SCAN uint64_t uniffi_bitkitcore_fn_func_trezor_scan(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_TRANSPORT_CALLBACK @@ -1174,19 +1225,19 @@ void uniffi_bitkitcore_fn_func_validate_mnemonic(RustBuffer mnemonic_phrase, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_CLOSED_CHANNELS void uniffi_bitkitcore_fn_func_wipe_all_closed_channels(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_DATABASES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_DATABASES uint64_t uniffi_bitkitcore_fn_func_wipe_all_databases(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_TRANSACTION_DETAILS void uniffi_bitkitcore_fn_func_wipe_all_transaction_details(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_ALLOC @@ -1472,925 +1523,949 @@ void ffi_bitkitcore_rust_future_complete_void(uint64_t handle, RustCallStatus *_ #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_WIPE_ALL uint16_t uniffi_bitkitcore_checksum_func_activity_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_add_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_add_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_TAGS uint16_t uniffi_bitkitcore_checksum_func_add_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_APPROVE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_APPROVE_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_approve_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_blocktank_remove_all_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS uint16_t uniffi_bitkitcore_checksum_func_blocktank_remove_all_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_WIPE_ALL uint16_t uniffi_bitkitcore_checksum_func_blocktank_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BROADCAST_SWEEP_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BROADCAST_SWEEP_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_broadcast_sweep_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS uint16_t uniffi_bitkitcore_checksum_func_calculate_channel_liquidity_options(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CANCEL_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CANCEL_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_cancel_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CHECK_SWEEPABLE_BALANCES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CHECK_SWEEPABLE_BALANCES uint16_t uniffi_bitkitcore_checksum_func_check_sweepable_balances(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_COMPLETE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_COMPLETE_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_complete_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CHANNEL_REQUEST_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CHANNEL_REQUEST_URL uint16_t uniffi_bitkitcore_checksum_func_create_channel_request_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CJIT_ENTRY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CJIT_ENTRY uint16_t uniffi_bitkitcore_checksum_func_create_cjit_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_ORDER #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_ORDER uint16_t uniffi_bitkitcore_checksum_func_create_order(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_WITHDRAW_CALLBACK_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_WITHDRAW_CALLBACK_URL uint16_t uniffi_bitkitcore_checksum_func_create_withdraw_callback_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DECODE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DECODE uint16_t uniffi_bitkitcore_checksum_func_decode(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITY_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITY_BY_ID uint16_t uniffi_bitkitcore_checksum_func_delete_activity_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_delete_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_delete_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_derive_bitcoin_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESSES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESSES uint16_t uniffi_bitkitcore_checksum_func_derive_bitcoin_addresses(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_ONCHAIN_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_ONCHAIN_DESCRIPTOR uint16_t uniffi_bitkitcore_checksum_func_derive_onchain_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PRIVATE_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PRIVATE_KEY uint16_t uniffi_bitkitcore_checksum_func_derive_private_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PUBKY_SECRET_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PUBKY_SECRET_KEY uint16_t uniffi_bitkitcore_checksum_func_derive_pubky_secret_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ENTROPY_TO_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ENTROPY_TO_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_entropy_to_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE uint16_t uniffi_bitkitcore_checksum_func_estimate_order_fee(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE_FULL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE_FULL uint16_t uniffi_bitkitcore_checksum_func_estimate_order_fee_full(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_CONTACTS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_CONTACTS uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_contacts(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_file(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE_STRING #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE_STRING uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_file_string(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_PROFILE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_PROFILE uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_profile(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GENERATE_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GENERATE_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_generate_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_get_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_BY_TAG #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_BY_TAG uint16_t uniffi_bitkitcore_checksum_func_get_activities_by_tag(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_ID uint16_t uniffi_bitkitcore_checksum_func_get_activity_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_TX_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_TX_ID uint16_t uniffi_bitkitcore_checksum_func_get_activity_by_tx_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_ACTIVITIES_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_ACTIVITIES_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_all_activities_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_get_all_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_get_all_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_get_all_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_UNIQUE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_UNIQUE_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_all_unique_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_SUGGESTIONS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_SUGGESTIONS uint16_t uniffi_bitkitcore_checksum_func_get_bip39_suggestions(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_WORDLIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_WORDLIST uint16_t uniffi_bitkitcore_checksum_func_get_bip39_wordlist(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_get_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CLOSED_CHANNEL_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CLOSED_CHANNEL_BY_ID uint16_t uniffi_bitkitcore_checksum_func_get_closed_channel_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_LSP_BALANCE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_LSP_BALANCE uint16_t uniffi_bitkitcore_checksum_func_get_default_lsp_balance(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_GIFT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_GIFT uint16_t uniffi_bitkitcore_checksum_func_get_gift(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_INFO uint16_t uniffi_bitkitcore_checksum_func_get_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE uint16_t uniffi_bitkitcore_checksum_func_get_lnurl_invoice(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_MIN_ZERO_CONF_TX_FEE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_MIN_ZERO_CONF_TX_FEE uint16_t uniffi_bitkitcore_checksum_func_get_min_zero_conf_tx_fee(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ORDERS uint16_t uniffi_bitkitcore_checksum_func_get_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PAYMENT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PAYMENT uint16_t uniffi_bitkitcore_checksum_func_get_payment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_get_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_get_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_ORDER #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_ORDER uint16_t uniffi_bitkitcore_checksum_func_gift_order(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_PAY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_PAY uint16_t uniffi_bitkitcore_checksum_func_gift_pay(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INIT_DB #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INIT_DB uint16_t uniffi_bitkitcore_checksum_func_init_db(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INSERT_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INSERT_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_insert_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_ADDRESS_USED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_ADDRESS_USED uint16_t uniffi_bitkitcore_checksum_func_is_address_used(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_VALID_BIP39_WORD #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_VALID_BIP39_WORD uint16_t uniffi_bitkitcore_checksum_func_is_valid_bip39_word(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_LNURL_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_LNURL_AUTH uint16_t uniffi_bitkitcore_checksum_func_lnurl_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MARK_ACTIVITY_AS_SEEN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MARK_ACTIVITY_AS_SEEN uint16_t uniffi_bitkitcore_checksum_func_mark_activity_as_seen(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_ENTROPY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_ENTROPY uint16_t uniffi_bitkitcore_checksum_func_mnemonic_to_entropy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_SEED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_SEED uint16_t uniffi_bitkitcore_checksum_func_mnemonic_to_seed(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_BROADCAST_RAW_TX #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_BROADCAST_RAW_TX uint16_t uniffi_bitkitcore_checksum_func_onchain_broadcast_raw_tx(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_COMPOSE_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_COMPOSE_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_onchain_compose_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ACCOUNT_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ACCOUNT_INFO uint16_t uniffi_bitkitcore_checksum_func_onchain_get_account_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ADDRESS_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ADDRESS_INFO uint16_t uniffi_bitkitcore_checksum_func_onchain_get_address_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL uint16_t uniffi_bitkitcore_checksum_func_onchain_get_transaction_detail(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY uint16_t uniffi_bitkitcore_checksum_func_onchain_get_transaction_history(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_START_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_START_WATCHER +uint16_t uniffi_bitkitcore_checksum_func_onchain_start_watcher(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_ALL_WATCHERS +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_ALL_WATCHERS +uint16_t uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_WATCHER +uint16_t uniffi_bitkitcore_checksum_func_onchain_stop_watcher(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_OPEN_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_OPEN_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_open_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PARSE_PUBKY_AUTH_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PARSE_PUBKY_AUTH_URL uint16_t uniffi_bitkitcore_checksum_func_parse_pubky_auth_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP uint16_t uniffi_bitkitcore_checksum_func_prepare_legacy_rn_native_segwit_recovery_sweep(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_SWEEP_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_SWEEP_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_prepare_sweep_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET uint16_t uniffi_bitkitcore_checksum_func_pubky_public_key_from_secret(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUT_WITH_SECRET_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUT_WITH_SECRET_KEY uint16_t uniffi_bitkitcore_checksum_func_pubky_put_with_secret_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_DELETE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_DELETE uint16_t uniffi_bitkitcore_checksum_func_pubky_session_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_LIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_LIST uint16_t uniffi_bitkitcore_checksum_func_pubky_session_list(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_PUT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_PUT uint16_t uniffi_bitkitcore_checksum_func_pubky_session_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_IN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_IN uint16_t uniffi_bitkitcore_checksum_func_pubky_sign_in(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_UP #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_UP uint16_t uniffi_bitkitcore_checksum_func_pubky_sign_up(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_refresh_active_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_ORDERS uint16_t uniffi_bitkitcore_checksum_func_refresh_active_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGISTER_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGISTER_DEVICE uint16_t uniffi_bitkitcore_checksum_func_register_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_CLOSE_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_CLOSE_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_regtest_close_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_DEPOSIT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_DEPOSIT uint16_t uniffi_bitkitcore_checksum_func_regtest_deposit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_GET_PAYMENT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_GET_PAYMENT uint16_t uniffi_bitkitcore_checksum_func_regtest_get_payment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_MINE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_MINE uint16_t uniffi_bitkitcore_checksum_func_regtest_mine(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_PAY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_PAY uint16_t uniffi_bitkitcore_checksum_func_regtest_pay(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID uint16_t uniffi_bitkitcore_checksum_func_remove_closed_channel_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_remove_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_TAGS uint16_t uniffi_bitkitcore_checksum_func_remove_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_reset_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESOLVE_PUBKY_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESOLVE_PUBKY_URL uint16_t uniffi_bitkitcore_checksum_func_resolve_pubky_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS uint16_t uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_START_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_START_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_start_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TEST_NOTIFICATION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TEST_NOTIFICATION uint16_t uniffi_bitkitcore_checksum_func_test_notification(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE uint16_t uniffi_bitkitcore_checksum_func_trezor_account_type_to_script_type(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CLEAR_CREDENTIALS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CLEAR_CREDENTIALS uint16_t uniffi_bitkitcore_checksum_func_trezor_clear_credentials(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CONNECT uint16_t uniffi_bitkitcore_checksum_func_trezor_connect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_DISCONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_DISCONNECT uint16_t uniffi_bitkitcore_checksum_func_trezor_disconnect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_trezor_get_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_CONNECTED_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_CONNECTED_DEVICE uint16_t uniffi_bitkitcore_checksum_func_trezor_get_connected_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_DEVICE_FINGERPRINT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_DEVICE_FINGERPRINT uint16_t uniffi_bitkitcore_checksum_func_trezor_get_device_fingerprint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_FEATURES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_FEATURES uint16_t uniffi_bitkitcore_checksum_func_trezor_get_features(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_PUBLIC_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_PUBLIC_KEY uint16_t uniffi_bitkitcore_checksum_func_trezor_get_public_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_INITIALIZE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_INITIALIZE uint16_t uniffi_bitkitcore_checksum_func_trezor_initialize(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_BLE_AVAILABLE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_BLE_AVAILABLE uint16_t uniffi_bitkitcore_checksum_func_trezor_is_ble_available(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_CONNECTED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_CONNECTED uint16_t uniffi_bitkitcore_checksum_func_trezor_is_connected(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_INITIALIZED uint16_t uniffi_bitkitcore_checksum_func_trezor_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_LIST_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_LIST_DEVICES uint16_t uniffi_bitkitcore_checksum_func_trezor_list_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SCAN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SCAN uint16_t uniffi_bitkitcore_checksum_func_trezor_scan(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_TRANSPORT_CALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_TRANSPORT_CALLBACK uint16_t uniffi_bitkitcore_checksum_func_trezor_set_transport_callback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_UI_CALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_UI_CALLBACK uint16_t uniffi_bitkitcore_checksum_func_trezor_set_ui_callback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_MESSAGE uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_tx(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX_FROM_PSBT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX_FROM_PSBT uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_tx_from_psbt(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_VERIFY_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_VERIFY_MESSAGE uint16_t uniffi_bitkitcore_checksum_func_trezor_verify_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_update_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_BLOCKTANK_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_BLOCKTANK_URL uint16_t uniffi_bitkitcore_checksum_func_update_blocktank_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_upsert_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_upsert_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_upsert_closed_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_upsert_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_INFO uint16_t uniffi_bitkitcore_checksum_func_upsert_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_LIGHTNING_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_LIGHTNING_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_lightning_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ONCHAIN_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ONCHAIN_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_onchain_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ORDERS uint16_t uniffi_bitkitcore_checksum_func_upsert_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_upsert_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TAGS uint16_t uniffi_bitkitcore_checksum_func_upsert_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_upsert_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_BITCOIN_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_BITCOIN_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_validate_bitcoin_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_validate_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_wipe_all_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_DATABASES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_DATABASES uint16_t uniffi_bitkitcore_checksum_func_wipe_all_databases(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_wipe_all_transaction_details(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_EVENTLISTENER_ON_EVENT +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_EVENTLISTENER_ON_EVENT +uint16_t uniffi_bitkitcore_checksum_method_eventlistener_on_event(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_open_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_close_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_read_chunk(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_write_chunk(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_get_chunk_size(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_call_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_get_pairing_code(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_save_thp_credential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_load_thp_credential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_log_debug(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST uint16_t uniffi_bitkitcore_checksum_method_trezoruicallback_on_pin_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST uint16_t uniffi_bitkitcore_checksum_method_trezoruicallback_on_passphrase_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_UNIFFI_CONTRACT_VERSION #define UNIFFI_FFIDEF_FFI_BITKITCORE_UNIFFI_CONTRACT_VERSION uint32_t ffi_bitkitcore_uniffi_contract_version(void - + ); #endif diff --git a/bindings/ios/BitkitCore.xcframework/ios-arm64/libbitkitcore.a b/bindings/ios/BitkitCore.xcframework/ios-arm64/libbitkitcore.a index 8c7d6de..c0284a1 100644 Binary files a/bindings/ios/BitkitCore.xcframework/ios-arm64/libbitkitcore.a and b/bindings/ios/BitkitCore.xcframework/ios-arm64/libbitkitcore.a differ diff --git a/bindings/ios/bitkitcore.swift b/bindings/ios/bitkitcore.swift index e536001..c3e006b 100644 --- a/bindings/ios/bitkitcore.swift +++ b/bindings/ios/bitkitcore.swift @@ -585,6 +585,206 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer { +/** + * Callback interface for receiving watcher events. + * + * Implement this trait in Swift/Kotlin/Python to receive typed notifications + * from xpub watchers. + */ +public protocol EventListener: AnyObject, Sendable { + + /** + * Called when a watcher event occurs. + * + * `watcher_id` identifies which watcher produced the event. + * `event` is a typed enum — no JSON parsing needed. + */ + func onEvent(watcherId: String, event: WatcherEvent) + +} +/** + * Callback interface for receiving watcher events. + * + * Implement this trait in Swift/Kotlin/Python to receive typed notifications + * from xpub watchers. + */ +open class EventListenerImpl: EventListener, @unchecked Sendable { + fileprivate let pointer: UnsafeMutableRawPointer! + + /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public struct NoPointer { + public init() {} + } + + // TODO: We'd like this to be `private` but for Swifty reasons, + // we can't implement `FfiConverter` without making this `required` and we can't + // make it `required` without making it `public`. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { + self.pointer = pointer + } + + // This constructor can be used to instantiate a fake object. + // - Parameter noPointer: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject]. + // + // - Warning: + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing [Pointer] the FFI lower functions will crash. +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public init(noPointer: NoPointer) { + self.pointer = nil + } + +#if swift(>=5.8) + @_documentation(visibility: private) +#endif + public func uniffiClonePointer() -> UnsafeMutableRawPointer { + return try! rustCall { uniffi_bitkitcore_fn_clone_eventlistener(self.pointer, $0) } + } + // No primary constructor declared for this class. + + deinit { + guard let pointer = pointer else { + return + } + + try! rustCall { uniffi_bitkitcore_fn_free_eventlistener(pointer, $0) } + } + + + + + /** + * Called when a watcher event occurs. + * + * `watcher_id` identifies which watcher produced the event. + * `event` is a typed enum — no JSON parsing needed. + */ +open func onEvent(watcherId: String, event: WatcherEvent) {try! rustCall() { + uniffi_bitkitcore_fn_method_eventlistener_on_event(self.uniffiClonePointer(), + FfiConverterString.lower(watcherId), + FfiConverterTypeWatcherEvent_lower(event),$0 + ) +} +} + + +} + + +// Put the implementation in a struct so we don't pollute the top-level namespace +fileprivate struct UniffiCallbackInterfaceEventListener { + + // Create the VTable using a series of closures. + // Swift automatically converts these into C callback functions. + // + // This creates 1-element array, since this seems to be the only way to construct a const + // pointer that we can pass to the Rust code. + static let vtable: [UniffiVTableCallbackInterfaceEventListener] = [UniffiVTableCallbackInterfaceEventListener( + onEvent: { ( + uniffiHandle: UInt64, + watcherId: RustBuffer, + event: RustBuffer, + uniffiOutReturn: UnsafeMutableRawPointer, + uniffiCallStatus: UnsafeMutablePointer + ) in + let makeCall = { + () throws -> () in + guard let uniffiObj = try? FfiConverterTypeEventListener.handleMap.get(handle: uniffiHandle) else { + throw UniffiInternalError.unexpectedStaleHandle + } + return uniffiObj.onEvent( + watcherId: try FfiConverterString.lift(watcherId), + event: try FfiConverterTypeWatcherEvent_lift(event) + ) + } + + + let writeReturn = { () } + uniffiTraitInterfaceCall( + callStatus: uniffiCallStatus, + makeCall: makeCall, + writeReturn: writeReturn + ) + }, + uniffiFree: { (uniffiHandle: UInt64) -> () in + let result = try? FfiConverterTypeEventListener.handleMap.remove(handle: uniffiHandle) + if result == nil { + print("Uniffi callback interface EventListener: handle missing in uniffiFree") + } + } + )] +} + +private func uniffiCallbackInitEventListener() { + uniffi_bitkitcore_fn_init_callback_vtable_eventlistener(UniffiCallbackInterfaceEventListener.vtable) +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeEventListener: FfiConverter { + fileprivate static let handleMap = UniffiHandleMap() + + typealias FfiType = UnsafeMutableRawPointer + typealias SwiftType = EventListener + + public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> EventListener { + return EventListenerImpl(unsafeFromRawPointer: pointer) + } + + public static func lower(_ value: EventListener) -> UnsafeMutableRawPointer { + guard let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: handleMap.insert(obj: value))) else { + fatalError("Cast to UnsafeMutableRawPointer failed") + } + return ptr + } + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> EventListener { + let v: UInt64 = try readInt(&buf) + // The Rust code won't compile if a pointer won't fit in a UInt64. + // We have to go via `UInt` because that's the thing that's the size of a pointer. + let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: v)) + if (ptr == nil) { + throw UniffiInternalError.unexpectedNullPointer + } + return try lift(ptr!) + } + + public static func write(_ value: EventListener, into buf: inout [UInt8]) { + // This fiddling is because `Int` is the thing that's the same size as a pointer. + // The Rust code won't compile if a pointer won't fit in a `UInt64`. + writeInt(&buf, UInt64(bitPattern: Int64(Int(bitPattern: lower(value))))) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeEventListener_lift(_ pointer: UnsafeMutableRawPointer) throws -> EventListener { + return try FfiConverterTypeEventListener.lift(pointer) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeEventListener_lower(_ value: EventListener) -> UnsafeMutableRawPointer { + return FfiConverterTypeEventListener.lower(value) +} + + + + + + /** * Callback interface for native Trezor transport operations * @@ -608,37 +808,37 @@ fileprivate struct FfiConverterData: FfiConverterRustBuffer { * Use IOKit/CoreBluetooth with same service/characteristic UUIDs. */ public protocol TrezorTransportCallback: AnyObject, Sendable { - + /** * Enumerate all connected Trezor devices */ func enumerateDevices() -> [NativeDeviceInfo] - + /** * Open a connection to a device */ func openDevice(path: String) -> TrezorTransportWriteResult - + /** * Close the connection to a device */ func closeDevice(path: String) -> TrezorTransportWriteResult - + /** * Read a chunk of data from the device */ func readChunk(path: String) -> TrezorTransportReadResult - + /** * Write a chunk of data to the device */ func writeChunk(path: String, data: Data) -> TrezorTransportWriteResult - + /** * Get the chunk size for a device (64 for USB, 244 for Bluetooth) */ func getChunkSize(path: String) -> UInt32 - + /** * High-level message call for BLE/THP devices. * @@ -655,7 +855,7 @@ public protocol TrezorTransportCallback: AnyObject, Sendable { * * `data` - Serialized protobuf message data */ func callMessage(path: String, messageType: UInt16, data: Data) -> TrezorCallMessageResult? - + /** * Get pairing code from user during BLE THP pairing. * @@ -668,7 +868,7 @@ public protocol TrezorTransportCallback: AnyObject, Sendable { * Returns the 6-digit code as a string, or empty string to cancel. */ func getPairingCode() -> String - + /** * Save THP pairing credentials for a device. * @@ -682,7 +882,7 @@ public protocol TrezorTransportCallback: AnyObject, Sendable { * Returns true if credentials were saved successfully. */ func saveThpCredential(deviceId: String, credentialJson: String) -> Bool - + /** * Load THP pairing credentials for a device. * @@ -695,7 +895,7 @@ public protocol TrezorTransportCallback: AnyObject, Sendable { * Returns the JSON string containing ThpCredentials, or None if not found. */ func loadThpCredential(deviceId: String) -> String? - + /** * Log a debug message from the Rust THP handshake layer. * @@ -707,8 +907,8 @@ public protocol TrezorTransportCallback: AnyObject, Sendable { * * `tag` - Short tag identifying the subsystem (e.g., "HANDSHAKE", "THP") * * `message` - Human-readable debug message */ - func logDebug(tag: String, message: String) - + func logDebug(tag: String, message: String) + } /** * Callback interface for native Trezor transport operations @@ -781,9 +981,9 @@ open class TrezorTransportCallbackImpl: TrezorTransportCallback, @unchecked Send try! rustCall { uniffi_bitkitcore_fn_free_trezortransportcallback(pointer, $0) } } + - - + /** * Enumerate all connected Trezor devices */ @@ -793,7 +993,7 @@ open func enumerateDevices() -> [NativeDeviceInfo] { ) }) } - + /** * Open a connection to a device */ @@ -804,7 +1004,7 @@ open func openDevice(path: String) -> TrezorTransportWriteResult { ) }) } - + /** * Close the connection to a device */ @@ -815,7 +1015,7 @@ open func closeDevice(path: String) -> TrezorTransportWriteResult { ) }) } - + /** * Read a chunk of data from the device */ @@ -826,7 +1026,7 @@ open func readChunk(path: String) -> TrezorTransportReadResult { ) }) } - + /** * Write a chunk of data to the device */ @@ -838,7 +1038,7 @@ open func writeChunk(path: String, data: Data) -> TrezorTransportWriteResult { ) }) } - + /** * Get the chunk size for a device (64 for USB, 244 for Bluetooth) */ @@ -849,7 +1049,7 @@ open func getChunkSize(path: String) -> UInt32 { ) }) } - + /** * High-level message call for BLE/THP devices. * @@ -874,7 +1074,7 @@ open func callMessage(path: String, messageType: UInt16, data: Data) -> TrezorCa ) }) } - + /** * Get pairing code from user during BLE THP pairing. * @@ -892,7 +1092,7 @@ open func getPairingCode() -> String { ) }) } - + /** * Save THP pairing credentials for a device. * @@ -913,7 +1113,7 @@ open func saveThpCredential(deviceId: String, credentialJson: String) -> Bool { ) }) } - + /** * Load THP pairing credentials for a device. * @@ -932,7 +1132,7 @@ open func loadThpCredential(deviceId: String) -> String? { ) }) } - + /** * Log a debug message from the Rust THP handshake layer. * @@ -951,7 +1151,7 @@ open func logDebug(tag: String, message: String) {try! rustCall() { ) } } - + } @@ -979,7 +1179,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterSequenceTypeNativeDeviceInfo.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1003,7 +1203,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeTrezorTransportWriteResult_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1027,7 +1227,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeTrezorTransportWriteResult_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1051,7 +1251,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeTrezorTransportReadResult_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1077,7 +1277,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypeTrezorTransportWriteResult_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1101,7 +1301,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterUInt32.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1129,7 +1329,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterOptionTypeTrezorCallMessageResult.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1151,7 +1351,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterString.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1177,7 +1377,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterBool.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1201,7 +1401,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterOptionString.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1227,7 +1427,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorTransportCallback { ) } - + let writeReturn = { () } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1314,7 +1514,7 @@ public func FfiConverterTypeTrezorTransportCallback_lower(_ value: TrezorTranspo * input UI when the device requests it during operations like signing. */ public protocol TrezorUiCallback: AnyObject, Sendable { - + /** * Called when the device requests a PIN. * @@ -1322,7 +1522,7 @@ public protocol TrezorUiCallback: AnyObject, Sendable { * Return empty string to cancel. */ func onPinRequest() -> String - + /** * Called when the device requests a passphrase. * @@ -1334,7 +1534,7 @@ public protocol TrezorUiCallback: AnyObject, Sendable { * `OnDevice` (defer entry to the Trezor), or `Cancel`. */ func onPassphraseRequest(onDevice: Bool) -> PassphraseResponse - + } /** * Callback interface for handling PIN and passphrase requests from the Trezor device. @@ -1391,9 +1591,9 @@ open class TrezorUiCallbackImpl: TrezorUiCallback, @unchecked Sendable { try! rustCall { uniffi_bitkitcore_fn_free_trezoruicallback(pointer, $0) } } + - - + /** * Called when the device requests a PIN. * @@ -1406,7 +1606,7 @@ open func onPinRequest() -> String { ) }) } - + /** * Called when the device requests a passphrase. * @@ -1424,7 +1624,7 @@ open func onPassphraseRequest(onDevice: Bool) -> PassphraseResponse { ) }) } - + } @@ -1452,7 +1652,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorUiCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterString.lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1476,7 +1676,7 @@ fileprivate struct UniffiCallbackInterfaceTrezorUiCallback { ) } - + let writeReturn = { uniffiOutReturn.pointee = FfiConverterTypePassphraseResponse_lower($0) } uniffiTraitInterfaceCall( callStatus: uniffiCallStatus, @@ -1576,10 +1776,10 @@ public struct AccountAddresses { public init( /** * Used receive addresses (have at least one transaction) - */used: [AddressInfo], + */used: [AddressInfo], /** * Unused receive addresses (no transactions yet) - */unused: [AddressInfo], + */unused: [AddressInfo], /** * Change addresses */change: [AddressInfo]) { @@ -1626,8 +1826,8 @@ public struct FfiConverterTypeAccountAddresses: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AccountAddresses { return try AccountAddresses( - used: FfiConverterSequenceTypeAddressInfo.read(from: &buf), - unused: FfiConverterSequenceTypeAddressInfo.read(from: &buf), + used: FfiConverterSequenceTypeAddressInfo.read(from: &buf), + unused: FfiConverterSequenceTypeAddressInfo.read(from: &buf), change: FfiConverterSequenceTypeAddressInfo.read(from: &buf) ) } @@ -1685,16 +1885,16 @@ public struct AccountInfoResult { public init( /** * The account structure with addresses and UTXOs - */account: ComposeAccount, + */account: ComposeAccount, /** * Total confirmed balance in satoshis - */balance: UInt64, + */balance: UInt64, /** * Number of UTXOs - */utxoCount: UInt32, + */utxoCount: UInt32, /** * The detected or specified account type - */accountType: AccountType, + */accountType: AccountType, /** * The current blockchain tip height */blockHeight: UInt32) { @@ -1751,10 +1951,10 @@ public struct FfiConverterTypeAccountInfoResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AccountInfoResult { return try AccountInfoResult( - account: FfiConverterTypeComposeAccount.read(from: &buf), - balance: FfiConverterUInt64.read(from: &buf), - utxoCount: FfiConverterUInt32.read(from: &buf), - accountType: FfiConverterTypeAccountType.read(from: &buf), + account: FfiConverterTypeComposeAccount.read(from: &buf), + balance: FfiConverterUInt64.read(from: &buf), + utxoCount: FfiConverterUInt32.read(from: &buf), + accountType: FfiConverterTypeAccountType.read(from: &buf), blockHeight: FfiConverterUInt32.read(from: &buf) ) } @@ -1834,31 +2034,31 @@ public struct AccountUtxo { public init( /** * Transaction ID (hex) - */txid: String, + */txid: String, /** * Output index - */vout: UInt32, + */vout: UInt32, /** * Amount in satoshis - */amount: UInt64, + */amount: UInt64, /** * Block height where the UTXO was confirmed (0 if unconfirmed) - */blockHeight: UInt32, + */blockHeight: UInt32, /** * Address holding this UTXO - */address: String, + */address: String, /** * BIP32 derivation path (e.g., "m/84'/0'/0'/0/0") - */path: String, + */path: String, /** * Number of confirmations (0 if unconfirmed) - */confirmations: UInt32, + */confirmations: UInt32, /** * Whether this is a coinbase output - */coinbase: Bool, + */coinbase: Bool, /** * Whether this UTXO is owned by the account - */own: Bool, + */own: Bool, /** * Whether this UTXO must be included in the transaction */required: Bool?) { @@ -1940,15 +2140,15 @@ public struct FfiConverterTypeAccountUtxo: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AccountUtxo { return try AccountUtxo( - txid: FfiConverterString.read(from: &buf), - vout: FfiConverterUInt32.read(from: &buf), - amount: FfiConverterUInt64.read(from: &buf), - blockHeight: FfiConverterUInt32.read(from: &buf), - address: FfiConverterString.read(from: &buf), - path: FfiConverterString.read(from: &buf), - confirmations: FfiConverterUInt32.read(from: &buf), - coinbase: FfiConverterBool.read(from: &buf), - own: FfiConverterBool.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + vout: FfiConverterUInt32.read(from: &buf), + amount: FfiConverterUInt64.read(from: &buf), + blockHeight: FfiConverterUInt32.read(from: &buf), + address: FfiConverterString.read(from: &buf), + path: FfiConverterString.read(from: &buf), + confirmations: FfiConverterUInt32.read(from: &buf), + coinbase: FfiConverterBool.read(from: &buf), + own: FfiConverterBool.read(from: &buf), required: FfiConverterOptionBool.read(from: &buf) ) } @@ -2028,7 +2228,7 @@ public struct FfiConverterTypeActivityTags: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ActivityTags { return try ActivityTags( - activityId: FfiConverterString.read(from: &buf), + activityId: FfiConverterString.read(from: &buf), tags: FfiConverterSequenceString.read(from: &buf) ) } @@ -2077,10 +2277,10 @@ public struct AddressInfo { public init( /** * The Bitcoin address - */address: String, + */address: String, /** * BIP32 derivation path - */path: String, + */path: String, /** * Number of transfers (real count in `get_address_info`, 1/0 presence flag in `get_account_info`) */transfers: UInt32) { @@ -2127,8 +2327,8 @@ public struct FfiConverterTypeAddressInfo: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AddressInfo { return try AddressInfo( - address: FfiConverterString.read(from: &buf), - path: FfiConverterString.read(from: &buf), + address: FfiConverterString.read(from: &buf), + path: FfiConverterString.read(from: &buf), transfers: FfiConverterUInt32.read(from: &buf) ) } @@ -2213,9 +2413,9 @@ public struct FfiConverterTypeChannelLiquidityOptions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ChannelLiquidityOptions { return try ChannelLiquidityOptions( - defaultLspBalanceSat: FfiConverterUInt64.read(from: &buf), - minLspBalanceSat: FfiConverterUInt64.read(from: &buf), - maxLspBalanceSat: FfiConverterUInt64.read(from: &buf), + defaultLspBalanceSat: FfiConverterUInt64.read(from: &buf), + minLspBalanceSat: FfiConverterUInt64.read(from: &buf), + maxLspBalanceSat: FfiConverterUInt64.read(from: &buf), maxClientBalanceSat: FfiConverterUInt64.read(from: &buf) ) } @@ -2307,10 +2507,10 @@ public struct FfiConverterTypeChannelLiquidityParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ChannelLiquidityParams { return try ChannelLiquidityParams( - clientBalanceSat: FfiConverterUInt64.read(from: &buf), - existingChannelsTotalSat: FfiConverterUInt64.read(from: &buf), - minChannelSizeSat: FfiConverterUInt64.read(from: &buf), - maxChannelSizeSat: FfiConverterUInt64.read(from: &buf), + clientBalanceSat: FfiConverterUInt64.read(from: &buf), + existingChannelsTotalSat: FfiConverterUInt64.read(from: &buf), + minChannelSizeSat: FfiConverterUInt64.read(from: &buf), + maxChannelSizeSat: FfiConverterUInt64.read(from: &buf), satsPerEur: FfiConverterUInt64.read(from: &buf) ) } @@ -2457,19 +2657,19 @@ public struct FfiConverterTypeClosedChannelDetails: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ClosedChannelDetails { return try ClosedChannelDetails( - channelId: FfiConverterString.read(from: &buf), - counterpartyNodeId: FfiConverterString.read(from: &buf), - fundingTxoTxid: FfiConverterString.read(from: &buf), - fundingTxoIndex: FfiConverterUInt32.read(from: &buf), - channelValueSats: FfiConverterUInt64.read(from: &buf), - closedAt: FfiConverterUInt64.read(from: &buf), - outboundCapacityMsat: FfiConverterUInt64.read(from: &buf), - inboundCapacityMsat: FfiConverterUInt64.read(from: &buf), - counterpartyUnspendablePunishmentReserve: FfiConverterUInt64.read(from: &buf), - unspendablePunishmentReserve: FfiConverterUInt64.read(from: &buf), - forwardingFeeProportionalMillionths: FfiConverterUInt32.read(from: &buf), - forwardingFeeBaseMsat: FfiConverterUInt32.read(from: &buf), - channelName: FfiConverterString.read(from: &buf), + channelId: FfiConverterString.read(from: &buf), + counterpartyNodeId: FfiConverterString.read(from: &buf), + fundingTxoTxid: FfiConverterString.read(from: &buf), + fundingTxoIndex: FfiConverterUInt32.read(from: &buf), + channelValueSats: FfiConverterUInt64.read(from: &buf), + closedAt: FfiConverterUInt64.read(from: &buf), + outboundCapacityMsat: FfiConverterUInt64.read(from: &buf), + inboundCapacityMsat: FfiConverterUInt64.read(from: &buf), + counterpartyUnspendablePunishmentReserve: FfiConverterUInt64.read(from: &buf), + unspendablePunishmentReserve: FfiConverterUInt64.read(from: &buf), + forwardingFeeProportionalMillionths: FfiConverterUInt32.read(from: &buf), + forwardingFeeBaseMsat: FfiConverterUInt32.read(from: &buf), + channelName: FfiConverterString.read(from: &buf), channelClosureReason: FfiConverterString.read(from: &buf) ) } @@ -2530,10 +2730,10 @@ public struct ComposeAccount { public init( /** * Account derivation path (e.g., "m/84'/0'/0'") - */path: String, + */path: String, /** * Categorized addresses - */addresses: AccountAddresses, + */addresses: AccountAddresses, /** * Unspent transaction outputs */utxo: [AccountUtxo]) { @@ -2580,8 +2780,8 @@ public struct FfiConverterTypeComposeAccount: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ComposeAccount { return try ComposeAccount( - path: FfiConverterString.read(from: &buf), - addresses: FfiConverterTypeAccountAddresses.read(from: &buf), + path: FfiConverterString.read(from: &buf), + addresses: FfiConverterTypeAccountAddresses.read(from: &buf), utxo: FfiConverterSequenceTypeAccountUtxo.read(from: &buf) ) } @@ -2635,13 +2835,13 @@ public struct ComposeParams { public init( /** * Wallet configuration (key, server, network) - */wallet: WalletParams, + */wallet: WalletParams, /** * Desired transaction outputs - */outputs: [ComposeOutput], + */outputs: [ComposeOutput], /** * Fee rates to evaluate (sat/vB), one PSBT per rate - */feeRates: [Float], + */feeRates: [Float], /** * UTXO selection strategy (defaults to BranchAndBound) */coinSelection: CoinSelection?) { @@ -2693,9 +2893,9 @@ public struct FfiConverterTypeComposeParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ComposeParams { return try ComposeParams( - wallet: FfiConverterTypeWalletParams.read(from: &buf), - outputs: FfiConverterSequenceTypeComposeOutput.read(from: &buf), - feeRates: FfiConverterSequenceFloat.read(from: &buf), + wallet: FfiConverterTypeWalletParams.read(from: &buf), + outputs: FfiConverterSequenceTypeComposeOutput.read(from: &buf), + feeRates: FfiConverterSequenceFloat.read(from: &buf), coinSelection: FfiConverterOptionTypeCoinSelection.read(from: &buf) ) } @@ -2769,7 +2969,7 @@ public struct FfiConverterTypeCreateCjitOptions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CreateCjitOptions { return try CreateCjitOptions( - source: FfiConverterOptionString.read(from: &buf), + source: FfiConverterOptionString.read(from: &buf), discountCode: FfiConverterOptionString.read(from: &buf) ) } @@ -2907,18 +3107,18 @@ public struct FfiConverterTypeCreateOrderOptions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CreateOrderOptions { return try CreateOrderOptions( - clientBalanceSat: FfiConverterUInt64.read(from: &buf), - lspNodeId: FfiConverterOptionString.read(from: &buf), - couponCode: FfiConverterString.read(from: &buf), - source: FfiConverterOptionString.read(from: &buf), - discountCode: FfiConverterOptionString.read(from: &buf), - zeroConf: FfiConverterBool.read(from: &buf), - zeroConfPayment: FfiConverterOptionBool.read(from: &buf), - zeroReserve: FfiConverterBool.read(from: &buf), - clientNodeId: FfiConverterOptionString.read(from: &buf), - signature: FfiConverterOptionString.read(from: &buf), - timestamp: FfiConverterOptionString.read(from: &buf), - refundOnchainAddress: FfiConverterOptionString.read(from: &buf), + clientBalanceSat: FfiConverterUInt64.read(from: &buf), + lspNodeId: FfiConverterOptionString.read(from: &buf), + couponCode: FfiConverterString.read(from: &buf), + source: FfiConverterOptionString.read(from: &buf), + discountCode: FfiConverterOptionString.read(from: &buf), + zeroConf: FfiConverterBool.read(from: &buf), + zeroConfPayment: FfiConverterOptionBool.read(from: &buf), + zeroReserve: FfiConverterBool.read(from: &buf), + clientNodeId: FfiConverterOptionString.read(from: &buf), + signature: FfiConverterOptionString.read(from: &buf), + timestamp: FfiConverterOptionString.read(from: &buf), + refundOnchainAddress: FfiConverterOptionString.read(from: &buf), announceChannel: FfiConverterBool.read(from: &buf) ) } @@ -3007,8 +3207,8 @@ public struct FfiConverterTypeDefaultLspBalanceParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> DefaultLspBalanceParams { return try DefaultLspBalanceParams( - clientBalanceSat: FfiConverterUInt64.read(from: &buf), - maxChannelSizeSat: FfiConverterUInt64.read(from: &buf), + clientBalanceSat: FfiConverterUInt64.read(from: &buf), + maxChannelSizeSat: FfiConverterUInt64.read(from: &buf), satsPerEur: FfiConverterUInt64.read(from: &buf) ) } @@ -3151,8 +3351,8 @@ public struct FfiConverterTypeFeeRates: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> FeeRates { return try FeeRates( - fast: FfiConverterUInt32.read(from: &buf), - mid: FfiConverterUInt32.read(from: &buf), + fast: FfiConverterUInt32.read(from: &buf), + mid: FfiConverterUInt32.read(from: &buf), slow: FfiConverterUInt32.read(from: &buf) ) } @@ -3225,7 +3425,7 @@ public struct FfiConverterTypeFundingTx: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> FundingTx { return try FundingTx( - id: FfiConverterString.read(from: &buf), + id: FfiConverterString.read(from: &buf), vout: FfiConverterUInt64.read(from: &buf) ) } @@ -3271,10 +3471,10 @@ public struct GetAddressResponse { public init( /** * The generated Bitcoin address as a string - */address: String, + */address: String, /** * The derivation path used to generate the address - */path: String, + */path: String, /** * The hexadecimal representation of the public key */publicKey: String) { @@ -3321,8 +3521,8 @@ public struct FfiConverterTypeGetAddressResponse: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GetAddressResponse { return try GetAddressResponse( - address: FfiConverterString.read(from: &buf), - path: FfiConverterString.read(from: &buf), + address: FfiConverterString.read(from: &buf), + path: FfiConverterString.read(from: &buf), publicKey: FfiConverterString.read(from: &buf) ) } @@ -3473,34 +3673,34 @@ public struct HistoryTransaction { public init( /** * Transaction ID (hex) - */txid: String, + */txid: String, /** * Amount received by the wallet (sats) - */received: UInt64, + */received: UInt64, /** * Amount sent by the wallet (sats) — includes change sent back to self - */sent: UInt64, + */sent: UInt64, /** * Net value from wallet's perspective: received - sent (positive = inflow, negative = outflow) - */net: Int64, + */net: Int64, /** * Transaction fee in sats (None if not available, e.g. for received-only txs) - */fee: UInt64?, + */fee: UInt64?, /** * Display amount in sats: * - Received: the received value * - Sent: amount that left the wallet (sent - received - fee) * - SelfTransfer: the fee paid - */amount: UInt64, + */amount: UInt64, /** * Transaction direction - */direction: TxDirection, + */direction: TxDirection, /** * Block height (None if unconfirmed/mempool) - */blockHeight: UInt32?, + */blockHeight: UInt32?, /** * Block timestamp as unix epoch seconds (None if unconfirmed) - */timestamp: UInt64?, + */timestamp: UInt64?, /** * Number of confirmations (0 if unconfirmed) */confirmations: UInt32) { @@ -3582,15 +3782,15 @@ public struct FfiConverterTypeHistoryTransaction: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HistoryTransaction { return try HistoryTransaction( - txid: FfiConverterString.read(from: &buf), - received: FfiConverterUInt64.read(from: &buf), - sent: FfiConverterUInt64.read(from: &buf), - net: FfiConverterInt64.read(from: &buf), - fee: FfiConverterOptionUInt64.read(from: &buf), - amount: FfiConverterUInt64.read(from: &buf), - direction: FfiConverterTypeTxDirection.read(from: &buf), - blockHeight: FfiConverterOptionUInt32.read(from: &buf), - timestamp: FfiConverterOptionUInt64.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + received: FfiConverterUInt64.read(from: &buf), + sent: FfiConverterUInt64.read(from: &buf), + net: FfiConverterInt64.read(from: &buf), + fee: FfiConverterOptionUInt64.read(from: &buf), + amount: FfiConverterUInt64.read(from: &buf), + direction: FfiConverterTypeTxDirection.read(from: &buf), + blockHeight: FfiConverterOptionUInt32.read(from: &buf), + timestamp: FfiConverterOptionUInt64.read(from: &buf), confirmations: FfiConverterUInt32.read(from: &buf) ) } @@ -3670,7 +3870,7 @@ public struct FfiConverterTypeIBt0ConfMinTxFeeWindow: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBt0ConfMinTxFeeWindow { return try IBt0ConfMinTxFeeWindow( - satPerVbyte: FfiConverterDouble.read(from: &buf), + satPerVbyte: FfiConverterDouble.read(from: &buf), validityEndsAt: FfiConverterString.read(from: &buf) ) } @@ -3754,9 +3954,9 @@ public struct FfiConverterTypeIBtBolt11Invoice: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtBolt11Invoice { return try IBtBolt11Invoice( - request: FfiConverterString.read(from: &buf), - state: FfiConverterTypeBtBolt11InvoiceState.read(from: &buf), - expiresAt: FfiConverterString.read(from: &buf), + request: FfiConverterString.read(from: &buf), + state: FfiConverterTypeBtBolt11InvoiceState.read(from: &buf), + expiresAt: FfiConverterString.read(from: &buf), updatedAt: FfiConverterString.read(from: &buf) ) } @@ -3866,13 +4066,13 @@ public struct FfiConverterTypeIBtChannel: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtChannel { return try IBtChannel( - state: FfiConverterTypeBtOpenChannelState.read(from: &buf), - lspNodePubkey: FfiConverterString.read(from: &buf), - clientNodePubkey: FfiConverterString.read(from: &buf), - announceChannel: FfiConverterBool.read(from: &buf), - fundingTx: FfiConverterTypeFundingTx.read(from: &buf), - closingTxId: FfiConverterOptionString.read(from: &buf), - close: FfiConverterOptionTypeIBtChannelClose.read(from: &buf), + state: FfiConverterTypeBtOpenChannelState.read(from: &buf), + lspNodePubkey: FfiConverterString.read(from: &buf), + clientNodePubkey: FfiConverterString.read(from: &buf), + announceChannel: FfiConverterBool.read(from: &buf), + fundingTx: FfiConverterTypeFundingTx.read(from: &buf), + closingTxId: FfiConverterOptionString.read(from: &buf), + close: FfiConverterOptionTypeIBtChannelClose.read(from: &buf), shortChannelId: FfiConverterOptionString.read(from: &buf) ) } @@ -3962,9 +4162,9 @@ public struct FfiConverterTypeIBtChannelClose: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtChannelClose { return try IBtChannelClose( - txId: FfiConverterString.read(from: &buf), - closeType: FfiConverterString.read(from: &buf), - initiator: FfiConverterString.read(from: &buf), + txId: FfiConverterString.read(from: &buf), + closeType: FfiConverterString.read(from: &buf), + initiator: FfiConverterString.read(from: &buf), registeredAt: FfiConverterString.read(from: &buf) ) } @@ -4038,7 +4238,7 @@ public struct FfiConverterTypeIBtEstimateFeeResponse: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtEstimateFeeResponse { return try IBtEstimateFeeResponse( - feeSat: FfiConverterUInt64.read(from: &buf), + feeSat: FfiConverterUInt64.read(from: &buf), min0ConfTxFee: FfiConverterTypeIBt0ConfMinTxFeeWindow.read(from: &buf) ) } @@ -4122,9 +4322,9 @@ public struct FfiConverterTypeIBtEstimateFeeResponse2: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtEstimateFeeResponse2 { return try IBtEstimateFeeResponse2( - feeSat: FfiConverterUInt64.read(from: &buf), - networkFeeSat: FfiConverterUInt64.read(from: &buf), - serviceFeeSat: FfiConverterUInt64.read(from: &buf), + feeSat: FfiConverterUInt64.read(from: &buf), + networkFeeSat: FfiConverterUInt64.read(from: &buf), + serviceFeeSat: FfiConverterUInt64.read(from: &buf), min0ConfTxFee: FfiConverterTypeIBt0ConfMinTxFeeWindow.read(from: &buf) ) } @@ -4216,10 +4416,10 @@ public struct FfiConverterTypeIBtInfo: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtInfo { return try IBtInfo( - version: FfiConverterUInt32.read(from: &buf), - nodes: FfiConverterSequenceTypeILspNode.read(from: &buf), - options: FfiConverterTypeIBtInfoOptions.read(from: &buf), - versions: FfiConverterTypeIBtInfoVersions.read(from: &buf), + version: FfiConverterUInt32.read(from: &buf), + nodes: FfiConverterSequenceTypeILspNode.read(from: &buf), + options: FfiConverterTypeIBtInfoOptions.read(from: &buf), + versions: FfiConverterTypeIBtInfoVersions.read(from: &buf), onchain: FfiConverterTypeIBtInfoOnchain.read(from: &buf) ) } @@ -4294,7 +4494,7 @@ public struct FfiConverterTypeIBtInfoOnchain: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtInfoOnchain { return try IBtInfoOnchain( - network: FfiConverterTypeBitcoinNetworkEnum.read(from: &buf), + network: FfiConverterTypeBitcoinNetworkEnum.read(from: &buf), feeRates: FfiConverterTypeFeeRates.read(from: &buf) ) } @@ -4402,13 +4602,13 @@ public struct FfiConverterTypeIBtInfoOptions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtInfoOptions { return try IBtInfoOptions( - minChannelSizeSat: FfiConverterUInt64.read(from: &buf), - maxChannelSizeSat: FfiConverterUInt64.read(from: &buf), - minExpiryWeeks: FfiConverterUInt32.read(from: &buf), - maxExpiryWeeks: FfiConverterUInt32.read(from: &buf), - minPaymentConfirmations: FfiConverterUInt32.read(from: &buf), - minHighRiskPaymentConfirmations: FfiConverterUInt32.read(from: &buf), - max0ConfClientBalanceSat: FfiConverterUInt64.read(from: &buf), + minChannelSizeSat: FfiConverterUInt64.read(from: &buf), + maxChannelSizeSat: FfiConverterUInt64.read(from: &buf), + minExpiryWeeks: FfiConverterUInt32.read(from: &buf), + maxExpiryWeeks: FfiConverterUInt32.read(from: &buf), + minPaymentConfirmations: FfiConverterUInt32.read(from: &buf), + minHighRiskPaymentConfirmations: FfiConverterUInt32.read(from: &buf), + max0ConfClientBalanceSat: FfiConverterUInt64.read(from: &buf), maxClientBalanceSat: FfiConverterUInt64.read(from: &buf) ) } @@ -4492,8 +4692,8 @@ public struct FfiConverterTypeIBtInfoVersions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtInfoVersions { return try IBtInfoVersions( - http: FfiConverterString.read(from: &buf), - btc: FfiConverterString.read(from: &buf), + http: FfiConverterString.read(from: &buf), + btc: FfiConverterString.read(from: &buf), ln2: FfiConverterString.read(from: &buf) ) } @@ -4602,13 +4802,13 @@ public struct FfiConverterTypeIBtOnchainTransaction: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtOnchainTransaction { return try IBtOnchainTransaction( - amountSat: FfiConverterUInt64.read(from: &buf), - txId: FfiConverterString.read(from: &buf), - vout: FfiConverterUInt32.read(from: &buf), - blockHeight: FfiConverterOptionUInt32.read(from: &buf), - blockConfirmationCount: FfiConverterUInt32.read(from: &buf), - feeRateSatPerVbyte: FfiConverterDouble.read(from: &buf), - confirmed: FfiConverterBool.read(from: &buf), + amountSat: FfiConverterUInt64.read(from: &buf), + txId: FfiConverterString.read(from: &buf), + vout: FfiConverterUInt32.read(from: &buf), + blockHeight: FfiConverterOptionUInt32.read(from: &buf), + blockConfirmationCount: FfiConverterUInt32.read(from: &buf), + feeRateSatPerVbyte: FfiConverterDouble.read(from: &buf), + confirmed: FfiConverterBool.read(from: &buf), suspicious0ConfReason: FfiConverterString.read(from: &buf) ) } @@ -4698,9 +4898,9 @@ public struct FfiConverterTypeIBtOnchainTransactions: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtOnchainTransactions { return try IBtOnchainTransactions( - address: FfiConverterString.read(from: &buf), - confirmedSat: FfiConverterUInt64.read(from: &buf), - requiredConfirmations: FfiConverterUInt32.read(from: &buf), + address: FfiConverterString.read(from: &buf), + confirmedSat: FfiConverterUInt64.read(from: &buf), + requiredConfirmations: FfiConverterUInt32.read(from: &buf), transactions: FfiConverterSequenceTypeIBtOnchainTransaction.read(from: &buf) ) } @@ -4900,28 +5100,28 @@ public struct FfiConverterTypeIBtOrder: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtOrder { return try IBtOrder( - id: FfiConverterString.read(from: &buf), - state: FfiConverterTypeBtOrderState.read(from: &buf), - state2: FfiConverterOptionTypeBtOrderState2.read(from: &buf), - feeSat: FfiConverterUInt64.read(from: &buf), - networkFeeSat: FfiConverterUInt64.read(from: &buf), - serviceFeeSat: FfiConverterUInt64.read(from: &buf), - lspBalanceSat: FfiConverterUInt64.read(from: &buf), - clientBalanceSat: FfiConverterUInt64.read(from: &buf), - zeroConf: FfiConverterBool.read(from: &buf), - zeroReserve: FfiConverterBool.read(from: &buf), - clientNodeId: FfiConverterOptionString.read(from: &buf), - channelExpiryWeeks: FfiConverterUInt32.read(from: &buf), - channelExpiresAt: FfiConverterString.read(from: &buf), - orderExpiresAt: FfiConverterString.read(from: &buf), - channel: FfiConverterOptionTypeIBtChannel.read(from: &buf), - lspNode: FfiConverterOptionTypeILspNode.read(from: &buf), - lnurl: FfiConverterOptionString.read(from: &buf), - payment: FfiConverterOptionTypeIBtPayment.read(from: &buf), - couponCode: FfiConverterOptionString.read(from: &buf), - source: FfiConverterOptionString.read(from: &buf), - discount: FfiConverterOptionTypeIDiscount.read(from: &buf), - updatedAt: FfiConverterString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + state: FfiConverterTypeBtOrderState.read(from: &buf), + state2: FfiConverterOptionTypeBtOrderState2.read(from: &buf), + feeSat: FfiConverterUInt64.read(from: &buf), + networkFeeSat: FfiConverterUInt64.read(from: &buf), + serviceFeeSat: FfiConverterUInt64.read(from: &buf), + lspBalanceSat: FfiConverterUInt64.read(from: &buf), + clientBalanceSat: FfiConverterUInt64.read(from: &buf), + zeroConf: FfiConverterBool.read(from: &buf), + zeroReserve: FfiConverterBool.read(from: &buf), + clientNodeId: FfiConverterOptionString.read(from: &buf), + channelExpiryWeeks: FfiConverterUInt32.read(from: &buf), + channelExpiresAt: FfiConverterString.read(from: &buf), + orderExpiresAt: FfiConverterString.read(from: &buf), + channel: FfiConverterOptionTypeIBtChannel.read(from: &buf), + lspNode: FfiConverterOptionTypeILspNode.read(from: &buf), + lnurl: FfiConverterOptionString.read(from: &buf), + payment: FfiConverterOptionTypeIBtPayment.read(from: &buf), + couponCode: FfiConverterOptionString.read(from: &buf), + source: FfiConverterOptionString.read(from: &buf), + discount: FfiConverterOptionTypeIDiscount.read(from: &buf), + updatedAt: FfiConverterString.read(from: &buf), createdAt: FfiConverterString.read(from: &buf) ) } @@ -5044,12 +5244,12 @@ public struct FfiConverterTypeIBtPayment: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IBtPayment { return try IBtPayment( - state: FfiConverterTypeBtPaymentState.read(from: &buf), - state2: FfiConverterOptionTypeBtPaymentState2.read(from: &buf), - paidSat: FfiConverterUInt64.read(from: &buf), - bolt11Invoice: FfiConverterOptionTypeIBtBolt11Invoice.read(from: &buf), - onchain: FfiConverterOptionTypeIBtOnchainTransactions.read(from: &buf), - isManuallyPaid: FfiConverterOptionBool.read(from: &buf), + state: FfiConverterTypeBtPaymentState.read(from: &buf), + state2: FfiConverterOptionTypeBtPaymentState2.read(from: &buf), + paidSat: FfiConverterUInt64.read(from: &buf), + bolt11Invoice: FfiConverterOptionTypeIBtBolt11Invoice.read(from: &buf), + onchain: FfiConverterOptionTypeIBtOnchainTransactions.read(from: &buf), + isManuallyPaid: FfiConverterOptionBool.read(from: &buf), manualRefunds: FfiConverterOptionSequenceTypeIManualRefund.read(from: &buf) ) } @@ -5222,23 +5422,23 @@ public struct FfiConverterTypeICJitEntry: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IcJitEntry { return try IcJitEntry( - id: FfiConverterString.read(from: &buf), - state: FfiConverterTypeCJitStateEnum.read(from: &buf), - feeSat: FfiConverterUInt64.read(from: &buf), - networkFeeSat: FfiConverterUInt64.read(from: &buf), - serviceFeeSat: FfiConverterUInt64.read(from: &buf), - channelSizeSat: FfiConverterUInt64.read(from: &buf), - channelExpiryWeeks: FfiConverterUInt32.read(from: &buf), - channelOpenError: FfiConverterOptionString.read(from: &buf), - nodeId: FfiConverterString.read(from: &buf), - invoice: FfiConverterTypeIBtBolt11Invoice.read(from: &buf), - channel: FfiConverterOptionTypeIBtChannel.read(from: &buf), - lspNode: FfiConverterTypeILspNode.read(from: &buf), - couponCode: FfiConverterString.read(from: &buf), - source: FfiConverterOptionString.read(from: &buf), - discount: FfiConverterOptionTypeIDiscount.read(from: &buf), - expiresAt: FfiConverterString.read(from: &buf), - updatedAt: FfiConverterString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + state: FfiConverterTypeCJitStateEnum.read(from: &buf), + feeSat: FfiConverterUInt64.read(from: &buf), + networkFeeSat: FfiConverterUInt64.read(from: &buf), + serviceFeeSat: FfiConverterUInt64.read(from: &buf), + channelSizeSat: FfiConverterUInt64.read(from: &buf), + channelExpiryWeeks: FfiConverterUInt32.read(from: &buf), + channelOpenError: FfiConverterOptionString.read(from: &buf), + nodeId: FfiConverterString.read(from: &buf), + invoice: FfiConverterTypeIBtBolt11Invoice.read(from: &buf), + channel: FfiConverterOptionTypeIBtChannel.read(from: &buf), + lspNode: FfiConverterTypeILspNode.read(from: &buf), + couponCode: FfiConverterString.read(from: &buf), + source: FfiConverterOptionString.read(from: &buf), + discount: FfiConverterOptionTypeIDiscount.read(from: &buf), + expiresAt: FfiConverterString.read(from: &buf), + updatedAt: FfiConverterString.read(from: &buf), createdAt: FfiConverterString.read(from: &buf) ) } @@ -5338,9 +5538,9 @@ public struct FfiConverterTypeIDiscount: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IDiscount { return try IDiscount( - code: FfiConverterString.read(from: &buf), - absoluteSat: FfiConverterUInt64.read(from: &buf), - relative: FfiConverterDouble.read(from: &buf), + code: FfiConverterString.read(from: &buf), + absoluteSat: FfiConverterUInt64.read(from: &buf), + relative: FfiConverterDouble.read(from: &buf), overallSat: FfiConverterUInt64.read(from: &buf) ) } @@ -5462,15 +5662,15 @@ public struct FfiConverterTypeIGift: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGift { return try IGift( - id: FfiConverterString.read(from: &buf), - nodeId: FfiConverterString.read(from: &buf), - orderId: FfiConverterOptionString.read(from: &buf), - order: FfiConverterOptionTypeIGiftOrder.read(from: &buf), - bolt11PaymentId: FfiConverterOptionString.read(from: &buf), - bolt11Payment: FfiConverterOptionTypeIGiftPayment.read(from: &buf), - appliedGiftCodeId: FfiConverterOptionString.read(from: &buf), - appliedGiftCode: FfiConverterOptionTypeIGiftCode.read(from: &buf), - createdAt: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + nodeId: FfiConverterString.read(from: &buf), + orderId: FfiConverterOptionString.read(from: &buf), + order: FfiConverterOptionTypeIGiftOrder.read(from: &buf), + bolt11PaymentId: FfiConverterOptionString.read(from: &buf), + bolt11Payment: FfiConverterOptionTypeIGiftPayment.read(from: &buf), + appliedGiftCodeId: FfiConverterOptionString.read(from: &buf), + appliedGiftCode: FfiConverterOptionTypeIGiftCode.read(from: &buf), + createdAt: FfiConverterOptionString.read(from: &buf), updatedAt: FfiConverterOptionString.read(from: &buf) ) } @@ -5604,16 +5804,16 @@ public struct FfiConverterTypeIGiftBolt11Invoice: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGiftBolt11Invoice { return try IGiftBolt11Invoice( - id: FfiConverterString.read(from: &buf), - request: FfiConverterString.read(from: &buf), - state: FfiConverterString.read(from: &buf), - isHodlInvoice: FfiConverterOptionBool.read(from: &buf), - paymentHash: FfiConverterOptionString.read(from: &buf), - amountSat: FfiConverterOptionUInt64.read(from: &buf), - amountMsat: FfiConverterOptionString.read(from: &buf), - internalNodePubkey: FfiConverterOptionString.read(from: &buf), - updatedAt: FfiConverterOptionString.read(from: &buf), - createdAt: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + request: FfiConverterString.read(from: &buf), + state: FfiConverterString.read(from: &buf), + isHodlInvoice: FfiConverterOptionBool.read(from: &buf), + paymentHash: FfiConverterOptionString.read(from: &buf), + amountSat: FfiConverterOptionUInt64.read(from: &buf), + amountMsat: FfiConverterOptionString.read(from: &buf), + internalNodePubkey: FfiConverterOptionString.read(from: &buf), + updatedAt: FfiConverterOptionString.read(from: &buf), + createdAt: FfiConverterOptionString.read(from: &buf), expiresAt: FfiConverterOptionString.read(from: &buf) ) } @@ -5736,14 +5936,14 @@ public struct FfiConverterTypeIGiftBtcAddress: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGiftBtcAddress { return try IGiftBtcAddress( - id: FfiConverterString.read(from: &buf), - address: FfiConverterString.read(from: &buf), - transactions: FfiConverterSequenceString.read(from: &buf), - allTransactions: FfiConverterSequenceString.read(from: &buf), - isBlacklisted: FfiConverterOptionBool.read(from: &buf), - watchUntil: FfiConverterOptionString.read(from: &buf), - watchForBlockConfirmations: FfiConverterOptionUInt32.read(from: &buf), - updatedAt: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + address: FfiConverterString.read(from: &buf), + transactions: FfiConverterSequenceString.read(from: &buf), + allTransactions: FfiConverterSequenceString.read(from: &buf), + isBlacklisted: FfiConverterOptionBool.read(from: &buf), + watchUntil: FfiConverterOptionString.read(from: &buf), + watchForBlockConfirmations: FfiConverterOptionUInt32.read(from: &buf), + updatedAt: FfiConverterOptionString.read(from: &buf), createdAt: FfiConverterOptionString.read(from: &buf) ) } @@ -5858,13 +6058,13 @@ public struct FfiConverterTypeIGiftCode: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGiftCode { return try IGiftCode( - id: FfiConverterString.read(from: &buf), - code: FfiConverterString.read(from: &buf), - createdAt: FfiConverterString.read(from: &buf), - updatedAt: FfiConverterString.read(from: &buf), - expiresAt: FfiConverterString.read(from: &buf), - giftSat: FfiConverterOptionUInt64.read(from: &buf), - scope: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + code: FfiConverterString.read(from: &buf), + createdAt: FfiConverterString.read(from: &buf), + updatedAt: FfiConverterString.read(from: &buf), + expiresAt: FfiConverterString.read(from: &buf), + giftSat: FfiConverterOptionUInt64.read(from: &buf), + scope: FfiConverterOptionString.read(from: &buf), maxCount: FfiConverterOptionUInt32.read(from: &buf) ) } @@ -5948,8 +6148,8 @@ public struct FfiConverterTypeIGiftLspNode: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGiftLspNode { return try IGiftLspNode( - alias: FfiConverterString.read(from: &buf), - pubkey: FfiConverterString.read(from: &buf), + alias: FfiConverterString.read(from: &buf), + pubkey: FfiConverterString.read(from: &buf), connectionStrings: FfiConverterSequenceString.read(from: &buf) ) } @@ -6142,27 +6342,27 @@ public struct FfiConverterTypeIGiftOrder: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGiftOrder { return try IGiftOrder( - id: FfiConverterString.read(from: &buf), - state: FfiConverterString.read(from: &buf), - oldState: FfiConverterOptionString.read(from: &buf), - isChannelExpired: FfiConverterOptionBool.read(from: &buf), - isOrderExpired: FfiConverterOptionBool.read(from: &buf), - lspBalanceSat: FfiConverterOptionUInt64.read(from: &buf), - clientBalanceSat: FfiConverterOptionUInt64.read(from: &buf), - channelExpiryWeeks: FfiConverterOptionUInt32.read(from: &buf), - zeroConf: FfiConverterOptionBool.read(from: &buf), - zeroReserve: FfiConverterOptionBool.read(from: &buf), - announced: FfiConverterOptionBool.read(from: &buf), - clientNodeId: FfiConverterOptionString.read(from: &buf), - channelExpiresAt: FfiConverterOptionString.read(from: &buf), - orderExpiresAt: FfiConverterOptionString.read(from: &buf), - feeSat: FfiConverterOptionUInt64.read(from: &buf), - networkFeeSat: FfiConverterOptionUInt64.read(from: &buf), - serviceFeeSat: FfiConverterOptionUInt64.read(from: &buf), - payment: FfiConverterOptionTypeIGiftPayment.read(from: &buf), - lspNode: FfiConverterOptionTypeIGiftLspNode.read(from: &buf), - updatedAt: FfiConverterOptionString.read(from: &buf), - createdAt: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + state: FfiConverterString.read(from: &buf), + oldState: FfiConverterOptionString.read(from: &buf), + isChannelExpired: FfiConverterOptionBool.read(from: &buf), + isOrderExpired: FfiConverterOptionBool.read(from: &buf), + lspBalanceSat: FfiConverterOptionUInt64.read(from: &buf), + clientBalanceSat: FfiConverterOptionUInt64.read(from: &buf), + channelExpiryWeeks: FfiConverterOptionUInt32.read(from: &buf), + zeroConf: FfiConverterOptionBool.read(from: &buf), + zeroReserve: FfiConverterOptionBool.read(from: &buf), + announced: FfiConverterOptionBool.read(from: &buf), + clientNodeId: FfiConverterOptionString.read(from: &buf), + channelExpiresAt: FfiConverterOptionString.read(from: &buf), + orderExpiresAt: FfiConverterOptionString.read(from: &buf), + feeSat: FfiConverterOptionUInt64.read(from: &buf), + networkFeeSat: FfiConverterOptionUInt64.read(from: &buf), + serviceFeeSat: FfiConverterOptionUInt64.read(from: &buf), + payment: FfiConverterOptionTypeIGiftPayment.read(from: &buf), + lspNode: FfiConverterOptionTypeIGiftLspNode.read(from: &buf), + updatedAt: FfiConverterOptionString.read(from: &buf), + createdAt: FfiConverterOptionString.read(from: &buf), nodeIdVerified: FfiConverterOptionBool.read(from: &buf) ) } @@ -6362,25 +6562,25 @@ public struct FfiConverterTypeIGiftPayment: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IGiftPayment { return try IGiftPayment( - id: FfiConverterString.read(from: &buf), - state: FfiConverterString.read(from: &buf), - oldState: FfiConverterOptionString.read(from: &buf), - onchainState: FfiConverterOptionString.read(from: &buf), - lnState: FfiConverterOptionString.read(from: &buf), - paidOnchainSat: FfiConverterOptionUInt64.read(from: &buf), - paidLnSat: FfiConverterOptionUInt64.read(from: &buf), - paidSat: FfiConverterOptionUInt64.read(from: &buf), - isOverpaid: FfiConverterOptionBool.read(from: &buf), - isRefunded: FfiConverterOptionBool.read(from: &buf), - overpaidAmountSat: FfiConverterOptionUInt64.read(from: &buf), - requiredOnchainConfirmations: FfiConverterOptionUInt32.read(from: &buf), - settlementState: FfiConverterOptionString.read(from: &buf), - expectedAmountSat: FfiConverterOptionUInt64.read(from: &buf), - isManuallyPaid: FfiConverterOptionBool.read(from: &buf), - btcAddress: FfiConverterOptionTypeIGiftBtcAddress.read(from: &buf), - btcAddressId: FfiConverterOptionString.read(from: &buf), - bolt11Invoice: FfiConverterOptionTypeIGiftBolt11Invoice.read(from: &buf), - bolt11InvoiceId: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + state: FfiConverterString.read(from: &buf), + oldState: FfiConverterOptionString.read(from: &buf), + onchainState: FfiConverterOptionString.read(from: &buf), + lnState: FfiConverterOptionString.read(from: &buf), + paidOnchainSat: FfiConverterOptionUInt64.read(from: &buf), + paidLnSat: FfiConverterOptionUInt64.read(from: &buf), + paidSat: FfiConverterOptionUInt64.read(from: &buf), + isOverpaid: FfiConverterOptionBool.read(from: &buf), + isRefunded: FfiConverterOptionBool.read(from: &buf), + overpaidAmountSat: FfiConverterOptionUInt64.read(from: &buf), + requiredOnchainConfirmations: FfiConverterOptionUInt32.read(from: &buf), + settlementState: FfiConverterOptionString.read(from: &buf), + expectedAmountSat: FfiConverterOptionUInt64.read(from: &buf), + isManuallyPaid: FfiConverterOptionBool.read(from: &buf), + btcAddress: FfiConverterOptionTypeIGiftBtcAddress.read(from: &buf), + btcAddressId: FfiConverterOptionString.read(from: &buf), + bolt11Invoice: FfiConverterOptionTypeIGiftBolt11Invoice.read(from: &buf), + bolt11InvoiceId: FfiConverterOptionString.read(from: &buf), manualRefunds: FfiConverterSequenceString.read(from: &buf) ) } @@ -6482,9 +6682,9 @@ public struct FfiConverterTypeILspNode: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ILspNode { return try ILspNode( - alias: FfiConverterString.read(from: &buf), - pubkey: FfiConverterString.read(from: &buf), - connectionStrings: FfiConverterSequenceString.read(from: &buf), + alias: FfiConverterString.read(from: &buf), + pubkey: FfiConverterString.read(from: &buf), + connectionStrings: FfiConverterSequenceString.read(from: &buf), readonly: FfiConverterOptionBool.read(from: &buf) ) } @@ -6588,12 +6788,12 @@ public struct FfiConverterTypeIManualRefund: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IManualRefund { return try IManualRefund( - amountSat: FfiConverterUInt64.read(from: &buf), - target: FfiConverterString.read(from: &buf), - state: FfiConverterTypeManualRefundStateEnum.read(from: &buf), - createdByName: FfiConverterString.read(from: &buf), - votedByName: FfiConverterOptionString.read(from: &buf), - reason: FfiConverterOptionString.read(from: &buf), + amountSat: FfiConverterUInt64.read(from: &buf), + target: FfiConverterString.read(from: &buf), + state: FfiConverterTypeManualRefundStateEnum.read(from: &buf), + createdByName: FfiConverterString.read(from: &buf), + votedByName: FfiConverterOptionString.read(from: &buf), + reason: FfiConverterOptionString.read(from: &buf), targetType: FfiConverterString.read(from: &buf) ) } @@ -6640,7 +6840,7 @@ public struct LegacyRnCloseRecoveryScanResult { public init( /** * Total balance found in legacy RN P2WPKH close outputs (in satoshis). - */totalAmount: UInt64, + */totalAmount: UInt64, /** * Number of P2WPKH outputs found. */outputsCount: UInt32) { @@ -6682,7 +6882,7 @@ public struct FfiConverterTypeLegacyRnCloseRecoveryScanResult: FfiConverterRustB public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LegacyRnCloseRecoveryScanResult { return try LegacyRnCloseRecoveryScanResult( - totalAmount: FfiConverterUInt64.read(from: &buf), + totalAmount: FfiConverterUInt64.read(from: &buf), outputsCount: FfiConverterUInt32.read(from: &buf) ) } @@ -6748,25 +6948,25 @@ public struct LegacyRnCloseRecoverySweepPreview { public init( /** * Fully signed raw sweep transaction hex. Broadcast only after user confirmation. - */txHex: String, + */txHex: String, /** * Transaction id of the sweep transaction. - */txid: String, + */txid: String, /** * Total input amount in satoshis. - */totalAmount: UInt64, + */totalAmount: UInt64, /** * Fee in satoshis. - */estimatedFee: UInt64, + */estimatedFee: UInt64, /** * Transaction virtual size in vbytes. - */estimatedVsize: UInt64, + */estimatedVsize: UInt64, /** * Number of recovered outputs swept. - */outputsCount: UInt32, + */outputsCount: UInt32, /** * Destination address receiving the sweep. - */destinationAddress: String, + */destinationAddress: String, /** * Amount sent to destination after fees. */amountAfterFees: UInt64) { @@ -6838,13 +7038,13 @@ public struct FfiConverterTypeLegacyRnCloseRecoverySweepPreview: FfiConverterRus public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LegacyRnCloseRecoverySweepPreview { return try LegacyRnCloseRecoverySweepPreview( - txHex: FfiConverterString.read(from: &buf), - txid: FfiConverterString.read(from: &buf), - totalAmount: FfiConverterUInt64.read(from: &buf), - estimatedFee: FfiConverterUInt64.read(from: &buf), - estimatedVsize: FfiConverterUInt64.read(from: &buf), - outputsCount: FfiConverterUInt32.read(from: &buf), - destinationAddress: FfiConverterString.read(from: &buf), + txHex: FfiConverterString.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + totalAmount: FfiConverterUInt64.read(from: &buf), + estimatedFee: FfiConverterUInt64.read(from: &buf), + estimatedVsize: FfiConverterUInt64.read(from: &buf), + outputsCount: FfiConverterUInt32.read(from: &buf), + destinationAddress: FfiConverterString.read(from: &buf), amountAfterFees: FfiConverterUInt64.read(from: &buf) ) } @@ -6988,18 +7188,18 @@ public struct FfiConverterTypeLightningActivity: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LightningActivity { return try LightningActivity( - id: FfiConverterString.read(from: &buf), - txType: FfiConverterTypePaymentType.read(from: &buf), - status: FfiConverterTypePaymentState.read(from: &buf), - value: FfiConverterUInt64.read(from: &buf), - fee: FfiConverterOptionUInt64.read(from: &buf), - invoice: FfiConverterString.read(from: &buf), - message: FfiConverterString.read(from: &buf), - timestamp: FfiConverterUInt64.read(from: &buf), - preimage: FfiConverterOptionString.read(from: &buf), - contact: FfiConverterOptionString.read(from: &buf), - createdAt: FfiConverterOptionUInt64.read(from: &buf), - updatedAt: FfiConverterOptionUInt64.read(from: &buf), + id: FfiConverterString.read(from: &buf), + txType: FfiConverterTypePaymentType.read(from: &buf), + status: FfiConverterTypePaymentState.read(from: &buf), + value: FfiConverterUInt64.read(from: &buf), + fee: FfiConverterOptionUInt64.read(from: &buf), + invoice: FfiConverterString.read(from: &buf), + message: FfiConverterString.read(from: &buf), + timestamp: FfiConverterUInt64.read(from: &buf), + preimage: FfiConverterOptionString.read(from: &buf), + contact: FfiConverterOptionString.read(from: &buf), + createdAt: FfiConverterOptionUInt64.read(from: &buf), + updatedAt: FfiConverterOptionUInt64.read(from: &buf), seenAt: FfiConverterOptionUInt64.read(from: &buf) ) } @@ -7124,14 +7324,14 @@ public struct FfiConverterTypeLightningInvoice: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LightningInvoice { return try LightningInvoice( - bolt11: FfiConverterString.read(from: &buf), - paymentHash: FfiConverterData.read(from: &buf), - amountSatoshis: FfiConverterUInt64.read(from: &buf), - timestampSeconds: FfiConverterUInt64.read(from: &buf), - expirySeconds: FfiConverterUInt64.read(from: &buf), - isExpired: FfiConverterBool.read(from: &buf), - description: FfiConverterOptionString.read(from: &buf), - networkType: FfiConverterTypeNetworkType.read(from: &buf), + bolt11: FfiConverterString.read(from: &buf), + paymentHash: FfiConverterData.read(from: &buf), + amountSatoshis: FfiConverterUInt64.read(from: &buf), + timestampSeconds: FfiConverterUInt64.read(from: &buf), + expirySeconds: FfiConverterUInt64.read(from: &buf), + isExpired: FfiConverterBool.read(from: &buf), + description: FfiConverterOptionString.read(from: &buf), + networkType: FfiConverterTypeNetworkType.read(from: &buf), payeeNodeId: FfiConverterOptionData.read(from: &buf) ) } @@ -7216,8 +7416,8 @@ public struct FfiConverterTypeLnurlAddressData: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LnurlAddressData { return try LnurlAddressData( - uri: FfiConverterString.read(from: &buf), - domain: FfiConverterString.read(from: &buf), + uri: FfiConverterString.read(from: &buf), + domain: FfiConverterString.read(from: &buf), username: FfiConverterString.read(from: &buf) ) } @@ -7302,9 +7502,9 @@ public struct FfiConverterTypeLnurlAuthData: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LnurlAuthData { return try LnurlAuthData( - uri: FfiConverterString.read(from: &buf), - tag: FfiConverterString.read(from: &buf), - k1: FfiConverterString.read(from: &buf), + uri: FfiConverterString.read(from: &buf), + tag: FfiConverterString.read(from: &buf), + k1: FfiConverterString.read(from: &buf), domain: FfiConverterString.read(from: &buf) ) } @@ -7390,9 +7590,9 @@ public struct FfiConverterTypeLnurlChannelData: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LnurlChannelData { return try LnurlChannelData( - uri: FfiConverterString.read(from: &buf), - callback: FfiConverterString.read(from: &buf), - k1: FfiConverterString.read(from: &buf), + uri: FfiConverterString.read(from: &buf), + callback: FfiConverterString.read(from: &buf), + k1: FfiConverterString.read(from: &buf), tag: FfiConverterString.read(from: &buf) ) } @@ -7502,13 +7702,13 @@ public struct FfiConverterTypeLnurlPayData: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LnurlPayData { return try LnurlPayData( - uri: FfiConverterString.read(from: &buf), - callback: FfiConverterString.read(from: &buf), - minSendable: FfiConverterUInt64.read(from: &buf), - maxSendable: FfiConverterUInt64.read(from: &buf), - metadataStr: FfiConverterString.read(from: &buf), - commentAllowed: FfiConverterOptionUInt32.read(from: &buf), - allowsNostr: FfiConverterBool.read(from: &buf), + uri: FfiConverterString.read(from: &buf), + callback: FfiConverterString.read(from: &buf), + minSendable: FfiConverterUInt64.read(from: &buf), + maxSendable: FfiConverterUInt64.read(from: &buf), + metadataStr: FfiConverterString.read(from: &buf), + commentAllowed: FfiConverterOptionUInt32.read(from: &buf), + allowsNostr: FfiConverterBool.read(from: &buf), nostrPubkey: FfiConverterOptionData.read(from: &buf) ) } @@ -7616,12 +7816,12 @@ public struct FfiConverterTypeLnurlWithdrawData: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LnurlWithdrawData { return try LnurlWithdrawData( - uri: FfiConverterString.read(from: &buf), - callback: FfiConverterString.read(from: &buf), - k1: FfiConverterString.read(from: &buf), - defaultDescription: FfiConverterString.read(from: &buf), - minWithdrawable: FfiConverterOptionUInt64.read(from: &buf), - maxWithdrawable: FfiConverterUInt64.read(from: &buf), + uri: FfiConverterString.read(from: &buf), + callback: FfiConverterString.read(from: &buf), + k1: FfiConverterString.read(from: &buf), + defaultDescription: FfiConverterString.read(from: &buf), + minWithdrawable: FfiConverterOptionUInt64.read(from: &buf), + maxWithdrawable: FfiConverterUInt64.read(from: &buf), tag: FfiConverterString.read(from: &buf) ) } @@ -7683,16 +7883,16 @@ public struct NativeDeviceInfo { public init( /** * Unique path/identifier for this device - */path: String, + */path: String, /** * Transport type: "usb" or "bluetooth" - */transportType: String, + */transportType: String, /** * Optional device name (from BLE advertisement or USB descriptor) - */name: String?, + */name: String?, /** * USB Vendor ID (for USB devices) - */vendorId: UInt16?, + */vendorId: UInt16?, /** * USB Product ID (for USB devices) */productId: UInt16?) { @@ -7749,10 +7949,10 @@ public struct FfiConverterTypeNativeDeviceInfo: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NativeDeviceInfo { return try NativeDeviceInfo( - path: FfiConverterString.read(from: &buf), - transportType: FfiConverterString.read(from: &buf), - name: FfiConverterOptionString.read(from: &buf), - vendorId: FfiConverterOptionUInt16.read(from: &buf), + path: FfiConverterString.read(from: &buf), + transportType: FfiConverterString.read(from: &buf), + name: FfiConverterOptionString.read(from: &buf), + vendorId: FfiConverterOptionUInt16.read(from: &buf), productId: FfiConverterOptionUInt16.read(from: &buf) ) } @@ -7845,10 +8045,10 @@ public struct FfiConverterTypeOnChainInvoice: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OnChainInvoice { return try OnChainInvoice( - address: FfiConverterString.read(from: &buf), - amountSatoshis: FfiConverterUInt64.read(from: &buf), - label: FfiConverterOptionString.read(from: &buf), - message: FfiConverterOptionString.read(from: &buf), + address: FfiConverterString.read(from: &buf), + amountSatoshis: FfiConverterUInt64.read(from: &buf), + label: FfiConverterOptionString.read(from: &buf), + message: FfiConverterOptionString.read(from: &buf), params: FfiConverterOptionDictionaryStringString.read(from: &buf) ) } @@ -8031,25 +8231,25 @@ public struct FfiConverterTypeOnchainActivity: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OnchainActivity { return try OnchainActivity( - id: FfiConverterString.read(from: &buf), - txType: FfiConverterTypePaymentType.read(from: &buf), - txId: FfiConverterString.read(from: &buf), - value: FfiConverterUInt64.read(from: &buf), - fee: FfiConverterUInt64.read(from: &buf), - feeRate: FfiConverterUInt64.read(from: &buf), - address: FfiConverterString.read(from: &buf), - confirmed: FfiConverterBool.read(from: &buf), - timestamp: FfiConverterUInt64.read(from: &buf), - isBoosted: FfiConverterBool.read(from: &buf), - boostTxIds: FfiConverterSequenceString.read(from: &buf), - isTransfer: FfiConverterBool.read(from: &buf), - doesExist: FfiConverterBool.read(from: &buf), - confirmTimestamp: FfiConverterOptionUInt64.read(from: &buf), - channelId: FfiConverterOptionString.read(from: &buf), - transferTxId: FfiConverterOptionString.read(from: &buf), - contact: FfiConverterOptionString.read(from: &buf), - createdAt: FfiConverterOptionUInt64.read(from: &buf), - updatedAt: FfiConverterOptionUInt64.read(from: &buf), + id: FfiConverterString.read(from: &buf), + txType: FfiConverterTypePaymentType.read(from: &buf), + txId: FfiConverterString.read(from: &buf), + value: FfiConverterUInt64.read(from: &buf), + fee: FfiConverterUInt64.read(from: &buf), + feeRate: FfiConverterUInt64.read(from: &buf), + address: FfiConverterString.read(from: &buf), + confirmed: FfiConverterBool.read(from: &buf), + timestamp: FfiConverterUInt64.read(from: &buf), + isBoosted: FfiConverterBool.read(from: &buf), + boostTxIds: FfiConverterSequenceString.read(from: &buf), + isTransfer: FfiConverterBool.read(from: &buf), + doesExist: FfiConverterBool.read(from: &buf), + confirmTimestamp: FfiConverterOptionUInt64.read(from: &buf), + channelId: FfiConverterOptionString.read(from: &buf), + transferTxId: FfiConverterOptionString.read(from: &buf), + contact: FfiConverterOptionString.read(from: &buf), + createdAt: FfiConverterOptionUInt64.read(from: &buf), + updatedAt: FfiConverterOptionUInt64.read(from: &buf), seenAt: FfiConverterOptionUInt64.read(from: &buf) ) } @@ -8187,15 +8387,15 @@ public struct FfiConverterTypePreActivityMetadata: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PreActivityMetadata { return try PreActivityMetadata( - paymentId: FfiConverterString.read(from: &buf), - tags: FfiConverterSequenceString.read(from: &buf), - paymentHash: FfiConverterOptionString.read(from: &buf), - txId: FfiConverterOptionString.read(from: &buf), - address: FfiConverterOptionString.read(from: &buf), - isReceive: FfiConverterBool.read(from: &buf), - feeRate: FfiConverterUInt64.read(from: &buf), - isTransfer: FfiConverterBool.read(from: &buf), - channelId: FfiConverterOptionString.read(from: &buf), + paymentId: FfiConverterString.read(from: &buf), + tags: FfiConverterSequenceString.read(from: &buf), + paymentHash: FfiConverterOptionString.read(from: &buf), + txId: FfiConverterOptionString.read(from: &buf), + address: FfiConverterOptionString.read(from: &buf), + isReceive: FfiConverterBool.read(from: &buf), + feeRate: FfiConverterUInt64.read(from: &buf), + isTransfer: FfiConverterBool.read(from: &buf), + channelId: FfiConverterOptionString.read(from: &buf), createdAt: FfiConverterUInt64.read(from: &buf) ) } @@ -8324,16 +8524,16 @@ public struct PubkyAuthDetails { public init( /** * Whether this is a signin or signup flow. - */kind: PubkyAuthKind, + */kind: PubkyAuthKind, /** * Requested capabilities (e.g. `"/pub/pubky.app/:rw"`). - */capabilities: String, + */capabilities: String, /** * Relay URL used for the auth exchange. - */relay: String, + */relay: String, /** * Homeserver public key (z32-encoded). Present only for signup flows. - */homeserver: String?, + */homeserver: String?, /** * Signup token. Present only for signup flows. */signupToken: String?) { @@ -8390,10 +8590,10 @@ public struct FfiConverterTypePubkyAuthDetails: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PubkyAuthDetails { return try PubkyAuthDetails( - kind: FfiConverterTypePubkyAuthKind.read(from: &buf), - capabilities: FfiConverterString.read(from: &buf), - relay: FfiConverterString.read(from: &buf), - homeserver: FfiConverterOptionString.read(from: &buf), + kind: FfiConverterTypePubkyAuthKind.read(from: &buf), + capabilities: FfiConverterString.read(from: &buf), + relay: FfiConverterString.read(from: &buf), + homeserver: FfiConverterOptionString.read(from: &buf), signupToken: FfiConverterOptionString.read(from: &buf) ) } @@ -8486,10 +8686,10 @@ public struct FfiConverterTypePubkyProfile: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PubkyProfile { return try PubkyProfile( - name: FfiConverterString.read(from: &buf), - bio: FfiConverterOptionString.read(from: &buf), - image: FfiConverterOptionString.read(from: &buf), - links: FfiConverterOptionSequenceTypePubkyProfileLink.read(from: &buf), + name: FfiConverterString.read(from: &buf), + bio: FfiConverterOptionString.read(from: &buf), + image: FfiConverterOptionString.read(from: &buf), + links: FfiConverterOptionSequenceTypePubkyProfileLink.read(from: &buf), status: FfiConverterOptionString.read(from: &buf) ) } @@ -8564,7 +8764,7 @@ public struct FfiConverterTypePubkyProfileLink: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PubkyProfileLink { return try PubkyProfileLink( - title: FfiConverterString.read(from: &buf), + title: FfiConverterString.read(from: &buf), url: FfiConverterString.read(from: &buf) ) } @@ -8621,16 +8821,16 @@ public struct SingleAddressInfoResult { public init( /** * The queried address - */address: String, + */address: String, /** * Total confirmed balance in satoshis - */balance: UInt64, + */balance: UInt64, /** * UTXOs for this address - */utxos: [AccountUtxo], + */utxos: [AccountUtxo], /** * Number of transactions involving this address - */transfers: UInt32, + */transfers: UInt32, /** * Current blockchain tip height */blockHeight: UInt32) { @@ -8687,10 +8887,10 @@ public struct FfiConverterTypeSingleAddressInfoResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SingleAddressInfoResult { return try SingleAddressInfoResult( - address: FfiConverterString.read(from: &buf), - balance: FfiConverterUInt64.read(from: &buf), - utxos: FfiConverterSequenceTypeAccountUtxo.read(from: &buf), - transfers: FfiConverterUInt32.read(from: &buf), + address: FfiConverterString.read(from: &buf), + balance: FfiConverterUInt64.read(from: &buf), + utxos: FfiConverterSequenceTypeAccountUtxo.read(from: &buf), + transfers: FfiConverterUInt32.read(from: &buf), blockHeight: FfiConverterUInt32.read(from: &buf) ) } @@ -8743,13 +8943,13 @@ public struct SweepResult { public init( /** * The transaction ID of the sweep transaction - */txid: String, + */txid: String, /** * The total amount swept (in satoshis) - */amountSwept: UInt64, + */amountSwept: UInt64, /** * The fee paid (in satoshis) - */feePaid: UInt64, + */feePaid: UInt64, /** * The number of UTXOs swept */utxosSwept: UInt32) { @@ -8801,9 +9001,9 @@ public struct FfiConverterTypeSweepResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SweepResult { return try SweepResult( - txid: FfiConverterString.read(from: &buf), - amountSwept: FfiConverterUInt64.read(from: &buf), - feePaid: FfiConverterUInt64.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + amountSwept: FfiConverterUInt64.read(from: &buf), + feePaid: FfiConverterUInt64.read(from: &buf), utxosSwept: FfiConverterUInt32.read(from: &buf) ) } @@ -8867,22 +9067,22 @@ public struct SweepTransactionPreview { public init( /** * The PSBT (Partially Signed Bitcoin Transaction) in base64 format - */psbt: String, + */psbt: String, /** * The total amount available to sweep (in satoshis) - */totalAmount: UInt64, + */totalAmount: UInt64, /** * The estimated fee for the transaction (in satoshis) - */estimatedFee: UInt64, + */estimatedFee: UInt64, /** * The estimated virtual size of the transaction (in vbytes) - */estimatedVsize: UInt64, + */estimatedVsize: UInt64, /** * The number of UTXOs that will be swept - */utxosCount: UInt32, + */utxosCount: UInt32, /** * The destination address - */destinationAddress: String, + */destinationAddress: String, /** * The amount that will be sent to destination after fees (in satoshis) */amountAfterFees: UInt64) { @@ -8949,12 +9149,12 @@ public struct FfiConverterTypeSweepTransactionPreview: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SweepTransactionPreview { return try SweepTransactionPreview( - psbt: FfiConverterString.read(from: &buf), - totalAmount: FfiConverterUInt64.read(from: &buf), - estimatedFee: FfiConverterUInt64.read(from: &buf), - estimatedVsize: FfiConverterUInt64.read(from: &buf), - utxosCount: FfiConverterUInt32.read(from: &buf), - destinationAddress: FfiConverterString.read(from: &buf), + psbt: FfiConverterString.read(from: &buf), + totalAmount: FfiConverterUInt64.read(from: &buf), + estimatedFee: FfiConverterUInt64.read(from: &buf), + estimatedVsize: FfiConverterUInt64.read(from: &buf), + utxosCount: FfiConverterUInt32.read(from: &buf), + destinationAddress: FfiConverterString.read(from: &buf), amountAfterFees: FfiConverterUInt64.read(from: &buf) ) } @@ -9025,25 +9225,25 @@ public struct SweepableBalances { public init( /** * Balance in legacy (P2PKH) addresses (in satoshis) - */legacyBalance: UInt64, + */legacyBalance: UInt64, /** * Balance in P2SH-SegWit (P2SH-P2WPKH) addresses (in satoshis) - */p2shBalance: UInt64, + */p2shBalance: UInt64, /** * Balance in Taproot (P2TR) addresses (in satoshis) - */taprootBalance: UInt64, + */taprootBalance: UInt64, /** * Total balance across all wallet types (in satoshis) - */totalBalance: UInt64, + */totalBalance: UInt64, /** * Number of UTXOs in legacy wallet - */legacyUtxosCount: UInt32, + */legacyUtxosCount: UInt32, /** * Number of UTXOs in P2SH-SegWit wallet - */p2shUtxosCount: UInt32, + */p2shUtxosCount: UInt32, /** * Number of UTXOs in Taproot wallet - */taprootUtxosCount: UInt32, + */taprootUtxosCount: UInt32, /** * Total number of UTXOs across all wallet types */totalUtxosCount: UInt32) { @@ -9115,13 +9315,13 @@ public struct FfiConverterTypeSweepableBalances: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SweepableBalances { return try SweepableBalances( - legacyBalance: FfiConverterUInt64.read(from: &buf), - p2shBalance: FfiConverterUInt64.read(from: &buf), - taprootBalance: FfiConverterUInt64.read(from: &buf), - totalBalance: FfiConverterUInt64.read(from: &buf), - legacyUtxosCount: FfiConverterUInt32.read(from: &buf), - p2shUtxosCount: FfiConverterUInt32.read(from: &buf), - taprootUtxosCount: FfiConverterUInt32.read(from: &buf), + legacyBalance: FfiConverterUInt64.read(from: &buf), + p2shBalance: FfiConverterUInt64.read(from: &buf), + taprootBalance: FfiConverterUInt64.read(from: &buf), + totalBalance: FfiConverterUInt64.read(from: &buf), + legacyUtxosCount: FfiConverterUInt32.read(from: &buf), + p2shUtxosCount: FfiConverterUInt32.read(from: &buf), + taprootUtxosCount: FfiConverterUInt32.read(from: &buf), totalUtxosCount: FfiConverterUInt32.read(from: &buf) ) } @@ -9228,49 +9428,49 @@ public struct TransactionDetail { public init( /** * Transaction ID (hex) - */txid: String, + */txid: String, /** * Amount received by the wallet (sats) - */received: UInt64, + */received: UInt64, /** * Amount sent by the wallet (sats) — includes change sent back to self - */sent: UInt64, + */sent: UInt64, /** * Net value from wallet's perspective: received - sent (positive = inflow, negative = outflow) - */net: Int64, + */net: Int64, /** * Display amount in sats (same semantics as HistoryTransaction.amount) - */amount: UInt64, + */amount: UInt64, /** * Transaction fee in sats (None if not available) - */fee: UInt64?, + */fee: UInt64?, /** * Transaction direction - */direction: TxDirection, + */direction: TxDirection, /** * Block height (None if unconfirmed/mempool) - */blockHeight: UInt32?, + */blockHeight: UInt32?, /** * Block timestamp as unix epoch seconds (None if unconfirmed) - */timestamp: UInt64?, + */timestamp: UInt64?, /** * Number of confirmations (0 if unconfirmed) - */confirmations: UInt32, + */confirmations: UInt32, /** * Transaction inputs - */inputs: [TxDetailInput], + */inputs: [TxDetailInput], /** * Transaction outputs - */outputs: [TxDetailOutput], + */outputs: [TxDetailOutput], /** * Serialized transaction size in bytes - */size: UInt32, + */size: UInt32, /** * Virtual size in vbytes (ceil(weight / 4)) - */vsize: UInt32, + */vsize: UInt32, /** * Transaction weight in weight units - */weight: UInt32, + */weight: UInt32, /** * Fee rate in sat/vB (fee / vsize), None if fee is unavailable or vsize is zero */feeRate: Double?) { @@ -9382,21 +9582,21 @@ public struct FfiConverterTypeTransactionDetail: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionDetail { return try TransactionDetail( - txid: FfiConverterString.read(from: &buf), - received: FfiConverterUInt64.read(from: &buf), - sent: FfiConverterUInt64.read(from: &buf), - net: FfiConverterInt64.read(from: &buf), - amount: FfiConverterUInt64.read(from: &buf), - fee: FfiConverterOptionUInt64.read(from: &buf), - direction: FfiConverterTypeTxDirection.read(from: &buf), - blockHeight: FfiConverterOptionUInt32.read(from: &buf), - timestamp: FfiConverterOptionUInt64.read(from: &buf), - confirmations: FfiConverterUInt32.read(from: &buf), - inputs: FfiConverterSequenceTypeTxDetailInput.read(from: &buf), - outputs: FfiConverterSequenceTypeTxDetailOutput.read(from: &buf), - size: FfiConverterUInt32.read(from: &buf), - vsize: FfiConverterUInt32.read(from: &buf), - weight: FfiConverterUInt32.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + received: FfiConverterUInt64.read(from: &buf), + sent: FfiConverterUInt64.read(from: &buf), + net: FfiConverterInt64.read(from: &buf), + amount: FfiConverterUInt64.read(from: &buf), + fee: FfiConverterOptionUInt64.read(from: &buf), + direction: FfiConverterTypeTxDirection.read(from: &buf), + blockHeight: FfiConverterOptionUInt32.read(from: &buf), + timestamp: FfiConverterOptionUInt64.read(from: &buf), + confirmations: FfiConverterUInt32.read(from: &buf), + inputs: FfiConverterSequenceTypeTxDetailInput.read(from: &buf), + outputs: FfiConverterSequenceTypeTxDetailOutput.read(from: &buf), + size: FfiConverterUInt32.read(from: &buf), + vsize: FfiConverterUInt32.read(from: &buf), + weight: FfiConverterUInt32.read(from: &buf), feeRate: FfiConverterOptionDouble.read(from: &buf) ) } @@ -9468,7 +9668,7 @@ public struct TransactionDetails { public init( /** * The transaction ID. - */txId: String, + */txId: String, /** * The net amount in this transaction (in satoshis). * @@ -9476,10 +9676,10 @@ public struct TransactionDetails { * this will be positive. For outgoing payments, this will be negative. * * Note: This amount does NOT include transaction fees. - */amountSats: Int64, + */amountSats: Int64, /** * The transaction inputs with full details. - */inputs: [TxInput], + */inputs: [TxInput], /** * The transaction outputs with full details. */outputs: [TxOutput]) { @@ -9531,9 +9731,9 @@ public struct FfiConverterTypeTransactionDetails: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionDetails { return try TransactionDetails( - txId: FfiConverterString.read(from: &buf), - amountSats: FfiConverterInt64.read(from: &buf), - inputs: FfiConverterSequenceTypeTxInput.read(from: &buf), + txId: FfiConverterString.read(from: &buf), + amountSats: FfiConverterInt64.read(from: &buf), + inputs: FfiConverterSequenceTypeTxInput.read(from: &buf), outputs: FfiConverterSequenceTypeTxOutput.read(from: &buf) ) } @@ -9592,16 +9792,16 @@ public struct TransactionHistoryResult { public init( /** * All transactions, sorted: unconfirmed first, then by timestamp descending - */transactions: [HistoryTransaction], + */transactions: [HistoryTransaction], /** * Balance breakdown - */balance: WalletBalance, + */balance: WalletBalance, /** * Total number of transactions - */txCount: UInt32, + */txCount: UInt32, /** * Current blockchain tip height - */blockHeight: UInt32, + */blockHeight: UInt32, /** * The detected or specified account type */accountType: AccountType) { @@ -9658,10 +9858,10 @@ public struct FfiConverterTypeTransactionHistoryResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TransactionHistoryResult { return try TransactionHistoryResult( - transactions: FfiConverterSequenceTypeHistoryTransaction.read(from: &buf), - balance: FfiConverterTypeWalletBalance.read(from: &buf), - txCount: FfiConverterUInt32.read(from: &buf), - blockHeight: FfiConverterUInt32.read(from: &buf), + transactions: FfiConverterSequenceTypeHistoryTransaction.read(from: &buf), + balance: FfiConverterTypeWalletBalance.read(from: &buf), + txCount: FfiConverterUInt32.read(from: &buf), + blockHeight: FfiConverterUInt32.read(from: &buf), accountType: FfiConverterTypeAccountType.read(from: &buf) ) } @@ -9709,7 +9909,7 @@ public struct TrezorAddressResponse { public init( /** * The Bitcoin address - */address: String, + */address: String, /** * The serialized path (e.g., "m/84'/0'/0'/0/0") */path: String) { @@ -9751,7 +9951,7 @@ public struct FfiConverterTypeTrezorAddressResponse: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorAddressResponse { return try TrezorAddressResponse( - address: FfiConverterString.read(from: &buf), + address: FfiConverterString.read(from: &buf), path: FfiConverterString.read(from: &buf) ) } @@ -9804,13 +10004,13 @@ public struct TrezorCallMessageResult { public init( /** * Whether the call succeeded - */success: Bool, + */success: Bool, /** * Response message type - */messageType: UInt16, + */messageType: UInt16, /** * Response protobuf data - */data: Data, + */data: Data, /** * Error message (empty on success) */error: String) { @@ -9862,9 +10062,9 @@ public struct FfiConverterTypeTrezorCallMessageResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorCallMessageResult { return try TrezorCallMessageResult( - success: FfiConverterBool.read(from: &buf), - messageType: FfiConverterUInt16.read(from: &buf), - data: FfiConverterData.read(from: &buf), + success: FfiConverterBool.read(from: &buf), + messageType: FfiConverterUInt16.read(from: &buf), + data: FfiConverterData.read(from: &buf), error: FfiConverterString.read(from: &buf) ) } @@ -9931,22 +10131,22 @@ public struct TrezorDeviceInfo { public init( /** * Unique identifier for the device - */id: String, + */id: String, /** * Transport type (USB or Bluetooth) - */transportType: TrezorTransportType, + */transportType: TrezorTransportType, /** * Device name (from BLE advertisement or USB descriptor) - */name: String?, + */name: String?, /** * Transport-specific path (used internally for connection) - */path: String, + */path: String, /** * Device label (set by user during device setup) - */label: String?, + */label: String?, /** * Device model (e.g., "T2", "Safe 5", "Safe 7") - */model: String?, + */model: String?, /** * Whether the device is in bootloader mode */isBootloader: Bool) { @@ -10013,12 +10213,12 @@ public struct FfiConverterTypeTrezorDeviceInfo: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorDeviceInfo { return try TrezorDeviceInfo( - id: FfiConverterString.read(from: &buf), - transportType: FfiConverterTypeTrezorTransportType.read(from: &buf), - name: FfiConverterOptionString.read(from: &buf), - path: FfiConverterString.read(from: &buf), - label: FfiConverterOptionString.read(from: &buf), - model: FfiConverterOptionString.read(from: &buf), + id: FfiConverterString.read(from: &buf), + transportType: FfiConverterTypeTrezorTransportType.read(from: &buf), + name: FfiConverterOptionString.read(from: &buf), + path: FfiConverterString.read(from: &buf), + label: FfiConverterOptionString.read(from: &buf), + model: FfiConverterOptionString.read(from: &buf), isBootloader: FfiConverterBool.read(from: &buf) ) } @@ -10109,37 +10309,37 @@ public struct TrezorFeatures { public init( /** * Vendor string - */vendor: String?, + */vendor: String?, /** * Device model - */model: String?, + */model: String?, /** * Device label (set by user during device setup) - */label: String?, + */label: String?, /** * Device ID (unique per device) - */deviceId: String?, + */deviceId: String?, /** * Major firmware version - */majorVersion: UInt32?, + */majorVersion: UInt32?, /** * Minor firmware version - */minorVersion: UInt32?, + */minorVersion: UInt32?, /** * Patch firmware version - */patchVersion: UInt32?, + */patchVersion: UInt32?, /** * Whether PIN protection is enabled - */pinProtection: Bool?, + */pinProtection: Bool?, /** * Whether passphrase protection is enabled - */passphraseProtection: Bool?, + */passphraseProtection: Bool?, /** * Whether the device is initialized with a seed - */initialized: Bool?, + */initialized: Bool?, /** * Whether the device needs backup - */needsBackup: Bool?, + */needsBackup: Bool?, /** * Whether the device can accept passphrase entry on the device itself * (`Capability_PassphraseEntry`). When false/None, use host entry only. @@ -10232,17 +10432,17 @@ public struct FfiConverterTypeTrezorFeatures: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorFeatures { return try TrezorFeatures( - vendor: FfiConverterOptionString.read(from: &buf), - model: FfiConverterOptionString.read(from: &buf), - label: FfiConverterOptionString.read(from: &buf), - deviceId: FfiConverterOptionString.read(from: &buf), - majorVersion: FfiConverterOptionUInt32.read(from: &buf), - minorVersion: FfiConverterOptionUInt32.read(from: &buf), - patchVersion: FfiConverterOptionUInt32.read(from: &buf), - pinProtection: FfiConverterOptionBool.read(from: &buf), - passphraseProtection: FfiConverterOptionBool.read(from: &buf), - initialized: FfiConverterOptionBool.read(from: &buf), - needsBackup: FfiConverterOptionBool.read(from: &buf), + vendor: FfiConverterOptionString.read(from: &buf), + model: FfiConverterOptionString.read(from: &buf), + label: FfiConverterOptionString.read(from: &buf), + deviceId: FfiConverterOptionString.read(from: &buf), + majorVersion: FfiConverterOptionUInt32.read(from: &buf), + minorVersion: FfiConverterOptionUInt32.read(from: &buf), + patchVersion: FfiConverterOptionUInt32.read(from: &buf), + pinProtection: FfiConverterOptionBool.read(from: &buf), + passphraseProtection: FfiConverterOptionBool.read(from: &buf), + initialized: FfiConverterOptionBool.read(from: &buf), + needsBackup: FfiConverterOptionBool.read(from: &buf), passphraseEntryCapable: FfiConverterOptionBool.read(from: &buf) ) } @@ -10305,13 +10505,13 @@ public struct TrezorGetAddressParams { public init( /** * BIP32 path (e.g., "m/84'/0'/0'/0/0") - */path: String, + */path: String, /** * Coin network (default: Bitcoin) - */coin: TrezorCoinType?, + */coin: TrezorCoinType?, /** * Whether to display the address on the device for confirmation - */showOnTrezor: Bool, + */showOnTrezor: Bool, /** * Script type (auto-detected from path if not specified) */scriptType: TrezorScriptType?) { @@ -10363,9 +10563,9 @@ public struct FfiConverterTypeTrezorGetAddressParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorGetAddressParams { return try TrezorGetAddressParams( - path: FfiConverterString.read(from: &buf), - coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf), - showOnTrezor: FfiConverterBool.read(from: &buf), + path: FfiConverterString.read(from: &buf), + coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf), + showOnTrezor: FfiConverterBool.read(from: &buf), scriptType: FfiConverterOptionTypeTrezorScriptType.read(from: &buf) ) } @@ -10416,10 +10616,10 @@ public struct TrezorGetPublicKeyParams { public init( /** * BIP32 path (e.g., "m/84'/0'/0'") - */path: String, + */path: String, /** * Coin network (default: Bitcoin) - */coin: TrezorCoinType?, + */coin: TrezorCoinType?, /** * Whether to display on device for confirmation */showOnTrezor: Bool) { @@ -10466,8 +10666,8 @@ public struct FfiConverterTypeTrezorGetPublicKeyParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorGetPublicKeyParams { return try TrezorGetPublicKeyParams( - path: FfiConverterString.read(from: &buf), - coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf), + path: FfiConverterString.read(from: &buf), + coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf), showOnTrezor: FfiConverterBool.read(from: &buf) ) } @@ -10525,16 +10725,16 @@ public struct TrezorPrevTx { public init( /** * Transaction hash (hex encoded) - */hash: String, + */hash: String, /** * Transaction version - */version: UInt32, + */version: UInt32, /** * Lock time - */lockTime: UInt32, + */lockTime: UInt32, /** * Transaction inputs - */inputs: [TrezorPrevTxInput], + */inputs: [TrezorPrevTxInput], /** * Transaction outputs */outputs: [TrezorPrevTxOutput]) { @@ -10591,10 +10791,10 @@ public struct FfiConverterTypeTrezorPrevTx: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorPrevTx { return try TrezorPrevTx( - hash: FfiConverterString.read(from: &buf), - version: FfiConverterUInt32.read(from: &buf), - lockTime: FfiConverterUInt32.read(from: &buf), - inputs: FfiConverterSequenceTypeTrezorPrevTxInput.read(from: &buf), + hash: FfiConverterString.read(from: &buf), + version: FfiConverterUInt32.read(from: &buf), + lockTime: FfiConverterUInt32.read(from: &buf), + inputs: FfiConverterSequenceTypeTrezorPrevTxInput.read(from: &buf), outputs: FfiConverterSequenceTypeTrezorPrevTxOutput.read(from: &buf) ) } @@ -10650,13 +10850,13 @@ public struct TrezorPrevTxInput { public init( /** * Previous transaction hash (hex encoded) - */prevHash: String, + */prevHash: String, /** * Previous output index - */prevIndex: UInt32, + */prevIndex: UInt32, /** * Script signature (hex encoded) - */scriptSig: String, + */scriptSig: String, /** * Sequence number */sequence: UInt32) { @@ -10708,9 +10908,9 @@ public struct FfiConverterTypeTrezorPrevTxInput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorPrevTxInput { return try TrezorPrevTxInput( - prevHash: FfiConverterString.read(from: &buf), - prevIndex: FfiConverterUInt32.read(from: &buf), - scriptSig: FfiConverterString.read(from: &buf), + prevHash: FfiConverterString.read(from: &buf), + prevIndex: FfiConverterUInt32.read(from: &buf), + scriptSig: FfiConverterString.read(from: &buf), sequence: FfiConverterUInt32.read(from: &buf) ) } @@ -10757,7 +10957,7 @@ public struct TrezorPrevTxOutput { public init( /** * Amount in satoshis - */amount: UInt64, + */amount: UInt64, /** * Script pubkey (hex encoded) */scriptPubkey: String) { @@ -10799,7 +10999,7 @@ public struct FfiConverterTypeTrezorPrevTxOutput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorPrevTxOutput { return try TrezorPrevTxOutput( - amount: FfiConverterUInt64.read(from: &buf), + amount: FfiConverterUInt64.read(from: &buf), scriptPubkey: FfiConverterString.read(from: &buf) ) } @@ -10864,22 +11064,22 @@ public struct TrezorPublicKeyResponse { public init( /** * Extended public key (xpub) - */xpub: String, + */xpub: String, /** * The serialized path (e.g., "m/84'/0'/0'") - */path: String, + */path: String, /** * Compressed public key (hex encoded) - */publicKey: String, + */publicKey: String, /** * Chain code (hex encoded) - */chainCode: String, + */chainCode: String, /** * Parent key fingerprint - */fingerprint: UInt32, + */fingerprint: UInt32, /** * Derivation depth - */depth: UInt32, + */depth: UInt32, /** * Master root fingerprint (from the device's master seed) */rootFingerprint: UInt32?) { @@ -10946,12 +11146,12 @@ public struct FfiConverterTypeTrezorPublicKeyResponse: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorPublicKeyResponse { return try TrezorPublicKeyResponse( - xpub: FfiConverterString.read(from: &buf), - path: FfiConverterString.read(from: &buf), - publicKey: FfiConverterString.read(from: &buf), - chainCode: FfiConverterString.read(from: &buf), - fingerprint: FfiConverterUInt32.read(from: &buf), - depth: FfiConverterUInt32.read(from: &buf), + xpub: FfiConverterString.read(from: &buf), + path: FfiConverterString.read(from: &buf), + publicKey: FfiConverterString.read(from: &buf), + chainCode: FfiConverterString.read(from: &buf), + fingerprint: FfiConverterUInt32.read(from: &buf), + depth: FfiConverterUInt32.read(from: &buf), rootFingerprint: FfiConverterOptionUInt32.read(from: &buf) ) } @@ -11005,10 +11205,10 @@ public struct TrezorSignMessageParams { public init( /** * BIP32 path for the signing key (e.g., "m/84'/0'/0'/0/0") - */path: String, + */path: String, /** * Message to sign - */message: String, + */message: String, /** * Coin network (default: Bitcoin) */coin: TrezorCoinType?) { @@ -11055,8 +11255,8 @@ public struct FfiConverterTypeTrezorSignMessageParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorSignMessageParams { return try TrezorSignMessageParams( - path: FfiConverterString.read(from: &buf), - message: FfiConverterString.read(from: &buf), + path: FfiConverterString.read(from: &buf), + message: FfiConverterString.read(from: &buf), coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf) ) } @@ -11118,19 +11318,19 @@ public struct TrezorSignTxParams { public init( /** * Transaction inputs - */inputs: [TrezorTxInput], + */inputs: [TrezorTxInput], /** * Transaction outputs - */outputs: [TrezorTxOutput], + */outputs: [TrezorTxOutput], /** * Coin network (default: Bitcoin) - */coin: TrezorCoinType?, + */coin: TrezorCoinType?, /** * Lock time (default: 0) - */lockTime: UInt32?, + */lockTime: UInt32?, /** * Version (default: 2) - */version: UInt32?, + */version: UInt32?, /** * Previous transactions (for non-SegWit input verification) */prevTxs: [TrezorPrevTx]) { @@ -11192,11 +11392,11 @@ public struct FfiConverterTypeTrezorSignTxParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorSignTxParams { return try TrezorSignTxParams( - inputs: FfiConverterSequenceTypeTrezorTxInput.read(from: &buf), - outputs: FfiConverterSequenceTypeTrezorTxOutput.read(from: &buf), - coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf), - lockTime: FfiConverterOptionUInt32.read(from: &buf), - version: FfiConverterOptionUInt32.read(from: &buf), + inputs: FfiConverterSequenceTypeTrezorTxInput.read(from: &buf), + outputs: FfiConverterSequenceTypeTrezorTxOutput.read(from: &buf), + coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf), + lockTime: FfiConverterOptionUInt32.read(from: &buf), + version: FfiConverterOptionUInt32.read(from: &buf), prevTxs: FfiConverterSequenceTypeTrezorPrevTx.read(from: &buf) ) } @@ -11245,7 +11445,7 @@ public struct TrezorSignedMessageResponse { public init( /** * Bitcoin address that signed the message - */address: String, + */address: String, /** * Signature (base64 encoded) */signature: String) { @@ -11287,7 +11487,7 @@ public struct FfiConverterTypeTrezorSignedMessageResponse: FfiConverterRustBuffe public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorSignedMessageResponse { return try TrezorSignedMessageResponse( - address: FfiConverterString.read(from: &buf), + address: FfiConverterString.read(from: &buf), signature: FfiConverterString.read(from: &buf) ) } @@ -11336,10 +11536,10 @@ public struct TrezorSignedTx { public init( /** * Signatures for each input (hex encoded) - */signatures: [String], + */signatures: [String], /** * Serialized transaction (hex) - */serializedTx: String, + */serializedTx: String, /** * Broadcast transaction ID (populated when push=true) */txid: String?) { @@ -11386,8 +11586,8 @@ public struct FfiConverterTypeTrezorSignedTx: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorSignedTx { return try TrezorSignedTx( - signatures: FfiConverterSequenceString.read(from: &buf), - serializedTx: FfiConverterString.read(from: &buf), + signatures: FfiConverterSequenceString.read(from: &buf), + serializedTx: FfiConverterString.read(from: &buf), txid: FfiConverterOptionString.read(from: &buf) ) } @@ -11437,10 +11637,10 @@ public struct TrezorTransportReadResult { public init( /** * Whether the read succeeded - */success: Bool, + */success: Bool, /** * Data read (empty on failure) - */data: Data, + */data: Data, /** * Error message (empty on success) */error: String) { @@ -11487,8 +11687,8 @@ public struct FfiConverterTypeTrezorTransportReadResult: FfiConverterRustBuffer public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorTransportReadResult { return try TrezorTransportReadResult( - success: FfiConverterBool.read(from: &buf), - data: FfiConverterData.read(from: &buf), + success: FfiConverterBool.read(from: &buf), + data: FfiConverterData.read(from: &buf), error: FfiConverterString.read(from: &buf) ) } @@ -11534,7 +11734,7 @@ public struct TrezorTransportWriteResult { public init( /** * Whether the operation succeeded - */success: Bool, + */success: Bool, /** * Error message (empty on success) */error: String) { @@ -11576,7 +11776,7 @@ public struct FfiConverterTypeTrezorTransportWriteResult: FfiConverterRustBuffer public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorTransportWriteResult { return try TrezorTransportWriteResult( - success: FfiConverterBool.read(from: &buf), + success: FfiConverterBool.read(from: &buf), error: FfiConverterString.read(from: &buf) ) } @@ -11645,25 +11845,25 @@ public struct TrezorTxInput { public init( /** * Previous transaction hash (hex, 32 bytes) - */prevHash: String, + */prevHash: String, /** * Previous output index - */prevIndex: UInt32, + */prevIndex: UInt32, /** * BIP32 derivation path (e.g., "m/84'/0'/0'/0/0") - */path: String, + */path: String, /** * Amount in satoshis - */amount: UInt64, + */amount: UInt64, /** * Script type - */scriptType: TrezorScriptType, + */scriptType: TrezorScriptType, /** * Sequence number (default: 0xFFFFFFFD for RBF) - */sequence: UInt32?, + */sequence: UInt32?, /** * Original transaction hash for RBF replacement (hex encoded) - */origHash: String?, + */origHash: String?, /** * Original input index for RBF replacement */origIndex: UInt32?) { @@ -11735,13 +11935,13 @@ public struct FfiConverterTypeTrezorTxInput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorTxInput { return try TrezorTxInput( - prevHash: FfiConverterString.read(from: &buf), - prevIndex: FfiConverterUInt32.read(from: &buf), - path: FfiConverterString.read(from: &buf), - amount: FfiConverterUInt64.read(from: &buf), - scriptType: FfiConverterTypeTrezorScriptType.read(from: &buf), - sequence: FfiConverterOptionUInt32.read(from: &buf), - origHash: FfiConverterOptionString.read(from: &buf), + prevHash: FfiConverterString.read(from: &buf), + prevIndex: FfiConverterUInt32.read(from: &buf), + path: FfiConverterString.read(from: &buf), + amount: FfiConverterUInt64.read(from: &buf), + scriptType: FfiConverterTypeTrezorScriptType.read(from: &buf), + sequence: FfiConverterOptionUInt32.read(from: &buf), + origHash: FfiConverterOptionString.read(from: &buf), origIndex: FfiConverterOptionUInt32.read(from: &buf) ) } @@ -11812,22 +12012,22 @@ public struct TrezorTxOutput { public init( /** * Destination address (for external outputs) - */address: String?, + */address: String?, /** * BIP32 path (for change outputs) - */path: String?, + */path: String?, /** * Amount in satoshis - */amount: UInt64, + */amount: UInt64, /** * Script type (for change outputs) - */scriptType: TrezorScriptType?, + */scriptType: TrezorScriptType?, /** * OP_RETURN data (hex encoded, for data outputs) - */opReturnData: String?, + */opReturnData: String?, /** * Original transaction hash for RBF replacement (hex encoded) - */origHash: String?, + */origHash: String?, /** * Original output index for RBF replacement */origIndex: UInt32?) { @@ -11894,12 +12094,12 @@ public struct FfiConverterTypeTrezorTxOutput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorTxOutput { return try TrezorTxOutput( - address: FfiConverterOptionString.read(from: &buf), - path: FfiConverterOptionString.read(from: &buf), - amount: FfiConverterUInt64.read(from: &buf), - scriptType: FfiConverterOptionTypeTrezorScriptType.read(from: &buf), - opReturnData: FfiConverterOptionString.read(from: &buf), - origHash: FfiConverterOptionString.read(from: &buf), + address: FfiConverterOptionString.read(from: &buf), + path: FfiConverterOptionString.read(from: &buf), + amount: FfiConverterUInt64.read(from: &buf), + scriptType: FfiConverterOptionTypeTrezorScriptType.read(from: &buf), + opReturnData: FfiConverterOptionString.read(from: &buf), + origHash: FfiConverterOptionString.read(from: &buf), origIndex: FfiConverterOptionUInt32.read(from: &buf) ) } @@ -11957,13 +12157,13 @@ public struct TrezorVerifyMessageParams { public init( /** * Bitcoin address that signed the message - */address: String, + */address: String, /** * Signature (base64 encoded) - */signature: String, + */signature: String, /** * Original message - */message: String, + */message: String, /** * Coin network (default: Bitcoin) */coin: TrezorCoinType?) { @@ -12015,9 +12215,9 @@ public struct FfiConverterTypeTrezorVerifyMessageParams: FfiConverterRustBuffer public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorVerifyMessageParams { return try TrezorVerifyMessageParams( - address: FfiConverterString.read(from: &buf), - signature: FfiConverterString.read(from: &buf), - message: FfiConverterString.read(from: &buf), + address: FfiConverterString.read(from: &buf), + signature: FfiConverterString.read(from: &buf), + message: FfiConverterString.read(from: &buf), coin: FfiConverterOptionTypeTrezorCoinType.read(from: &buf) ) } @@ -12076,16 +12276,16 @@ public struct TxDetailInput { public init( /** * Previous output transaction ID (hex) - */txid: String, + */txid: String, /** * Previous output index - */vout: UInt32, + */vout: UInt32, /** * Sequence number - */sequence: UInt32, + */sequence: UInt32, /** * Script signature (hex-encoded) - */scriptSig: String, + */scriptSig: String, /** * Witness stack (each element hex-encoded) */witness: [String]) { @@ -12142,10 +12342,10 @@ public struct FfiConverterTypeTxDetailInput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TxDetailInput { return try TxDetailInput( - txid: FfiConverterString.read(from: &buf), - vout: FfiConverterUInt32.read(from: &buf), - sequence: FfiConverterUInt32.read(from: &buf), - scriptSig: FfiConverterString.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + vout: FfiConverterUInt32.read(from: &buf), + sequence: FfiConverterUInt32.read(from: &buf), + scriptSig: FfiConverterString.read(from: &buf), witness: FfiConverterSequenceString.read(from: &buf) ) } @@ -12201,13 +12401,13 @@ public struct TxDetailOutput { public init( /** * Output value in sats - */value: UInt64, + */value: UInt64, /** * Script public key (hex-encoded) - */scriptPubkey: String, + */scriptPubkey: String, /** * Decoded address (None if script is not decodable to an address) - */address: String?, + */address: String?, /** * Whether this output belongs to the queried wallet */isMine: Bool) { @@ -12259,9 +12459,9 @@ public struct FfiConverterTypeTxDetailOutput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TxDetailOutput { return try TxDetailOutput( - value: FfiConverterUInt64.read(from: &buf), - scriptPubkey: FfiConverterString.read(from: &buf), - address: FfiConverterOptionString.read(from: &buf), + value: FfiConverterUInt64.read(from: &buf), + scriptPubkey: FfiConverterString.read(from: &buf), + address: FfiConverterOptionString.read(from: &buf), isMine: FfiConverterBool.read(from: &buf) ) } @@ -12320,16 +12520,16 @@ public struct TxInput { public init( /** * The transaction ID of the previous output being spent. - */txid: String, + */txid: String, /** * The output index of the previous output being spent. - */vout: UInt32, + */vout: UInt32, /** * The script signature (hex-encoded). - */scriptsig: String, + */scriptsig: String, /** * The witness stack (hex-encoded strings). - */witness: [String], + */witness: [String], /** * The sequence number. */sequence: UInt32) { @@ -12386,10 +12586,10 @@ public struct FfiConverterTypeTxInput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TxInput { return try TxInput( - txid: FfiConverterString.read(from: &buf), - vout: FfiConverterUInt32.read(from: &buf), - scriptsig: FfiConverterString.read(from: &buf), - witness: FfiConverterSequenceString.read(from: &buf), + txid: FfiConverterString.read(from: &buf), + vout: FfiConverterUInt32.read(from: &buf), + scriptsig: FfiConverterString.read(from: &buf), + witness: FfiConverterSequenceString.read(from: &buf), sequence: FfiConverterUInt32.read(from: &buf) ) } @@ -12449,16 +12649,16 @@ public struct TxOutput { public init( /** * The script public key (hex-encoded). - */scriptpubkey: String, + */scriptpubkey: String, /** * The script public key type (e.g., "p2pkh", "p2sh", "p2wpkh", "p2wsh", "p2tr"). - */scriptpubkeyType: String?, + */scriptpubkeyType: String?, /** * The address corresponding to this script (if decodable). - */scriptpubkeyAddress: String?, + */scriptpubkeyAddress: String?, /** * The value in satoshis. - */value: Int64, + */value: Int64, /** * The output index in the transaction. */n: UInt32) { @@ -12515,10 +12715,10 @@ public struct FfiConverterTypeTxOutput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TxOutput { return try TxOutput( - scriptpubkey: FfiConverterString.read(from: &buf), - scriptpubkeyType: FfiConverterOptionString.read(from: &buf), - scriptpubkeyAddress: FfiConverterOptionString.read(from: &buf), - value: FfiConverterInt64.read(from: &buf), + scriptpubkey: FfiConverterString.read(from: &buf), + scriptpubkeyType: FfiConverterOptionString.read(from: &buf), + scriptpubkeyAddress: FfiConverterOptionString.read(from: &buf), + value: FfiConverterInt64.read(from: &buf), n: FfiConverterUInt32.read(from: &buf) ) } @@ -12599,8 +12799,8 @@ public struct FfiConverterTypeValidationResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ValidationResult { return try ValidationResult( - address: FfiConverterString.read(from: &buf), - network: FfiConverterTypeNetworkType.read(from: &buf), + address: FfiConverterString.read(from: &buf), + network: FfiConverterTypeNetworkType.read(from: &buf), addressType: FfiConverterTypeAddressType.read(from: &buf) ) } @@ -12662,19 +12862,19 @@ public struct WalletBalance { public init( /** * Confirmed and spendable balance (sats) - */confirmed: UInt64, + */confirmed: UInt64, /** * Immature coinbase outputs (sats) - */immature: UInt64, + */immature: UInt64, /** * Unconfirmed UTXOs from trusted sources (own change) (sats) - */trustedPending: UInt64, + */trustedPending: UInt64, /** * Unconfirmed UTXOs from external sources (sats) - */untrustedPending: UInt64, + */untrustedPending: UInt64, /** * Total spendable: confirmed + trusted_pending (sats) - */spendable: UInt64, + */spendable: UInt64, /** * Grand total: all categories (sats) */total: UInt64) { @@ -12736,11 +12936,11 @@ public struct FfiConverterTypeWalletBalance: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WalletBalance { return try WalletBalance( - confirmed: FfiConverterUInt64.read(from: &buf), - immature: FfiConverterUInt64.read(from: &buf), - trustedPending: FfiConverterUInt64.read(from: &buf), - untrustedPending: FfiConverterUInt64.read(from: &buf), - spendable: FfiConverterUInt64.read(from: &buf), + confirmed: FfiConverterUInt64.read(from: &buf), + immature: FfiConverterUInt64.read(from: &buf), + trustedPending: FfiConverterUInt64.read(from: &buf), + untrustedPending: FfiConverterUInt64.read(from: &buf), + spendable: FfiConverterUInt64.read(from: &buf), total: FfiConverterUInt64.read(from: &buf) ) } @@ -12801,16 +13001,16 @@ public struct WalletParams { public init( /** * Extended public key (xpub/ypub/zpub/tpub/upub/vpub) - */extendedKey: String, + */extendedKey: String, /** * Electrum server URL for wallet sync - */electrumUrl: String, + */electrumUrl: String, /** * Root fingerprint hex (e.g. "73c5da0a"). Required for hardware wallet signing. - */fingerprint: String?, + */fingerprint: String?, /** * Bitcoin network (auto-detected from key prefix if not specified) - */network: Network?, + */network: Network?, /** * Override account type for ambiguous key prefixes (xpub/tpub) */accountType: AccountType?) { @@ -12867,10 +13067,10 @@ public struct FfiConverterTypeWalletParams: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WalletParams { return try WalletParams( - extendedKey: FfiConverterString.read(from: &buf), - electrumUrl: FfiConverterString.read(from: &buf), - fingerprint: FfiConverterOptionString.read(from: &buf), - network: FfiConverterOptionTypeNetwork.read(from: &buf), + extendedKey: FfiConverterString.read(from: &buf), + electrumUrl: FfiConverterString.read(from: &buf), + fingerprint: FfiConverterOptionString.read(from: &buf), + network: FfiConverterOptionTypeNetwork.read(from: &buf), accountType: FfiConverterOptionTypeAccountType.read(from: &buf) ) } @@ -12901,73 +13101,221 @@ public func FfiConverterTypeWalletParams_lower(_ value: WalletParams) -> RustBuf /** - * Errors specific to account info operations (BDK/Electrum-based). + * Parameters for starting an xpub transaction watcher. */ -public enum AccountInfoError: Swift.Error { - - - - /** - * The provided extended public key is invalid or cannot be parsed - */ - case InvalidExtendedKey(errorDetails: String - ) - /** - * The provided address is invalid - */ - case InvalidAddress(errorDetails: String - ) +public struct WatcherParams { /** - * Electrum connection or query failed - */ - case ElectrumError(errorDetails: String - ) - /** - * BDK wallet creation or operation error + * Caller-supplied identifier for this watcher. */ - case WalletError(errorDetails: String - ) + public var watcherId: String /** - * Wallet sync with Electrum failed + * Extended public key (xpub/ypub/zpub/tpub/upub/vpub). */ - case SyncError(errorDetails: String - ) + public var extendedKey: String /** - * The key type/prefix is not recognized + * Electrum server URL (e.g. "ssl://electrum.example.com:50002"). */ - case UnsupportedKeyType(errorDetails: String - ) + public var electrumUrl: String /** - * Network mismatch between key prefix and specified network + * Bitcoin network override (auto-detected from key prefix if None). */ - case NetworkMismatch(errorDetails: String - ) + public var network: Network? /** - * Invalid transaction ID provided + * Account type override (auto-detected from key prefix if None). */ - case InvalidTxid(errorDetails: String - ) + public var accountType: AccountType? /** - * A valid transaction ID was not found in the wallet + * Number of unused addresses to monitor beyond the last used (default 20). */ - case TransactionNotFound(errorDetails: String - ) -} + public var gapLimit: UInt32? + // Default memberwise initializers are never public by default, so we + // declare one manually. + public init( + /** + * Caller-supplied identifier for this watcher. + */watcherId: String, + /** + * Extended public key (xpub/ypub/zpub/tpub/upub/vpub). + */extendedKey: String, + /** + * Electrum server URL (e.g. "ssl://electrum.example.com:50002"). + */electrumUrl: String, + /** + * Bitcoin network override (auto-detected from key prefix if None). + */network: Network?, + /** + * Account type override (auto-detected from key prefix if None). + */accountType: AccountType?, + /** + * Number of unused addresses to monitor beyond the last used (default 20). + */gapLimit: UInt32?) { + self.watcherId = watcherId + self.extendedKey = extendedKey + self.electrumUrl = electrumUrl + self.network = network + self.accountType = accountType + self.gapLimit = gapLimit + } +} -#if swift(>=5.8) -@_documentation(visibility: private) +#if compiler(>=6) +extension WatcherParams: Sendable {} #endif -public struct FfiConverterTypeAccountInfoError: FfiConverterRustBuffer { - typealias SwiftType = AccountInfoError + + +extension WatcherParams: Equatable, Hashable { + public static func ==(lhs: WatcherParams, rhs: WatcherParams) -> Bool { + if lhs.watcherId != rhs.watcherId { + return false + } + if lhs.extendedKey != rhs.extendedKey { + return false + } + if lhs.electrumUrl != rhs.electrumUrl { + return false + } + if lhs.network != rhs.network { + return false + } + if lhs.accountType != rhs.accountType { + return false + } + if lhs.gapLimit != rhs.gapLimit { + return false + } + return true + } + + public func hash(into hasher: inout Hasher) { + hasher.combine(watcherId) + hasher.combine(extendedKey) + hasher.combine(electrumUrl) + hasher.combine(network) + hasher.combine(accountType) + hasher.combine(gapLimit) + } +} + +extension WatcherParams: Codable {} + + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeWatcherParams: FfiConverterRustBuffer { + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WatcherParams { + return + try WatcherParams( + watcherId: FfiConverterString.read(from: &buf), + extendedKey: FfiConverterString.read(from: &buf), + electrumUrl: FfiConverterString.read(from: &buf), + network: FfiConverterOptionTypeNetwork.read(from: &buf), + accountType: FfiConverterOptionTypeAccountType.read(from: &buf), + gapLimit: FfiConverterOptionUInt32.read(from: &buf) + ) + } + + public static func write(_ value: WatcherParams, into buf: inout [UInt8]) { + FfiConverterString.write(value.watcherId, into: &buf) + FfiConverterString.write(value.extendedKey, into: &buf) + FfiConverterString.write(value.electrumUrl, into: &buf) + FfiConverterOptionTypeNetwork.write(value.network, into: &buf) + FfiConverterOptionTypeAccountType.write(value.accountType, into: &buf) + FfiConverterOptionUInt32.write(value.gapLimit, into: &buf) + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeWatcherParams_lift(_ buf: RustBuffer) throws -> WatcherParams { + return try FfiConverterTypeWatcherParams.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeWatcherParams_lower(_ value: WatcherParams) -> RustBuffer { + return FfiConverterTypeWatcherParams.lower(value) +} + + +/** + * Errors specific to account info operations (BDK/Electrum-based). + */ +public enum AccountInfoError: Swift.Error { + + + + /** + * The provided extended public key is invalid or cannot be parsed + */ + case InvalidExtendedKey(errorDetails: String + ) + /** + * The provided address is invalid + */ + case InvalidAddress(errorDetails: String + ) + /** + * Electrum connection or query failed + */ + case ElectrumError(errorDetails: String + ) + /** + * BDK wallet creation or operation error + */ + case WalletError(errorDetails: String + ) + /** + * Wallet sync with Electrum failed + */ + case SyncError(errorDetails: String + ) + /** + * The key type/prefix is not recognized + */ + case UnsupportedKeyType(errorDetails: String + ) + /** + * Network mismatch between key prefix and specified network + */ + case NetworkMismatch(errorDetails: String + ) + /** + * Invalid transaction ID provided + */ + case InvalidTxid(errorDetails: String + ) + /** + * A valid transaction ID was not found in the wallet + */ + case TransactionNotFound(errorDetails: String + ) + /** + * Watcher lifecycle or subscription error + */ + case WatcherError(errorDetails: String + ) +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeAccountInfoError: FfiConverterRustBuffer { + typealias SwiftType = AccountInfoError public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AccountInfoError { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidExtendedKey( errorDetails: try FfiConverterString.read(from: &buf) ) @@ -12995,6 +13343,9 @@ public struct FfiConverterTypeAccountInfoError: FfiConverterRustBuffer { case 9: return .TransactionNotFound( errorDetails: try FfiConverterString.read(from: &buf) ) + case 10: return .WatcherError( + errorDetails: try FfiConverterString.read(from: &buf) + ) default: throw UniffiInternalError.unexpectedEnumCase } @@ -13003,54 +13354,59 @@ public struct FfiConverterTypeAccountInfoError: FfiConverterRustBuffer { public static func write(_ value: AccountInfoError, into buf: inout [UInt8]) { switch value { + - - - + + case let .InvalidExtendedKey(errorDetails): writeInt(&buf, Int32(1)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InvalidAddress(errorDetails): writeInt(&buf, Int32(2)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .ElectrumError(errorDetails): writeInt(&buf, Int32(3)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .WalletError(errorDetails): writeInt(&buf, Int32(4)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .SyncError(errorDetails): writeInt(&buf, Int32(5)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .UnsupportedKeyType(errorDetails): writeInt(&buf, Int32(6)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .NetworkMismatch(errorDetails): writeInt(&buf, Int32(7)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InvalidTxid(errorDetails): writeInt(&buf, Int32(8)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .TransactionNotFound(errorDetails): writeInt(&buf, Int32(9)) FfiConverterString.write(errorDetails, into: &buf) - + + + case let .WatcherError(errorDetails): + writeInt(&buf, Int32(10)) + FfiConverterString.write(errorDetails, into: &buf) + } } } @@ -13096,7 +13452,7 @@ extension AccountInfoError: Foundation.LocalizedError { */ public enum AccountType { - + /** * BIP44 legacy (P2PKH) — xpub/tpub prefix */ @@ -13129,38 +13485,38 @@ public struct FfiConverterTypeAccountType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AccountType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .legacy - + case 2: return .wrappedSegwit - + case 3: return .nativeSegwit - + case 4: return .taproot - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: AccountType, into buf: inout [UInt8]) { switch value { - - + + case .legacy: writeInt(&buf, Int32(1)) - - + + case .wrappedSegwit: writeInt(&buf, Int32(2)) - - + + case .nativeSegwit: writeInt(&buf, Int32(3)) - - + + case .taproot: writeInt(&buf, Int32(4)) - + } } } @@ -13194,7 +13550,7 @@ extension AccountType: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum Activity { - + case onchain(OnchainActivity ) case lightning(LightningActivity @@ -13215,30 +13571,30 @@ public struct FfiConverterTypeActivity: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Activity { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .onchain(try FfiConverterTypeOnchainActivity.read(from: &buf) ) - + case 2: return .lightning(try FfiConverterTypeLightningActivity.read(from: &buf) ) - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: Activity, into buf: inout [UInt8]) { switch value { - - + + case let .onchain(v1): writeInt(&buf, Int32(1)) FfiConverterTypeOnchainActivity.write(v1, into: &buf) - - + + case let .lightning(v1): writeInt(&buf, Int32(2)) FfiConverterTypeLightningActivity.write(v1, into: &buf) - + } } } @@ -13271,8 +13627,8 @@ extension Activity: Codable {} public enum ActivityError: Swift.Error { - - + + case InvalidActivity(errorDetails: String ) case InitializationError(errorDetails: String @@ -13300,9 +13656,9 @@ public struct FfiConverterTypeActivityError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidActivity( errorDetails: try FfiConverterString.read(from: &buf) ) @@ -13332,44 +13688,44 @@ public struct FfiConverterTypeActivityError: FfiConverterRustBuffer { public static func write(_ value: ActivityError, into buf: inout [UInt8]) { switch value { + - - - + + case let .InvalidActivity(errorDetails): writeInt(&buf, Int32(1)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InitializationError(errorDetails): writeInt(&buf, Int32(2)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InsertError(errorDetails): writeInt(&buf, Int32(3)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .RetrievalError(errorDetails): writeInt(&buf, Int32(4)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .DataError(errorDetails): writeInt(&buf, Int32(5)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .ConnectionError(errorDetails): writeInt(&buf, Int32(6)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .SerializationError(errorDetails): writeInt(&buf, Int32(7)) FfiConverterString.write(errorDetails, into: &buf) - + } } } @@ -13410,7 +13766,7 @@ extension ActivityError: Foundation.LocalizedError { // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ActivityFilter { - + case all case lightning case onchain @@ -13430,32 +13786,32 @@ public struct FfiConverterTypeActivityFilter: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ActivityFilter { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .all - + case 2: return .lightning - + case 3: return .onchain - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ActivityFilter, into buf: inout [UInt8]) { switch value { - - + + case .all: writeInt(&buf, Int32(1)) - - + + case .lightning: writeInt(&buf, Int32(2)) - - + + case .onchain: writeInt(&buf, Int32(3)) - + } } } @@ -13489,7 +13845,7 @@ extension ActivityFilter: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ActivityType { - + case onchain case lightning } @@ -13508,26 +13864,26 @@ public struct FfiConverterTypeActivityType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ActivityType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .onchain - + case 2: return .lightning - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ActivityType, into buf: inout [UInt8]) { switch value { - - + + case .onchain: writeInt(&buf, Int32(1)) - - + + case .lightning: writeInt(&buf, Int32(2)) - + } } } @@ -13560,8 +13916,8 @@ extension ActivityType: Codable {} public enum AddressError: Swift.Error { - - + + case InvalidAddress case InvalidNetwork case MnemonicGenerationFailed @@ -13581,9 +13937,9 @@ public struct FfiConverterTypeAddressError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidAddress case 2: return .InvalidNetwork case 3: return .MnemonicGenerationFailed @@ -13598,33 +13954,33 @@ public struct FfiConverterTypeAddressError: FfiConverterRustBuffer { public static func write(_ value: AddressError, into buf: inout [UInt8]) { switch value { + - - - + + case .InvalidAddress: writeInt(&buf, Int32(1)) - - + + case .InvalidNetwork: writeInt(&buf, Int32(2)) - - + + case .MnemonicGenerationFailed: writeInt(&buf, Int32(3)) - - + + case .InvalidMnemonic: writeInt(&buf, Int32(4)) - - + + case .InvalidEntropy: writeInt(&buf, Int32(5)) - - + + case .AddressDerivationFailed: writeInt(&buf, Int32(6)) - + } } } @@ -13665,7 +14021,7 @@ extension AddressError: Foundation.LocalizedError { // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum AddressType { - + case p2pkh case p2sh case p2wpkh @@ -13688,50 +14044,50 @@ public struct FfiConverterTypeAddressType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> AddressType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .p2pkh - + case 2: return .p2sh - + case 3: return .p2wpkh - + case 4: return .p2wsh - + case 5: return .p2tr - + case 6: return .unknown - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: AddressType, into buf: inout [UInt8]) { switch value { - - + + case .p2pkh: writeInt(&buf, Int32(1)) - - + + case .p2sh: writeInt(&buf, Int32(2)) - - + + case .p2wpkh: writeInt(&buf, Int32(3)) - - + + case .p2wsh: writeInt(&buf, Int32(4)) - - + + case .p2tr: writeInt(&buf, Int32(5)) - - + + case .unknown: writeInt(&buf, Int32(6)) - + } } } @@ -13765,7 +14121,7 @@ extension AddressType: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BitcoinNetworkEnum { - + case mainnet case testnet case signet @@ -13786,38 +14142,38 @@ public struct FfiConverterTypeBitcoinNetworkEnum: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BitcoinNetworkEnum { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .mainnet - + case 2: return .testnet - + case 3: return .signet - + case 4: return .regtest - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BitcoinNetworkEnum, into buf: inout [UInt8]) { switch value { - - + + case .mainnet: writeInt(&buf, Int32(1)) - - + + case .testnet: writeInt(&buf, Int32(2)) - - + + case .signet: writeInt(&buf, Int32(3)) - - + + case .regtest: writeInt(&buf, Int32(4)) - + } } } @@ -13850,8 +14206,8 @@ extension BitcoinNetworkEnum: Codable {} public enum BlocktankError: Swift.Error { - - + + case HttpClient(errorDetails: String ) case BlocktankClient(errorDetails: String @@ -13891,9 +14247,9 @@ public struct FfiConverterTypeBlocktankError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .HttpClient( errorDetails: try FfiConverterString.read(from: &buf) ) @@ -13922,7 +14278,7 @@ public struct FfiConverterTypeBlocktankError: FfiConverterRustBuffer { errorDetails: try FfiConverterString.read(from: &buf) ) case 10: return .ChannelOpen( - errorType: try FfiConverterTypeBtChannelOrderErrorType.read(from: &buf), + errorType: try FfiConverterTypeBtChannelOrderErrorType.read(from: &buf), errorDetails: try FfiConverterString.read(from: &buf) ) case 11: return .OrderState( @@ -13942,75 +14298,75 @@ public struct FfiConverterTypeBlocktankError: FfiConverterRustBuffer { public static func write(_ value: BlocktankError, into buf: inout [UInt8]) { switch value { + - - - + + case let .HttpClient(errorDetails): writeInt(&buf, Int32(1)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .BlocktankClient(errorDetails): writeInt(&buf, Int32(2)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InvalidBlocktank(errorDetails): writeInt(&buf, Int32(3)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InitializationError(errorDetails): writeInt(&buf, Int32(4)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InsertError(errorDetails): writeInt(&buf, Int32(5)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .RetrievalError(errorDetails): writeInt(&buf, Int32(6)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .DataError(errorDetails): writeInt(&buf, Int32(7)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .ConnectionError(errorDetails): writeInt(&buf, Int32(8)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .SerializationError(errorDetails): writeInt(&buf, Int32(9)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .ChannelOpen(errorType,errorDetails): writeInt(&buf, Int32(10)) FfiConverterTypeBtChannelOrderErrorType.write(errorType, into: &buf) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .OrderState(errorDetails): writeInt(&buf, Int32(11)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InvalidParameter(errorDetails): writeInt(&buf, Int32(12)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .DatabaseError(errorDetails): writeInt(&buf, Int32(13)) FfiConverterString.write(errorDetails, into: &buf) - + } } } @@ -14050,8 +14406,8 @@ extension BlocktankError: Foundation.LocalizedError { public enum BroadcastError: Swift.Error { - - + + case InvalidHex(errorDetails: String ) case InvalidTransaction(errorDetails: String @@ -14073,9 +14429,9 @@ public struct FfiConverterTypeBroadcastError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidHex( errorDetails: try FfiConverterString.read(from: &buf) ) @@ -14096,29 +14452,29 @@ public struct FfiConverterTypeBroadcastError: FfiConverterRustBuffer { public static func write(_ value: BroadcastError, into buf: inout [UInt8]) { switch value { + - - - + + case let .InvalidHex(errorDetails): writeInt(&buf, Int32(1)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .InvalidTransaction(errorDetails): writeInt(&buf, Int32(2)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .ElectrumError(errorDetails): writeInt(&buf, Int32(3)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .TaskError(errorDetails): writeInt(&buf, Int32(4)) FfiConverterString.write(errorDetails, into: &buf) - + } } } @@ -14159,7 +14515,7 @@ extension BroadcastError: Foundation.LocalizedError { // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtBolt11InvoiceState { - + case pending case holding case paid @@ -14180,38 +14536,38 @@ public struct FfiConverterTypeBtBolt11InvoiceState: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtBolt11InvoiceState { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .pending - + case 2: return .holding - + case 3: return .paid - + case 4: return .canceled - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtBolt11InvoiceState, into buf: inout [UInt8]) { switch value { - - + + case .pending: writeInt(&buf, Int32(1)) - - + + case .holding: writeInt(&buf, Int32(2)) - - + + case .paid: writeInt(&buf, Int32(3)) - - + + case .canceled: writeInt(&buf, Int32(4)) - + } } } @@ -14245,7 +14601,7 @@ extension BtBolt11InvoiceState: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtChannelOrderErrorType { - + case wrongOrderState case peerNotReachable case channelRejectedByDestination @@ -14267,44 +14623,44 @@ public struct FfiConverterTypeBtChannelOrderErrorType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtChannelOrderErrorType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .wrongOrderState - + case 2: return .peerNotReachable - + case 3: return .channelRejectedByDestination - + case 4: return .channelRejectedByLsp - + case 5: return .blocktankNotReady - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtChannelOrderErrorType, into buf: inout [UInt8]) { switch value { - - + + case .wrongOrderState: writeInt(&buf, Int32(1)) - - + + case .peerNotReachable: writeInt(&buf, Int32(2)) - - + + case .channelRejectedByDestination: writeInt(&buf, Int32(3)) - - + + case .channelRejectedByLsp: writeInt(&buf, Int32(4)) - - + + case .blocktankNotReady: writeInt(&buf, Int32(5)) - + } } } @@ -14338,7 +14694,7 @@ extension BtChannelOrderErrorType: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtOpenChannelState { - + case opening case `open` case closed @@ -14358,32 +14714,32 @@ public struct FfiConverterTypeBtOpenChannelState: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtOpenChannelState { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .opening - + case 2: return .`open` - + case 3: return .closed - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtOpenChannelState, into buf: inout [UInt8]) { switch value { - - + + case .opening: writeInt(&buf, Int32(1)) - - + + case .`open`: writeInt(&buf, Int32(2)) - - + + case .closed: writeInt(&buf, Int32(3)) - + } } } @@ -14417,7 +14773,7 @@ extension BtOpenChannelState: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtOrderState { - + case created case expired case `open` @@ -14438,38 +14794,38 @@ public struct FfiConverterTypeBtOrderState: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtOrderState { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .created - + case 2: return .expired - + case 3: return .`open` - + case 4: return .closed - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtOrderState, into buf: inout [UInt8]) { switch value { - - + + case .created: writeInt(&buf, Int32(1)) - - + + case .expired: writeInt(&buf, Int32(2)) - - + + case .`open`: writeInt(&buf, Int32(3)) - - + + case .closed: writeInt(&buf, Int32(4)) - + } } } @@ -14503,7 +14859,7 @@ extension BtOrderState: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtOrderState2 { - + case created case expired case executed @@ -14524,38 +14880,38 @@ public struct FfiConverterTypeBtOrderState2: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtOrderState2 { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .created - + case 2: return .expired - + case 3: return .executed - + case 4: return .paid - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtOrderState2, into buf: inout [UInt8]) { switch value { - - + + case .created: writeInt(&buf, Int32(1)) - - + + case .expired: writeInt(&buf, Int32(2)) - - + + case .executed: writeInt(&buf, Int32(3)) - - + + case .paid: writeInt(&buf, Int32(4)) - + } } } @@ -14589,7 +14945,7 @@ extension BtOrderState2: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtPaymentState { - + case created case partiallyPaid case paid @@ -14611,44 +14967,44 @@ public struct FfiConverterTypeBtPaymentState: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtPaymentState { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .created - + case 2: return .partiallyPaid - + case 3: return .paid - + case 4: return .refunded - + case 5: return .refundAvailable - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtPaymentState, into buf: inout [UInt8]) { switch value { - - + + case .created: writeInt(&buf, Int32(1)) - - + + case .partiallyPaid: writeInt(&buf, Int32(2)) - - + + case .paid: writeInt(&buf, Int32(3)) - - + + case .refunded: writeInt(&buf, Int32(4)) - - + + case .refundAvailable: writeInt(&buf, Int32(5)) - + } } } @@ -14682,7 +15038,7 @@ extension BtPaymentState: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum BtPaymentState2 { - + case created case paid case refunded @@ -14704,44 +15060,44 @@ public struct FfiConverterTypeBtPaymentState2: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> BtPaymentState2 { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .created - + case 2: return .paid - + case 3: return .refunded - + case 4: return .refundAvailable - + case 5: return .canceled - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: BtPaymentState2, into buf: inout [UInt8]) { switch value { - - + + case .created: writeInt(&buf, Int32(1)) - - + + case .paid: writeInt(&buf, Int32(2)) - - + + case .refunded: writeInt(&buf, Int32(3)) - - + + case .refundAvailable: writeInt(&buf, Int32(4)) - - + + case .canceled: writeInt(&buf, Int32(5)) - + } } } @@ -14775,7 +15131,7 @@ extension BtPaymentState2: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum CJitStateEnum { - + case created case completed case expired @@ -14796,38 +15152,38 @@ public struct FfiConverterTypeCJitStateEnum: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CJitStateEnum { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .created - + case 2: return .completed - + case 3: return .expired - + case 4: return .failed - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CJitStateEnum, into buf: inout [UInt8]) { switch value { - - + + case .created: writeInt(&buf, Int32(1)) - - + + case .completed: writeInt(&buf, Int32(2)) - - + + case .expired: writeInt(&buf, Int32(3)) - - + + case .failed: writeInt(&buf, Int32(4)) - + } } } @@ -14864,7 +15220,7 @@ extension CJitStateEnum: Codable {} */ public enum CoinSelection { - + /** * Branch-and-bound (default). Minimizes change by searching for exact matches. */ @@ -14893,32 +15249,32 @@ public struct FfiConverterTypeCoinSelection: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CoinSelection { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .branchAndBound - + case 2: return .largestFirst - + case 3: return .oldestFirst - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: CoinSelection, into buf: inout [UInt8]) { switch value { - - + + case .branchAndBound: writeInt(&buf, Int32(1)) - - + + case .largestFirst: writeInt(&buf, Int32(2)) - - + + case .oldestFirst: writeInt(&buf, Int32(3)) - + } } } @@ -14955,7 +15311,7 @@ extension CoinSelection: Codable {} */ public enum ComposeOutput { - + /** * Payment to a specific address with a fixed amount (satoshis) */ @@ -14987,39 +15343,39 @@ public struct FfiConverterTypeComposeOutput: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ComposeOutput { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .payment(address: try FfiConverterString.read(from: &buf), amountSats: try FfiConverterUInt64.read(from: &buf) ) - + case 2: return .sendMax(address: try FfiConverterString.read(from: &buf) ) - + case 3: return .opReturn(dataHex: try FfiConverterString.read(from: &buf) ) - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ComposeOutput, into buf: inout [UInt8]) { switch value { - - + + case let .payment(address,amountSats): writeInt(&buf, Int32(1)) FfiConverterString.write(address, into: &buf) FfiConverterUInt64.write(amountSats, into: &buf) - - + + case let .sendMax(address): writeInt(&buf, Int32(2)) FfiConverterString.write(address, into: &buf) - - + + case let .opReturn(dataHex): writeInt(&buf, Int32(3)) FfiConverterString.write(dataHex, into: &buf) - + } } } @@ -15056,20 +15412,20 @@ extension ComposeOutput: Codable {} */ public enum ComposeResult { - + /** * Successfully built a signable PSBT */ case success( /** * Base64-encoded PSBT ready for signing - */psbt: String, + */psbt: String, /** * Total fee in satoshis - */fee: UInt64, + */fee: UInt64, /** * Target fee rate in sat/vB (actual may differ slightly due to rounding) - */feeRate: Float, + */feeRate: Float, /** * Total value spent (payments + fee, excluding change). * Uses BDK's `sent - received` semantics, which may undercount for @@ -15097,33 +15453,33 @@ public struct FfiConverterTypeComposeResult: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ComposeResult { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .success(psbt: try FfiConverterString.read(from: &buf), fee: try FfiConverterUInt64.read(from: &buf), feeRate: try FfiConverterFloat.read(from: &buf), totalSpent: try FfiConverterUInt64.read(from: &buf) ) - + case 2: return .error(error: try FfiConverterString.read(from: &buf) ) - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ComposeResult, into buf: inout [UInt8]) { switch value { - - + + case let .success(psbt,fee,feeRate,totalSpent): writeInt(&buf, Int32(1)) FfiConverterString.write(psbt, into: &buf) FfiConverterUInt64.write(fee, into: &buf) FfiConverterFloat.write(feeRate, into: &buf) FfiConverterUInt64.write(totalSpent, into: &buf) - - + + case let .error(error): writeInt(&buf, Int32(2)) FfiConverterString.write(error, into: &buf) - + } } } @@ -15156,8 +15512,8 @@ extension ComposeResult: Codable {} public enum DbError: Swift.Error { - - + + case DbActivityError(errorDetails: ActivityError ) case DbBlocktankError(errorDetails: BlocktankError @@ -15177,9 +15533,9 @@ public struct FfiConverterTypeDbError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .DbActivityError( errorDetails: try FfiConverterTypeActivityError.read(from: &buf) ) @@ -15197,24 +15553,24 @@ public struct FfiConverterTypeDbError: FfiConverterRustBuffer { public static func write(_ value: DbError, into buf: inout [UInt8]) { switch value { + - - - + + case let .DbActivityError(errorDetails): writeInt(&buf, Int32(1)) FfiConverterTypeActivityError.write(errorDetails, into: &buf) - - + + case let .DbBlocktankError(errorDetails): writeInt(&buf, Int32(2)) FfiConverterTypeBlocktankError.write(errorDetails, into: &buf) - - + + case let .InitializationError(errorDetails): writeInt(&buf, Int32(3)) FfiConverterString.write(errorDetails, into: &buf) - + } } } @@ -15254,8 +15610,8 @@ extension DbError: Foundation.LocalizedError { public enum DecodingError: Swift.Error { - - + + case InvalidFormat case InvalidNetwork case InvalidAmount @@ -15283,15 +15639,15 @@ public struct FfiConverterTypeDecodingError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidFormat case 2: return .InvalidNetwork case 3: return .InvalidAmount case 4: return .InvalidLnurlPayAmount( - amountSatoshis: try FfiConverterUInt64.read(from: &buf), - min: try FfiConverterUInt64.read(from: &buf), + amountSatoshis: try FfiConverterUInt64.read(from: &buf), + min: try FfiConverterUInt64.read(from: &buf), max: try FfiConverterUInt64.read(from: &buf) ) case 5: return .InvalidTimestamp @@ -15312,61 +15668,61 @@ public struct FfiConverterTypeDecodingError: FfiConverterRustBuffer { public static func write(_ value: DecodingError, into buf: inout [UInt8]) { switch value { + - - - + + case .InvalidFormat: writeInt(&buf, Int32(1)) - - + + case .InvalidNetwork: writeInt(&buf, Int32(2)) - - + + case .InvalidAmount: writeInt(&buf, Int32(3)) - - + + case let .InvalidLnurlPayAmount(amountSatoshis,min,max): writeInt(&buf, Int32(4)) FfiConverterUInt64.write(amountSatoshis, into: &buf) FfiConverterUInt64.write(min, into: &buf) FfiConverterUInt64.write(max, into: &buf) - - + + case .InvalidTimestamp: writeInt(&buf, Int32(5)) - - + + case .InvalidChecksum: writeInt(&buf, Int32(6)) - - + + case .InvalidResponse: writeInt(&buf, Int32(7)) - - + + case .UnsupportedType: writeInt(&buf, Int32(8)) - - + + case .InvalidAddress: writeInt(&buf, Int32(9)) - - + + case .RequestFailed: writeInt(&buf, Int32(10)) - - + + case .ClientCreationFailed: writeInt(&buf, Int32(11)) - - + + case let .InvoiceCreationFailed(errorMessage): writeInt(&buf, Int32(12)) FfiConverterString.write(errorMessage, into: &buf) - + } } } @@ -15406,8 +15762,8 @@ extension DecodingError: Foundation.LocalizedError { public enum LnurlError: Swift.Error { - - + + case InvalidAddress case ClientCreationFailed case RequestFailed @@ -15430,16 +15786,16 @@ public struct FfiConverterTypeLnurlError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidAddress case 2: return .ClientCreationFailed case 3: return .RequestFailed case 4: return .InvalidResponse case 5: return .InvalidAmount( - amountSatoshis: try FfiConverterUInt64.read(from: &buf), - min: try FfiConverterUInt64.read(from: &buf), + amountSatoshis: try FfiConverterUInt64.read(from: &buf), + min: try FfiConverterUInt64.read(from: &buf), max: try FfiConverterUInt64.read(from: &buf) ) case 6: return .InvoiceCreationFailed( @@ -15454,41 +15810,41 @@ public struct FfiConverterTypeLnurlError: FfiConverterRustBuffer { public static func write(_ value: LnurlError, into buf: inout [UInt8]) { switch value { + - - - + + case .InvalidAddress: writeInt(&buf, Int32(1)) - - + + case .ClientCreationFailed: writeInt(&buf, Int32(2)) - - + + case .RequestFailed: writeInt(&buf, Int32(3)) - - + + case .InvalidResponse: writeInt(&buf, Int32(4)) - - + + case let .InvalidAmount(amountSatoshis,min,max): writeInt(&buf, Int32(5)) FfiConverterUInt64.write(amountSatoshis, into: &buf) FfiConverterUInt64.write(min, into: &buf) FfiConverterUInt64.write(max, into: &buf) - - + + case let .InvoiceCreationFailed(errorDetails): writeInt(&buf, Int32(6)) FfiConverterString.write(errorDetails, into: &buf) - - + + case .AuthenticationFailed: writeInt(&buf, Int32(7)) - + } } } @@ -15529,7 +15885,7 @@ extension LnurlError: Foundation.LocalizedError { // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum ManualRefundStateEnum { - + case created case approved case rejected @@ -15550,38 +15906,38 @@ public struct FfiConverterTypeManualRefundStateEnum: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ManualRefundStateEnum { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .created - + case 2: return .approved - + case 3: return .rejected - + case 4: return .sent - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: ManualRefundStateEnum, into buf: inout [UInt8]) { switch value { - - + + case .created: writeInt(&buf, Int32(1)) - - + + case .approved: writeInt(&buf, Int32(2)) - - + + case .rejected: writeInt(&buf, Int32(3)) - - + + case .sent: writeInt(&buf, Int32(4)) - + } } } @@ -15615,7 +15971,7 @@ extension ManualRefundStateEnum: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum Network { - + /** * Mainnet Bitcoin. */ @@ -15652,44 +16008,44 @@ public struct FfiConverterTypeNetwork: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Network { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .bitcoin - + case 2: return .testnet - + case 3: return .testnet4 - + case 4: return .signet - + case 5: return .regtest - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: Network, into buf: inout [UInt8]) { switch value { - - + + case .bitcoin: writeInt(&buf, Int32(1)) - - + + case .testnet: writeInt(&buf, Int32(2)) - - + + case .testnet4: writeInt(&buf, Int32(3)) - - + + case .signet: writeInt(&buf, Int32(4)) - - + + case .regtest: writeInt(&buf, Int32(5)) - + } } } @@ -15723,7 +16079,7 @@ extension Network: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum NetworkType { - + case bitcoin case testnet case regtest @@ -15744,38 +16100,38 @@ public struct FfiConverterTypeNetworkType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NetworkType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .bitcoin - + case 2: return .testnet - + case 3: return .regtest - + case 4: return .signet - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: NetworkType, into buf: inout [UInt8]) { switch value { - - + + case .bitcoin: writeInt(&buf, Int32(1)) - - + + case .testnet: writeInt(&buf, Int32(2)) - - + + case .regtest: writeInt(&buf, Int32(3)) - - + + case .signet: writeInt(&buf, Int32(4)) - + } } } @@ -15809,7 +16165,7 @@ extension NetworkType: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum PassphraseResponse { - + /** * User cancelled — aborts the pending operation. */ @@ -15843,40 +16199,40 @@ public struct FfiConverterTypePassphraseResponse: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PassphraseResponse { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .cancel - + case 2: return .standard - + case 3: return .hidden(value: try FfiConverterString.read(from: &buf) ) - + case 4: return .onDevice - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: PassphraseResponse, into buf: inout [UInt8]) { switch value { - - + + case .cancel: writeInt(&buf, Int32(1)) - - + + case .standard: writeInt(&buf, Int32(2)) - - + + case let .hidden(value): writeInt(&buf, Int32(3)) FfiConverterString.write(value, into: &buf) - - + + case .onDevice: writeInt(&buf, Int32(4)) - + } } } @@ -15910,7 +16266,7 @@ extension PassphraseResponse: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum PaymentState { - + case pending case succeeded case failed @@ -15930,32 +16286,32 @@ public struct FfiConverterTypePaymentState: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PaymentState { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .pending - + case 2: return .succeeded - + case 3: return .failed - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: PaymentState, into buf: inout [UInt8]) { switch value { - - + + case .pending: writeInt(&buf, Int32(1)) - - + + case .succeeded: writeInt(&buf, Int32(2)) - - + + case .failed: writeInt(&buf, Int32(3)) - + } } } @@ -15989,7 +16345,7 @@ extension PaymentState: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum PaymentType { - + case sent case received } @@ -16008,26 +16364,26 @@ public struct FfiConverterTypePaymentType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PaymentType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .sent - + case 2: return .received - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: PaymentType, into buf: inout [UInt8]) { switch value { - - + + case .sent: writeInt(&buf, Int32(1)) - - + + case .received: writeInt(&buf, Int32(2)) - + } } } @@ -16064,7 +16420,7 @@ extension PaymentType: Codable {} */ public enum PubkyAuthKind { - + case signin case signup } @@ -16083,26 +16439,26 @@ public struct FfiConverterTypePubkyAuthKind: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PubkyAuthKind { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .signin - + case 2: return .signup - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: PubkyAuthKind, into buf: inout [UInt8]) { switch value { - - + + case .signin: writeInt(&buf, Int32(1)) - - + + case .signup: writeInt(&buf, Int32(2)) - + } } } @@ -16135,8 +16491,8 @@ extension PubkyAuthKind: Codable {} public enum PubkyError: Swift.Error { - - + + case InvalidCapabilities(reason: String ) case AuthFailed(reason: String @@ -16166,9 +16522,9 @@ public struct FfiConverterTypePubkyError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .InvalidCapabilities( reason: try FfiConverterString.read(from: &buf) ) @@ -16200,52 +16556,52 @@ public struct FfiConverterTypePubkyError: FfiConverterRustBuffer { public static func write(_ value: PubkyError, into buf: inout [UInt8]) { switch value { + - - - + + case let .InvalidCapabilities(reason): writeInt(&buf, Int32(1)) FfiConverterString.write(reason, into: &buf) - - + + case let .AuthFailed(reason): writeInt(&buf, Int32(2)) FfiConverterString.write(reason, into: &buf) - - + + case .NoActiveFlow: writeInt(&buf, Int32(3)) - - + + case let .ResolutionFailed(reason): writeInt(&buf, Int32(4)) FfiConverterString.write(reason, into: &buf) - - + + case let .FetchFailed(reason): writeInt(&buf, Int32(5)) FfiConverterString.write(reason, into: &buf) - - + + case .ProfileNotFound: writeInt(&buf, Int32(6)) - - + + case let .ProfileParseFailed(reason): writeInt(&buf, Int32(7)) FfiConverterString.write(reason, into: &buf) - - + + case let .KeyError(reason): writeInt(&buf, Int32(8)) FfiConverterString.write(reason, into: &buf) - - + + case let .WriteFailed(reason): writeInt(&buf, Int32(9)) FfiConverterString.write(reason, into: &buf) - + } } } @@ -16286,7 +16642,7 @@ extension PubkyError: Foundation.LocalizedError { // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum Scanner { - + case onChain(invoice: OnChainInvoice ) case lightning(invoice: LightningInvoice @@ -16323,96 +16679,96 @@ public struct FfiConverterTypeScanner: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Scanner { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .onChain(invoice: try FfiConverterTypeOnChainInvoice.read(from: &buf) ) - + case 2: return .lightning(invoice: try FfiConverterTypeLightningInvoice.read(from: &buf) ) - + case 3: return .pubkyAuth(data: try FfiConverterString.read(from: &buf) ) - + case 4: return .lnurlChannel(data: try FfiConverterTypeLnurlChannelData.read(from: &buf) ) - + case 5: return .lnurlAuth(data: try FfiConverterTypeLnurlAuthData.read(from: &buf) ) - + case 6: return .lnurlWithdraw(data: try FfiConverterTypeLnurlWithdrawData.read(from: &buf) ) - + case 7: return .lnurlAddress(data: try FfiConverterTypeLnurlAddressData.read(from: &buf) ) - + case 8: return .lnurlPay(data: try FfiConverterTypeLnurlPayData.read(from: &buf) ) - + case 9: return .nodeId(url: try FfiConverterString.read(from: &buf), network: try FfiConverterTypeNetworkType.read(from: &buf) ) - + case 10: return .gift(code: try FfiConverterString.read(from: &buf), amount: try FfiConverterUInt64.read(from: &buf) ) - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: Scanner, into buf: inout [UInt8]) { switch value { - - + + case let .onChain(invoice): writeInt(&buf, Int32(1)) FfiConverterTypeOnChainInvoice.write(invoice, into: &buf) - - + + case let .lightning(invoice): writeInt(&buf, Int32(2)) FfiConverterTypeLightningInvoice.write(invoice, into: &buf) - - + + case let .pubkyAuth(data): writeInt(&buf, Int32(3)) FfiConverterString.write(data, into: &buf) - - + + case let .lnurlChannel(data): writeInt(&buf, Int32(4)) FfiConverterTypeLnurlChannelData.write(data, into: &buf) - - + + case let .lnurlAuth(data): writeInt(&buf, Int32(5)) FfiConverterTypeLnurlAuthData.write(data, into: &buf) - - + + case let .lnurlWithdraw(data): writeInt(&buf, Int32(6)) FfiConverterTypeLnurlWithdrawData.write(data, into: &buf) - - + + case let .lnurlAddress(data): writeInt(&buf, Int32(7)) FfiConverterTypeLnurlAddressData.write(data, into: &buf) - - + + case let .lnurlPay(data): writeInt(&buf, Int32(8)) FfiConverterTypeLnurlPayData.write(data, into: &buf) - - + + case let .nodeId(url,network): writeInt(&buf, Int32(9)) FfiConverterString.write(url, into: &buf) FfiConverterTypeNetworkType.write(network, into: &buf) - - + + case let .gift(code,amount): writeInt(&buf, Int32(10)) FfiConverterString.write(code, into: &buf) FfiConverterUInt64.write(amount, into: &buf) - + } } } @@ -16446,7 +16802,7 @@ extension Scanner: Codable {} // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. public enum SortDirection { - + case asc case desc } @@ -16465,26 +16821,26 @@ public struct FfiConverterTypeSortDirection: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SortDirection { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .asc - + case 2: return .desc - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: SortDirection, into buf: inout [UInt8]) { switch value { - - + + case .asc: writeInt(&buf, Int32(1)) - - + + case .desc: writeInt(&buf, Int32(2)) - + } } } @@ -16517,8 +16873,8 @@ extension SortDirection: Codable {} public enum SweepError: Swift.Error { - - + + case SweepFailed(String ) case NoUtxosFound @@ -16536,9 +16892,9 @@ public struct FfiConverterTypeSweepError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .SweepFailed( try FfiConverterString.read(from: &buf) ) @@ -16552,22 +16908,22 @@ public struct FfiConverterTypeSweepError: FfiConverterRustBuffer { public static func write(_ value: SweepError, into buf: inout [UInt8]) { switch value { + - - - + + case let .SweepFailed(v1): writeInt(&buf, Int32(1)) FfiConverterString.write(v1, into: &buf) - - + + case .NoUtxosFound: writeInt(&buf, Int32(2)) - - + + case .InvalidMnemonic: writeInt(&buf, Int32(3)) - + } } } @@ -16611,7 +16967,7 @@ extension SweepError: Foundation.LocalizedError { */ public enum TrezorCoinType { - + /** * Bitcoin mainnet */ @@ -16644,38 +17000,38 @@ public struct FfiConverterTypeTrezorCoinType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorCoinType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .bitcoin - + case 2: return .testnet - + case 3: return .signet - + case 4: return .regtest - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: TrezorCoinType, into buf: inout [UInt8]) { switch value { - - + + case .bitcoin: writeInt(&buf, Int32(1)) - - + + case .testnet: writeInt(&buf, Int32(2)) - - + + case .signet: writeInt(&buf, Int32(3)) - - + + case .regtest: writeInt(&buf, Int32(4)) - + } } } @@ -16711,8 +17067,8 @@ extension TrezorCoinType: Codable {} */ public enum TrezorError: Swift.Error { - - + + /** * Transport layer error (USB/Bluetooth communication) */ @@ -16814,9 +17170,9 @@ public struct FfiConverterTypeTrezorError: FfiConverterRustBuffer { let variant: Int32 = try readInt(&buf) switch variant { + - - + case 1: return .TransportError( errorDetails: try FfiConverterString.read(from: &buf) ) @@ -16861,97 +17217,97 @@ public struct FfiConverterTypeTrezorError: FfiConverterRustBuffer { public static func write(_ value: TrezorError, into buf: inout [UInt8]) { switch value { + - - - + + case let .TransportError(errorDetails): writeInt(&buf, Int32(1)) FfiConverterString.write(errorDetails, into: &buf) - - + + case .DeviceNotFound: writeInt(&buf, Int32(2)) - - + + case .DeviceDisconnected: writeInt(&buf, Int32(3)) - - + + case let .ConnectionError(errorDetails): writeInt(&buf, Int32(4)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .ProtocolError(errorDetails): writeInt(&buf, Int32(5)) FfiConverterString.write(errorDetails, into: &buf) - - + + case .PairingRequired: writeInt(&buf, Int32(6)) - - + + case let .PairingFailed(errorDetails): writeInt(&buf, Int32(7)) FfiConverterString.write(errorDetails, into: &buf) - - + + case .PinRequired: writeInt(&buf, Int32(8)) - - + + case .PinCancelled: writeInt(&buf, Int32(9)) - - + + case .InvalidPin: writeInt(&buf, Int32(10)) - - + + case .PassphraseRequired: writeInt(&buf, Int32(11)) - - + + case .PassphraseCancelled: writeInt(&buf, Int32(12)) - - + + case .UserCancelled: writeInt(&buf, Int32(13)) - - + + case .Timeout: writeInt(&buf, Int32(14)) - - + + case let .InvalidPath(errorDetails): writeInt(&buf, Int32(15)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .DeviceError(errorDetails): writeInt(&buf, Int32(16)) FfiConverterString.write(errorDetails, into: &buf) - - + + case .NotInitialized: writeInt(&buf, Int32(17)) - - + + case .NotConnected: writeInt(&buf, Int32(18)) - - + + case let .SessionError(errorDetails): writeInt(&buf, Int32(19)) FfiConverterString.write(errorDetails, into: &buf) - - + + case let .IoError(errorDetails): writeInt(&buf, Int32(20)) FfiConverterString.write(errorDetails, into: &buf) - + } } } @@ -16995,7 +17351,7 @@ extension TrezorError: Foundation.LocalizedError { */ public enum TrezorScriptType { - + /** * P2PKH (legacy) */ @@ -17036,50 +17392,50 @@ public struct FfiConverterTypeTrezorScriptType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorScriptType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .spendAddress - + case 2: return .spendP2shWitness - + case 3: return .spendWitness - + case 4: return .spendTaproot - + case 5: return .spendMultisig - + case 6: return .external - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: TrezorScriptType, into buf: inout [UInt8]) { switch value { - - + + case .spendAddress: writeInt(&buf, Int32(1)) - - + + case .spendP2shWitness: writeInt(&buf, Int32(2)) - - + + case .spendWitness: writeInt(&buf, Int32(3)) - - + + case .spendTaproot: writeInt(&buf, Int32(4)) - - + + case .spendMultisig: writeInt(&buf, Int32(5)) - - + + case .external: writeInt(&buf, Int32(6)) - + } } } @@ -17116,7 +17472,7 @@ extension TrezorScriptType: Codable {} */ public enum TrezorTransportType { - + /** * USB connection */ @@ -17141,26 +17497,26 @@ public struct FfiConverterTypeTrezorTransportType: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TrezorTransportType { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .usb - + case 2: return .bluetooth - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: TrezorTransportType, into buf: inout [UInt8]) { switch value { - - + + case .usb: writeInt(&buf, Int32(1)) - - + + case .bluetooth: writeInt(&buf, Int32(2)) - + } } } @@ -17197,7 +17553,7 @@ extension TrezorTransportType: Codable {} */ public enum TxDirection { - + /** * Wallet sent funds to an external address */ @@ -17226,32 +17582,32 @@ public struct FfiConverterTypeTxDirection: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TxDirection { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .sent - + case 2: return .received - + case 3: return .selfTransfer - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: TxDirection, into buf: inout [UInt8]) { switch value { - - + + case .sent: writeInt(&buf, Int32(1)) - - + + case .received: writeInt(&buf, Int32(2)) - - + + case .selfTransfer: writeInt(&buf, Int32(3)) - + } } } @@ -17294,7 +17650,7 @@ extension TxDirection: Codable {} */ public enum WalletSelection { - + /** * The standard wallet — no passphrase. */ @@ -17324,34 +17680,34 @@ public struct FfiConverterTypeWalletSelection: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WalletSelection { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .standard - + case 2: return .hidden(passphrase: try FfiConverterString.read(from: &buf) ) - + case 3: return .onDevice - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: WalletSelection, into buf: inout [UInt8]) { switch value { - - + + case .standard: writeInt(&buf, Int32(1)) - - + + case let .hidden(passphrase): writeInt(&buf, Int32(2)) FfiConverterString.write(passphrase, into: &buf) - - + + case .onDevice: writeInt(&buf, Int32(3)) - + } } } @@ -17383,9 +17739,123 @@ extension WalletSelection: Codable {} // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. +/** + * Events emitted by the onchain xpub watcher. + */ -public enum WordCount { +public enum WatcherEvent { + + /** + * Transaction activity changed — contains full updated state. + */ + case transactionsChanged(transactions: [HistoryTransaction], balance: WalletBalance, txCount: UInt32, blockHeight: UInt32, accountType: AccountType + ) + /** + * An error occurred in the watcher loop. + */ + case error(message: String + ) + /** + * Connection to the Electrum server was lost. + */ + case disconnected(message: String + ) + /** + * Connection to the Electrum server was restored. + */ + case reconnected +} + + +#if compiler(>=6) +extension WatcherEvent: Sendable {} +#endif + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public struct FfiConverterTypeWatcherEvent: FfiConverterRustBuffer { + typealias SwiftType = WatcherEvent + + public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WatcherEvent { + let variant: Int32 = try readInt(&buf) + switch variant { + + case 1: return .transactionsChanged(transactions: try FfiConverterSequenceTypeHistoryTransaction.read(from: &buf), balance: try FfiConverterTypeWalletBalance.read(from: &buf), txCount: try FfiConverterUInt32.read(from: &buf), blockHeight: try FfiConverterUInt32.read(from: &buf), accountType: try FfiConverterTypeAccountType.read(from: &buf) + ) + + case 2: return .error(message: try FfiConverterString.read(from: &buf) + ) + + case 3: return .disconnected(message: try FfiConverterString.read(from: &buf) + ) + + case 4: return .reconnected + + default: throw UniffiInternalError.unexpectedEnumCase + } + } + + public static func write(_ value: WatcherEvent, into buf: inout [UInt8]) { + switch value { + + + case let .transactionsChanged(transactions,balance,txCount,blockHeight,accountType): + writeInt(&buf, Int32(1)) + FfiConverterSequenceTypeHistoryTransaction.write(transactions, into: &buf) + FfiConverterTypeWalletBalance.write(balance, into: &buf) + FfiConverterUInt32.write(txCount, into: &buf) + FfiConverterUInt32.write(blockHeight, into: &buf) + FfiConverterTypeAccountType.write(accountType, into: &buf) + + + case let .error(message): + writeInt(&buf, Int32(2)) + FfiConverterString.write(message, into: &buf) + + + case let .disconnected(message): + writeInt(&buf, Int32(3)) + FfiConverterString.write(message, into: &buf) + + + case .reconnected: + writeInt(&buf, Int32(4)) + + } + } +} + + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeWatcherEvent_lift(_ buf: RustBuffer) throws -> WatcherEvent { + return try FfiConverterTypeWatcherEvent.lift(buf) +} + +#if swift(>=5.8) +@_documentation(visibility: private) +#endif +public func FfiConverterTypeWatcherEvent_lower(_ value: WatcherEvent) -> RustBuffer { + return FfiConverterTypeWatcherEvent.lower(value) +} + + +extension WatcherEvent: Equatable, Hashable {} + +extension WatcherEvent: Codable {} + + + + + +// Note that we don't yet support `indirect` for enums. +// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. + +public enum WordCount { + /** * 12-word mnemonic (128 bits of entropy) */ @@ -17422,44 +17892,44 @@ public struct FfiConverterTypeWordCount: FfiConverterRustBuffer { public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WordCount { let variant: Int32 = try readInt(&buf) switch variant { - + case 1: return .words12 - + case 2: return .words15 - + case 3: return .words18 - + case 4: return .words21 - + case 5: return .words24 - + default: throw UniffiInternalError.unexpectedEnumCase } } public static func write(_ value: WordCount, into buf: inout [UInt8]) { switch value { - - + + case .words12: writeInt(&buf, Int32(1)) - - + + case .words15: writeInt(&buf, Int32(2)) - - + + case .words18: writeInt(&buf, Int32(3)) - - + + case .words21: writeInt(&buf, Int32(4)) - - + + case .words24: writeInt(&buf, Int32(5)) - + } } } @@ -20210,7 +20680,7 @@ public func onchainComposeTransaction(params: ComposeParams)async -> [ComposeRe freeFunc: ffi_bitkitcore_rust_future_free_rust_buffer, liftFunc: FfiConverterSequenceTypeComposeResult.lift, errorHandler: nil - + ) } /** @@ -20281,6 +20751,42 @@ public func onchainGetTransactionHistory(extendedKey: String, electrumUrl: Strin errorHandler: FfiConverterTypeAccountInfoError_lift ) } +/** + * Start monitoring an xpub for transaction activity via Electrum subscriptions. + * + * Each watcher receives its own listener — no global registration needed. + */ +public func onchainStartWatcher(params: WatcherParams, listener: EventListener)async throws { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_bitkitcore_fn_func_onchain_start_watcher(FfiConverterTypeWatcherParams_lower(params),FfiConverterTypeEventListener_lower(listener) + ) + }, + pollFunc: ffi_bitkitcore_rust_future_poll_void, + completeFunc: ffi_bitkitcore_rust_future_complete_void, + freeFunc: ffi_bitkitcore_rust_future_free_void, + liftFunc: { $0 }, + errorHandler: FfiConverterTypeAccountInfoError_lift + ) +} +/** + * Stop all active xpub watchers. + */ +public func onchainStopAllWatchers() {try! rustCall() { + uniffi_bitkitcore_fn_func_onchain_stop_all_watchers($0 + ) +} +} +/** + * Stop a specific xpub watcher by ID. + */ +public func onchainStopWatcher(watcherId: String)throws {try rustCallWithError(FfiConverterTypeAccountInfoError_lift) { + uniffi_bitkitcore_fn_func_onchain_stop_watcher( + FfiConverterString.lower(watcherId),$0 + ) +} +} public func openChannel(orderId: String, connectionString: String)async throws -> IBtOrder { return try await uniffiRustCallAsync( @@ -20719,7 +21225,7 @@ public func trezorGetConnectedDevice()async -> TrezorDeviceInfo? { freeFunc: ffi_bitkitcore_rust_future_free_rust_buffer, liftFunc: FfiConverterOptionTypeTrezorDeviceInfo.lift, errorHandler: nil - + ) } /** @@ -20760,7 +21266,7 @@ public func trezorGetFeatures()async -> TrezorFeatures? { freeFunc: ffi_bitkitcore_rust_future_free_rust_buffer, liftFunc: FfiConverterOptionTypeTrezorFeatures.lift, errorHandler: nil - + ) } /** @@ -20829,7 +21335,7 @@ public func trezorIsConnected()async -> Bool { freeFunc: ffi_bitkitcore_rust_future_free_i8, liftFunc: FfiConverterBool.lift, errorHandler: nil - + ) } /** @@ -20847,7 +21353,7 @@ public func trezorIsInitialized()async -> Bool { freeFunc: ffi_bitkitcore_rust_future_free_i8, liftFunc: FfiConverterBool.lift, errorHandler: nil - + ) } /** @@ -21376,6 +21882,15 @@ private let initializationResult: InitializationResult = { if (uniffi_bitkitcore_checksum_func_onchain_get_transaction_history() != 4452) { return InitializationResult.apiChecksumMismatch } + if (uniffi_bitkitcore_checksum_func_onchain_start_watcher() != 58125) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers() != 28485) { + return InitializationResult.apiChecksumMismatch + } + if (uniffi_bitkitcore_checksum_func_onchain_stop_watcher() != 2426) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_bitkitcore_checksum_func_open_channel() != 21402) { return InitializationResult.apiChecksumMismatch } @@ -21577,6 +22092,9 @@ private let initializationResult: InitializationResult = { if (uniffi_bitkitcore_checksum_func_wipe_all_transaction_details() != 65339) { return InitializationResult.apiChecksumMismatch } + if (uniffi_bitkitcore_checksum_method_eventlistener_on_event() != 35531) { + return InitializationResult.apiChecksumMismatch + } if (uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices() != 18766) { return InitializationResult.apiChecksumMismatch } @@ -21617,6 +22135,7 @@ private let initializationResult: InitializationResult = { return InitializationResult.apiChecksumMismatch } + uniffiCallbackInitEventListener() uniffiCallbackInitTrezorTransportCallback() uniffiCallbackInitTrezorUiCallback() return InitializationResult.ok diff --git a/bindings/ios/bitkitcoreFFI.h b/bindings/ios/bitkitcoreFFI.h index b445fda..adc6b27 100644 --- a/bindings/ios/bitkitcoreFFI.h +++ b/bindings/ios/bitkitcoreFFI.h @@ -250,97 +250,112 @@ typedef struct UniffiForeignFutureStructVoid { typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t, UniffiForeignFutureStructVoid ); +#endif +#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 +#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 +typedef void (*UniffiCallbackInterfaceEventListenerMethod0)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, + RustCallStatus *_Nonnull uniffiCallStatus + ); + #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod1)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod1)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD2 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD2 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod2)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD3 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD3 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod3)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD4 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD4 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod4)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod4)(uint64_t, RustBuffer, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD5 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD5 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod5)(uint64_t, RustBuffer, uint32_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod5)(uint64_t, RustBuffer, uint32_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD6 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD6 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod6)(uint64_t, RustBuffer, uint16_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod6)(uint64_t, RustBuffer, uint16_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD7 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD7 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod7)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod7)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD8 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD8 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod8)(uint64_t, RustBuffer, RustBuffer, int8_t* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod8)(uint64_t, RustBuffer, RustBuffer, int8_t* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD9 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD9 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod9)(uint64_t, RustBuffer, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod9)(uint64_t, RustBuffer, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD10 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD10 -typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod10)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorTransportCallbackMethod10)(uint64_t, RustBuffer, RustBuffer, void* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD0 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD0 -typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod0)(uint64_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); #endif #ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 #define UNIFFI_FFIDEF_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 -typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod1)(uint64_t, int8_t, RustBuffer* _Nonnull, +typedef void (*UniffiCallbackInterfaceTrezorUiCallbackMethod1)(uint64_t, int8_t, RustBuffer* _Nonnull, RustCallStatus *_Nonnull uniffiCallStatus ); +#endif +#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_EVENT_LISTENER +#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_EVENT_LISTENER +typedef struct UniffiVTableCallbackInterfaceEventListener { + UniffiCallbackInterfaceEventListenerMethod0 _Nonnull onEvent; + UniffiCallbackInterfaceFree _Nonnull uniffiFree; +} UniffiVTableCallbackInterfaceEventListener; + #endif #ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK #define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK @@ -368,6 +383,26 @@ typedef struct UniffiVTableCallbackInterfaceTrezorUiCallback { UniffiCallbackInterfaceFree _Nonnull uniffiFree; } UniffiVTableCallbackInterfaceTrezorUiCallback; +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_EVENTLISTENER +void*_Nonnull uniffi_bitkitcore_fn_clone_eventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_EVENTLISTENER +void uniffi_bitkitcore_fn_free_eventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_EVENTLISTENER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_EVENTLISTENER +void uniffi_bitkitcore_fn_init_callback_vtable_eventlistener(const UniffiVTableCallbackInterfaceEventListener* _Nonnull vtable +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_EVENTLISTENER_ON_EVENT +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_EVENTLISTENER_ON_EVENT +void uniffi_bitkitcore_fn_method_eventlistener_on_event(void*_Nonnull ptr, RustBuffer watcher_id, RustBuffer event, RustCallStatus *_Nonnull out_status +); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORTRANSPORTCALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORTRANSPORTCALLBACK @@ -467,7 +502,7 @@ RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request(vo #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_WIPE_ALL void uniffi_bitkitcore_fn_func_activity_wipe_all(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA @@ -493,19 +528,19 @@ uint64_t uniffi_bitkitcore_fn_func_approve_pubky_auth(RustBuffer auth_url, RustB #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES uint64_t uniffi_bitkitcore_fn_func_blocktank_remove_all_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS uint64_t uniffi_bitkitcore_fn_func_blocktank_remove_all_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BLOCKTANK_WIPE_ALL uint64_t uniffi_bitkitcore_fn_func_blocktank_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION @@ -521,7 +556,7 @@ RustBuffer uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options(RustBuf #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CANCEL_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CANCEL_PUBKY_AUTH uint64_t uniffi_bitkitcore_fn_func_cancel_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CHECK_SWEEPABLE_BALANCES @@ -532,7 +567,7 @@ uint64_t uniffi_bitkitcore_fn_func_check_sweepable_balances(RustBuffer mnemonic_ #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_COMPLETE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_COMPLETE_PUBKY_AUTH uint64_t uniffi_bitkitcore_fn_func_complete_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CHANNEL_REQUEST_URL @@ -663,7 +698,7 @@ RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_tx_id(RustBuffer tx_id, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_ACTIVITIES_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_ACTIVITIES_TAGS RustBuffer uniffi_bitkitcore_fn_func_get_all_activities_tags(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_CLOSED_CHANNELS @@ -674,19 +709,19 @@ RustBuffer uniffi_bitkitcore_fn_func_get_all_closed_channels(RustBuffer sort_dir #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_PRE_ACTIVITY_METADATA RustBuffer uniffi_bitkitcore_fn_func_get_all_pre_activity_metadata(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_TRANSACTION_DETAILS RustBuffer uniffi_bitkitcore_fn_func_get_all_transaction_details(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_UNIQUE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_UNIQUE_TAGS RustBuffer uniffi_bitkitcore_fn_func_get_all_unique_tags(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_SUGGESTIONS @@ -697,7 +732,7 @@ RustBuffer uniffi_bitkitcore_fn_func_get_bip39_suggestions(RustBuffer partial_wo #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_WORDLIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_WORDLIST RustBuffer uniffi_bitkitcore_fn_func_get_bip39_wordlist(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CJIT_ENTRIES @@ -840,6 +875,22 @@ uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_detail(RustBuffer ext uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_history(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer network, RustBuffer script_type ); #endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_START_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_START_WATCHER +uint64_t uniffi_bitkitcore_fn_func_onchain_start_watcher(RustBuffer params, void*_Nonnull listener +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_ALL_WATCHERS +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_ALL_WATCHERS +void uniffi_bitkitcore_fn_func_onchain_stop_all_watchers(RustCallStatus *_Nonnull out_status + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_STOP_WATCHER +void uniffi_bitkitcore_fn_func_onchain_stop_watcher(RustBuffer watcher_id, RustCallStatus *_Nonnull out_status +); +#endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_OPEN_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_OPEN_CHANNEL uint64_t uniffi_bitkitcore_fn_func_open_channel(RustBuffer order_id, RustBuffer connection_string @@ -898,13 +949,13 @@ uint64_t uniffi_bitkitcore_fn_func_pubky_sign_up(RustBuffer secret_key_hex, Rust #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES uint64_t uniffi_bitkitcore_fn_func_refresh_active_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REFRESH_ACTIVE_ORDERS uint64_t uniffi_bitkitcore_fn_func_refresh_active_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGISTER_DEVICE @@ -995,7 +1046,7 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_connect(RustBuffer device_id, RustBuff #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_DISCONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_DISCONNECT uint64_t uniffi_bitkitcore_fn_func_trezor_disconnect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_ADDRESS @@ -1006,19 +1057,19 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_get_address(RustBuffer params #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_CONNECTED_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_CONNECTED_DEVICE uint64_t uniffi_bitkitcore_fn_func_trezor_get_connected_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_DEVICE_FINGERPRINT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_DEVICE_FINGERPRINT uint64_t uniffi_bitkitcore_fn_func_trezor_get_device_fingerprint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_FEATURES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_FEATURES uint64_t uniffi_bitkitcore_fn_func_trezor_get_features(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_PUBLIC_KEY @@ -1034,31 +1085,31 @@ uint64_t uniffi_bitkitcore_fn_func_trezor_initialize(RustBuffer credential_path #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_BLE_AVAILABLE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_BLE_AVAILABLE int8_t uniffi_bitkitcore_fn_func_trezor_is_ble_available(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_CONNECTED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_CONNECTED uint64_t uniffi_bitkitcore_fn_func_trezor_is_connected(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_IS_INITIALIZED uint64_t uniffi_bitkitcore_fn_func_trezor_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_LIST_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_LIST_DEVICES uint64_t uniffi_bitkitcore_fn_func_trezor_list_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SCAN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SCAN uint64_t uniffi_bitkitcore_fn_func_trezor_scan(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_TRANSPORT_CALLBACK @@ -1174,19 +1225,19 @@ void uniffi_bitkitcore_fn_func_validate_mnemonic(RustBuffer mnemonic_phrase, Rus #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_CLOSED_CHANNELS void uniffi_bitkitcore_fn_func_wipe_all_closed_channels(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_DATABASES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_DATABASES uint64_t uniffi_bitkitcore_fn_func_wipe_all_databases(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_WIPE_ALL_TRANSACTION_DETAILS void uniffi_bitkitcore_fn_func_wipe_all_transaction_details(RustCallStatus *_Nonnull out_status - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_ALLOC @@ -1472,925 +1523,949 @@ void ffi_bitkitcore_rust_future_complete_void(uint64_t handle, RustCallStatus *_ #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_WIPE_ALL uint16_t uniffi_bitkitcore_checksum_func_activity_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_add_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_add_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ADD_TAGS uint16_t uniffi_bitkitcore_checksum_func_add_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_APPROVE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_APPROVE_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_approve_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_blocktank_remove_all_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_REMOVE_ALL_ORDERS uint16_t uniffi_bitkitcore_checksum_func_blocktank_remove_all_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_WIPE_ALL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BLOCKTANK_WIPE_ALL uint16_t uniffi_bitkitcore_checksum_func_blocktank_wipe_all(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BROADCAST_SWEEP_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BROADCAST_SWEEP_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_broadcast_sweep_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS uint16_t uniffi_bitkitcore_checksum_func_calculate_channel_liquidity_options(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CANCEL_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CANCEL_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_cancel_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CHECK_SWEEPABLE_BALANCES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CHECK_SWEEPABLE_BALANCES uint16_t uniffi_bitkitcore_checksum_func_check_sweepable_balances(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_COMPLETE_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_COMPLETE_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_complete_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CHANNEL_REQUEST_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CHANNEL_REQUEST_URL uint16_t uniffi_bitkitcore_checksum_func_create_channel_request_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CJIT_ENTRY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_CJIT_ENTRY uint16_t uniffi_bitkitcore_checksum_func_create_cjit_entry(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_ORDER #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_ORDER uint16_t uniffi_bitkitcore_checksum_func_create_order(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_WITHDRAW_CALLBACK_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CREATE_WITHDRAW_CALLBACK_URL uint16_t uniffi_bitkitcore_checksum_func_create_withdraw_callback_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DECODE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DECODE uint16_t uniffi_bitkitcore_checksum_func_decode(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITY_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITY_BY_ID uint16_t uniffi_bitkitcore_checksum_func_delete_activity_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_delete_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_delete_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_derive_bitcoin_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESSES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_BITCOIN_ADDRESSES uint16_t uniffi_bitkitcore_checksum_func_derive_bitcoin_addresses(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_ONCHAIN_DESCRIPTOR #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_ONCHAIN_DESCRIPTOR uint16_t uniffi_bitkitcore_checksum_func_derive_onchain_descriptor(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PRIVATE_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PRIVATE_KEY uint16_t uniffi_bitkitcore_checksum_func_derive_private_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PUBKY_SECRET_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_PUBKY_SECRET_KEY uint16_t uniffi_bitkitcore_checksum_func_derive_pubky_secret_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ENTROPY_TO_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ENTROPY_TO_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_entropy_to_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE uint16_t uniffi_bitkitcore_checksum_func_estimate_order_fee(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE_FULL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ESTIMATE_ORDER_FEE_FULL uint16_t uniffi_bitkitcore_checksum_func_estimate_order_fee_full(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_CONTACTS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_CONTACTS uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_contacts(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_file(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE_STRING #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_FILE_STRING uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_file_string(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_PROFILE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FETCH_PUBKY_PROFILE uint16_t uniffi_bitkitcore_checksum_func_fetch_pubky_profile(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GENERATE_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GENERATE_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_generate_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_get_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_BY_TAG #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_BY_TAG uint16_t uniffi_bitkitcore_checksum_func_get_activities_by_tag(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_ID uint16_t uniffi_bitkitcore_checksum_func_get_activity_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_TX_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITY_BY_TX_ID uint16_t uniffi_bitkitcore_checksum_func_get_activity_by_tx_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_ACTIVITIES_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_ACTIVITIES_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_all_activities_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_get_all_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_get_all_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_get_all_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_UNIQUE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ALL_UNIQUE_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_all_unique_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_SUGGESTIONS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_SUGGESTIONS uint16_t uniffi_bitkitcore_checksum_func_get_bip39_suggestions(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_WORDLIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_BIP39_WORDLIST uint16_t uniffi_bitkitcore_checksum_func_get_bip39_wordlist(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_get_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CLOSED_CHANNEL_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_CLOSED_CHANNEL_BY_ID uint16_t uniffi_bitkitcore_checksum_func_get_closed_channel_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_LSP_BALANCE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_LSP_BALANCE uint16_t uniffi_bitkitcore_checksum_func_get_default_lsp_balance(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_GIFT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_GIFT uint16_t uniffi_bitkitcore_checksum_func_get_gift(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_INFO uint16_t uniffi_bitkitcore_checksum_func_get_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE uint16_t uniffi_bitkitcore_checksum_func_get_lnurl_invoice(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_MIN_ZERO_CONF_TX_FEE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_MIN_ZERO_CONF_TX_FEE uint16_t uniffi_bitkitcore_checksum_func_get_min_zero_conf_tx_fee(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ORDERS uint16_t uniffi_bitkitcore_checksum_func_get_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PAYMENT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PAYMENT uint16_t uniffi_bitkitcore_checksum_func_get_payment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_get_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TAGS uint16_t uniffi_bitkitcore_checksum_func_get_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_get_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_ORDER #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_ORDER uint16_t uniffi_bitkitcore_checksum_func_gift_order(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_PAY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GIFT_PAY uint16_t uniffi_bitkitcore_checksum_func_gift_pay(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INIT_DB #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INIT_DB uint16_t uniffi_bitkitcore_checksum_func_init_db(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INSERT_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_INSERT_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_insert_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_ADDRESS_USED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_ADDRESS_USED uint16_t uniffi_bitkitcore_checksum_func_is_address_used(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_VALID_BIP39_WORD #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_IS_VALID_BIP39_WORD uint16_t uniffi_bitkitcore_checksum_func_is_valid_bip39_word(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_LNURL_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_LNURL_AUTH uint16_t uniffi_bitkitcore_checksum_func_lnurl_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MARK_ACTIVITY_AS_SEEN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MARK_ACTIVITY_AS_SEEN uint16_t uniffi_bitkitcore_checksum_func_mark_activity_as_seen(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_ENTROPY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_ENTROPY uint16_t uniffi_bitkitcore_checksum_func_mnemonic_to_entropy(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_SEED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MNEMONIC_TO_SEED uint16_t uniffi_bitkitcore_checksum_func_mnemonic_to_seed(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_BROADCAST_RAW_TX #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_BROADCAST_RAW_TX uint16_t uniffi_bitkitcore_checksum_func_onchain_broadcast_raw_tx(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_COMPOSE_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_COMPOSE_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_onchain_compose_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ACCOUNT_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ACCOUNT_INFO uint16_t uniffi_bitkitcore_checksum_func_onchain_get_account_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ADDRESS_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_ADDRESS_INFO uint16_t uniffi_bitkitcore_checksum_func_onchain_get_address_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL uint16_t uniffi_bitkitcore_checksum_func_onchain_get_transaction_detail(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY uint16_t uniffi_bitkitcore_checksum_func_onchain_get_transaction_history(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_START_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_START_WATCHER +uint16_t uniffi_bitkitcore_checksum_func_onchain_start_watcher(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_ALL_WATCHERS +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_ALL_WATCHERS +uint16_t uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers(void + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_WATCHER +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ONCHAIN_STOP_WATCHER +uint16_t uniffi_bitkitcore_checksum_func_onchain_stop_watcher(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_OPEN_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_OPEN_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_open_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PARSE_PUBKY_AUTH_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PARSE_PUBKY_AUTH_URL uint16_t uniffi_bitkitcore_checksum_func_parse_pubky_auth_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP uint16_t uniffi_bitkitcore_checksum_func_prepare_legacy_rn_native_segwit_recovery_sweep(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_SWEEP_TRANSACTION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PREPARE_SWEEP_TRANSACTION uint16_t uniffi_bitkitcore_checksum_func_prepare_sweep_transaction(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET uint16_t uniffi_bitkitcore_checksum_func_pubky_public_key_from_secret(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUT_WITH_SECRET_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_PUT_WITH_SECRET_KEY uint16_t uniffi_bitkitcore_checksum_func_pubky_put_with_secret_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_DELETE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_DELETE uint16_t uniffi_bitkitcore_checksum_func_pubky_session_delete(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_LIST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_LIST uint16_t uniffi_bitkitcore_checksum_func_pubky_session_list(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_PUT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SESSION_PUT uint16_t uniffi_bitkitcore_checksum_func_pubky_session_put(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_IN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_IN uint16_t uniffi_bitkitcore_checksum_func_pubky_sign_in(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_UP #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PUBKY_SIGN_UP uint16_t uniffi_bitkitcore_checksum_func_pubky_sign_up(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_refresh_active_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REFRESH_ACTIVE_ORDERS uint16_t uniffi_bitkitcore_checksum_func_refresh_active_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGISTER_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGISTER_DEVICE uint16_t uniffi_bitkitcore_checksum_func_register_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_CLOSE_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_CLOSE_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_regtest_close_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_DEPOSIT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_DEPOSIT uint16_t uniffi_bitkitcore_checksum_func_regtest_deposit(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_GET_PAYMENT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_GET_PAYMENT uint16_t uniffi_bitkitcore_checksum_func_regtest_get_payment(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_MINE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_MINE uint16_t uniffi_bitkitcore_checksum_func_regtest_mine(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_PAY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REGTEST_PAY uint16_t uniffi_bitkitcore_checksum_func_regtest_pay(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID uint16_t uniffi_bitkitcore_checksum_func_remove_closed_channel_by_id(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_remove_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_REMOVE_TAGS uint16_t uniffi_bitkitcore_checksum_func_remove_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS uint16_t uniffi_bitkitcore_checksum_func_reset_pre_activity_metadata_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESOLVE_PUBKY_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_RESOLVE_PUBKY_URL uint16_t uniffi_bitkitcore_checksum_func_resolve_pubky_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS uint16_t uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_START_PUBKY_AUTH #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_START_PUBKY_AUTH uint16_t uniffi_bitkitcore_checksum_func_start_pubky_auth(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TEST_NOTIFICATION #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TEST_NOTIFICATION uint16_t uniffi_bitkitcore_checksum_func_test_notification(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE uint16_t uniffi_bitkitcore_checksum_func_trezor_account_type_to_script_type(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CLEAR_CREDENTIALS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CLEAR_CREDENTIALS uint16_t uniffi_bitkitcore_checksum_func_trezor_clear_credentials(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_CONNECT uint16_t uniffi_bitkitcore_checksum_func_trezor_connect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_DISCONNECT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_DISCONNECT uint16_t uniffi_bitkitcore_checksum_func_trezor_disconnect(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_trezor_get_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_CONNECTED_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_CONNECTED_DEVICE uint16_t uniffi_bitkitcore_checksum_func_trezor_get_connected_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_DEVICE_FINGERPRINT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_DEVICE_FINGERPRINT uint16_t uniffi_bitkitcore_checksum_func_trezor_get_device_fingerprint(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_FEATURES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_FEATURES uint16_t uniffi_bitkitcore_checksum_func_trezor_get_features(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_PUBLIC_KEY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_GET_PUBLIC_KEY uint16_t uniffi_bitkitcore_checksum_func_trezor_get_public_key(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_INITIALIZE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_INITIALIZE uint16_t uniffi_bitkitcore_checksum_func_trezor_initialize(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_BLE_AVAILABLE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_BLE_AVAILABLE uint16_t uniffi_bitkitcore_checksum_func_trezor_is_ble_available(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_CONNECTED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_CONNECTED uint16_t uniffi_bitkitcore_checksum_func_trezor_is_connected(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_INITIALIZED #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_IS_INITIALIZED uint16_t uniffi_bitkitcore_checksum_func_trezor_is_initialized(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_LIST_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_LIST_DEVICES uint16_t uniffi_bitkitcore_checksum_func_trezor_list_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SCAN #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SCAN uint16_t uniffi_bitkitcore_checksum_func_trezor_scan(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_TRANSPORT_CALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_TRANSPORT_CALLBACK uint16_t uniffi_bitkitcore_checksum_func_trezor_set_transport_callback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_UI_CALLBACK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SET_UI_CALLBACK uint16_t uniffi_bitkitcore_checksum_func_trezor_set_ui_callback(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_MESSAGE uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_tx(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX_FROM_PSBT #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_SIGN_TX_FROM_PSBT uint16_t uniffi_bitkitcore_checksum_func_trezor_sign_tx_from_psbt(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_VERIFY_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_VERIFY_MESSAGE uint16_t uniffi_bitkitcore_checksum_func_trezor_verify_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_update_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_BLOCKTANK_URL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPDATE_BLOCKTANK_URL uint16_t uniffi_bitkitcore_checksum_func_update_blocktank_url(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITY #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ACTIVITY uint16_t uniffi_bitkitcore_checksum_func_upsert_activity(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CJIT_ENTRIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CJIT_ENTRIES uint16_t uniffi_bitkitcore_checksum_func_upsert_cjit_entries(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNEL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNEL uint16_t uniffi_bitkitcore_checksum_func_upsert_closed_channel(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_upsert_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_INFO #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_INFO uint16_t uniffi_bitkitcore_checksum_func_upsert_info(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_LIGHTNING_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_LIGHTNING_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_lightning_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ONCHAIN_ACTIVITIES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ONCHAIN_ACTIVITIES uint16_t uniffi_bitkitcore_checksum_func_upsert_onchain_activities(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ORDERS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_ORDERS uint16_t uniffi_bitkitcore_checksum_func_upsert_orders(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_PRE_ACTIVITY_METADATA #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_PRE_ACTIVITY_METADATA uint16_t uniffi_bitkitcore_checksum_func_upsert_pre_activity_metadata(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TAGS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TAGS uint16_t uniffi_bitkitcore_checksum_func_upsert_tags(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UPSERT_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_upsert_transaction_details(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_BITCOIN_ADDRESS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_BITCOIN_ADDRESS uint16_t uniffi_bitkitcore_checksum_func_validate_bitcoin_address(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_MNEMONIC #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_VALIDATE_MNEMONIC uint16_t uniffi_bitkitcore_checksum_func_validate_mnemonic(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_CLOSED_CHANNELS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_CLOSED_CHANNELS uint16_t uniffi_bitkitcore_checksum_func_wipe_all_closed_channels(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_DATABASES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_DATABASES uint16_t uniffi_bitkitcore_checksum_func_wipe_all_databases(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_TRANSACTION_DETAILS #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_WIPE_ALL_TRANSACTION_DETAILS uint16_t uniffi_bitkitcore_checksum_func_wipe_all_transaction_details(void - + +); +#endif +#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_EVENTLISTENER_ON_EVENT +#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_EVENTLISTENER_ON_EVENT +uint16_t uniffi_bitkitcore_checksum_method_eventlistener_on_event(void + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_open_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_close_device(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_read_chunk(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_write_chunk(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_get_chunk_size(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_call_message(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_get_pairing_code(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_save_thp_credential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_load_thp_credential(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG uint16_t uniffi_bitkitcore_checksum_method_trezortransportcallback_log_debug(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST uint16_t uniffi_bitkitcore_checksum_method_trezoruicallback_on_pin_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST #define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST uint16_t uniffi_bitkitcore_checksum_method_trezoruicallback_on_passphrase_request(void - + ); #endif #ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_UNIFFI_CONTRACT_VERSION #define UNIFFI_FFIDEF_FFI_BITKITCORE_UNIFFI_CONTRACT_VERSION uint32_t ffi_bitkitcore_uniffi_contract_version(void - + ); #endif diff --git a/bindings/python/bitkitcore/bitkitcore.py b/bindings/python/bitkitcore/bitkitcore.py index b464bc3..a258db5 100644 --- a/bindings/python/bitkitcore/bitkitcore.py +++ b/bindings/python/bitkitcore/bitkitcore.py @@ -607,6 +607,12 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_bitkitcore_checksum_func_onchain_get_transaction_history() != 4452: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_bitkitcore_checksum_func_onchain_start_watcher() != 58125: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers() != 28485: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_bitkitcore_checksum_func_onchain_stop_watcher() != 2426: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_bitkitcore_checksum_func_open_channel() != 21402: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_bitkitcore_checksum_func_parse_pubky_auth_url() != 56972: @@ -741,6 +747,8 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_bitkitcore_checksum_func_wipe_all_transaction_details() != 65339: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_bitkitcore_checksum_method_eventlistener_on_event() != 35531: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices() != 18766: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_bitkitcore_checksum_method_trezortransportcallback_open_device() != 44156: @@ -873,6 +881,9 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ] _UNIFFI_FOREIGN_FUTURE_COMPLETE_VOID = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiForeignFutureStructVoid, ) +_UNIFFI_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,_UniffiRustBuffer,_UniffiRustBuffer,ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) _UNIFFI_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.POINTER(_UniffiRustBuffer), ctypes.POINTER(_UniffiRustCallStatus), ) @@ -912,6 +923,11 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UNIFFI_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1 = ctypes.CFUNCTYPE(None,ctypes.c_uint64,ctypes.c_int8,ctypes.POINTER(_UniffiRustBuffer), ctypes.POINTER(_UniffiRustCallStatus), ) +class _UniffiVTableCallbackInterfaceEventListener(ctypes.Structure): + _fields_ = [ + ("on_event", _UNIFFI_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0), + ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE), + ] class _UniffiVTableCallbackInterfaceTrezorTransportCallback(ctypes.Structure): _fields_ = [ ("enumerate_devices", _UNIFFI_CALLBACK_INTERFACE_TREZOR_TRANSPORT_CALLBACK_METHOD0), @@ -933,6 +949,27 @@ class _UniffiVTableCallbackInterfaceTrezorUiCallback(ctypes.Structure): ("on_passphrase_request", _UNIFFI_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK_METHOD1), ("uniffi_free", _UNIFFI_CALLBACK_INTERFACE_FREE), ] +_UniffiLib.uniffi_bitkitcore_fn_clone_eventlistener.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_bitkitcore_fn_clone_eventlistener.restype = ctypes.c_void_p +_UniffiLib.uniffi_bitkitcore_fn_free_eventlistener.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_bitkitcore_fn_free_eventlistener.restype = None +_UniffiLib.uniffi_bitkitcore_fn_init_callback_vtable_eventlistener.argtypes = ( + ctypes.POINTER(_UniffiVTableCallbackInterfaceEventListener), +) +_UniffiLib.uniffi_bitkitcore_fn_init_callback_vtable_eventlistener.restype = None +_UniffiLib.uniffi_bitkitcore_fn_method_eventlistener_on_event.argtypes = ( + ctypes.c_void_p, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_bitkitcore_fn_method_eventlistener_on_event.restype = None _UniffiLib.uniffi_bitkitcore_fn_clone_trezortransportcallback.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1443,6 +1480,20 @@ class _UniffiVTableCallbackInterfaceTrezorUiCallback(ctypes.Structure): _UniffiRustBuffer, ) _UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_transaction_history.restype = ctypes.c_uint64 +_UniffiLib.uniffi_bitkitcore_fn_func_onchain_start_watcher.argtypes = ( + _UniffiRustBuffer, + ctypes.c_void_p, +) +_UniffiLib.uniffi_bitkitcore_fn_func_onchain_start_watcher.restype = ctypes.c_uint64 +_UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_all_watchers.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_all_watchers.restype = None +_UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_watcher.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_watcher.restype = None _UniffiLib.uniffi_bitkitcore_fn_func_open_channel.argtypes = ( _UniffiRustBuffer, _UniffiRustBuffer, @@ -2252,6 +2303,15 @@ class _UniffiVTableCallbackInterfaceTrezorUiCallback(ctypes.Structure): _UniffiLib.uniffi_bitkitcore_checksum_func_onchain_get_transaction_history.argtypes = ( ) _UniffiLib.uniffi_bitkitcore_checksum_func_onchain_get_transaction_history.restype = ctypes.c_uint16 +_UniffiLib.uniffi_bitkitcore_checksum_func_onchain_start_watcher.argtypes = ( +) +_UniffiLib.uniffi_bitkitcore_checksum_func_onchain_start_watcher.restype = ctypes.c_uint16 +_UniffiLib.uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers.argtypes = ( +) +_UniffiLib.uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers.restype = ctypes.c_uint16 +_UniffiLib.uniffi_bitkitcore_checksum_func_onchain_stop_watcher.argtypes = ( +) +_UniffiLib.uniffi_bitkitcore_checksum_func_onchain_stop_watcher.restype = ctypes.c_uint16 _UniffiLib.uniffi_bitkitcore_checksum_func_open_channel.argtypes = ( ) _UniffiLib.uniffi_bitkitcore_checksum_func_open_channel.restype = ctypes.c_uint16 @@ -2453,6 +2513,9 @@ class _UniffiVTableCallbackInterfaceTrezorUiCallback(ctypes.Structure): _UniffiLib.uniffi_bitkitcore_checksum_func_wipe_all_transaction_details.argtypes = ( ) _UniffiLib.uniffi_bitkitcore_checksum_func_wipe_all_transaction_details.restype = ctypes.c_uint16 +_UniffiLib.uniffi_bitkitcore_checksum_method_eventlistener_on_event.argtypes = ( +) +_UniffiLib.uniffi_bitkitcore_checksum_method_eventlistener_on_event.restype = ctypes.c_uint16 _UniffiLib.uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices.argtypes = ( ) _UniffiLib.uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices.restype = ctypes.c_uint16 @@ -2681,6 +2744,8 @@ def write(value, buf): + + class AccountAddresses: """ Grouped address lists for an account. @@ -9830,6 +9895,98 @@ def write(value, buf): _UniffiConverterOptionalTypeAccountType.write(value.account_type, buf) +class WatcherParams: + """ + Parameters for starting an xpub transaction watcher. + """ + + watcher_id: "str" + """ + Caller-supplied identifier for this watcher. + """ + + extended_key: "str" + """ + Extended public key (xpub/ypub/zpub/tpub/upub/vpub). + """ + + electrum_url: "str" + """ + Electrum server URL (e.g. "ssl://electrum.example.com:50002"). + """ + + network: "typing.Optional[Network]" + """ + Bitcoin network override (auto-detected from key prefix if None). + """ + + account_type: "typing.Optional[AccountType]" + """ + Account type override (auto-detected from key prefix if None). + """ + + gap_limit: "typing.Optional[int]" + """ + Number of unused addresses to monitor beyond the last used (default 20). + """ + + def __init__(self, *, watcher_id: "str", extended_key: "str", electrum_url: "str", network: "typing.Optional[Network]", account_type: "typing.Optional[AccountType]", gap_limit: "typing.Optional[int]"): + self.watcher_id = watcher_id + self.extended_key = extended_key + self.electrum_url = electrum_url + self.network = network + self.account_type = account_type + self.gap_limit = gap_limit + + def __str__(self): + return "WatcherParams(watcher_id={}, extended_key={}, electrum_url={}, network={}, account_type={}, gap_limit={})".format(self.watcher_id, self.extended_key, self.electrum_url, self.network, self.account_type, self.gap_limit) + + def __eq__(self, other): + if self.watcher_id != other.watcher_id: + return False + if self.extended_key != other.extended_key: + return False + if self.electrum_url != other.electrum_url: + return False + if self.network != other.network: + return False + if self.account_type != other.account_type: + return False + if self.gap_limit != other.gap_limit: + return False + return True + +class _UniffiConverterTypeWatcherParams(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return WatcherParams( + watcher_id=_UniffiConverterString.read(buf), + extended_key=_UniffiConverterString.read(buf), + electrum_url=_UniffiConverterString.read(buf), + network=_UniffiConverterOptionalTypeNetwork.read(buf), + account_type=_UniffiConverterOptionalTypeAccountType.read(buf), + gap_limit=_UniffiConverterOptionalUInt32.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiConverterString.check_lower(value.watcher_id) + _UniffiConverterString.check_lower(value.extended_key) + _UniffiConverterString.check_lower(value.electrum_url) + _UniffiConverterOptionalTypeNetwork.check_lower(value.network) + _UniffiConverterOptionalTypeAccountType.check_lower(value.account_type) + _UniffiConverterOptionalUInt32.check_lower(value.gap_limit) + + @staticmethod + def write(value, buf): + _UniffiConverterString.write(value.watcher_id, buf) + _UniffiConverterString.write(value.extended_key, buf) + _UniffiConverterString.write(value.electrum_url, buf) + _UniffiConverterOptionalTypeNetwork.write(value.network, buf) + _UniffiConverterOptionalTypeAccountType.write(value.account_type, buf) + _UniffiConverterOptionalUInt32.write(value.gap_limit, buf) + + # AccountInfoError # We want to define each variant as a nested class that's also a subclass, # which is tricky in Python. To accomplish this we're going to create each @@ -9976,6 +10133,20 @@ def __init__(self, error_details): def __repr__(self): return "AccountInfoError.TransactionNotFound({})".format(str(self)) _UniffiTempAccountInfoError.TransactionNotFound = TransactionNotFound # type: ignore + class WatcherError(_UniffiTempAccountInfoError): + """ + Watcher lifecycle or subscription error + """ + + def __init__(self, error_details): + super().__init__(", ".join([ + "error_details={!r}".format(error_details), + ])) + self.error_details = error_details + + def __repr__(self): + return "AccountInfoError.WatcherError({})".format(str(self)) + _UniffiTempAccountInfoError.WatcherError = WatcherError # type: ignore AccountInfoError = _UniffiTempAccountInfoError # type: ignore del _UniffiTempAccountInfoError @@ -10021,6 +10192,10 @@ def read(buf): return AccountInfoError.TransactionNotFound( _UniffiConverterString.read(buf), ) + if variant == 10: + return AccountInfoError.WatcherError( + _UniffiConverterString.read(buf), + ) raise InternalError("Raw enum value doesn't match any cases") @staticmethod @@ -10052,6 +10227,9 @@ def check_lower(value): if isinstance(value, AccountInfoError.TransactionNotFound): _UniffiConverterString.check_lower(value.error_details) return + if isinstance(value, AccountInfoError.WatcherError): + _UniffiConverterString.check_lower(value.error_details) + return @staticmethod def write(value, buf): @@ -10082,6 +10260,9 @@ def write(value, buf): if isinstance(value, AccountInfoError.TransactionNotFound): buf.write_i32(9) _UniffiConverterString.write(value.error_details, buf) + if isinstance(value, AccountInfoError.WatcherError): + buf.write_i32(10) + _UniffiConverterString.write(value.error_details, buf) @@ -10099,25 +10280,25 @@ class AccountType(enum.Enum): BIP44 legacy (P2PKH) — xpub/tpub prefix """ - + WRAPPED_SEGWIT = 1 """ BIP49 wrapped segwit (P2SH-P2WPKH) — ypub/upub prefix """ - + NATIVE_SEGWIT = 2 """ BIP84 native segwit (P2WPKH) — zpub/vpub prefix """ - + TAPROOT = 3 """ BIP86 taproot (P2TR) """ - + class _UniffiConverterTypeAccountType(_UniffiConverterRustBuffer): @@ -10200,7 +10381,7 @@ def __eq__(self, other): if not other.is_LIGHTNING(): return False return self._values == other._values - + # For each variant, we have `is_NAME` and `is_name` methods for easily checking # whether an instance is that variant. @@ -10212,7 +10393,7 @@ def is_LIGHTNING(self) -> bool: return isinstance(self, Activity.LIGHTNING) def is_lightning(self) -> bool: return isinstance(self, Activity.LIGHTNING) - + # Now, a little trick - we make each nested variant class be a subclass of the main # enum class, so that method calls and instance checks etc will work intuitively. @@ -10434,11 +10615,11 @@ def write(value, buf): class ActivityFilter(enum.Enum): ALL = 0 - + LIGHTNING = 1 - + ONCHAIN = 2 - + class _UniffiConverterTypeActivityFilter(_UniffiConverterRustBuffer): @@ -10480,9 +10661,9 @@ def write(value, buf): class ActivityType(enum.Enum): ONCHAIN = 0 - + LIGHTNING = 1 - + class _UniffiConverterTypeActivityType(_UniffiConverterRustBuffer): @@ -10632,17 +10813,17 @@ def write(value, buf): class AddressType(enum.Enum): P2PKH = 0 - + P2SH = 1 - + P2WPKH = 2 - + P2WSH = 3 - + P2TR = 4 - + UNKNOWN = 5 - + class _UniffiConverterTypeAddressType(_UniffiConverterRustBuffer): @@ -10702,13 +10883,13 @@ def write(value, buf): class BitcoinNetworkEnum(enum.Enum): MAINNET = 0 - + TESTNET = 1 - + SIGNET = 2 - + REGTEST = 3 - + class _UniffiConverterTypeBitcoinNetworkEnum(_UniffiConverterRustBuffer): @@ -11161,13 +11342,13 @@ def write(value, buf): class BtBolt11InvoiceState(enum.Enum): PENDING = 0 - + HOLDING = 1 - + PAID = 2 - + CANCELED = 3 - + class _UniffiConverterTypeBtBolt11InvoiceState(_UniffiConverterRustBuffer): @@ -11215,15 +11396,15 @@ def write(value, buf): class BtChannelOrderErrorType(enum.Enum): WRONG_ORDER_STATE = 0 - + PEER_NOT_REACHABLE = 1 - + CHANNEL_REJECTED_BY_DESTINATION = 2 - + CHANNEL_REJECTED_BY_LSP = 3 - + BLOCKTANK_NOT_READY = 4 - + class _UniffiConverterTypeBtChannelOrderErrorType(_UniffiConverterRustBuffer): @@ -11277,11 +11458,11 @@ def write(value, buf): class BtOpenChannelState(enum.Enum): OPENING = 0 - + OPEN = 1 - + CLOSED = 2 - + class _UniffiConverterTypeBtOpenChannelState(_UniffiConverterRustBuffer): @@ -11323,13 +11504,13 @@ def write(value, buf): class BtOrderState(enum.Enum): CREATED = 0 - + EXPIRED = 1 - + OPEN = 2 - + CLOSED = 3 - + class _UniffiConverterTypeBtOrderState(_UniffiConverterRustBuffer): @@ -11377,13 +11558,13 @@ def write(value, buf): class BtOrderState2(enum.Enum): CREATED = 0 - + EXPIRED = 1 - + EXECUTED = 2 - + PAID = 3 - + class _UniffiConverterTypeBtOrderState2(_UniffiConverterRustBuffer): @@ -11431,15 +11612,15 @@ def write(value, buf): class BtPaymentState(enum.Enum): CREATED = 0 - + PARTIALLY_PAID = 1 - + PAID = 2 - + REFUNDED = 3 - + REFUND_AVAILABLE = 4 - + class _UniffiConverterTypeBtPaymentState(_UniffiConverterRustBuffer): @@ -11493,15 +11674,15 @@ def write(value, buf): class BtPaymentState2(enum.Enum): CREATED = 0 - + PAID = 1 - + REFUNDED = 2 - + REFUND_AVAILABLE = 3 - + CANCELED = 4 - + class _UniffiConverterTypeBtPaymentState2(_UniffiConverterRustBuffer): @@ -11555,13 +11736,13 @@ def write(value, buf): class CJitStateEnum(enum.Enum): CREATED = 0 - + COMPLETED = 1 - + EXPIRED = 2 - + FAILED = 3 - + class _UniffiConverterTypeCJitStateEnum(_UniffiConverterRustBuffer): @@ -11617,19 +11798,19 @@ class CoinSelection(enum.Enum): Branch-and-bound (default). Minimizes change by searching for exact matches. """ - + LARGEST_FIRST = 1 """ Selects largest UTXOs first. Useful for UTXO consolidation. """ - + OLDEST_FIRST = 2 """ Selects oldest UTXOs first. Maximizes coin-age spending. """ - + class _UniffiConverterTypeCoinSelection(_UniffiConverterRustBuffer): @@ -11701,7 +11882,7 @@ def __eq__(self, other): if self.amount_sats != other.amount_sats: return False return True - + class SEND_MAX: """ Send all remaining funds (after fees) to an address @@ -11721,7 +11902,7 @@ def __eq__(self, other): if self.address != other.address: return False return True - + class OP_RETURN: """ OP_RETURN data output (hex-encoded payload) @@ -11741,8 +11922,8 @@ def __eq__(self, other): if self.data_hex != other.data_hex: return False return True - - + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking # whether an instance is that variant. @@ -11758,7 +11939,7 @@ def is_OP_RETURN(self) -> bool: return isinstance(self, ComposeOutput.OP_RETURN) def is_op_return(self) -> bool: return isinstance(self, ComposeOutput.OP_RETURN) - + # Now, a little trick - we make each nested variant class be a subclass of the main # enum class, so that method calls and instance checks etc will work intuitively. @@ -11880,7 +12061,7 @@ def __eq__(self, other): if self.total_spent != other.total_spent: return False return True - + class ERROR: """ Composition failed (e.g. insufficient funds) @@ -11900,8 +12081,8 @@ def __eq__(self, other): if self.error != other.error: return False return True - - + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking # whether an instance is that variant. @@ -11913,7 +12094,7 @@ def is_ERROR(self) -> bool: return isinstance(self, ComposeResult.ERROR) def is_error(self) -> bool: return isinstance(self, ComposeResult.ERROR) - + # Now, a little trick - we make each nested variant class be a subclass of the main # enum class, so that method calls and instance checks etc will work intuitively. @@ -12434,13 +12615,13 @@ def write(value, buf): class ManualRefundStateEnum(enum.Enum): CREATED = 0 - + APPROVED = 1 - + REJECTED = 2 - + SENT = 3 - + class _UniffiConverterTypeManualRefundStateEnum(_UniffiConverterRustBuffer): @@ -12492,31 +12673,31 @@ class Network(enum.Enum): Mainnet Bitcoin. """ - + TESTNET = 1 """ Bitcoin's testnet network. """ - + TESTNET4 = 2 """ Bitcoin's testnet4 network. """ - + SIGNET = 3 """ Bitcoin's signet network. """ - + REGTEST = 4 """ Bitcoin's regtest network. """ - + class _UniffiConverterTypeNetwork(_UniffiConverterRustBuffer): @@ -12570,13 +12751,13 @@ def write(value, buf): class NetworkType(enum.Enum): BITCOIN = 0 - + TESTNET = 1 - + REGTEST = 2 - + SIGNET = 3 - + class _UniffiConverterTypeNetworkType(_UniffiConverterRustBuffer): @@ -12643,7 +12824,7 @@ def __eq__(self, other): if not other.is_CANCEL(): return False return True - + class STANDARD: """ Standard wallet — no passphrase, equivalent to `Some("")` on the device. @@ -12660,7 +12841,7 @@ def __eq__(self, other): if not other.is_STANDARD(): return False return True - + class HIDDEN: """ Hidden wallet — derived from the passphrase entered on the host. @@ -12680,7 +12861,7 @@ def __eq__(self, other): if self.value != other.value: return False return True - + class ON_DEVICE: """ Enter the passphrase on the Trezor device itself instead of on the host. @@ -12697,8 +12878,8 @@ def __eq__(self, other): if not other.is_ON_DEVICE(): return False return True - - + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking # whether an instance is that variant. @@ -12718,7 +12899,7 @@ def is_ON_DEVICE(self) -> bool: return isinstance(self, PassphraseResponse.ON_DEVICE) def is_on_device(self) -> bool: return isinstance(self, PassphraseResponse.ON_DEVICE) - + # Now, a little trick - we make each nested variant class be a subclass of the main # enum class, so that method calls and instance checks etc will work intuitively. @@ -12783,11 +12964,11 @@ def write(value, buf): class PaymentState(enum.Enum): PENDING = 0 - + SUCCEEDED = 1 - + FAILED = 2 - + class _UniffiConverterTypePaymentState(_UniffiConverterRustBuffer): @@ -12829,9 +13010,9 @@ def write(value, buf): class PaymentType(enum.Enum): SENT = 0 - + RECEIVED = 1 - + class _UniffiConverterTypePaymentType(_UniffiConverterRustBuffer): @@ -12871,9 +13052,9 @@ class PubkyAuthKind(enum.Enum): """ SIGNIN = 0 - + SIGNUP = 1 - + class _UniffiConverterTypePubkyAuthKind(_UniffiConverterRustBuffer): @@ -13125,7 +13306,7 @@ def __eq__(self, other): if self.invoice != other.invoice: return False return True - + class LIGHTNING: invoice: "LightningInvoice" @@ -13141,7 +13322,7 @@ def __eq__(self, other): if self.invoice != other.invoice: return False return True - + class PUBKY_AUTH: data: "str" @@ -13157,7 +13338,7 @@ def __eq__(self, other): if self.data != other.data: return False return True - + class LNURL_CHANNEL: data: "LnurlChannelData" @@ -13173,7 +13354,7 @@ def __eq__(self, other): if self.data != other.data: return False return True - + class LNURL_AUTH: data: "LnurlAuthData" @@ -13189,7 +13370,7 @@ def __eq__(self, other): if self.data != other.data: return False return True - + class LNURL_WITHDRAW: data: "LnurlWithdrawData" @@ -13205,7 +13386,7 @@ def __eq__(self, other): if self.data != other.data: return False return True - + class LNURL_ADDRESS: data: "LnurlAddressData" @@ -13221,7 +13402,7 @@ def __eq__(self, other): if self.data != other.data: return False return True - + class LNURL_PAY: data: "LnurlPayData" @@ -13237,7 +13418,7 @@ def __eq__(self, other): if self.data != other.data: return False return True - + class NODE_ID: url: "str" network: "NetworkType" @@ -13257,7 +13438,7 @@ def __eq__(self, other): if self.network != other.network: return False return True - + class GIFT: code: "str" amount: "int" @@ -13277,8 +13458,8 @@ def __eq__(self, other): if self.amount != other.amount: return False return True - - + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking # whether an instance is that variant. @@ -13322,7 +13503,7 @@ def is_GIFT(self) -> bool: return isinstance(self, Scanner.GIFT) def is_gift(self) -> bool: return isinstance(self, Scanner.GIFT) - + # Now, a little trick - we make each nested variant class be a subclass of the main # enum class, so that method calls and instance checks etc will work intuitively. @@ -13468,9 +13649,9 @@ def write(value, buf): class SortDirection(enum.Enum): ASC = 0 - + DESC = 1 - + class _UniffiConverterTypeSortDirection(_UniffiConverterRustBuffer): @@ -13597,25 +13778,25 @@ class TrezorCoinType(enum.Enum): Bitcoin mainnet """ - + TESTNET = 1 """ Bitcoin testnet """ - + SIGNET = 2 """ Bitcoin signet (treated as testnet by the device) """ - + REGTEST = 3 """ Bitcoin regtest """ - + class _UniffiConverterTypeTrezorCoinType(_UniffiConverterRustBuffer): @@ -14117,37 +14298,37 @@ class TrezorScriptType(enum.Enum): P2PKH (legacy) """ - + SPEND_P2SH_WITNESS = 1 """ P2SH-P2WPKH (nested SegWit) """ - + SPEND_WITNESS = 2 """ P2WPKH (native SegWit) """ - + SPEND_TAPROOT = 3 """ P2TR (Taproot) """ - + SPEND_MULTISIG = 4 """ P2SH multisig """ - + EXTERNAL = 5 """ External/watch-only input (not signed by device) """ - + class _UniffiConverterTypeTrezorScriptType(_UniffiConverterRustBuffer): @@ -14215,13 +14396,13 @@ class TrezorTransportType(enum.Enum): USB connection """ - + BLUETOOTH = 1 """ Bluetooth connection """ - + class _UniffiConverterTypeTrezorTransportType(_UniffiConverterRustBuffer): @@ -14265,19 +14446,19 @@ class TxDirection(enum.Enum): Wallet sent funds to an external address """ - + RECEIVED = 1 """ Wallet received funds from an external source """ - + SELF_TRANSFER = 2 """ Wallet sent funds to itself (e.g. consolidation, change-only) """ - + class _UniffiConverterTypeTxDirection(_UniffiConverterRustBuffer): @@ -14348,7 +14529,7 @@ def __eq__(self, other): if not other.is_STANDARD(): return False return True - + class HIDDEN: """ A hidden wallet whose passphrase is entered on the host. @@ -14368,7 +14549,7 @@ def __eq__(self, other): if self.passphrase != other.passphrase: return False return True - + class ON_DEVICE: """ A hidden wallet whose passphrase is entered on the Trezor itself. @@ -14385,8 +14566,8 @@ def __eq__(self, other): if not other.is_ON_DEVICE(): return False return True - - + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking # whether an instance is that variant. @@ -14402,7 +14583,7 @@ def is_ON_DEVICE(self) -> bool: return isinstance(self, WalletSelection.ON_DEVICE) def is_on_device(self) -> bool: return isinstance(self, WalletSelection.ON_DEVICE) - + # Now, a little trick - we make each nested variant class be a subclass of the main # enum class, so that method calls and instance checks etc will work intuitively. @@ -14457,37 +14638,240 @@ def write(value, buf): -class WordCount(enum.Enum): - WORDS12 = 12 +class WatcherEvent: """ - 12-word mnemonic (128 bits of entropy) + Events emitted by the onchain xpub watcher. """ + def __init__(self): + raise RuntimeError("WatcherEvent cannot be instantiated directly") + + # Each enum variant is a nested class of the enum itself. + class TRANSACTIONS_CHANGED: + """ + Transaction activity changed — contains full updated state. + """ + + transactions: "typing.List[HistoryTransaction]" + balance: "WalletBalance" + tx_count: "int" + block_height: "int" + account_type: "AccountType" + + def __init__(self,transactions: "typing.List[HistoryTransaction]", balance: "WalletBalance", tx_count: "int", block_height: "int", account_type: "AccountType"): + self.transactions = transactions + self.balance = balance + self.tx_count = tx_count + self.block_height = block_height + self.account_type = account_type + + def __str__(self): + return "WatcherEvent.TRANSACTIONS_CHANGED(transactions={}, balance={}, tx_count={}, block_height={}, account_type={})".format(self.transactions, self.balance, self.tx_count, self.block_height, self.account_type) + + def __eq__(self, other): + if not other.is_TRANSACTIONS_CHANGED(): + return False + if self.transactions != other.transactions: + return False + if self.balance != other.balance: + return False + if self.tx_count != other.tx_count: + return False + if self.block_height != other.block_height: + return False + if self.account_type != other.account_type: + return False + return True + + class ERROR: + """ + An error occurred in the watcher loop. + """ + + message: "str" + + def __init__(self,message: "str"): + self.message = message + + def __str__(self): + return "WatcherEvent.ERROR(message={})".format(self.message) + + def __eq__(self, other): + if not other.is_ERROR(): + return False + if self.message != other.message: + return False + return True + + class DISCONNECTED: + """ + Connection to the Electrum server was lost. + """ + + message: "str" + + def __init__(self,message: "str"): + self.message = message + + def __str__(self): + return "WatcherEvent.DISCONNECTED(message={})".format(self.message) + + def __eq__(self, other): + if not other.is_DISCONNECTED(): + return False + if self.message != other.message: + return False + return True + + class RECONNECTED: + """ + Connection to the Electrum server was restored. + """ + + + def __init__(self,): + pass + + def __str__(self): + return "WatcherEvent.RECONNECTED()".format() + + def __eq__(self, other): + if not other.is_RECONNECTED(): + return False + return True + + + + # For each variant, we have `is_NAME` and `is_name` methods for easily checking + # whether an instance is that variant. + def is_TRANSACTIONS_CHANGED(self) -> bool: + return isinstance(self, WatcherEvent.TRANSACTIONS_CHANGED) + def is_transactions_changed(self) -> bool: + return isinstance(self, WatcherEvent.TRANSACTIONS_CHANGED) + def is_ERROR(self) -> bool: + return isinstance(self, WatcherEvent.ERROR) + def is_error(self) -> bool: + return isinstance(self, WatcherEvent.ERROR) + def is_DISCONNECTED(self) -> bool: + return isinstance(self, WatcherEvent.DISCONNECTED) + def is_disconnected(self) -> bool: + return isinstance(self, WatcherEvent.DISCONNECTED) + def is_RECONNECTED(self) -> bool: + return isinstance(self, WatcherEvent.RECONNECTED) + def is_reconnected(self) -> bool: + return isinstance(self, WatcherEvent.RECONNECTED) + + +# Now, a little trick - we make each nested variant class be a subclass of the main +# enum class, so that method calls and instance checks etc will work intuitively. +# We might be able to do this a little more neatly with a metaclass, but this'll do. +WatcherEvent.TRANSACTIONS_CHANGED = type("WatcherEvent.TRANSACTIONS_CHANGED", (WatcherEvent.TRANSACTIONS_CHANGED, WatcherEvent,), {}) # type: ignore +WatcherEvent.ERROR = type("WatcherEvent.ERROR", (WatcherEvent.ERROR, WatcherEvent,), {}) # type: ignore +WatcherEvent.DISCONNECTED = type("WatcherEvent.DISCONNECTED", (WatcherEvent.DISCONNECTED, WatcherEvent,), {}) # type: ignore +WatcherEvent.RECONNECTED = type("WatcherEvent.RECONNECTED", (WatcherEvent.RECONNECTED, WatcherEvent,), {}) # type: ignore + + - WORDS15 = 15 - """ - 15-word mnemonic (160 bits of entropy) - """ - +class _UniffiConverterTypeWatcherEvent(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return WatcherEvent.TRANSACTIONS_CHANGED( + _UniffiConverterSequenceTypeHistoryTransaction.read(buf), + _UniffiConverterTypeWalletBalance.read(buf), + _UniffiConverterUInt32.read(buf), + _UniffiConverterUInt32.read(buf), + _UniffiConverterTypeAccountType.read(buf), + ) + if variant == 2: + return WatcherEvent.ERROR( + _UniffiConverterString.read(buf), + ) + if variant == 3: + return WatcherEvent.DISCONNECTED( + _UniffiConverterString.read(buf), + ) + if variant == 4: + return WatcherEvent.RECONNECTED( + ) + raise InternalError("Raw enum value doesn't match any cases") + + @staticmethod + def check_lower(value): + if value.is_TRANSACTIONS_CHANGED(): + _UniffiConverterSequenceTypeHistoryTransaction.check_lower(value.transactions) + _UniffiConverterTypeWalletBalance.check_lower(value.balance) + _UniffiConverterUInt32.check_lower(value.tx_count) + _UniffiConverterUInt32.check_lower(value.block_height) + _UniffiConverterTypeAccountType.check_lower(value.account_type) + return + if value.is_ERROR(): + _UniffiConverterString.check_lower(value.message) + return + if value.is_DISCONNECTED(): + _UniffiConverterString.check_lower(value.message) + return + if value.is_RECONNECTED(): + return + raise ValueError(value) + + @staticmethod + def write(value, buf): + if value.is_TRANSACTIONS_CHANGED(): + buf.write_i32(1) + _UniffiConverterSequenceTypeHistoryTransaction.write(value.transactions, buf) + _UniffiConverterTypeWalletBalance.write(value.balance, buf) + _UniffiConverterUInt32.write(value.tx_count, buf) + _UniffiConverterUInt32.write(value.block_height, buf) + _UniffiConverterTypeAccountType.write(value.account_type, buf) + if value.is_ERROR(): + buf.write_i32(2) + _UniffiConverterString.write(value.message, buf) + if value.is_DISCONNECTED(): + buf.write_i32(3) + _UniffiConverterString.write(value.message, buf) + if value.is_RECONNECTED(): + buf.write_i32(4) + + + + + + + +class WordCount(enum.Enum): + WORDS12 = 12 + """ + 12-word mnemonic (128 bits of entropy) + """ + + + WORDS15 = 15 + """ + 15-word mnemonic (160 bits of entropy) + """ + + WORDS18 = 18 """ 18-word mnemonic (192 bits of entropy) """ - + WORDS21 = 21 """ 21-word mnemonic (224 bits of entropy) """ - + WORDS24 = 24 """ 24-word mnemonic (256 bits of entropy) """ - + class _UniffiConverterTypeWordCount(_UniffiConverterRustBuffer): @@ -16638,6 +17022,165 @@ def read(cls, buf): return d # objects. +class EventListenerProtocol(typing.Protocol): + """ + Callback interface for receiving watcher events. + + Implement this trait in Swift/Kotlin/Python to receive typed notifications + from xpub watchers. + """ + + def on_event(self, watcher_id: "str",event: "WatcherEvent"): + """ + Called when a watcher event occurs. + + `watcher_id` identifies which watcher produced the event. + `event` is a typed enum — no JSON parsing needed. + """ + + raise NotImplementedError +# EventListener is a foreign trait so treated like a callback interface, where the +# primary use-case is the trait being implemented locally. +# It is a base-class local implementations might subclass. + + +class EventListener(): + """ + Callback interface for receiving watcher events. + + Implement this trait in Swift/Kotlin/Python to receive typed notifications + from xpub watchers. + """ + + def on_event(self, watcher_id: "str",event: "WatcherEvent"): + """ + Called when a watcher event occurs. + + `watcher_id` identifies which watcher produced the event. + `event` is a typed enum — no JSON parsing needed. + """ + + raise NotImplementedError +# `EventListenerImpl` is the implementation for a Rust implemented version. +class EventListenerImpl(): + """ + Callback interface for receiving watcher events. + + Implement this trait in Swift/Kotlin/Python to receive typed notifications + from xpub watchers. + """ + + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_free_eventlistener, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_clone_eventlistener, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + def on_event(self, watcher_id: "str",event: "WatcherEvent") -> None: + """ + Called when a watcher event occurs. + + `watcher_id` identifies which watcher produced the event. + `event` is a typed enum — no JSON parsing needed. + """ + + _UniffiConverterString.check_lower(watcher_id) + + _UniffiConverterTypeWatcherEvent.check_lower(event) + + _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_eventlistener_on_event,self._uniffi_clone_pointer(), + _UniffiConverterString.lower(watcher_id), + _UniffiConverterTypeWatcherEvent.lower(event)) + + + + + + +# Put all the bits inside a class to keep the top-level namespace clean +class _UniffiTraitImplEventListener: + # For each method, generate a callback function to pass to Rust + + @_UNIFFI_CALLBACK_INTERFACE_EVENT_LISTENER_METHOD0 + def on_event( + uniffi_handle, + watcher_id, + event, + uniffi_out_return, + uniffi_call_status_ptr, + ): + uniffi_obj = _UniffiConverterTypeEventListener._handle_map.get(uniffi_handle) + def make_call(): + args = (_UniffiConverterString.lift(watcher_id), _UniffiConverterTypeWatcherEvent.lift(event), ) + method = uniffi_obj.on_event + return method(*args) + + + write_return_value = lambda v: None + _uniffi_trait_interface_call( + uniffi_call_status_ptr.contents, + make_call, + write_return_value, + ) + + @_UNIFFI_CALLBACK_INTERFACE_FREE + def _uniffi_free(uniffi_handle): + _UniffiConverterTypeEventListener._handle_map.remove(uniffi_handle) + + # Generate the FFI VTable. This has a field for each callback interface method. + _uniffi_vtable = _UniffiVTableCallbackInterfaceEventListener( + on_event, + _uniffi_free + ) + # Send Rust a pointer to the VTable. Note: this means we need to keep the struct alive forever, + # or else bad things will happen when Rust tries to access it. + _UniffiLib.uniffi_bitkitcore_fn_init_callback_vtable_eventlistener(ctypes.byref(_uniffi_vtable)) + + + +class _UniffiConverterTypeEventListener: + _handle_map = _UniffiHandleMap() + + @staticmethod + def lift(value: int): + return EventListenerImpl._make_instance_(value) + + @staticmethod + def check_lower(value: EventListener): + pass + + @staticmethod + def lower(value: EventListenerProtocol): + return _UniffiConverterTypeEventListener._handle_map.insert(value) + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: EventListenerProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) class TrezorTransportCallbackProtocol(typing.Protocol): """ Callback interface for native Trezor transport operations @@ -16939,7 +17482,7 @@ class TrezorTransportCallbackImpl(): """ _pointer: ctypes.c_void_p - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -16981,7 +17524,7 @@ def open_device(self, path: "str") -> "TrezorTransportWriteResult": """ _UniffiConverterString.check_lower(path) - + return _UniffiConverterTypeTrezorTransportWriteResult.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_open_device,self._uniffi_clone_pointer(), _UniffiConverterString.lower(path)) @@ -16997,7 +17540,7 @@ def close_device(self, path: "str") -> "TrezorTransportWriteResult": """ _UniffiConverterString.check_lower(path) - + return _UniffiConverterTypeTrezorTransportWriteResult.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_close_device,self._uniffi_clone_pointer(), _UniffiConverterString.lower(path)) @@ -17013,7 +17556,7 @@ def read_chunk(self, path: "str") -> "TrezorTransportReadResult": """ _UniffiConverterString.check_lower(path) - + return _UniffiConverterTypeTrezorTransportReadResult.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_read_chunk,self._uniffi_clone_pointer(), _UniffiConverterString.lower(path)) @@ -17029,9 +17572,9 @@ def write_chunk(self, path: "str",data: "bytes") -> "TrezorTransportWriteResult" """ _UniffiConverterString.check_lower(path) - + _UniffiConverterBytes.check_lower(data) - + return _UniffiConverterTypeTrezorTransportWriteResult.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_write_chunk,self._uniffi_clone_pointer(), _UniffiConverterString.lower(path), @@ -17048,7 +17591,7 @@ def get_chunk_size(self, path: "str") -> "int": """ _UniffiConverterString.check_lower(path) - + return _UniffiConverterUInt32.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_get_chunk_size,self._uniffi_clone_pointer(), _UniffiConverterString.lower(path)) @@ -17076,11 +17619,11 @@ def call_message(self, path: "str",message_type: "int",data: "bytes") -> "typing """ _UniffiConverterString.check_lower(path) - + _UniffiConverterUInt16.check_lower(message_type) - + _UniffiConverterBytes.check_lower(data) - + return _UniffiConverterOptionalTypeTrezorCallMessageResult.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_call_message,self._uniffi_clone_pointer(), _UniffiConverterString.lower(path), @@ -17128,9 +17671,9 @@ def save_thp_credential(self, device_id: "str",credential_json: "str") -> "bool" """ _UniffiConverterString.check_lower(device_id) - + _UniffiConverterString.check_lower(credential_json) - + return _UniffiConverterBool.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_save_thp_credential,self._uniffi_clone_pointer(), _UniffiConverterString.lower(device_id), @@ -17155,7 +17698,7 @@ def load_thp_credential(self, device_id: "str") -> "typing.Optional[str]": """ _UniffiConverterString.check_lower(device_id) - + return _UniffiConverterOptionalString.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_load_thp_credential,self._uniffi_clone_pointer(), _UniffiConverterString.lower(device_id)) @@ -17179,9 +17722,9 @@ def log_debug(self, tag: "str",message: "str") -> None: """ _UniffiConverterString.check_lower(tag) - + _UniffiConverterString.check_lower(message) - + _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_log_debug,self._uniffi_clone_pointer(), _UniffiConverterString.lower(tag), _UniffiConverterString.lower(message)) @@ -17207,7 +17750,7 @@ def make_call(): method = uniffi_obj.enumerate_devices return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterSequenceTypeNativeDeviceInfo.lower(v) _uniffi_trait_interface_call( @@ -17229,7 +17772,7 @@ def make_call(): method = uniffi_obj.open_device return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterTypeTrezorTransportWriteResult.lower(v) _uniffi_trait_interface_call( @@ -17251,7 +17794,7 @@ def make_call(): method = uniffi_obj.close_device return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterTypeTrezorTransportWriteResult.lower(v) _uniffi_trait_interface_call( @@ -17273,7 +17816,7 @@ def make_call(): method = uniffi_obj.read_chunk return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterTypeTrezorTransportReadResult.lower(v) _uniffi_trait_interface_call( @@ -17296,7 +17839,7 @@ def make_call(): method = uniffi_obj.write_chunk return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterTypeTrezorTransportWriteResult.lower(v) _uniffi_trait_interface_call( @@ -17318,7 +17861,7 @@ def make_call(): method = uniffi_obj.get_chunk_size return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterUInt32.lower(v) _uniffi_trait_interface_call( @@ -17342,7 +17885,7 @@ def make_call(): method = uniffi_obj.call_message return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterOptionalTypeTrezorCallMessageResult.lower(v) _uniffi_trait_interface_call( @@ -17363,7 +17906,7 @@ def make_call(): method = uniffi_obj.get_pairing_code return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterString.lower(v) _uniffi_trait_interface_call( @@ -17386,7 +17929,7 @@ def make_call(): method = uniffi_obj.save_thp_credential return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterBool.lower(v) _uniffi_trait_interface_call( @@ -17408,7 +17951,7 @@ def make_call(): method = uniffi_obj.load_thp_credential return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterOptionalString.lower(v) _uniffi_trait_interface_call( @@ -17431,7 +17974,7 @@ def make_call(): method = uniffi_obj.log_debug return method(*args) - + write_return_value = lambda v: None _uniffi_trait_interface_call( uniffi_call_status_ptr.contents, @@ -17564,7 +18107,7 @@ class TrezorUiCallbackImpl(): """ _pointer: ctypes.c_void_p - + def __init__(self, *args, **kwargs): raise ValueError("This class has no default constructor") @@ -17616,7 +18159,7 @@ def on_passphrase_request(self, on_device: "bool") -> "PassphraseResponse": """ _UniffiConverterBool.check_lower(on_device) - + return _UniffiConverterTypePassphraseResponse.lift( _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request,self._uniffi_clone_pointer(), _UniffiConverterBool.lower(on_device)) @@ -17642,7 +18185,7 @@ def make_call(): method = uniffi_obj.on_pin_request return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterString.lower(v) _uniffi_trait_interface_call( @@ -17664,7 +18207,7 @@ def make_call(): method = uniffi_obj.on_passphrase_request return method(*args) - + def write_return_value(v): uniffi_out_return[0] = _UniffiConverterTypePassphraseResponse.lower(v) _uniffi_trait_interface_call( @@ -17785,16 +18328,16 @@ def activity_wipe_all() -> None: def add_pre_activity_metadata(pre_activity_metadata: "PreActivityMetadata") -> None: _UniffiConverterTypePreActivityMetadata.check_lower(pre_activity_metadata) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_add_pre_activity_metadata, _UniffiConverterTypePreActivityMetadata.lower(pre_activity_metadata)) def add_pre_activity_metadata_tags(payment_id: "str",tags: "typing.List[str]") -> None: _UniffiConverterString.check_lower(payment_id) - + _UniffiConverterSequenceString.check_lower(tags) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_add_pre_activity_metadata_tags, _UniffiConverterString.lower(payment_id), _UniffiConverterSequenceString.lower(tags)) @@ -17802,9 +18345,9 @@ def add_pre_activity_metadata_tags(payment_id: "str",tags: "typing.List[str]") - def add_tags(activity_id: "str",tags: "typing.List[str]") -> None: _UniffiConverterString.check_lower(activity_id) - + _UniffiConverterSequenceString.check_lower(tags) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_add_tags, _UniffiConverterString.lower(activity_id), _UniffiConverterSequenceString.lower(tags)) @@ -17812,9 +18355,9 @@ def add_tags(activity_id: "str",tags: "typing.List[str]") -> None: async def approve_pubky_auth(auth_url: "str",secret_key_hex: "str") -> None: _UniffiConverterString.check_lower(auth_url) - + _UniffiConverterString.check_lower(secret_key_hex) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_approve_pubky_auth( _UniffiConverterString.lower(auth_url), @@ -17824,8 +18367,8 @@ async def approve_pubky_auth(auth_url: "str",secret_key_hex: "str") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypePubkyError, @@ -17839,8 +18382,8 @@ async def blocktank_remove_all_cjit_entries() -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -17854,8 +18397,8 @@ async def blocktank_remove_all_orders() -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -17869,8 +18412,8 @@ async def blocktank_wipe_all() -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -17878,15 +18421,15 @@ async def blocktank_wipe_all() -> None: async def broadcast_sweep_transaction(psbt: "str",mnemonic_phrase: "str",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]",electrum_url: "str") -> "SweepResult": _UniffiConverterString.check_lower(psbt) - + _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + _UniffiConverterString.check_lower(electrum_url) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_broadcast_sweep_transaction( _UniffiConverterString.lower(psbt), @@ -17899,7 +18442,7 @@ async def broadcast_sweep_transaction(psbt: "str",mnemonic_phrase: "str",network _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeSweepResult.lift, - + # Error FFI converter _UniffiConverterTypeSweepError, @@ -17907,7 +18450,7 @@ async def broadcast_sweep_transaction(psbt: "str",mnemonic_phrase: "str",network def calculate_channel_liquidity_options(params: "ChannelLiquidityParams") -> "ChannelLiquidityOptions": _UniffiConverterTypeChannelLiquidityParams.check_lower(params) - + return _UniffiConverterTypeChannelLiquidityOptions.lift(_uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options, _UniffiConverterTypeChannelLiquidityParams.lower(params))) @@ -17920,8 +18463,8 @@ async def cancel_pubky_auth() -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypePubkyError, @@ -17929,13 +18472,13 @@ async def cancel_pubky_auth() -> None: async def check_sweepable_balances(mnemonic_phrase: "str",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]",electrum_url: "str") -> "SweepableBalances": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + _UniffiConverterString.check_lower(electrum_url) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_check_sweepable_balances( _UniffiConverterString.lower(mnemonic_phrase), @@ -17947,7 +18490,7 @@ async def check_sweepable_balances(mnemonic_phrase: "str",network: "typing.Optio _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeSweepableBalances.lift, - + # Error FFI converter _UniffiConverterTypeSweepError, @@ -17961,7 +18504,7 @@ async def complete_pubky_auth() -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -17969,15 +18512,15 @@ async def complete_pubky_auth() -> "str": def create_channel_request_url(k1: "str",callback: "str",local_node_id: "str",is_private: "bool",cancel: "bool") -> "str": _UniffiConverterString.check_lower(k1) - + _UniffiConverterString.check_lower(callback) - + _UniffiConverterString.check_lower(local_node_id) - + _UniffiConverterBool.check_lower(is_private) - + _UniffiConverterBool.check_lower(cancel) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeLnurlError,_UniffiLib.uniffi_bitkitcore_fn_func_create_channel_request_url, _UniffiConverterString.lower(k1), _UniffiConverterString.lower(callback), @@ -17988,17 +18531,17 @@ def create_channel_request_url(k1: "str",callback: "str",local_node_id: "str",is async def create_cjit_entry(channel_size_sat: "int",invoice_sat: "int",invoice_description: "str",node_id: "str",channel_expiry_weeks: "int",options: "typing.Optional[CreateCjitOptions]") -> "IcJitEntry": _UniffiConverterUInt64.check_lower(channel_size_sat) - + _UniffiConverterUInt64.check_lower(invoice_sat) - + _UniffiConverterString.check_lower(invoice_description) - + _UniffiConverterString.check_lower(node_id) - + _UniffiConverterUInt32.check_lower(channel_expiry_weeks) - + _UniffiConverterOptionalTypeCreateCjitOptions.check_lower(options) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_create_cjit_entry( _UniffiConverterUInt64.lower(channel_size_sat), @@ -18012,7 +18555,7 @@ async def create_cjit_entry(channel_size_sat: "int",invoice_sat: "int",invoice_d _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIcJitEntry.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18020,11 +18563,11 @@ async def create_cjit_entry(channel_size_sat: "int",invoice_sat: "int",invoice_d async def create_order(lsp_balance_sat: "int",channel_expiry_weeks: "int",options: "typing.Optional[CreateOrderOptions]") -> "IBtOrder": _UniffiConverterUInt64.check_lower(lsp_balance_sat) - + _UniffiConverterUInt32.check_lower(channel_expiry_weeks) - + _UniffiConverterOptionalTypeCreateOrderOptions.check_lower(options) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_create_order( _UniffiConverterUInt64.lower(lsp_balance_sat), @@ -18035,7 +18578,7 @@ async def create_order(lsp_balance_sat: "int",channel_expiry_weeks: "int",option _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBtOrder.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18043,11 +18586,11 @@ async def create_order(lsp_balance_sat: "int",channel_expiry_weeks: "int",option def create_withdraw_callback_url(k1: "str",callback: "str",payment_request: "str") -> "str": _UniffiConverterString.check_lower(k1) - + _UniffiConverterString.check_lower(callback) - + _UniffiConverterString.check_lower(payment_request) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeLnurlError,_UniffiLib.uniffi_bitkitcore_fn_func_create_withdraw_callback_url, _UniffiConverterString.lower(k1), _UniffiConverterString.lower(callback), @@ -18056,7 +18599,7 @@ def create_withdraw_callback_url(k1: "str",callback: "str",payment_request: "str async def decode(invoice: "str") -> "Scanner": _UniffiConverterString.check_lower(invoice) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_decode( _UniffiConverterString.lower(invoice)), @@ -18065,7 +18608,7 @@ async def decode(invoice: "str") -> "Scanner": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeScanner.lift, - + # Error FFI converter _UniffiConverterTypeDecodingError, @@ -18073,34 +18616,34 @@ async def decode(invoice: "str") -> "Scanner": def delete_activity_by_id(activity_id: "str") -> "bool": _UniffiConverterString.check_lower(activity_id) - + return _UniffiConverterBool.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_delete_activity_by_id, _UniffiConverterString.lower(activity_id))) def delete_pre_activity_metadata(payment_id: "str") -> None: _UniffiConverterString.check_lower(payment_id) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_delete_pre_activity_metadata, _UniffiConverterString.lower(payment_id)) def delete_transaction_details(tx_id: "str") -> "bool": _UniffiConverterString.check_lower(tx_id) - + return _UniffiConverterBool.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_delete_transaction_details, _UniffiConverterString.lower(tx_id))) def derive_bitcoin_address(mnemonic_phrase: "str",derivation_path_str: "typing.Optional[str]",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]") -> "GetAddressResponse": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalString.check_lower(derivation_path_str) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + return _UniffiConverterTypeGetAddressResponse.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_derive_bitcoin_address, _UniffiConverterString.lower(mnemonic_phrase), _UniffiConverterOptionalString.lower(derivation_path_str), @@ -18110,19 +18653,19 @@ def derive_bitcoin_address(mnemonic_phrase: "str",derivation_path_str: "typing.O def derive_bitcoin_addresses(mnemonic_phrase: "str",derivation_path_str: "typing.Optional[str]",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]",is_change: "typing.Optional[bool]",start_index: "typing.Optional[int]",count: "typing.Optional[int]") -> "GetAddressesResponse": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalString.check_lower(derivation_path_str) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + _UniffiConverterOptionalBool.check_lower(is_change) - + _UniffiConverterOptionalUInt32.check_lower(start_index) - + _UniffiConverterOptionalUInt32.check_lower(count) - + return _UniffiConverterTypeGetAddressesResponse.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_derive_bitcoin_addresses, _UniffiConverterString.lower(mnemonic_phrase), _UniffiConverterOptionalString.lower(derivation_path_str), @@ -18135,15 +18678,15 @@ def derive_bitcoin_addresses(mnemonic_phrase: "str",derivation_path_str: "typing def derive_onchain_descriptor(mnemonic_phrase: "str",network: "Network",bip39_passphrase: "typing.Optional[str]",account_type: "AccountType",account_index: "int") -> "str": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + _UniffiConverterTypeAccountType.check_lower(account_type) - + _UniffiConverterUInt32.check_lower(account_index) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_derive_onchain_descriptor, _UniffiConverterString.lower(mnemonic_phrase), _UniffiConverterTypeNetwork.lower(network), @@ -18154,13 +18697,13 @@ def derive_onchain_descriptor(mnemonic_phrase: "str",network: "Network",bip39_pa def derive_private_key(mnemonic_phrase: "str",derivation_path_str: "typing.Optional[str]",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]") -> "str": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalString.check_lower(derivation_path_str) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_derive_private_key, _UniffiConverterString.lower(mnemonic_phrase), _UniffiConverterOptionalString.lower(derivation_path_str), @@ -18170,25 +18713,25 @@ def derive_private_key(mnemonic_phrase: "str",derivation_path_str: "typing.Optio def derive_pubky_secret_key(seed: "bytes") -> "str": _UniffiConverterBytes.check_lower(seed) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypePubkyError,_UniffiLib.uniffi_bitkitcore_fn_func_derive_pubky_secret_key, _UniffiConverterBytes.lower(seed))) def entropy_to_mnemonic(entropy: "bytes") -> "str": _UniffiConverterBytes.check_lower(entropy) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_entropy_to_mnemonic, _UniffiConverterBytes.lower(entropy))) async def estimate_order_fee(lsp_balance_sat: "int",channel_expiry_weeks: "int",options: "typing.Optional[CreateOrderOptions]") -> "IBtEstimateFeeResponse": _UniffiConverterUInt64.check_lower(lsp_balance_sat) - + _UniffiConverterUInt32.check_lower(channel_expiry_weeks) - + _UniffiConverterOptionalTypeCreateOrderOptions.check_lower(options) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_estimate_order_fee( _UniffiConverterUInt64.lower(lsp_balance_sat), @@ -18199,7 +18742,7 @@ async def estimate_order_fee(lsp_balance_sat: "int",channel_expiry_weeks: "int", _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBtEstimateFeeResponse.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18207,11 +18750,11 @@ async def estimate_order_fee(lsp_balance_sat: "int",channel_expiry_weeks: "int", async def estimate_order_fee_full(lsp_balance_sat: "int",channel_expiry_weeks: "int",options: "typing.Optional[CreateOrderOptions]") -> "IBtEstimateFeeResponse2": _UniffiConverterUInt64.check_lower(lsp_balance_sat) - + _UniffiConverterUInt32.check_lower(channel_expiry_weeks) - + _UniffiConverterOptionalTypeCreateOrderOptions.check_lower(options) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_estimate_order_fee_full( _UniffiConverterUInt64.lower(lsp_balance_sat), @@ -18222,7 +18765,7 @@ async def estimate_order_fee_full(lsp_balance_sat: "int",channel_expiry_weeks: " _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBtEstimateFeeResponse2.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18230,7 +18773,7 @@ async def estimate_order_fee_full(lsp_balance_sat: "int",channel_expiry_weeks: " async def fetch_pubky_contacts(public_key: "str") -> "typing.List[str]": _UniffiConverterString.check_lower(public_key) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_contacts( _UniffiConverterString.lower(public_key)), @@ -18239,7 +18782,7 @@ async def fetch_pubky_contacts(public_key: "str") -> "typing.List[str]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -18247,7 +18790,7 @@ async def fetch_pubky_contacts(public_key: "str") -> "typing.List[str]": async def fetch_pubky_file(uri: "str") -> "bytes": _UniffiConverterString.check_lower(uri) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_file( _UniffiConverterString.lower(uri)), @@ -18256,7 +18799,7 @@ async def fetch_pubky_file(uri: "str") -> "bytes": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterBytes.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -18264,7 +18807,7 @@ async def fetch_pubky_file(uri: "str") -> "bytes": async def fetch_pubky_file_string(uri: "str") -> "str": _UniffiConverterString.check_lower(uri) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_file_string( _UniffiConverterString.lower(uri)), @@ -18273,7 +18816,7 @@ async def fetch_pubky_file_string(uri: "str") -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -18281,7 +18824,7 @@ async def fetch_pubky_file_string(uri: "str") -> "str": async def fetch_pubky_profile(public_key: "str") -> "PubkyProfile": _UniffiConverterString.check_lower(public_key) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_profile( _UniffiConverterString.lower(public_key)), @@ -18290,7 +18833,7 @@ async def fetch_pubky_profile(public_key: "str") -> "PubkyProfile": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypePubkyProfile.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -18298,28 +18841,28 @@ async def fetch_pubky_profile(public_key: "str") -> "PubkyProfile": def generate_mnemonic(word_count: "typing.Optional[WordCount]") -> "str": _UniffiConverterOptionalTypeWordCount.check_lower(word_count) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_generate_mnemonic, _UniffiConverterOptionalTypeWordCount.lower(word_count))) def get_activities(filter: "typing.Optional[ActivityFilter]",tx_type: "typing.Optional[PaymentType]",tags: "typing.Optional[typing.List[str]]",search: "typing.Optional[str]",min_date: "typing.Optional[int]",max_date: "typing.Optional[int]",limit: "typing.Optional[int]",sort_direction: "typing.Optional[SortDirection]") -> "typing.List[Activity]": _UniffiConverterOptionalTypeActivityFilter.check_lower(filter) - + _UniffiConverterOptionalTypePaymentType.check_lower(tx_type) - + _UniffiConverterOptionalSequenceString.check_lower(tags) - + _UniffiConverterOptionalString.check_lower(search) - + _UniffiConverterOptionalUInt64.check_lower(min_date) - + _UniffiConverterOptionalUInt64.check_lower(max_date) - + _UniffiConverterOptionalUInt32.check_lower(limit) - + _UniffiConverterOptionalTypeSortDirection.check_lower(sort_direction) - + return _UniffiConverterSequenceTypeActivity.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_activities, _UniffiConverterOptionalTypeActivityFilter.lower(filter), _UniffiConverterOptionalTypePaymentType.lower(tx_type), @@ -18333,11 +18876,11 @@ def get_activities(filter: "typing.Optional[ActivityFilter]",tx_type: "typing.Op def get_activities_by_tag(tag: "str",limit: "typing.Optional[int]",sort_direction: "typing.Optional[SortDirection]") -> "typing.List[Activity]": _UniffiConverterString.check_lower(tag) - + _UniffiConverterOptionalUInt32.check_lower(limit) - + _UniffiConverterOptionalTypeSortDirection.check_lower(sort_direction) - + return _UniffiConverterSequenceTypeActivity.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_activities_by_tag, _UniffiConverterString.lower(tag), _UniffiConverterOptionalUInt32.lower(limit), @@ -18346,14 +18889,14 @@ def get_activities_by_tag(tag: "str",limit: "typing.Optional[int]",sort_directio def get_activity_by_id(activity_id: "str") -> "typing.Optional[Activity]": _UniffiConverterString.check_lower(activity_id) - + return _UniffiConverterOptionalTypeActivity.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_activity_by_id, _UniffiConverterString.lower(activity_id))) def get_activity_by_tx_id(tx_id: "str") -> "typing.Optional[OnchainActivity]": _UniffiConverterString.check_lower(tx_id) - + return _UniffiConverterOptionalTypeOnchainActivity.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_activity_by_tx_id, _UniffiConverterString.lower(tx_id))) @@ -18364,7 +18907,7 @@ def get_all_activities_tags() -> "typing.List[ActivityTags]": def get_all_closed_channels(sort_direction: "typing.Optional[SortDirection]") -> "typing.List[ClosedChannelDetails]": _UniffiConverterOptionalTypeSortDirection.check_lower(sort_direction) - + return _UniffiConverterSequenceTypeClosedChannelDetails.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_all_closed_channels, _UniffiConverterOptionalTypeSortDirection.lower(sort_direction))) @@ -18383,9 +18926,9 @@ def get_all_unique_tags() -> "typing.List[str]": def get_bip39_suggestions(partial_word: "str",limit: "int") -> "typing.List[str]": _UniffiConverterString.check_lower(partial_word) - + _UniffiConverterUInt32.check_lower(limit) - + return _UniffiConverterSequenceString.lift(_uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_get_bip39_suggestions, _UniffiConverterString.lower(partial_word), _UniffiConverterUInt32.lower(limit))) @@ -18397,11 +18940,11 @@ def get_bip39_wordlist() -> "typing.List[str]": async def get_cjit_entries(entry_ids: "typing.Optional[typing.List[str]]",filter: "typing.Optional[CJitStateEnum]",refresh: "bool") -> "typing.List[IcJitEntry]": _UniffiConverterOptionalSequenceString.check_lower(entry_ids) - + _UniffiConverterOptionalTypeCJitStateEnum.check_lower(filter) - + _UniffiConverterBool.check_lower(refresh) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_cjit_entries( _UniffiConverterOptionalSequenceString.lower(entry_ids), @@ -18412,7 +18955,7 @@ async def get_cjit_entries(entry_ids: "typing.Optional[typing.List[str]]",filter _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeIcJitEntry.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18420,21 +18963,21 @@ async def get_cjit_entries(entry_ids: "typing.Optional[typing.List[str]]",filter def get_closed_channel_by_id(channel_id: "str") -> "typing.Optional[ClosedChannelDetails]": _UniffiConverterString.check_lower(channel_id) - + return _UniffiConverterOptionalTypeClosedChannelDetails.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_closed_channel_by_id, _UniffiConverterString.lower(channel_id))) def get_default_lsp_balance(params: "DefaultLspBalanceParams") -> "int": _UniffiConverterTypeDefaultLspBalanceParams.check_lower(params) - + return _UniffiConverterUInt64.lift(_uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_get_default_lsp_balance, _UniffiConverterTypeDefaultLspBalanceParams.lower(params))) async def get_gift(gift_id: "str") -> "IGift": _UniffiConverterString.check_lower(gift_id) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_gift( _UniffiConverterString.lower(gift_id)), @@ -18443,7 +18986,7 @@ async def get_gift(gift_id: "str") -> "IGift": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIGift.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18451,7 +18994,7 @@ async def get_gift(gift_id: "str") -> "IGift": async def get_info(refresh: "typing.Optional[bool]") -> "typing.Optional[IBtInfo]": _UniffiConverterOptionalBool.check_lower(refresh) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_info( _UniffiConverterOptionalBool.lower(refresh)), @@ -18460,7 +19003,7 @@ async def get_info(refresh: "typing.Optional[bool]") -> "typing.Optional[IBtInfo _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterOptionalTypeIBtInfo.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18468,9 +19011,9 @@ async def get_info(refresh: "typing.Optional[bool]") -> "typing.Optional[IBtInfo async def get_lnurl_invoice(address: "str",amount_satoshis: "int") -> "str": _UniffiConverterString.check_lower(address) - + _UniffiConverterUInt64.check_lower(amount_satoshis) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_lnurl_invoice( _UniffiConverterString.lower(address), @@ -18480,7 +19023,7 @@ async def get_lnurl_invoice(address: "str",amount_satoshis: "int") -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeLnurlError, @@ -18488,7 +19031,7 @@ async def get_lnurl_invoice(address: "str",amount_satoshis: "int") -> "str": async def get_min_zero_conf_tx_fee(order_id: "str") -> "IBt0ConfMinTxFeeWindow": _UniffiConverterString.check_lower(order_id) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_min_zero_conf_tx_fee( _UniffiConverterString.lower(order_id)), @@ -18497,7 +19040,7 @@ async def get_min_zero_conf_tx_fee(order_id: "str") -> "IBt0ConfMinTxFeeWindow": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBt0ConfMinTxFeeWindow.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18505,11 +19048,11 @@ async def get_min_zero_conf_tx_fee(order_id: "str") -> "IBt0ConfMinTxFeeWindow": async def get_orders(order_ids: "typing.Optional[typing.List[str]]",filter: "typing.Optional[BtOrderState2]",refresh: "bool") -> "typing.List[IBtOrder]": _UniffiConverterOptionalSequenceString.check_lower(order_ids) - + _UniffiConverterOptionalTypeBtOrderState2.check_lower(filter) - + _UniffiConverterBool.check_lower(refresh) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_orders( _UniffiConverterOptionalSequenceString.lower(order_ids), @@ -18520,7 +19063,7 @@ async def get_orders(order_ids: "typing.Optional[typing.List[str]]",filter: "typ _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeIBtOrder.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18528,7 +19071,7 @@ async def get_orders(order_ids: "typing.Optional[typing.List[str]]",filter: "typ async def get_payment(payment_id: "str") -> "IBtBolt11Invoice": _UniffiConverterString.check_lower(payment_id) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_get_payment( _UniffiConverterString.lower(payment_id)), @@ -18537,7 +19080,7 @@ async def get_payment(payment_id: "str") -> "IBtBolt11Invoice": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBtBolt11Invoice.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18545,9 +19088,9 @@ async def get_payment(payment_id: "str") -> "IBtBolt11Invoice": def get_pre_activity_metadata(search_key: "str",search_by_address: "bool") -> "typing.Optional[PreActivityMetadata]": _UniffiConverterString.check_lower(search_key) - + _UniffiConverterBool.check_lower(search_by_address) - + return _UniffiConverterOptionalTypePreActivityMetadata.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_pre_activity_metadata, _UniffiConverterString.lower(search_key), _UniffiConverterBool.lower(search_by_address))) @@ -18555,23 +19098,23 @@ def get_pre_activity_metadata(search_key: "str",search_by_address: "bool") -> "t def get_tags(activity_id: "str") -> "typing.List[str]": _UniffiConverterString.check_lower(activity_id) - + return _UniffiConverterSequenceString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_tags, _UniffiConverterString.lower(activity_id))) def get_transaction_details(tx_id: "str") -> "typing.Optional[TransactionDetails]": _UniffiConverterString.check_lower(tx_id) - + return _UniffiConverterOptionalTypeTransactionDetails.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_get_transaction_details, _UniffiConverterString.lower(tx_id))) async def gift_order(client_node_id: "str",code: "str") -> "IGift": _UniffiConverterString.check_lower(client_node_id) - + _UniffiConverterString.check_lower(code) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_gift_order( _UniffiConverterString.lower(client_node_id), @@ -18581,7 +19124,7 @@ async def gift_order(client_node_id: "str",code: "str") -> "IGift": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIGift.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18589,7 +19132,7 @@ async def gift_order(client_node_id: "str",code: "str") -> "IGift": async def gift_pay(invoice: "str") -> "IGift": _UniffiConverterString.check_lower(invoice) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_gift_pay( _UniffiConverterString.lower(invoice)), @@ -18598,7 +19141,7 @@ async def gift_pay(invoice: "str") -> "IGift": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIGift.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18606,45 +19149,45 @@ async def gift_pay(invoice: "str") -> "IGift": def init_db(base_path: "str") -> "str": _UniffiConverterString.check_lower(base_path) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeDbError,_UniffiLib.uniffi_bitkitcore_fn_func_init_db, _UniffiConverterString.lower(base_path))) def insert_activity(activity: "Activity") -> None: _UniffiConverterTypeActivity.check_lower(activity) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_insert_activity, _UniffiConverterTypeActivity.lower(activity)) def is_address_used(address: "str") -> "bool": _UniffiConverterString.check_lower(address) - + return _UniffiConverterBool.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_is_address_used, _UniffiConverterString.lower(address))) def is_valid_bip39_word(word: "str") -> "bool": _UniffiConverterString.check_lower(word) - + return _UniffiConverterBool.lift(_uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_is_valid_bip39_word, _UniffiConverterString.lower(word))) async def lnurl_auth(domain: "str",k1: "str",callback: "str",bip32_mnemonic: "str",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]") -> "str": _UniffiConverterString.check_lower(domain) - + _UniffiConverterString.check_lower(k1) - + _UniffiConverterString.check_lower(callback) - + _UniffiConverterString.check_lower(bip32_mnemonic) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_lnurl_auth( _UniffiConverterString.lower(domain), @@ -18658,7 +19201,7 @@ async def lnurl_auth(domain: "str",k1: "str",callback: "str",bip32_mnemonic: "st _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeLnurlError, @@ -18666,9 +19209,9 @@ async def lnurl_auth(domain: "str",k1: "str",callback: "str",bip32_mnemonic: "st def mark_activity_as_seen(activity_id: "str",seen_at: "int") -> None: _UniffiConverterString.check_lower(activity_id) - + _UniffiConverterUInt64.check_lower(seen_at) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_mark_activity_as_seen, _UniffiConverterString.lower(activity_id), _UniffiConverterUInt64.lower(seen_at)) @@ -18676,16 +19219,16 @@ def mark_activity_as_seen(activity_id: "str",seen_at: "int") -> None: def mnemonic_to_entropy(mnemonic_phrase: "str") -> "bytes": _UniffiConverterString.check_lower(mnemonic_phrase) - + return _UniffiConverterBytes.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_mnemonic_to_entropy, _UniffiConverterString.lower(mnemonic_phrase))) def mnemonic_to_seed(mnemonic_phrase: "str",passphrase: "typing.Optional[str]") -> "bytes": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalString.check_lower(passphrase) - + return _UniffiConverterBytes.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_mnemonic_to_seed, _UniffiConverterString.lower(mnemonic_phrase), _UniffiConverterOptionalString.lower(passphrase))) @@ -18700,9 +19243,9 @@ async def onchain_broadcast_raw_tx(serialized_tx: "str",electrum_url: "str") -> """ _UniffiConverterString.check_lower(serialized_tx) - + _UniffiConverterString.check_lower(electrum_url) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_onchain_broadcast_raw_tx( _UniffiConverterString.lower(serialized_tx), @@ -18712,7 +19255,7 @@ async def onchain_broadcast_raw_tx(serialized_tx: "str",electrum_url: "str") -> _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeBroadcastError, @@ -18729,7 +19272,7 @@ async def onchain_compose_transaction(params: "ComposeParams") -> "typing.List[C """ _UniffiConverterTypeComposeParams.check_lower(params) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_onchain_compose_transaction( _UniffiConverterTypeComposeParams.lower(params)), @@ -18738,7 +19281,7 @@ async def onchain_compose_transaction(params: "ComposeParams") -> "typing.List[C _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeComposeResult.lift, - + # Error FFI converter None, @@ -18751,15 +19294,15 @@ async def onchain_get_account_info(extended_key: "str",electrum_url: "str",netwo """ _UniffiConverterString.check_lower(extended_key) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalUInt32.check_lower(gap_limit) - + _UniffiConverterOptionalTypeAccountType.check_lower(script_type) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_account_info( _UniffiConverterString.lower(extended_key), @@ -18772,7 +19315,7 @@ async def onchain_get_account_info(extended_key: "str",electrum_url: "str",netwo _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeAccountInfoResult.lift, - + # Error FFI converter _UniffiConverterTypeAccountInfoError, @@ -18784,11 +19327,11 @@ async def onchain_get_address_info(address: "str",electrum_url: "str",network: " """ _UniffiConverterString.check_lower(address) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_address_info( _UniffiConverterString.lower(address), @@ -18799,7 +19342,7 @@ async def onchain_get_address_info(address: "str",electrum_url: "str",network: " _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeSingleAddressInfoResult.lift, - + # Error FFI converter _UniffiConverterTypeAccountInfoError, @@ -18811,15 +19354,15 @@ async def onchain_get_transaction_detail(extended_key: "str",electrum_url: "str" """ _UniffiConverterString.check_lower(extended_key) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterString.check_lower(txid) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalTypeAccountType.check_lower(script_type) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_transaction_detail( _UniffiConverterString.lower(extended_key), @@ -18832,7 +19375,7 @@ async def onchain_get_transaction_detail(extended_key: "str",electrum_url: "str" _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTransactionDetail.lift, - + # Error FFI converter _UniffiConverterTypeAccountInfoError, @@ -18844,13 +19387,13 @@ async def onchain_get_transaction_history(extended_key: "str",electrum_url: "str """ _UniffiConverterString.check_lower(extended_key) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalTypeAccountType.check_lower(script_type) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_transaction_history( _UniffiConverterString.lower(extended_key), @@ -18862,17 +19405,63 @@ async def onchain_get_transaction_history(extended_key: "str",electrum_url: "str _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTransactionHistoryResult.lift, + + # Error FFI converter +_UniffiConverterTypeAccountInfoError, + + ) +async def onchain_start_watcher(params: "WatcherParams",listener: "EventListener") -> None: + + """ + Start monitoring an xpub for transaction activity via Electrum subscriptions. + Each watcher receives its own listener — no global registration needed. + """ + + _UniffiConverterTypeWatcherParams.check_lower(params) + + _UniffiConverterTypeEventListener.check_lower(listener) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_bitkitcore_fn_func_onchain_start_watcher( + _UniffiConverterTypeWatcherParams.lower(params), + _UniffiConverterTypeEventListener.lower(listener)), + _UniffiLib.ffi_bitkitcore_rust_future_poll_void, + _UniffiLib.ffi_bitkitcore_rust_future_complete_void, + _UniffiLib.ffi_bitkitcore_rust_future_free_void, + # lift function + lambda val: None, + + # Error FFI converter _UniffiConverterTypeAccountInfoError, ) + +def onchain_stop_all_watchers() -> None: + """ + Stop all active xpub watchers. + """ + + _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_all_watchers,) + + +def onchain_stop_watcher(watcher_id: "str") -> None: + """ + Stop a specific xpub watcher by ID. + """ + + _UniffiConverterString.check_lower(watcher_id) + + _uniffi_rust_call_with_error(_UniffiConverterTypeAccountInfoError,_UniffiLib.uniffi_bitkitcore_fn_func_onchain_stop_watcher, + _UniffiConverterString.lower(watcher_id)) + async def open_channel(order_id: "str",connection_string: "str") -> "IBtOrder": _UniffiConverterString.check_lower(order_id) - + _UniffiConverterString.check_lower(connection_string) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_open_channel( _UniffiConverterString.lower(order_id), @@ -18882,7 +19471,7 @@ async def open_channel(order_id: "str",connection_string: "str") -> "IBtOrder": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBtOrder.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -18890,26 +19479,26 @@ async def open_channel(order_id: "str",connection_string: "str") -> "IBtOrder": def parse_pubky_auth_url(auth_url: "str") -> "PubkyAuthDetails": _UniffiConverterString.check_lower(auth_url) - + return _UniffiConverterTypePubkyAuthDetails.lift(_uniffi_rust_call_with_error(_UniffiConverterTypePubkyError,_UniffiLib.uniffi_bitkitcore_fn_func_parse_pubky_auth_url, _UniffiConverterString.lower(auth_url))) async def prepare_legacy_rn_native_segwit_recovery_sweep(mnemonic_phrase: "str",network: "typing.Optional[Network]",electrum_url: "str",destination_address: "str",fee_rate_sats_per_vbyte: "typing.Optional[int]",index_limit: "int",bip39_passphrase: "typing.Optional[str]") -> "LegacyRnCloseRecoverySweepPreview": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterString.check_lower(destination_address) - + _UniffiConverterOptionalUInt32.check_lower(fee_rate_sats_per_vbyte) - + _UniffiConverterUInt32.check_lower(index_limit) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_prepare_legacy_rn_native_segwit_recovery_sweep( _UniffiConverterString.lower(mnemonic_phrase), @@ -18924,7 +19513,7 @@ async def prepare_legacy_rn_native_segwit_recovery_sweep(mnemonic_phrase: "str", _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeLegacyRnCloseRecoverySweepPreview.lift, - + # Error FFI converter _UniffiConverterTypeSweepError, @@ -18932,17 +19521,17 @@ async def prepare_legacy_rn_native_segwit_recovery_sweep(mnemonic_phrase: "str", async def prepare_sweep_transaction(mnemonic_phrase: "str",network: "typing.Optional[Network]",bip39_passphrase: "typing.Optional[str]",electrum_url: "str",destination_address: "str",fee_rate_sats_per_vbyte: "typing.Optional[int]") -> "SweepTransactionPreview": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterString.check_lower(destination_address) - + _UniffiConverterOptionalUInt32.check_lower(fee_rate_sats_per_vbyte) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_prepare_sweep_transaction( _UniffiConverterString.lower(mnemonic_phrase), @@ -18956,7 +19545,7 @@ async def prepare_sweep_transaction(mnemonic_phrase: "str",network: "typing.Opti _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeSweepTransactionPreview.lift, - + # Error FFI converter _UniffiConverterTypeSweepError, @@ -18964,18 +19553,18 @@ async def prepare_sweep_transaction(mnemonic_phrase: "str",network: "typing.Opti def pubky_public_key_from_secret(secret_key_hex: "str") -> "str": _UniffiConverterString.check_lower(secret_key_hex) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypePubkyError,_UniffiLib.uniffi_bitkitcore_fn_func_pubky_public_key_from_secret, _UniffiConverterString.lower(secret_key_hex))) async def pubky_put_with_secret_key(secret_key_hex: "str",path: "str",content: "bytes") -> None: _UniffiConverterString.check_lower(secret_key_hex) - + _UniffiConverterString.check_lower(path) - + _UniffiConverterBytes.check_lower(content) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_pubky_put_with_secret_key( _UniffiConverterString.lower(secret_key_hex), @@ -18986,8 +19575,8 @@ async def pubky_put_with_secret_key(secret_key_hex: "str",path: "str",content: " _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypePubkyError, @@ -18995,9 +19584,9 @@ async def pubky_put_with_secret_key(secret_key_hex: "str",path: "str",content: " async def pubky_session_delete(session_secret: "str",path: "str") -> None: _UniffiConverterString.check_lower(session_secret) - + _UniffiConverterString.check_lower(path) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_pubky_session_delete( _UniffiConverterString.lower(session_secret), @@ -19007,8 +19596,8 @@ async def pubky_session_delete(session_secret: "str",path: "str") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypePubkyError, @@ -19016,9 +19605,9 @@ async def pubky_session_delete(session_secret: "str",path: "str") -> None: async def pubky_session_list(session_secret: "str",dir_path: "str") -> "typing.List[str]": _UniffiConverterString.check_lower(session_secret) - + _UniffiConverterString.check_lower(dir_path) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_pubky_session_list( _UniffiConverterString.lower(session_secret), @@ -19028,7 +19617,7 @@ async def pubky_session_list(session_secret: "str",dir_path: "str") -> "typing.L _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -19036,11 +19625,11 @@ async def pubky_session_list(session_secret: "str",dir_path: "str") -> "typing.L async def pubky_session_put(session_secret: "str",path: "str",content: "bytes") -> None: _UniffiConverterString.check_lower(session_secret) - + _UniffiConverterString.check_lower(path) - + _UniffiConverterBytes.check_lower(content) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_pubky_session_put( _UniffiConverterString.lower(session_secret), @@ -19051,8 +19640,8 @@ async def pubky_session_put(session_secret: "str",path: "str",content: "bytes") _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypePubkyError, @@ -19060,7 +19649,7 @@ async def pubky_session_put(session_secret: "str",path: "str",content: "bytes") async def pubky_sign_in(secret_key_hex: "str") -> "str": _UniffiConverterString.check_lower(secret_key_hex) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_pubky_sign_in( _UniffiConverterString.lower(secret_key_hex)), @@ -19069,7 +19658,7 @@ async def pubky_sign_in(secret_key_hex: "str") -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -19077,11 +19666,11 @@ async def pubky_sign_in(secret_key_hex: "str") -> "str": async def pubky_sign_up(secret_key_hex: "str",homeserver_public_key_z32: "str",signup_code: "typing.Optional[str]") -> "str": _UniffiConverterString.check_lower(secret_key_hex) - + _UniffiConverterString.check_lower(homeserver_public_key_z32) - + _UniffiConverterOptionalString.check_lower(signup_code) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_pubky_sign_up( _UniffiConverterString.lower(secret_key_hex), @@ -19092,7 +19681,7 @@ async def pubky_sign_up(secret_key_hex: "str",homeserver_public_key_z32: "str",s _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -19110,7 +19699,7 @@ async def refresh_active_cjit_entries() -> "typing.List[IcJitEntry]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeIcJitEntry.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19128,7 +19717,7 @@ async def refresh_active_orders() -> "typing.List[IBtOrder]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeIBtOrder.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19136,21 +19725,21 @@ async def refresh_active_orders() -> "typing.List[IBtOrder]": async def register_device(device_token: "str",public_key: "str",features: "typing.List[str]",node_id: "str",iso_timestamp: "str",signature: "str",is_production: "typing.Optional[bool]",custom_url: "typing.Optional[str]") -> "str": _UniffiConverterString.check_lower(device_token) - + _UniffiConverterString.check_lower(public_key) - + _UniffiConverterSequenceString.check_lower(features) - + _UniffiConverterString.check_lower(node_id) - + _UniffiConverterString.check_lower(iso_timestamp) - + _UniffiConverterString.check_lower(signature) - + _UniffiConverterOptionalBool.check_lower(is_production) - + _UniffiConverterOptionalString.check_lower(custom_url) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_register_device( _UniffiConverterString.lower(device_token), @@ -19166,7 +19755,7 @@ async def register_device(device_token: "str",public_key: "str",features: "typin _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19174,11 +19763,11 @@ async def register_device(device_token: "str",public_key: "str",features: "typin async def regtest_close_channel(funding_tx_id: "str",vout: "int",force_close_after_s: "typing.Optional[int]") -> "str": _UniffiConverterString.check_lower(funding_tx_id) - + _UniffiConverterUInt32.check_lower(vout) - + _UniffiConverterOptionalUInt64.check_lower(force_close_after_s) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_regtest_close_channel( _UniffiConverterString.lower(funding_tx_id), @@ -19189,7 +19778,7 @@ async def regtest_close_channel(funding_tx_id: "str",vout: "int",force_close_aft _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19197,9 +19786,9 @@ async def regtest_close_channel(funding_tx_id: "str",vout: "int",force_close_aft async def regtest_deposit(address: "str",amount_sat: "typing.Optional[int]") -> "str": _UniffiConverterString.check_lower(address) - + _UniffiConverterOptionalUInt64.check_lower(amount_sat) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_regtest_deposit( _UniffiConverterString.lower(address), @@ -19209,7 +19798,7 @@ async def regtest_deposit(address: "str",amount_sat: "typing.Optional[int]") -> _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19217,7 +19806,7 @@ async def regtest_deposit(address: "str",amount_sat: "typing.Optional[int]") -> async def regtest_get_payment(payment_id: "str") -> "IBtBolt11Invoice": _UniffiConverterString.check_lower(payment_id) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_regtest_get_payment( _UniffiConverterString.lower(payment_id)), @@ -19226,7 +19815,7 @@ async def regtest_get_payment(payment_id: "str") -> "IBtBolt11Invoice": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeIBtBolt11Invoice.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19234,7 +19823,7 @@ async def regtest_get_payment(payment_id: "str") -> "IBtBolt11Invoice": async def regtest_mine(count: "typing.Optional[int]") -> None: _UniffiConverterOptionalUInt32.check_lower(count) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_regtest_mine( _UniffiConverterOptionalUInt32.lower(count)), @@ -19243,8 +19832,8 @@ async def regtest_mine(count: "typing.Optional[int]") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19252,9 +19841,9 @@ async def regtest_mine(count: "typing.Optional[int]") -> None: async def regtest_pay(invoice: "str",amount_sat: "typing.Optional[int]") -> "str": _UniffiConverterString.check_lower(invoice) - + _UniffiConverterOptionalUInt64.check_lower(amount_sat) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_regtest_pay( _UniffiConverterString.lower(invoice), @@ -19264,7 +19853,7 @@ async def regtest_pay(invoice: "str",amount_sat: "typing.Optional[int]") -> "str _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19272,16 +19861,16 @@ async def regtest_pay(invoice: "str",amount_sat: "typing.Optional[int]") -> "str def remove_closed_channel_by_id(channel_id: "str") -> "bool": _UniffiConverterString.check_lower(channel_id) - + return _UniffiConverterBool.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_remove_closed_channel_by_id, _UniffiConverterString.lower(channel_id))) def remove_pre_activity_metadata_tags(payment_id: "str",tags: "typing.List[str]") -> None: _UniffiConverterString.check_lower(payment_id) - + _UniffiConverterSequenceString.check_lower(tags) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_remove_pre_activity_metadata_tags, _UniffiConverterString.lower(payment_id), _UniffiConverterSequenceString.lower(tags)) @@ -19289,9 +19878,9 @@ def remove_pre_activity_metadata_tags(payment_id: "str",tags: "typing.List[str]" def remove_tags(activity_id: "str",tags: "typing.List[str]") -> None: _UniffiConverterString.check_lower(activity_id) - + _UniffiConverterSequenceString.check_lower(tags) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_remove_tags, _UniffiConverterString.lower(activity_id), _UniffiConverterSequenceString.lower(tags)) @@ -19299,29 +19888,29 @@ def remove_tags(activity_id: "str",tags: "typing.List[str]") -> None: def reset_pre_activity_metadata_tags(payment_id: "str") -> None: _UniffiConverterString.check_lower(payment_id) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_reset_pre_activity_metadata_tags, _UniffiConverterString.lower(payment_id)) def resolve_pubky_url(uri: "str") -> "str": _UniffiConverterString.check_lower(uri) - + return _UniffiConverterString.lift(_uniffi_rust_call_with_error(_UniffiConverterTypePubkyError,_UniffiLib.uniffi_bitkitcore_fn_func_resolve_pubky_url, _UniffiConverterString.lower(uri))) async def scan_legacy_rn_native_segwit_recovery_funds(mnemonic_phrase: "str",network: "typing.Optional[Network]",electrum_url: "str",index_limit: "int",bip39_passphrase: "typing.Optional[str]") -> "LegacyRnCloseRecoveryScanResult": _UniffiConverterString.check_lower(mnemonic_phrase) - + _UniffiConverterOptionalTypeNetwork.check_lower(network) - + _UniffiConverterString.check_lower(electrum_url) - + _UniffiConverterUInt32.check_lower(index_limit) - + _UniffiConverterOptionalString.check_lower(bip39_passphrase) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_scan_legacy_rn_native_segwit_recovery_funds( _UniffiConverterString.lower(mnemonic_phrase), @@ -19334,7 +19923,7 @@ async def scan_legacy_rn_native_segwit_recovery_funds(mnemonic_phrase: "str",net _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeLegacyRnCloseRecoveryScanResult.lift, - + # Error FFI converter _UniffiConverterTypeSweepError, @@ -19342,7 +19931,7 @@ async def scan_legacy_rn_native_segwit_recovery_funds(mnemonic_phrase: "str",net async def start_pubky_auth(caps: "str") -> "str": _UniffiConverterString.check_lower(caps) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_start_pubky_auth( _UniffiConverterString.lower(caps)), @@ -19351,7 +19940,7 @@ async def start_pubky_auth(caps: "str") -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypePubkyError, @@ -19359,13 +19948,13 @@ async def start_pubky_auth(caps: "str") -> "str": async def test_notification(device_token: "str",secret_message: "str",notification_type: "typing.Optional[str]",custom_url: "typing.Optional[str]") -> "str": _UniffiConverterString.check_lower(device_token) - + _UniffiConverterString.check_lower(secret_message) - + _UniffiConverterOptionalString.check_lower(notification_type) - + _UniffiConverterOptionalString.check_lower(custom_url) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_test_notification( _UniffiConverterString.lower(device_token), @@ -19377,7 +19966,7 @@ async def test_notification(device_token: "str",secret_message: "str",notificati _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19389,7 +19978,7 @@ def trezor_account_type_to_script_type(account_type: "AccountType") -> "TrezorSc """ _UniffiConverterTypeAccountType.check_lower(account_type) - + return _UniffiConverterTypeTrezorScriptType.lift(_uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_trezor_account_type_to_script_type, _UniffiConverterTypeAccountType.lower(account_type))) @@ -19403,7 +19992,7 @@ async def trezor_clear_credentials(device_id: "str") -> None: """ _UniffiConverterString.check_lower(device_id) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_clear_credentials( _UniffiConverterString.lower(device_id)), @@ -19412,8 +20001,8 @@ async def trezor_clear_credentials(device_id: "str") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19433,9 +20022,9 @@ async def trezor_connect(device_id: "str",selection: "WalletSelection") -> "Trez """ _UniffiConverterString.check_lower(device_id) - + _UniffiConverterTypeWalletSelection.check_lower(selection) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_connect( _UniffiConverterString.lower(device_id), @@ -19445,7 +20034,7 @@ async def trezor_connect(device_id: "str",selection: "WalletSelection") -> "Trez _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTrezorFeatures.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19463,8 +20052,8 @@ async def trezor_disconnect() -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19476,7 +20065,7 @@ async def trezor_get_address(params: "TrezorGetAddressParams") -> "TrezorAddress """ _UniffiConverterTypeTrezorGetAddressParams.check_lower(params) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_address( _UniffiConverterTypeTrezorGetAddressParams.lower(params)), @@ -19485,7 +20074,7 @@ async def trezor_get_address(params: "TrezorGetAddressParams") -> "TrezorAddress _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTrezorAddressResponse.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19503,7 +20092,7 @@ async def trezor_get_connected_device() -> "typing.Optional[TrezorDeviceInfo]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterOptionalTypeTrezorDeviceInfo.lift, - + # Error FFI converter None, @@ -19525,7 +20114,7 @@ async def trezor_get_device_fingerprint() -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19546,7 +20135,7 @@ async def trezor_get_features() -> "typing.Optional[TrezorFeatures]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterOptionalTypeTrezorFeatures.lift, - + # Error FFI converter None, @@ -19559,7 +20148,7 @@ async def trezor_get_public_key(params: "TrezorGetPublicKeyParams") -> "TrezorPu """ _UniffiConverterTypeTrezorGetPublicKeyParams.check_lower(params) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_public_key( _UniffiConverterTypeTrezorGetPublicKeyParams.lower(params)), @@ -19568,7 +20157,7 @@ async def trezor_get_public_key(params: "TrezorGetPublicKeyParams") -> "TrezorPu _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTrezorPublicKeyResponse.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19585,7 +20174,7 @@ async def trezor_initialize(credential_path: "typing.Optional[str]") -> None: """ _UniffiConverterOptionalString.check_lower(credential_path) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_initialize( _UniffiConverterOptionalString.lower(credential_path)), @@ -19594,8 +20183,8 @@ async def trezor_initialize(credential_path: "typing.Optional[str]") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19624,7 +20213,7 @@ async def trezor_is_connected() -> "bool": _UniffiLib.ffi_bitkitcore_rust_future_free_i8, # lift function _UniffiConverterBool.lift, - + # Error FFI converter None, @@ -19643,7 +20232,7 @@ async def trezor_is_initialized() -> "bool": _UniffiLib.ffi_bitkitcore_rust_future_free_i8, # lift function _UniffiConverterBool.lift, - + # Error FFI converter None, @@ -19662,7 +20251,7 @@ async def trezor_list_devices() -> "typing.List[TrezorDeviceInfo]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeTrezorDeviceInfo.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19683,7 +20272,7 @@ async def trezor_scan() -> "typing.List[TrezorDeviceInfo]": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterSequenceTypeTrezorDeviceInfo.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19698,7 +20287,7 @@ def trezor_set_transport_callback(callback: "TrezorTransportCallback") -> None: """ _UniffiConverterTypeTrezorTransportCallback.check_lower(callback) - + _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_trezor_set_transport_callback, _UniffiConverterTypeTrezorTransportCallback.lower(callback)) @@ -19713,7 +20302,7 @@ def trezor_set_ui_callback(callback: "TrezorUiCallback") -> None: """ _UniffiConverterTypeTrezorUiCallback.check_lower(callback) - + _uniffi_rust_call(_UniffiLib.uniffi_bitkitcore_fn_func_trezor_set_ui_callback, _UniffiConverterTypeTrezorUiCallback.lower(callback)) @@ -19724,7 +20313,7 @@ async def trezor_sign_message(params: "TrezorSignMessageParams") -> "TrezorSigne """ _UniffiConverterTypeTrezorSignMessageParams.check_lower(params) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_sign_message( _UniffiConverterTypeTrezorSignMessageParams.lower(params)), @@ -19733,7 +20322,7 @@ async def trezor_sign_message(params: "TrezorSignMessageParams") -> "TrezorSigne _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTrezorSignedMessageResponse.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19745,7 +20334,7 @@ async def trezor_sign_tx(params: "TrezorSignTxParams") -> "TrezorSignedTx": """ _UniffiConverterTypeTrezorSignTxParams.check_lower(params) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_sign_tx( _UniffiConverterTypeTrezorSignTxParams.lower(params)), @@ -19754,7 +20343,7 @@ async def trezor_sign_tx(params: "TrezorSignTxParams") -> "TrezorSignedTx": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTrezorSignedTx.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19773,9 +20362,9 @@ async def trezor_sign_tx_from_psbt(psbt_base64: "str",network: "typing.Optional[ """ _UniffiConverterString.check_lower(psbt_base64) - + _UniffiConverterOptionalTypeTrezorCoinType.check_lower(network) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_sign_tx_from_psbt( _UniffiConverterString.lower(psbt_base64), @@ -19785,7 +20374,7 @@ async def trezor_sign_tx_from_psbt(psbt_base64: "str",network: "typing.Optional[ _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterTypeTrezorSignedTx.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19797,7 +20386,7 @@ async def trezor_verify_message(params: "TrezorVerifyMessageParams") -> "bool": """ _UniffiConverterTypeTrezorVerifyMessageParams.check_lower(params) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_trezor_verify_message( _UniffiConverterTypeTrezorVerifyMessageParams.lower(params)), @@ -19806,7 +20395,7 @@ async def trezor_verify_message(params: "TrezorVerifyMessageParams") -> "bool": _UniffiLib.ffi_bitkitcore_rust_future_free_i8, # lift function _UniffiConverterBool.lift, - + # Error FFI converter _UniffiConverterTypeTrezorError, @@ -19814,9 +20403,9 @@ async def trezor_verify_message(params: "TrezorVerifyMessageParams") -> "bool": def update_activity(activity_id: "str",activity: "Activity") -> None: _UniffiConverterString.check_lower(activity_id) - + _UniffiConverterTypeActivity.check_lower(activity) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_update_activity, _UniffiConverterString.lower(activity_id), _UniffiConverterTypeActivity.lower(activity)) @@ -19824,7 +20413,7 @@ def update_activity(activity_id: "str",activity: "Activity") -> None: async def update_blocktank_url(new_url: "str") -> None: _UniffiConverterString.check_lower(new_url) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_update_blocktank_url( _UniffiConverterString.lower(new_url)), @@ -19833,8 +20422,8 @@ async def update_blocktank_url(new_url: "str") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19842,21 +20431,21 @@ async def update_blocktank_url(new_url: "str") -> None: def upsert_activities(activities: "typing.List[Activity]") -> None: _UniffiConverterSequenceTypeActivity.check_lower(activities) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_activities, _UniffiConverterSequenceTypeActivity.lower(activities)) def upsert_activity(activity: "Activity") -> None: _UniffiConverterTypeActivity.check_lower(activity) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_activity, _UniffiConverterTypeActivity.lower(activity)) async def upsert_cjit_entries(entries: "typing.List[IcJitEntry]") -> None: _UniffiConverterSequenceTypeIcJitEntry.check_lower(entries) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_upsert_cjit_entries( _UniffiConverterSequenceTypeIcJitEntry.lower(entries)), @@ -19865,8 +20454,8 @@ async def upsert_cjit_entries(entries: "typing.List[IcJitEntry]") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19874,21 +20463,21 @@ async def upsert_cjit_entries(entries: "typing.List[IcJitEntry]") -> None: def upsert_closed_channel(channel: "ClosedChannelDetails") -> None: _UniffiConverterTypeClosedChannelDetails.check_lower(channel) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_closed_channel, _UniffiConverterTypeClosedChannelDetails.lower(channel)) def upsert_closed_channels(channels: "typing.List[ClosedChannelDetails]") -> None: _UniffiConverterSequenceTypeClosedChannelDetails.check_lower(channels) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_closed_channels, _UniffiConverterSequenceTypeClosedChannelDetails.lower(channels)) async def upsert_info(info: "IBtInfo") -> None: _UniffiConverterTypeIBtInfo.check_lower(info) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_upsert_info( _UniffiConverterTypeIBtInfo.lower(info)), @@ -19897,8 +20486,8 @@ async def upsert_info(info: "IBtInfo") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19906,21 +20495,21 @@ async def upsert_info(info: "IBtInfo") -> None: def upsert_lightning_activities(activities: "typing.List[LightningActivity]") -> None: _UniffiConverterSequenceTypeLightningActivity.check_lower(activities) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_lightning_activities, _UniffiConverterSequenceTypeLightningActivity.lower(activities)) def upsert_onchain_activities(activities: "typing.List[OnchainActivity]") -> None: _UniffiConverterSequenceTypeOnchainActivity.check_lower(activities) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_onchain_activities, _UniffiConverterSequenceTypeOnchainActivity.lower(activities)) async def upsert_orders(orders: "typing.List[IBtOrder]") -> None: _UniffiConverterSequenceTypeIBtOrder.check_lower(orders) - + return await _uniffi_rust_call_async( _UniffiLib.uniffi_bitkitcore_fn_func_upsert_orders( _UniffiConverterSequenceTypeIBtOrder.lower(orders)), @@ -19929,8 +20518,8 @@ async def upsert_orders(orders: "typing.List[IBtOrder]") -> None: _UniffiLib.ffi_bitkitcore_rust_future_free_void, # lift function lambda val: None, - - + + # Error FFI converter _UniffiConverterTypeBlocktankError, @@ -19938,35 +20527,35 @@ async def upsert_orders(orders: "typing.List[IBtOrder]") -> None: def upsert_pre_activity_metadata(pre_activity_metadata: "typing.List[PreActivityMetadata]") -> None: _UniffiConverterSequenceTypePreActivityMetadata.check_lower(pre_activity_metadata) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_pre_activity_metadata, _UniffiConverterSequenceTypePreActivityMetadata.lower(pre_activity_metadata)) def upsert_tags(activity_tags: "typing.List[ActivityTags]") -> None: _UniffiConverterSequenceTypeActivityTags.check_lower(activity_tags) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_tags, _UniffiConverterSequenceTypeActivityTags.lower(activity_tags)) def upsert_transaction_details(details_list: "typing.List[TransactionDetails]") -> None: _UniffiConverterSequenceTypeTransactionDetails.check_lower(details_list) - + _uniffi_rust_call_with_error(_UniffiConverterTypeActivityError,_UniffiLib.uniffi_bitkitcore_fn_func_upsert_transaction_details, _UniffiConverterSequenceTypeTransactionDetails.lower(details_list)) def validate_bitcoin_address(address: "str") -> "ValidationResult": _UniffiConverterString.check_lower(address) - + return _UniffiConverterTypeValidationResult.lift(_uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_validate_bitcoin_address, _UniffiConverterString.lower(address))) def validate_mnemonic(mnemonic_phrase: "str") -> None: _UniffiConverterString.check_lower(mnemonic_phrase) - + _uniffi_rust_call_with_error(_UniffiConverterTypeAddressError,_UniffiLib.uniffi_bitkitcore_fn_func_validate_mnemonic, _UniffiConverterString.lower(mnemonic_phrase)) @@ -19983,7 +20572,7 @@ async def wipe_all_databases() -> "str": _UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer, # lift function _UniffiConverterString.lift, - + # Error FFI converter _UniffiConverterTypeDbError, @@ -20037,6 +20626,7 @@ def wipe_all_transaction_details() -> None: "TrezorTransportType", "TxDirection", "WalletSelection", + "WatcherEvent", "WordCount", "AccountAddresses", "AccountInfoResult", @@ -20132,6 +20722,7 @@ def wipe_all_transaction_details() -> None: "ValidationResult", "WalletBalance", "WalletParams", + "WatcherParams", "activity_wipe_all", "add_pre_activity_metadata", "add_pre_activity_metadata_tags", @@ -20205,6 +20796,9 @@ def wipe_all_transaction_details() -> None: "onchain_get_address_info", "onchain_get_transaction_detail", "onchain_get_transaction_history", + "onchain_start_watcher", + "onchain_stop_all_watchers", + "onchain_stop_watcher", "open_channel", "parse_pubky_auth_url", "prepare_legacy_rn_native_segwit_recovery_sweep", @@ -20272,6 +20866,7 @@ def wipe_all_transaction_details() -> None: "wipe_all_closed_channels", "wipe_all_databases", "wipe_all_transaction_details", + "EventListener", "TrezorTransportCallback", "TrezorUiCallback", ] diff --git a/bindings/python/bitkitcore/libbitkitcore.dylib b/bindings/python/bitkitcore/libbitkitcore.dylib index 263c3af..4d2b0ca 100755 Binary files a/bindings/python/bitkitcore/libbitkitcore.dylib and b/bindings/python/bitkitcore/libbitkitcore.dylib differ diff --git a/src/lib.rs b/src/lib.rs index b7846d5..d6255c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,6 +55,9 @@ use crate::onchain::{ ValidationResult, }; use crate::onchain::{compose_transaction, ComposeParams, ComposeResult}; +use crate::onchain::{ + start_watcher, stop_all_watchers, stop_watcher, EventListener, WatcherParams, +}; pub use modules::activity; pub use modules::lnurl; pub use modules::onchain; @@ -64,7 +67,7 @@ use bip39::Mnemonic; use bitcoin::bip32::Xpriv; use bitcoin::Network as BitcoinNetwork; use std::str::FromStr; -use std::sync::Mutex as StdMutex; +use std::sync::{Arc, Mutex as StdMutex}; use tokio::runtime::Runtime; use tokio::sync::Mutex as TokioMutex; @@ -2573,3 +2576,37 @@ pub async fn onchain_broadcast_raw_tx( }) }) } + +// ============================================================================ +// Onchain xpub watcher +// ============================================================================ + +/// Start monitoring an xpub for transaction activity via Electrum subscriptions. +/// +/// Each watcher receives its own listener — no global registration needed. +#[uniffi::export] +pub async fn onchain_start_watcher( + params: WatcherParams, + listener: Arc, +) -> Result<(), AccountInfoError> { + let rt = ensure_runtime(); + rt.spawn(async move { start_watcher(params, listener).await }) + .await + .unwrap_or_else(|e| { + Err(AccountInfoError::WatcherError { + error_details: format!("Runtime error: {}", e), + }) + }) +} + +/// Stop a specific xpub watcher by ID. +#[uniffi::export] +pub fn onchain_stop_watcher(watcher_id: String) -> Result<(), AccountInfoError> { + stop_watcher(&watcher_id) +} + +/// Stop all active xpub watchers. +#[uniffi::export] +pub fn onchain_stop_all_watchers() { + stop_all_watchers(); +} diff --git a/src/modules/onchain/errors.rs b/src/modules/onchain/errors.rs index 6001b4b..505a2fc 100644 --- a/src/modules/onchain/errors.rs +++ b/src/modules/onchain/errors.rs @@ -80,4 +80,8 @@ pub enum AccountInfoError { /// A valid transaction ID was not found in the wallet #[error("Transaction not found: {error_details}")] TransactionNotFound { error_details: String }, + + /// Watcher lifecycle or subscription error + #[error("Watcher error: {error_details}")] + WatcherError { error_details: String }, } diff --git a/src/modules/onchain/implementation.rs b/src/modules/onchain/implementation.rs index 6b104d5..dcfff70 100644 --- a/src/modules/onchain/implementation.rs +++ b/src/modules/onchain/implementation.rs @@ -1308,15 +1308,14 @@ pub(crate) fn connect_and_get_tip( Ok((client, tip_height)) } -/// Create a BDK wallet and sync it via the provided Electrum client. +/// Create a BDK wallet (in-memory, unsynced) from the resolved setup. /// -/// The client is consumed; make any pre-sync calls (e.g. `block_headers_subscribe`) -/// before passing it here. -pub(crate) fn create_and_sync_wallet( +/// Addresses can be derived from the returned wallet without syncing; call +/// [`sync_wallet`] to populate balances and transaction history. +pub(crate) fn create_wallet( setup: &WalletSetup, - client: bdk::electrum_client::Client, ) -> Result, AccountInfoError> { - let wallet = Wallet::new( + Wallet::new( &setup.external_desc, Some(&setup.internal_desc), setup.network, @@ -1324,18 +1323,81 @@ pub(crate) fn create_and_sync_wallet( ) .map_err(|e| AccountInfoError::WalletError { error_details: format!("Failed to create wallet: {}", e), - })?; + }) +} - let blockchain = ElectrumBlockchain::from(client); +/// Sync a wallet against an existing `ElectrumBlockchain`. +/// +/// Unlike [`create_and_sync_wallet`], the blockchain is borrowed (not consumed), +/// so a single connection can be reused across repeated syncs. +pub(crate) fn sync_wallet( + wallet: &Wallet, + blockchain: &ElectrumBlockchain, +) -> Result<(), AccountInfoError> { wallet - .sync(&blockchain, SyncOptions::default()) + .sync(blockchain, SyncOptions::default()) .map_err(|e| AccountInfoError::SyncError { error_details: format!("Failed to sync wallet: {}", e), - })?; + }) +} +/// Create a BDK wallet and sync it via the provided Electrum client. +/// +/// The client is consumed; make any pre-sync calls (e.g. `block_headers_subscribe`) +/// before passing it here. +pub(crate) fn create_and_sync_wallet( + setup: &WalletSetup, + client: bdk::electrum_client::Client, +) -> Result, AccountInfoError> { + let wallet = create_wallet(setup)?; + let blockchain = ElectrumBlockchain::from(client); + sync_wallet(&wallet, &blockchain)?; Ok(wallet) } +// ============================================================================ +// Shared tx-mapping helpers +// ============================================================================ + +/// Map a single BDK TransactionDetails to a HistoryTransaction. +pub(crate) fn map_bdk_tx_to_history( + tx: &bdk::TransactionDetails, + tip_height: u32, +) -> HistoryTransaction { + let (direction, amount, net) = classify_tx(tx.sent, tx.received, tx.fee); + + let (block_height, timestamp, confirmations) = match tx.confirmation_time.as_ref() { + Some(conf) => { + let confs = tip_height.saturating_sub(conf.height) + 1; + (Some(conf.height), Some(conf.timestamp), confs) + } + None => (None, None, 0), + }; + + HistoryTransaction { + txid: tx.txid.to_string(), + received: tx.received, + sent: tx.sent, + net, + fee: tx.fee, + amount, + direction, + block_height, + timestamp, + confirmations, + } +} + +/// Sort history transactions: unconfirmed first, then by timestamp descending. +pub(crate) fn sort_history_transactions(history: &mut [HistoryTransaction]) { + history.sort_by(|a, b| match (a.timestamp, b.timestamp) { + (None, Some(_)) => std::cmp::Ordering::Less, + (Some(_), None) => std::cmp::Ordering::Greater, + (None, None) => std::cmp::Ordering::Equal, + (Some(a_ts), Some(b_ts)) => b_ts.cmp(&a_ts), + }); +} + // ============================================================================ // Account info: main async functions // ============================================================================ @@ -1586,39 +1648,10 @@ pub async fn get_transaction_history( let mut history: Vec = txs .iter() - .map(|tx| { - let (direction, amount, net) = classify_tx(tx.sent, tx.received, tx.fee); - - let (block_height, timestamp, confirmations) = match tx.confirmation_time.as_ref() { - Some(conf) => { - let confs = tip_height.saturating_sub(conf.height) + 1; - (Some(conf.height), Some(conf.timestamp), confs) - } - None => (None, None, 0), - }; - - HistoryTransaction { - txid: tx.txid.to_string(), - received: tx.received, - sent: tx.sent, - net, - fee: tx.fee, - amount, - direction, - block_height, - timestamp, - confirmations, - } - }) + .map(|tx| map_bdk_tx_to_history(tx, tip_height)) .collect(); - // Sort: unconfirmed first, then by timestamp descending - history.sort_by(|a, b| match (a.timestamp, b.timestamp) { - (None, Some(_)) => std::cmp::Ordering::Less, - (Some(_), None) => std::cmp::Ordering::Greater, - (None, None) => std::cmp::Ordering::Equal, - (Some(a_ts), Some(b_ts)) => b_ts.cmp(&a_ts), - }); + sort_history_transactions(&mut history); let tx_count = u32::try_from(history.len()).unwrap_or(u32::MAX); diff --git a/src/modules/onchain/listener.rs b/src/modules/onchain/listener.rs new file mode 100644 index 0000000..65bbfd4 --- /dev/null +++ b/src/modules/onchain/listener.rs @@ -0,0 +1,843 @@ +use std::collections::{HashMap, HashSet}; +use std::io; +use std::sync::atomic::{AtomicU64, Ordering}; +use std::sync::{Arc, Mutex as StdMutex}; +use std::time::Duration; + +use bdk::bitcoin::ScriptBuf; +use bdk::blockchain::{ConfigurableBlockchain, ElectrumBlockchain, ElectrumBlockchainConfig}; +use bdk::database::MemoryDatabase; +use bdk::electrum_client::{self, ConfigBuilder, ElectrumApi}; +use bdk::wallet::{AddressIndex as BdkAddressIndex, Wallet}; +use once_cell::sync::OnceCell; +use tokio::sync::{oneshot, watch}; + +use super::errors::AccountInfoError; +use super::implementation::{ + create_wallet, map_bdk_tx_to_history, resolve_wallet_setup, sort_history_transactions, + sync_wallet, +}; +use super::types::{AccountType, Network as OnchainNetwork, WalletBalance, WatcherEvent}; + +// ============================================================================ +// Callback trait +// ============================================================================ + +/// Callback interface for receiving watcher events. +/// +/// Implement this trait in Swift/Kotlin/Python to receive typed notifications +/// from xpub watchers. +#[uniffi::export(with_foreign)] +pub trait EventListener: Send + Sync { + /// Called when a watcher event occurs. + /// + /// `watcher_id` identifies which watcher produced the event. + /// `event` is a typed enum — no JSON parsing needed. + fn on_event(&self, watcher_id: String, event: WatcherEvent); +} + +// ============================================================================ +// Watcher configuration +// ============================================================================ + +/// Parameters for starting an xpub transaction watcher. +#[derive(Debug, Clone, uniffi::Record)] +pub struct WatcherParams { + /// Caller-supplied identifier for this watcher. + pub watcher_id: String, + /// Extended public key (xpub/ypub/zpub/tpub/upub/vpub). + pub extended_key: String, + /// Electrum server URL (e.g. "ssl://electrum.example.com:50002"). + pub electrum_url: String, + /// Bitcoin network override (auto-detected from key prefix if None). + pub network: Option, + /// Account type override (auto-detected from key prefix if None). + pub account_type: Option, + /// Number of unused addresses to monitor beyond the last used (default 20). + pub gap_limit: Option, +} + +// ============================================================================ +// Internal watcher handle +// ============================================================================ + +struct WatcherHandle { + shutdown_tx: watch::Sender, + /// Distinguishes watcher generations that reuse the same `watcher_id`, so a + /// watcher's own teardown can't evict a newer watcher with the same id. + generation: u64, +} + +// ============================================================================ +// Global state +// ============================================================================ + +static WATCHERS: OnceCell>> = OnceCell::new(); +static WATCHER_GENERATION: AtomicU64 = AtomicU64::new(0); + +fn get_watchers() -> &'static StdMutex> { + WATCHERS.get_or_init(|| StdMutex::new(HashMap::new())) +} + +/// Remove a watcher entry, but only if it still belongs to `generation`. +/// +/// Guards against a watcher's own teardown evicting a newer watcher that was +/// started under the same `watcher_id` in the teardown window. +fn remove_watcher_if_generation(watcher_id: &str, generation: u64) { + if let Ok(mut watchers) = get_watchers().lock() { + if watchers.get(watcher_id).map(|h| h.generation) == Some(generation) { + watchers.remove(watcher_id); + } + } +} + +// ============================================================================ +// Public API +// ============================================================================ + +/// Start monitoring an xpub for transaction activity. +/// +/// Uses Electrum `blockchain.scripthash.subscribe` for near-instant detection. +/// The server pushes notifications when any subscribed script's history changes. +/// A lightweight `ping()` call with a short socket timeout is used to drain +/// those notifications from the socket — no fixed poll interval needed. +/// +/// Returns `Err` if the initial connection, wallet sync, or script derivation +/// fails — the caller can rely on `Ok(())` meaning the watcher is running. +pub async fn start_watcher( + params: WatcherParams, + listener: Arc, +) -> Result<(), AccountInfoError> { + let setup = resolve_wallet_setup( + ¶ms.extended_key, + params.network, + params.account_type, + None, + )?; + + let watcher_id = params.watcher_id.clone(); + + let (shutdown_tx, shutdown_rx) = watch::channel(false); + let generation = WATCHER_GENERATION.fetch_add(1, Ordering::Relaxed); + + // Atomically check-and-insert to avoid a duplicate-id race. + { + let mut watchers = get_watchers() + .lock() + .map_err(|_| AccountInfoError::WatcherError { + error_details: "Failed to acquire watchers lock".to_string(), + })?; + match watchers.entry(watcher_id.clone()) { + std::collections::hash_map::Entry::Occupied(_) => { + return Err(AccountInfoError::WatcherError { + error_details: format!("Watcher '{}' is already running", watcher_id), + }); + } + std::collections::hash_map::Entry::Vacant(entry) => { + entry.insert(WatcherHandle { + shutdown_tx, + generation, + }); + } + } + } + + // `Wallet` and `electrum_client::Client` are `!Send`, so the + // entire init + poll loop runs on one dedicated OS thread. We use a plain + // `std` thread rather than `tokio::task::spawn_blocking` because the loop + // runs for the watcher's whole lifetime — a forever-task would permanently + // occupy a slot in Tokio's bounded blocking pool. + let (init_tx, init_rx) = oneshot::channel::>(); + + let watcher_id_for_cleanup = watcher_id.clone(); + let spawn_result = std::thread::Builder::new() + .name(format!("watcher-{}", watcher_id)) + .spawn(move || { + watcher_init_and_loop(params, setup, shutdown_rx, listener, init_tx); + remove_watcher_if_generation(&watcher_id_for_cleanup, generation); + }); + + if let Err(e) = spawn_result { + remove_watcher_if_generation(&watcher_id, generation); + return Err(AccountInfoError::WatcherError { + error_details: format!("Failed to spawn watcher thread: {}", e), + }); + } + + let init_result = init_rx.await.unwrap_or_else(|_| { + Err(AccountInfoError::WatcherError { + error_details: "Watcher task exited before reporting init status".to_string(), + }) + }); + + if init_result.is_err() { + remove_watcher_if_generation(&watcher_id, generation); + } + + init_result +} + +/// Stop a specific watcher by ID. +/// +/// Signals shutdown and returns immediately. The watcher thread observes the +/// signal at the top of its poll loop, so teardown completes within one +/// `SOCKET_TIMEOUT_SECS` window (a blocking socket read can't be interrupted +/// mid-call). +pub fn stop_watcher(watcher_id: &str) -> Result<(), AccountInfoError> { + let mut watchers = get_watchers() + .lock() + .map_err(|_| AccountInfoError::WatcherError { + error_details: "Failed to acquire watchers lock".to_string(), + })?; + + match watchers.remove(watcher_id) { + Some(handle) => { + let _ = handle.shutdown_tx.send(true); + Ok(()) + } + None => Err(AccountInfoError::WatcherError { + error_details: format!("No watcher found with ID '{}'", watcher_id), + }), + } +} + +/// Stop all active watchers. +/// +/// Like [`stop_watcher`], each watcher tears down within one +/// `SOCKET_TIMEOUT_SECS` window after the signal. +pub fn stop_all_watchers() { + if let Ok(mut watchers) = get_watchers().lock() { + for (_, handle) in watchers.drain() { + let _ = handle.shutdown_tx.send(true); + } + } +} + +// ============================================================================ +// Watcher internals (runs on a single dedicated thread) +// ============================================================================ + +/// Socket read timeout for the subscription client (seconds). +/// +/// Bounds how long a blocking socket read waits before returning, which in turn +/// bounds detection of a dead connection and shutdown latency (a blocking read +/// can't be interrupted mid-call; see [`stop_watcher`]). +/// +/// Note: `ping()` returns as soon as the server answers `server.ping` (≈one +/// round-trip), *not* after this timeout — the timeout only fires when the +/// server sends nothing at all. The idle loop cadence is therefore governed by +/// [`IDLE_POLL_INTERVAL_SECS`], not by this value. +const SOCKET_TIMEOUT_SECS: u8 = 5; + +/// How long to wait between polls when a loop iteration finds no activity. +/// +/// Each iteration sends `server.ping`, whose round-trip also pulls any pushed +/// `blockchain.scripthash.subscribe` notifications off the socket into the +/// client's queues. Because `ping()` returns immediately on reply, without this +/// wait an idle watcher would spin — hammering the server with pings and +/// risking rate-limiting/disconnect. Trade-off: a notification arriving during +/// the wait is detected on the next ping, so this also bounds idle detection +/// latency. +const IDLE_POLL_INTERVAL_SECS: u64 = 2; + +/// Create an Electrum client with a read timeout for subscription use. +/// +/// The timeout ensures `ping()` returns periodically so we can check for +/// shutdown and drain notification queues, rather than blocking forever. +fn connect_electrum_with_timeout( + electrum_url: &str, +) -> Result { + let config = ConfigBuilder::new() + .timeout(Some(SOCKET_TIMEOUT_SECS)) + .build(); + electrum_client::Client::from_config(electrum_url, config).map_err(|e| { + AccountInfoError::ElectrumError { + error_details: format!("Failed to connect to Electrum: {}", e), + } + }) +} + +/// Check whether an electrum_client error is a socket timeout (not a real disconnect). +fn is_timeout_error(err: &electrum_client::Error) -> bool { + match err { + electrum_client::Error::IOError(e) => { + matches!( + e.kind(), + io::ErrorKind::WouldBlock | io::ErrorKind::TimedOut + ) + } + electrum_client::Error::SharedIOError(e) => { + matches!( + e.kind(), + io::ErrorKind::WouldBlock | io::ErrorKind::TimedOut + ) + } + _ => false, + } +} + +/// Derive scriptPubKeys for external and internal keychains up to the gap limit. +fn derive_scripts( + wallet: &Wallet, + gap: u32, +) -> Result, AccountInfoError> { + let mut scripts = HashSet::new(); + + let next_external = wallet + .get_address(BdkAddressIndex::LastUnused) + .map_err(|e| AccountInfoError::WalletError { + error_details: format!("Failed to get last unused external address: {}", e), + })? + .index; + for i in 0..(next_external + gap) { + let addr = wallet.get_address(BdkAddressIndex::Peek(i)).map_err(|e| { + AccountInfoError::WalletError { + error_details: format!("Failed to derive external address {}: {}", i, e), + } + })?; + scripts.insert(addr.address.script_pubkey()); + } + + let next_internal = wallet + .get_internal_address(BdkAddressIndex::LastUnused) + .map_err(|e| AccountInfoError::WalletError { + error_details: format!("Failed to get last unused internal address: {}", e), + })? + .index; + for i in 0..(next_internal + gap) { + let addr = wallet + .get_internal_address(BdkAddressIndex::Peek(i)) + .map_err(|e| AccountInfoError::WalletError { + error_details: format!("Failed to derive internal address {}: {}", i, e), + })?; + scripts.insert(addr.address.script_pubkey()); + } + + Ok(scripts) +} + +/// Build a TransactionsChanged event from a synced wallet. +fn build_tx_changed_event( + wallet: &Wallet, + tip_height: u32, + account_type: AccountType, +) -> WatcherEvent { + let bdk_balance = match wallet.get_balance() { + Ok(b) => b, + Err(e) => { + return WatcherEvent::Error { + message: format!("Failed to get balance: {}", e), + }; + } + }; + let balance: WalletBalance = bdk_balance.into(); + + let txs = match wallet.list_transactions(false) { + Ok(t) => t, + Err(e) => { + return WatcherEvent::Error { + message: format!("Failed to list transactions: {}", e), + }; + } + }; + + let mut history = txs + .iter() + .map(|tx| map_bdk_tx_to_history(tx, tip_height)) + .collect::>(); + sort_history_transactions(&mut history); + + let tx_count = u32::try_from(history.len()).unwrap_or(u32::MAX); + + WatcherEvent::TransactionsChanged { + transactions: history, + balance, + tx_count, + block_height: tip_height, + account_type, + } +} + +/// Subscribe to all scripts in a single batched RPC. +/// +/// The failure is surfaced rather than ignored: `electrum-client` registers the +/// local notification queue per script *before* the RPC and doesn't roll it back +/// on error, so a dropped failure would leave `script_pop` returning `Ok(None)` +/// (looks idle) while the server-side subscription is not actually active. +/// Callers must treat an error as "not subscribed" — fail startup (init) or keep +/// retrying the reconnect. (Empty set: no-op.) +fn subscribe_scripts( + client: &electrum_client::Client, + scripts: &HashSet, +) -> Result<(), AccountInfoError> { + if scripts.is_empty() { + return Ok(()); + } + client + .batch_script_subscribe(scripts.iter().map(|s| s.as_script())) + .map(|_| ()) + .map_err(|e| AccountInfoError::ElectrumError { + error_details: format!("Failed to subscribe to scripts: {}", e), + }) +} + +/// Build a sync blockchain whose stop gap covers the watcher's subscribed range. +/// +/// BDK's `ElectrumBlockchain::from(client)` hardcodes a stop gap of 20. A +/// watcher started with a larger `gap_limit` subscribes to addresses past that, +/// so a notification for a far address could fire while wallet sync stopped +/// short of it — emitting a `TransactionsChanged` that omits the detected tx. +/// Building via `from_config` lets sync scan at least as far as we subscribe. +/// +/// All other settings match `connect_electrum`'s defaults (`Client::new`). +fn connect_sync_blockchain( + electrum_url: &str, + stop_gap: usize, +) -> Result { + let config = ElectrumBlockchainConfig { + url: electrum_url.to_string(), + socks5: None, + retry: 1, + timeout: None, + stop_gap, + validate_domain: true, + }; + ElectrumBlockchain::from_config(&config).map_err(|e| AccountInfoError::ElectrumError { + error_details: format!("Failed to connect to Electrum: {}", e), + }) +} + +/// Sync the wallet, reusing a persistent `ElectrumBlockchain` across calls to +/// avoid opening a fresh TCP connection on every resync. +/// +/// `stop_gap` must cover the watcher's gap limit so sync scans at least as far +/// as the subscribed scripts (see [`connect_sync_blockchain`]). +/// +/// On sync failure the (possibly dead) connection is dropped so the next call +/// rebuilds it — making the loop self-healing without a dedicated reconnect for +/// the sync channel. +fn ensure_synced( + wallet: &Wallet, + blockchain: &mut Option, + electrum_url: &str, + stop_gap: usize, +) -> Result<(), AccountInfoError> { + if blockchain.is_none() { + *blockchain = Some(connect_sync_blockchain(electrum_url, stop_gap)?); + } + let bc = blockchain.as_ref().expect("blockchain set above"); + match sync_wallet(wallet, bc) { + Ok(()) => Ok(()), + Err(e) => { + *blockchain = None; + Err(e) + } + } +} + +/// Sleep for `duration`, waking early if shutdown is requested. +/// +/// Returns `true` if shutdown was observed (the caller should tear down), or +/// `false` if the full duration elapsed. Sleeps in short chunks so shutdown is +/// honored promptly regardless of the interval. +fn sleep_unless_shutdown(shutdown_rx: &watch::Receiver, duration: Duration) -> bool { + let mut remaining = duration.as_millis() as u64; + while remaining > 0 { + if *shutdown_rx.borrow() { + return true; + } + let chunk = remaining.min(1000); + std::thread::sleep(Duration::from_millis(chunk)); + remaining = remaining.saturating_sub(chunk); + } + *shutdown_rx.borrow() +} + +/// Attempt to reconnect the subscription client with exponential backoff. +/// +/// Returns the new client and the current tip height once connected, or `None` +/// if shutdown was requested. +fn reconnect_loop( + electrum_url: &str, + shutdown_rx: &watch::Receiver, + scripts: &HashSet, +) -> Option<(electrum_client::Client, u32)> { + let mut backoff = Duration::from_secs(1); + let max_backoff = Duration::from_secs(60); + + loop { + // Check shutdown before sleeping. + if *shutdown_rx.borrow() { + return None; + } + + // Sleep in 1-second chunks so we can respond to shutdown promptly. + let mut remaining = backoff.as_millis() as u64; + while remaining > 0 { + if *shutdown_rx.borrow() { + return None; + } + let chunk = remaining.min(1000); + std::thread::sleep(Duration::from_millis(chunk)); + remaining = remaining.saturating_sub(chunk); + } + + match connect_electrum_with_timeout(electrum_url) { + Ok(client) => { + // Require both script and header subscriptions to succeed before + // declaring the reconnect good — otherwise we'd silently lose + // push updates (a failed subscribe still leaves local queues, so + // script_pop looks idle). Retry with backoff until both stick. + if subscribe_scripts(&client, scripts).is_ok() { + if let Ok(header) = client.block_headers_subscribe() { + let tip = u32::try_from(header.height).unwrap_or(0); + return Some((client, tip)); + } + } + backoff = std::cmp::min(backoff * 2, max_backoff); + } + Err(_) => { + backoff = std::cmp::min(backoff * 2, max_backoff); + } + } + } +} + +/// Initialize the watcher and enter the notification loop. +/// +/// Reports init success/failure back to the caller via `init_tx`. +/// Runs entirely on a single dedicated thread because `Wallet` +/// and `electrum_client::Client` are `!Send`. +/// +/// ## How notifications work +/// +/// Electrum's `blockchain.scripthash.subscribe` causes the server to push a +/// notification whenever a subscribed script's history changes (new tx, confirmation, etc.). +/// These arrive as JSON-RPC messages on the same TCP connection. +/// +/// The `electrum_client` crate reads notifications off the socket whenever any +/// `call()` is in progress (including `ping()`). Notifications are queued in memory +/// and retrieved via `script_pop()`. +/// +/// We use a short socket timeout (`SOCKET_TIMEOUT_SECS`) so that `ping()` blocks +/// on the socket for up to that duration. If a notification arrives during this +/// window, it's processed immediately — giving near-instant detection without +/// CPU-burning polling. The timeout just ensures we periodically wake up to check +/// for shutdown. +/// +/// ## Init ordering (sync → subscribe → sync) +/// +/// The wallet is synced once so address usage is known before deriving scripts, +/// then subscribed, then synced again. The second sync brackets the subscribe, +/// so a tx arriving between the first sync and the subscribe baseline is still +/// captured — closing the sync/subscribe race window. +fn watcher_init_and_loop( + params: WatcherParams, + setup: super::implementation::WalletSetup, + shutdown_rx: watch::Receiver, + listener: Arc, + init_tx: oneshot::Sender>, +) { + let gap = params.gap_limit.unwrap_or(20); + // Wallet sync must scan at least as far as the subscribed scripts (last used + // + gap). Never drop below BDK's default of 20. + let sync_stop_gap = (gap as usize).max(20); + let account_type = setup.account_type; + let watcher_id = params.watcher_id.clone(); + + // --- Initialization --- + + // Subscription client (persistent push channel) with a short read timeout. + let mut sub_client = match connect_electrum_with_timeout(¶ms.electrum_url) { + Ok(c) => c, + Err(e) => { + let _ = init_tx.send(Err(e)); + return; + } + }; + + let mut tip_height = match sub_client.block_headers_subscribe() { + Ok(header) => u32::try_from(header.height).unwrap_or(0), + Err(e) => { + let _ = init_tx.send(Err(AccountInfoError::ElectrumError { + error_details: format!("Failed to subscribe to headers: {}", e), + })); + return; + } + }; + + let wallet = match create_wallet(&setup) { + Ok(w) => w, + Err(e) => { + let _ = init_tx.send(Err(e)); + return; + } + }; + + // Persistent blockchain reused for every resync (see `ensure_synced`). + let mut blockchain: Option = None; + + // First sync: establishes address usage so `derive_scripts` covers the + // full used range. + if let Err(e) = ensure_synced( + &wallet, + &mut blockchain, + ¶ms.electrum_url, + sync_stop_gap, + ) { + let _ = init_tx.send(Err(e)); + return; + } + + let mut subscribed_scripts = match derive_scripts(&wallet, gap) { + Ok(s) => s, + Err(e) => { + let _ = init_tx.send(Err(e)); + return; + } + }; + + // A failed subscribe means no live push updates, so fail startup rather than + // report success for a watcher that can only refresh on new blocks. + if let Err(e) = subscribe_scripts(&sub_client, &subscribed_scripts) { + let _ = init_tx.send(Err(e)); + return; + } + + // Second sync: brackets the subscribe to close the sync/subscribe race. + if let Err(e) = ensure_synced( + &wallet, + &mut blockchain, + ¶ms.electrum_url, + sync_stop_gap, + ) { + let _ = init_tx.send(Err(e)); + return; + } + + // A stop can arrive (handle removed + shutdown signaled) while we were still + // initializing. If so, don't report success or call the listener for an + // already-stopped watcher — report the cancellation and tear down. + if *shutdown_rx.borrow() { + let _ = init_tx.send(Err(AccountInfoError::WatcherError { + error_details: "Watcher stopped during startup".to_string(), + })); + for script in &subscribed_scripts { + let _ = sub_client.script_unsubscribe(script); + } + return; + } + + // Init succeeded. + let _ = init_tx.send(Ok(())); + + // Send initial state. + listener.on_event( + watcher_id.clone(), + build_tx_changed_event(&wallet, tip_height, account_type), + ); + + // Track the last-used indices to detect gap limit extensions. + let mut last_external = wallet + .get_address(BdkAddressIndex::LastUnused) + .map(|info| info.index) + .unwrap_or(0); + let mut last_internal = wallet + .get_internal_address(BdkAddressIndex::LastUnused) + .map(|info| info.index) + .unwrap_or(0); + + // --- Notification loop --- + // + // Each iteration sends a single `server.ping`. The ping round-trip also + // pulls any pushed `blockchain.scripthash.subscribe` notifications off the + // socket into the client's queues, which we then drain. If changes were + // detected — or a previous resync failed — we resync the wallet and emit an + // event. When an iteration finds no activity, we wait IDLE_POLL_INTERVAL_SECS + // before pinging again so an idle watcher doesn't spin on `server.ping`. + + let mut needs_resync = false; + // Backoff for repeated resync failures while the subscription stays up, so a + // persistently failing sync doesn't spin or spam `Error` events. Reset on a + // successful sync; escalates like `reconnect_loop`. + let mut resync_backoff = Duration::from_secs(1); + let max_resync_backoff = Duration::from_secs(60); + + loop { + if *shutdown_rx.borrow() { + for script in &subscribed_scripts { + let _ = sub_client.script_unsubscribe(script); + } + return; + } + + // ping() keeps the connection alive and, during its round-trip, reads + // and queues any pushed notifications already on the socket. It returns + // as soon as the server replies — it does NOT wait out the socket + // timeout when idle — so the idle wait at the bottom of the loop, not + // this call, paces an otherwise-quiet watcher. Outcomes: + // - Ok(()): normal reply (any notifications are now queued), + // - Err(timeout): server sent nothing within SOCKET_TIMEOUT_SECS, + // - Err(other): a real connection failure → reconnect. + let mut activity = false; + match sub_client.ping() { + Ok(()) => {} + Err(ref e) if is_timeout_error(e) => { + // Idle timeout. Fall through: the drains below are cheap local + // queue checks, and falling through lets a previously-failed + // resync (needs_resync == true) retry even while idle. + } + Err(e) => { + listener.on_event( + watcher_id.clone(), + WatcherEvent::Disconnected { + message: format!("Connection lost: {}", e), + }, + ); + match reconnect_loop(¶ms.electrum_url, &shutdown_rx, &subscribed_scripts) { + Some((new_client, new_tip)) => { + sub_client = new_client; + // Adopt the reconnected server's tip; keeping a higher + // stale tip would overstate confirmations. + tip_height = new_tip; + listener.on_event(watcher_id.clone(), WatcherEvent::Reconnected); + // Drop the sync connection so the resync below rebuilds + // it, and force a resync to refresh post-reconnect state. + blockchain = None; + needs_resync = true; + activity = true; + } + None => return, // Shutdown requested + } + } + } + + // Drain block header notifications. + while let Ok(Some(header)) = sub_client.block_headers_pop_raw() { + let new_height = u32::try_from(header.height).unwrap_or(tip_height); + if new_height > tip_height { + tip_height = new_height; + needs_resync = true; + activity = true; + } + } + + // Drain script notifications — these arrive via server push from + // blockchain.scripthash.subscribe, already queued by the ping() above. + for script in &subscribed_scripts { + match sub_client.script_pop(script) { + Ok(Some(_)) => { + needs_resync = true; + activity = true; + } + Ok(None) => {} + Err(e) => { + listener.on_event( + watcher_id.clone(), + WatcherEvent::Disconnected { + message: format!("script_pop error: {}", e), + }, + ); + match reconnect_loop(¶ms.electrum_url, &shutdown_rx, &subscribed_scripts) { + Some((new_client, new_tip)) => { + sub_client = new_client; + // Adopt the reconnected server's tip (see above). + tip_height = new_tip; + listener.on_event(watcher_id.clone(), WatcherEvent::Reconnected); + blockchain = None; + needs_resync = true; + activity = true; + break; + } + None => return, + } + } + } + } + + if needs_resync { + if let Err(e) = ensure_synced( + &wallet, + &mut blockchain, + ¶ms.electrum_url, + sync_stop_gap, + ) { + listener.on_event( + watcher_id.clone(), + WatcherEvent::Error { + message: format!("{}", e), + }, + ); + // Leave needs_resync set so the next loop retries; a transient + // sync failure must not drop an already-popped notification. + // Back off first so a persistent failure doesn't busy-loop or + // spam Error events (the `continue` would otherwise skip the + // idle wait at the bottom of the loop). + if sleep_unless_shutdown(&shutdown_rx, resync_backoff) { + for script in &subscribed_scripts { + let _ = sub_client.script_unsubscribe(script); + } + return; + } + resync_backoff = (resync_backoff * 2).min(max_resync_backoff); + continue; + } + needs_resync = false; + resync_backoff = Duration::from_secs(1); + + // Extend the gap limit if new addresses were used. + let new_external = wallet + .get_address(BdkAddressIndex::LastUnused) + .map(|info| info.index) + .unwrap_or(last_external); + let new_internal = wallet + .get_internal_address(BdkAddressIndex::LastUnused) + .map(|info| info.index) + .unwrap_or(last_internal); + + if new_external > last_external { + for i in (last_external + gap)..(new_external + gap) { + if let Ok(addr) = wallet.get_address(BdkAddressIndex::Peek(i)) { + let script = addr.address.script_pubkey(); + // Only track scripts we actually subscribed; a failed + // subscribe falls back to the per-block resync. + if sub_client.script_subscribe(&script).is_ok() { + subscribed_scripts.insert(script); + } + } + } + last_external = new_external; + } + + if new_internal > last_internal { + for i in (last_internal + gap)..(new_internal + gap) { + if let Ok(addr) = wallet.get_internal_address(BdkAddressIndex::Peek(i)) { + let script = addr.address.script_pubkey(); + // Only track scripts we actually subscribed (see above). + if sub_client.script_subscribe(&script).is_ok() { + subscribed_scripts.insert(script); + } + } + } + last_internal = new_internal; + } + + listener.on_event( + watcher_id.clone(), + build_tx_changed_event(&wallet, tip_height, account_type), + ); + } + + // Idle: nothing was popped and no resync ran this round. Wait before the + // next ping so a quiet watcher doesn't spin on `server.ping`. A + // notification arriving during the wait is picked up by the next ping. + if !activity + && sleep_unless_shutdown(&shutdown_rx, Duration::from_secs(IDLE_POLL_INTERVAL_SECS)) + { + for script in &subscribed_scripts { + let _ = sub_client.script_unsubscribe(script); + } + return; + } + } +} diff --git a/src/modules/onchain/mod.rs b/src/modules/onchain/mod.rs index 0755331..1d0fb60 100644 --- a/src/modules/onchain/mod.rs +++ b/src/modules/onchain/mod.rs @@ -1,6 +1,7 @@ mod compose; mod errors; mod implementation; +mod listener; mod types; pub use compose::compose_transaction; @@ -10,6 +11,7 @@ pub use implementation::{ detect_network_from_key, get_account_info, get_address_info, get_transaction_detail, get_transaction_history, normalize_extended_key, BitcoinAddressValidator, }; +pub use listener::{start_watcher, stop_all_watchers, stop_watcher, EventListener, WatcherParams}; pub use types::{ AccountAddresses, AccountInfoResult, AccountType, AccountUtxo, AddressInfo, AddressType, CoinSelection, ComposeAccount, ComposeOutput, ComposeParams, ComposeResult, GetAddressResponse, @@ -17,7 +19,7 @@ pub use types::{ LegacyRnCloseRecoverySweepPreview, Network, SingleAddressInfoResult, SweepResult, SweepTransactionPreview, SweepableBalances, TransactionDetail, TransactionHistoryResult, TxDetailInput, TxDetailOutput, TxDirection, ValidationResult, WalletBalance, WalletParams, - WordCount, + WatcherEvent, WordCount, }; #[cfg(test)] diff --git a/src/modules/onchain/types.rs b/src/modules/onchain/types.rs index 41bc724..aacab9b 100644 --- a/src/modules/onchain/types.rs +++ b/src/modules/onchain/types.rs @@ -524,6 +524,25 @@ impl From for WalletBalance { } } +/// Events emitted by the onchain xpub watcher. +#[derive(Debug, Clone, uniffi::Enum)] +pub enum WatcherEvent { + /// Transaction activity changed — contains full updated state. + TransactionsChanged { + transactions: Vec, + balance: WalletBalance, + tx_count: u32, + block_height: u32, + account_type: AccountType, + }, + /// An error occurred in the watcher loop. + Error { message: String }, + /// Connection to the Electrum server was lost. + Disconnected { message: String }, + /// Connection to the Electrum server was restored. + Reconnected, +} + /// Result from querying transaction history for an xpub. #[derive(Debug, Clone, uniffi::Record)] pub struct TransactionHistoryResult {