diff --git a/.github/workflows/android-bindgen.yml b/.github/workflows/android-bindgen.yml new file mode 100644 index 00000000..458e94e4 --- /dev/null +++ b/.github/workflows/android-bindgen.yml @@ -0,0 +1,146 @@ +name: Android Bindgen + +on: + pull_request: + paths: + - '.cargo/**' + - '.github/workflows/android-bindgen.yml' + - '**/Cargo.lock' + - '**/Cargo.toml' + - '**/bindings/android/**' + - '**/build*.sh' + - '**/build.rs' + - '**/*.gradle*' + - '**/*.rs' + - '**/*.udl' + - '**/gradle/**' + - '**/gradle.properties' + - '**/gradlew*' + - '**/settings.gradle*' + - '**/uniffi*.toml' + - 'rust-toolchain*' + - 'vendor/**' + push: + branches: + - master + - main + paths: + - '.cargo/**' + - '.github/workflows/android-bindgen.yml' + - '**/Cargo.lock' + - '**/Cargo.toml' + - '**/bindings/android/**' + - '**/build*.sh' + - '**/build.rs' + - '**/*.gradle*' + - '**/*.rs' + - '**/*.udl' + - '**/gradle/**' + - '**/gradle.properties' + - '**/gradlew*' + - '**/settings.gradle*' + - '**/uniffi*.toml' + - 'rust-toolchain*' + - 'vendor/**' + workflow_dispatch: + inputs: + ref: + description: "Branch, tag, or SHA to build" + required: false + default: "" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + android-bindgen: + name: Android Bindgen + runs-on: ubuntu-latest + timeout-minutes: 60 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Set up Rust cache + uses: Swatinem/rust-cache@v2 + with: + cache-targets: false + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: "17" + distribution: temurin + + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libdbus-1-dev pkg-config protobuf-compiler zip unzip + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Set up Android NDK + id: setup-ndk + uses: nttld/setup-ndk@v1 + with: + ndk-version: r28c + add-to-path: true + + - name: Export Android NDK paths + run: | + echo "ANDROID_NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV" + echo "ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV" + echo "ANDROID_NDK_PATH=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV" + echo "NDK_HOME=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV" + + - name: Generate Android bindings and native libraries + run: ./build_android.sh + + - name: Verify Android outputs + shell: bash + run: | + set -euo pipefail + required=( + bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt + bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt + bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so + bindings/android/lib/src/main/jniLibs/armeabi-v7a/libbitkitcore.so + bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so + bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so + bindings/android/native-debug-symbols.zip + ) + + for path in "${required[@]}"; do + if [ ! -s "$path" ]; then + echo "::error::Missing or empty generated Android output: $path" + exit 1 + fi + done + + aar_count=$(find bindings/android/lib/build/outputs/aar -name '*release.aar' -type f | wc -l | tr -d ' ') + if [ "$aar_count" -eq 0 ]; then + echo "::error::Missing generated Android release AAR" + exit 1 + fi + + - name: Upload Android generated artifacts + uses: actions/upload-artifact@v4 + with: + name: bitkit-core-android-bindgen + path: | + bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/*.kt + bindings/android/lib/src/main/jniLibs/**/libbitkitcore.so + bindings/android/native-debug-symbols.zip + bindings/android/lib/build/outputs/aar/*release.aar + if-no-files-found: error diff --git a/.github/workflows/bindgen-validation.yml b/.github/workflows/bindgen-validation.yml new file mode 100644 index 00000000..7a02a4e1 --- /dev/null +++ b/.github/workflows/bindgen-validation.yml @@ -0,0 +1,63 @@ +name: Bindgen Validation + +on: + pull_request: + push: + branches: + - master + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + validate: + name: Scripts, Cargo, and Android manifests + runs-on: ubuntu-latest + timeout-minutes: 15 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Validate shell scripts + run: bash -n build.sh build_ios.sh build_android.sh build_python.sh + + - name: Validate Cargo manifest + run: cargo metadata --locked --format-version 1 > /dev/null + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: "17" + distribution: temurin + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Validate Android Gradle manifests + working-directory: bindings/android + run: ./gradlew projects --no-daemon + + swift-manifest: + name: SwiftPM manifest + runs-on: macos-15 + timeout-minutes: 10 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Validate SwiftPM manifest + run: swift package dump-package > /dev/null diff --git a/.github/workflows/ios-bindgen.yml b/.github/workflows/ios-bindgen.yml new file mode 100644 index 00000000..8ed5417a --- /dev/null +++ b/.github/workflows/ios-bindgen.yml @@ -0,0 +1,124 @@ +name: iOS Bindgen + +on: + pull_request: + paths: + - '.cargo/**' + - '.github/workflows/ios-bindgen.yml' + - '**/Cargo.lock' + - '**/Cargo.toml' + - '**/Package.swift' + - '**/bindings/ios/**' + - '**/build*.sh' + - '**/build.rs' + - '**/*.rs' + - '**/*.udl' + - '**/uniffi*.toml' + - 'rust-toolchain*' + - 'vendor/**' + push: + branches: + - master + - main + paths: + - '.cargo/**' + - '.github/workflows/ios-bindgen.yml' + - '**/Cargo.lock' + - '**/Cargo.toml' + - '**/Package.swift' + - '**/bindings/ios/**' + - '**/build*.sh' + - '**/build.rs' + - '**/*.rs' + - '**/*.udl' + - '**/uniffi*.toml' + - 'rust-toolchain*' + - 'vendor/**' + workflow_dispatch: + inputs: + ref: + description: "Branch, tag, or SHA to build" + required: false + default: "" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + ios-bindgen: + name: iOS Bindgen + runs-on: macos-15 + timeout-minutes: 60 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref || github.ref }} + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Set up Rust cache + uses: Swatinem/rust-cache@v2 + with: + cache-targets: false + + - name: Install native build dependencies + run: brew install protobuf + + - name: Generate iOS bindings and artifacts + run: ./build_ios.sh + + - name: Verify iOS outputs + shell: bash + run: | + set -euo pipefail + required=( + bindings/ios/bitkitcore.swift + bindings/ios/bitkitcoreFFI.h + bindings/ios/module.modulemap + dist/ios/BitkitCore.xcframework + dist/ios/BitkitCore.xcframework.zip + ) + + for path in "${required[@]}"; do + if [ ! -e "$path" ]; then + echo "::error::Missing generated iOS output: $path" + exit 1 + fi + done + + test -s dist/ios/BitkitCore.xcframework.zip + swift package compute-checksum dist/ios/BitkitCore.xcframework.zip + + - name: Check committed iOS interface files + shell: bash + run: | + set -euo pipefail + generated_sources=( + bindings/ios/bitkitcore.swift + bindings/ios/bitkitcoreFFI.h + bindings/ios/module.modulemap + ) + + if ! git diff --quiet -- "${generated_sources[@]}"; then + echo "::error::Committed iOS interface files are stale. Run './build_ios.sh', restore Package.swift unless preparing a release, and commit the updated interface files." + git diff --name-only -- "${generated_sources[@]}" + exit 1 + fi + + - name: Upload iOS generated artifacts + uses: actions/upload-artifact@v4 + with: + name: bitkit-core-ios-bindgen + path: | + bindings/ios/bitkitcore.swift + bindings/ios/bitkitcoreFFI.h + bindings/ios/module.modulemap + dist/ios/BitkitCore.xcframework.zip + if-no-files-found: error diff --git a/.gitignore b/.gitignore index cfb5f332..d65684ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,19 @@ target/ +.build/ +.swiftpm/ __pycache__/ *.pyc + +# Generated Android bindgen outputs bindings/android/native-debug-symbols.zip bindings/android/lib/src/main/jniLibs/ -# The xcframework's static libraries exceed GitHub's 100 MB file limit. They are -# already shipped, compressed, inside BitkitCore.xcframework.zip, which is what -# Package.swift downloads from the GitHub release, so tracking them here would -# only duplicate that payload. -bindings/ios/BitkitCore.xcframework/**/libbitkitcore.a +bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt +bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt + +# Generated iOS release artifacts +dist/ +bindings/ios/BitkitCore.xcframework/ +bindings/ios/BitkitCore.xcframework.zip .idea/ .DS_Store # AI diff --git a/README.md b/README.md index 2f03553c..790e807a 100644 --- a/README.md +++ b/README.md @@ -550,6 +550,11 @@ ./build.sh python # Python only ``` +Generated mobile binaries are not committed. iOS release artifacts are generated +under `dist/ios/`; `Package.swift` points at the matching GitHub Release asset. +Android Kotlin/JNI outputs are regenerated by `./build_android.sh` before local +publishing or CI validation. + ### Release Builds (with version bump) The `-r/--release` flag bumps versions in `Cargo.toml`, `Package.swift`, and `gradle.properties`, then builds. Defaults to patch version bump; use `--major`/`-M` or `--minor`/`-m` for other increments. 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 deleted file mode 100644 index f4056c5d..00000000 --- a/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.android.kt +++ /dev/null @@ -1,18131 +0,0 @@ - - -@file:Suppress("RemoveRedundantBackticks") - -package com.synonym.bitkitcore - -// Common helper code. -// -// Ideally this would live in a separate .kt file where it can be unittested etc -// in isolation, and perhaps even published as a re-useable package. -// -// However, it's important that the details of how this helper code works (e.g. the -// way that different builtin types are passed across the FFI) exactly match what's -// expected by the Rust code on the other side of the interface. In practice right -// now that means coming from the exact some version of `uniffi` that was used to -// compile the Rust component. The easiest way to ensure this is to bundle the Kotlin -// helpers directly inline like we're doing here. - -import com.sun.jna.Library -import com.sun.jna.Native -import com.sun.jna.Structure -import android.os.Build -import androidx.annotation.RequiresApi -import kotlin.coroutines.resume -import kotlinx.coroutines.CancellableContinuation -import kotlinx.coroutines.DelicateCoroutinesApi -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.Job -import kotlinx.coroutines.launch -import kotlinx.coroutines.suspendCancellableCoroutine -import kotlinx.coroutines.withContext - - -internal typealias Pointer = com.sun.jna.Pointer -internal val NullPointer: Pointer? = com.sun.jna.Pointer.NULL -internal fun Pointer.toLong(): Long = Pointer.nativeValue(this) -internal fun kotlin.Long.toPointer() = com.sun.jna.Pointer(this) - - -@kotlin.jvm.JvmInline -public value class ByteBuffer(private val inner: java.nio.ByteBuffer) { - init { - inner.order(java.nio.ByteOrder.BIG_ENDIAN) - } - - public fun internal(): java.nio.ByteBuffer = inner - - public fun limit(): Int = inner.limit() - - public fun position(): Int = inner.position() - - public fun hasRemaining(): Boolean = inner.hasRemaining() - - public fun get(): Byte = inner.get() - - public fun get(bytesToRead: Int): ByteArray = ByteArray(bytesToRead).apply(inner::get) - - public fun getShort(): Short = inner.getShort() - - public fun getInt(): Int = inner.getInt() - - public fun getLong(): Long = inner.getLong() - - public fun getFloat(): Float = inner.getFloat() - - public fun getDouble(): Double = inner.getDouble() - - public fun put(value: Byte) { - inner.put(value) - } - - public fun put(src: ByteArray) { - inner.put(src) - } - - public fun putShort(value: Short) { - inner.putShort(value) - } - - public fun putInt(value: Int) { - inner.putInt(value) - } - - public fun putLong(value: Long) { - inner.putLong(value) - } - - public fun putFloat(value: Float) { - inner.putFloat(value) - } - - public fun putDouble(value: Double) { - inner.putDouble(value) - } -} -public fun RustBuffer.setValue(array: RustBufferByValue) { - this.data = array.data - this.len = array.len - this.capacity = array.capacity -} - -internal object RustBufferHelper { - internal fun allocValue(size: ULong = 0UL): RustBufferByValue = uniffiRustCall { status -> - // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.ffi_bitkitcore_rustbuffer_alloc(size.toLong(), status) - }.also { - if(it.data == null) { - throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") - } - } - - internal fun free(buf: RustBufferByValue) = uniffiRustCall { status -> - UniffiLib.ffi_bitkitcore_rustbuffer_free(buf, status) - } -} - -@Structure.FieldOrder("capacity", "len", "data") -public open class RustBufferStruct( - // Note: `capacity` and `len` are actually `ULong` values, but JVM only supports signed values. - // When dealing with these fields, make sure to call `toULong()`. - @JvmField public var capacity: Long, - @JvmField public var len: Long, - @JvmField public var data: Pointer?, -) : Structure() { - public constructor(): this(0.toLong(), 0.toLong(), null) - - public class ByValue( - capacity: Long, - len: Long, - data: Pointer?, - ): RustBuffer(capacity, len, data), Structure.ByValue { - public constructor(): this(0.toLong(), 0.toLong(), null) - } - - /** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - */ - public class ByReference( - capacity: Long, - len: Long, - data: Pointer?, - ): RustBuffer(capacity, len, data), Structure.ByReference { - public constructor(): this(0.toLong(), 0.toLong(), null) - } -} - -public typealias RustBuffer = RustBufferStruct -public typealias RustBufferByValue = RustBufferStruct.ByValue - -internal fun RustBuffer.asByteBuffer(): ByteBuffer? { - require(this.len <= Int.MAX_VALUE) { - val length = this.len - "cannot handle RustBuffer longer than Int.MAX_VALUE bytes: length is $length" - } - return ByteBuffer(data?.getByteBuffer(0L, this.len) ?: return null) -} - -internal fun RustBufferByValue.asByteBuffer(): ByteBuffer? { - require(this.len <= Int.MAX_VALUE) { - val length = this.len - "cannot handle RustBuffer longer than Int.MAX_VALUE bytes: length is $length" - } - return ByteBuffer(data?.getByteBuffer(0L, this.len) ?: return null) -} - -// This is a helper for safely passing byte references into the rust code. -// It's not actually used at the moment, because there aren't many things that you -// can take a direct pointer to in the JVM, and if we're going to copy something -// then we might as well copy it into a `RustBuffer`. But it's here for API -// completeness. - -@Structure.FieldOrder("len", "data") -internal open class ForeignBytesStruct : Structure() { - @JvmField var len: Int = 0 - @JvmField var data: Pointer? = null - - internal class ByValue : ForeignBytes(), Structure.ByValue -} -internal typealias ForeignBytes = ForeignBytesStruct -internal typealias ForeignBytesByValue = ForeignBytesStruct.ByValue - -public interface FfiConverter { - // Convert an FFI type to a Kotlin type - public fun lift(value: FfiType): KotlinType - - // Convert an Kotlin type to an FFI type - public fun lower(value: KotlinType): FfiType - - // Read a Kotlin type from a `ByteBuffer` - public fun read(buf: ByteBuffer): KotlinType - - // Calculate bytes to allocate when creating a `RustBuffer` - // - // This must return at least as many bytes as the write() function will - // write. It can return more bytes than needed, for example when writing - // Strings we can't know the exact bytes needed until we the UTF-8 - // encoding, so we pessimistically allocate the largest size possible (3 - // bytes per codepoint). Allocating extra bytes is not really a big deal - // because the `RustBuffer` is short-lived. - public fun allocationSize(value: KotlinType): ULong - - // Write a Kotlin type to a `ByteBuffer` - public fun write(value: KotlinType, buf: ByteBuffer) - - // Lower a value into a `RustBuffer` - // - // This method lowers a value into a `RustBuffer` rather than the normal - // FfiType. It's used by the callback interface code. Callback interface - // returns are always serialized into a `RustBuffer` regardless of their - // normal FFI type. - public fun lowerIntoRustBuffer(value: KotlinType): RustBufferByValue { - val rbuf = RustBufferHelper.allocValue(allocationSize(value)) - val bbuf = rbuf.asByteBuffer()!! - write(value, bbuf) - return RustBufferByValue( - capacity = rbuf.capacity, - len = bbuf.position().toLong(), - data = rbuf.data, - ) - } - - // Lift a value from a `RustBuffer`. - // - // This here mostly because of the symmetry with `lowerIntoRustBuffer()`. - // It's currently only used by the `FfiConverterRustBuffer` class below. - public fun liftFromRustBuffer(rbuf: RustBufferByValue): KotlinType { - val byteBuf = rbuf.asByteBuffer()!! - try { - val item = read(byteBuf) - if (byteBuf.hasRemaining()) { - throw RuntimeException("junk remaining in buffer after lifting, something is very wrong!!") - } - return item - } finally { - RustBufferHelper.free(rbuf) - } - } -} - -// FfiConverter that uses `RustBuffer` as the FfiType -public interface FfiConverterRustBuffer: FfiConverter { - override fun lift(value: RustBufferByValue): KotlinType = liftFromRustBuffer(value) - override fun lower(value: KotlinType): RustBufferByValue = lowerIntoRustBuffer(value) -} - -internal const val UNIFFI_CALL_SUCCESS = 0.toByte() -internal const val UNIFFI_CALL_ERROR = 1.toByte() -internal const val UNIFFI_CALL_UNEXPECTED_ERROR = 2.toByte() - -// Default Implementations -internal fun UniffiRustCallStatus.isSuccess(): Boolean - = code == UNIFFI_CALL_SUCCESS - -internal fun UniffiRustCallStatus.isError(): Boolean - = code == UNIFFI_CALL_ERROR - -internal fun UniffiRustCallStatus.isPanic(): Boolean - = code == UNIFFI_CALL_UNEXPECTED_ERROR - -internal fun UniffiRustCallStatusByValue.isSuccess(): Boolean - = code == UNIFFI_CALL_SUCCESS - -internal fun UniffiRustCallStatusByValue.isError(): Boolean - = code == UNIFFI_CALL_ERROR - -internal fun UniffiRustCallStatusByValue.isPanic(): Boolean - = code == UNIFFI_CALL_UNEXPECTED_ERROR - -// Each top-level error class has a companion object that can lift the error from the call status's rust buffer -public interface UniffiRustCallStatusErrorHandler { - public fun lift(errorBuf: RustBufferByValue): E -} - -// Helpers for calling Rust -// In practice we usually need to be synchronized to call this safely, so it doesn't -// synchronize itself - -// Call a rust function that returns a Result<>. Pass in the Error class companion that corresponds to the Err -internal inline fun uniffiRustCallWithError(errorHandler: UniffiRustCallStatusErrorHandler, crossinline callback: (UniffiRustCallStatus) -> U): U { - return UniffiRustCallStatusHelper.withReference() { status -> - val returnValue = callback(status) - uniffiCheckCallStatus(errorHandler, status) - returnValue - } -} - -// Check `status` and throw an error if the call wasn't successful -internal fun uniffiCheckCallStatus(errorHandler: UniffiRustCallStatusErrorHandler, status: UniffiRustCallStatus) { - if (status.isSuccess()) { - return - } else if (status.isError()) { - throw errorHandler.lift(status.errorBuf) - } else if (status.isPanic()) { - // when the rust code sees a panic, it tries to construct a rustbuffer - // with the message. but if that code panics, then it just sends back - // an empty buffer. - if (status.errorBuf.len > 0) { - throw InternalException(FfiConverterString.lift(status.errorBuf)) - } else { - throw InternalException("Rust panic") - } - } else { - throw InternalException("Unknown rust call status: $status.code") - } -} - -// UniffiRustCallStatusErrorHandler implementation for times when we don't expect a CALL_ERROR -public object UniffiNullRustCallStatusErrorHandler: UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): InternalException { - RustBufferHelper.free(errorBuf) - return InternalException("Unexpected CALL_ERROR") - } -} - -// Call a rust function that returns a plain value -internal inline fun uniffiRustCall(crossinline callback: (UniffiRustCallStatus) -> U): U { - return uniffiRustCallWithError(UniffiNullRustCallStatusErrorHandler, callback) -} - -internal inline fun uniffiTraitInterfaceCall( - callStatus: UniffiRustCallStatus, - makeCall: () -> T, - writeReturn: (T) -> Unit, -) { - try { - writeReturn(makeCall()) - } catch(e: kotlin.Exception) { - callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.errorBuf = FfiConverterString.lower(e.toString()) - } -} - -internal inline fun uniffiTraitInterfaceCallWithError( - callStatus: UniffiRustCallStatus, - makeCall: () -> T, - writeReturn: (T) -> Unit, - lowerError: (E) -> RustBufferByValue -) { - try { - writeReturn(makeCall()) - } catch(e: kotlin.Exception) { - if (e is E) { - callStatus.code = UNIFFI_CALL_ERROR - callStatus.errorBuf = lowerError(e) - } else { - callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.errorBuf = FfiConverterString.lower(e.toString()) - } - } -} - -@Structure.FieldOrder("code", "errorBuf") -internal open class UniffiRustCallStatusStruct( - @JvmField public var code: Byte, - @JvmField public var errorBuf: RustBufferByValue, -) : Structure() { - internal constructor(): this(0.toByte(), RustBufferByValue()) - - internal class ByValue( - code: Byte, - errorBuf: RustBufferByValue, - ): UniffiRustCallStatusStruct(code, errorBuf), Structure.ByValue { - internal constructor(): this(0.toByte(), RustBufferByValue()) - } - internal class ByReference( - code: Byte, - errorBuf: RustBufferByValue, - ): UniffiRustCallStatusStruct(code, errorBuf), Structure.ByReference { - internal constructor(): this(0.toByte(), RustBufferByValue()) - } -} - -internal typealias UniffiRustCallStatus = UniffiRustCallStatusStruct.ByReference -internal typealias UniffiRustCallStatusByValue = UniffiRustCallStatusStruct.ByValue - -internal object UniffiRustCallStatusHelper { - internal fun allocValue() = UniffiRustCallStatusByValue() - internal fun withReference(block: (UniffiRustCallStatus) -> U): U { - val status = UniffiRustCallStatus() - return block(status) - } -} - -internal class UniffiHandleMap { - private val map = java.util.concurrent.ConcurrentHashMap() - private val counter: kotlinx.atomicfu.AtomicLong = kotlinx.atomicfu.atomic(1L) - - internal val size: Int - get() = map.size - - // Insert a new object into the handle map and get a handle for it - internal fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) - map[handle] = obj - return handle - } - - // Get an object from the handle map - internal fun get(handle: Long): T { - return map[handle] ?: throw InternalException("UniffiHandleMap.get: Invalid handle") - } - - // Remove an entry from the handlemap and get the Kotlin object back - internal fun remove(handle: Long): T { - return map.remove(handle) ?: throw InternalException("UniffiHandleMap.remove: Invalid handle") - } -} - -internal typealias ByteByReference = com.sun.jna.ptr.ByteByReference -internal typealias DoubleByReference = com.sun.jna.ptr.DoubleByReference -internal typealias FloatByReference = com.sun.jna.ptr.FloatByReference -internal typealias IntByReference = com.sun.jna.ptr.IntByReference -internal typealias LongByReference = com.sun.jna.ptr.LongByReference -internal typealias PointerByReference = com.sun.jna.ptr.PointerByReference -internal typealias ShortByReference = com.sun.jna.ptr.ShortByReference - -// Contains loading, initialization code, -// and the FFI Function declarations in a com.sun.jna.Library. - -// Define FFI callback types -internal interface UniffiRustFutureContinuationCallback: com.sun.jna.Callback { - public fun callback(`data`: Long,`pollResult`: Byte,) -} -internal interface UniffiForeignFutureFree: com.sun.jna.Callback { - public fun callback(`handle`: Long,) -} -internal interface UniffiCallbackInterfaceFree: com.sun.jna.Callback { - public fun callback(`handle`: Long,) -} -@Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFutureStruct( - @JvmField public var `handle`: Long, - @JvmField public var `free`: UniffiForeignFutureFree?, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `handle` = 0.toLong(), - - `free` = null, - - ) - - internal class UniffiByValue( - `handle`: Long, - `free`: UniffiForeignFutureFree?, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue -} - -internal typealias UniffiForeignFuture = UniffiForeignFutureStruct - -internal fun UniffiForeignFuture.uniffiSetValue(other: UniffiForeignFuture) { - `handle` = other.`handle` - `free` = other.`free` -} -internal fun UniffiForeignFuture.uniffiSetValue(other: UniffiForeignFutureUniffiByValue) { - `handle` = other.`handle` - `free` = other.`free` -} - -internal typealias UniffiForeignFutureUniffiByValue = UniffiForeignFutureStruct.UniffiByValue -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8Struct( - @JvmField public var `returnValue`: Byte, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.toByte(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Byte, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructU8 = UniffiForeignFutureStructU8Struct - -internal fun UniffiForeignFutureStructU8.uniffiSetValue(other: UniffiForeignFutureStructU8) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructU8.uniffiSetValue(other: UniffiForeignFutureStructU8UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructU8UniffiByValue = UniffiForeignFutureStructU8Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteU8: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8Struct( - @JvmField public var `returnValue`: Byte, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.toByte(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Byte, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructI8 = UniffiForeignFutureStructI8Struct - -internal fun UniffiForeignFutureStructI8.uniffiSetValue(other: UniffiForeignFutureStructI8) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructI8.uniffiSetValue(other: UniffiForeignFutureStructI8UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructI8UniffiByValue = UniffiForeignFutureStructI8Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteI8: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16Struct( - @JvmField public var `returnValue`: Short, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.toShort(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Short, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructU16 = UniffiForeignFutureStructU16Struct - -internal fun UniffiForeignFutureStructU16.uniffiSetValue(other: UniffiForeignFutureStructU16) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructU16.uniffiSetValue(other: UniffiForeignFutureStructU16UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructU16UniffiByValue = UniffiForeignFutureStructU16Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteU16: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16Struct( - @JvmField public var `returnValue`: Short, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.toShort(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Short, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructI16 = UniffiForeignFutureStructI16Struct - -internal fun UniffiForeignFutureStructI16.uniffiSetValue(other: UniffiForeignFutureStructI16) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructI16.uniffiSetValue(other: UniffiForeignFutureStructI16UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructI16UniffiByValue = UniffiForeignFutureStructI16Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteI16: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32Struct( - @JvmField public var `returnValue`: Int, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0, - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Int, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructU32 = UniffiForeignFutureStructU32Struct - -internal fun UniffiForeignFutureStructU32.uniffiSetValue(other: UniffiForeignFutureStructU32) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructU32.uniffiSetValue(other: UniffiForeignFutureStructU32UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructU32UniffiByValue = UniffiForeignFutureStructU32Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteU32: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32Struct( - @JvmField public var `returnValue`: Int, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0, - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Int, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructI32 = UniffiForeignFutureStructI32Struct - -internal fun UniffiForeignFutureStructI32.uniffiSetValue(other: UniffiForeignFutureStructI32) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructI32.uniffiSetValue(other: UniffiForeignFutureStructI32UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructI32UniffiByValue = UniffiForeignFutureStructI32Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteI32: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64Struct( - @JvmField public var `returnValue`: Long, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.toLong(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Long, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructU64 = UniffiForeignFutureStructU64Struct - -internal fun UniffiForeignFutureStructU64.uniffiSetValue(other: UniffiForeignFutureStructU64) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructU64.uniffiSetValue(other: UniffiForeignFutureStructU64UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructU64UniffiByValue = UniffiForeignFutureStructU64Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteU64: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64Struct( - @JvmField public var `returnValue`: Long, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.toLong(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Long, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructI64 = UniffiForeignFutureStructI64Struct - -internal fun UniffiForeignFutureStructI64.uniffiSetValue(other: UniffiForeignFutureStructI64) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructI64.uniffiSetValue(other: UniffiForeignFutureStructI64UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructI64UniffiByValue = UniffiForeignFutureStructI64Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteI64: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32Struct( - @JvmField public var `returnValue`: Float, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.0f, - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Float, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructF32 = UniffiForeignFutureStructF32Struct - -internal fun UniffiForeignFutureStructF32.uniffiSetValue(other: UniffiForeignFutureStructF32) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructF32.uniffiSetValue(other: UniffiForeignFutureStructF32UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructF32UniffiByValue = UniffiForeignFutureStructF32Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteF32: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64Struct( - @JvmField public var `returnValue`: Double, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = 0.0, - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Double, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructF64 = UniffiForeignFutureStructF64Struct - -internal fun UniffiForeignFutureStructF64.uniffiSetValue(other: UniffiForeignFutureStructF64) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructF64.uniffiSetValue(other: UniffiForeignFutureStructF64UniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructF64UniffiByValue = UniffiForeignFutureStructF64Struct.UniffiByValue -internal interface UniffiForeignFutureCompleteF64: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointerStruct( - @JvmField public var `returnValue`: Pointer?, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = NullPointer, - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: Pointer?, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructPointer = UniffiForeignFutureStructPointerStruct - -internal fun UniffiForeignFutureStructPointer.uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructPointer.uniffiSetValue(other: UniffiForeignFutureStructPointerUniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructPointerUniffiByValue = UniffiForeignFutureStructPointerStruct.UniffiByValue -internal interface UniffiForeignFutureCompletePointer: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointerUniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBufferStruct( - @JvmField public var `returnValue`: RustBufferByValue, - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `returnValue` = RustBufferHelper.allocValue(), - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `returnValue`: RustBufferByValue, - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructRustBuffer = UniffiForeignFutureStructRustBufferStruct - -internal fun UniffiForeignFutureStructRustBuffer.uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructRustBuffer.uniffiSetValue(other: UniffiForeignFutureStructRustBufferUniffiByValue) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructRustBufferUniffiByValue = UniffiForeignFutureStructRustBufferStruct.UniffiByValue -internal interface UniffiForeignFutureCompleteRustBuffer: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBufferUniffiByValue,) -} -@Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoidStruct( - @JvmField public var `callStatus`: UniffiRustCallStatusByValue, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `callStatus` = UniffiRustCallStatusHelper.allocValue(), - - ) - - internal class UniffiByValue( - `callStatus`: UniffiRustCallStatusByValue, - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue -} - -internal typealias UniffiForeignFutureStructVoid = UniffiForeignFutureStructVoidStruct - -internal fun UniffiForeignFutureStructVoid.uniffiSetValue(other: UniffiForeignFutureStructVoid) { - `callStatus` = other.`callStatus` -} -internal fun UniffiForeignFutureStructVoid.uniffiSetValue(other: UniffiForeignFutureStructVoidUniffiByValue) { - `callStatus` = other.`callStatus` -} - -internal typealias UniffiForeignFutureStructVoidUniffiByValue = UniffiForeignFutureStructVoidStruct.UniffiByValue -internal interface UniffiForeignFutureCompleteVoid: com.sun.jna.Callback { - public fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoidUniffiByValue,) -} -internal interface UniffiCallbackInterfaceBoltzEventListenerMethod0: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`event`: RustBufferByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -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,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod1: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`path`: RustBufferByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod2: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`path`: RustBufferByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod3: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`path`: RustBufferByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod4: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`path`: RustBufferByValue,`data`: RustBufferByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod5: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`path`: RustBufferByValue,`uniffiOutReturn`: IntByReference,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod6: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`path`: RustBufferByValue,`messageType`: Short,`data`: RustBufferByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod7: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod8: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`deviceId`: RustBufferByValue,`credentialJson`: RustBufferByValue,`uniffiOutReturn`: ByteByReference,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod9: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`deviceId`: RustBufferByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorTransportCallbackMethod10: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`tag`: RustBufferByValue,`message`: RustBufferByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceTrezorUiCallbackMethod0: com.sun.jna.Callback { - public fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) -} -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 UniffiVTableCallbackInterfaceBoltzEventListenerStruct( - @JvmField public var `onEvent`: UniffiCallbackInterfaceBoltzEventListenerMethod0?, - @JvmField public var `uniffiFree`: UniffiCallbackInterfaceFree?, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `onEvent` = null, - - `uniffiFree` = null, - - ) - - internal class UniffiByValue( - `onEvent`: UniffiCallbackInterfaceBoltzEventListenerMethod0?, - `uniffiFree`: UniffiCallbackInterfaceFree?, - ): UniffiVTableCallbackInterfaceBoltzEventListener(`onEvent`,`uniffiFree`,), Structure.ByValue -} - -internal typealias UniffiVTableCallbackInterfaceBoltzEventListener = UniffiVTableCallbackInterfaceBoltzEventListenerStruct - -internal fun UniffiVTableCallbackInterfaceBoltzEventListener.uniffiSetValue(other: UniffiVTableCallbackInterfaceBoltzEventListener) { - `onEvent` = other.`onEvent` - `uniffiFree` = other.`uniffiFree` -} -internal fun UniffiVTableCallbackInterfaceBoltzEventListener.uniffiSetValue(other: UniffiVTableCallbackInterfaceBoltzEventListenerUniffiByValue) { - `onEvent` = other.`onEvent` - `uniffiFree` = other.`uniffiFree` -} - -internal typealias UniffiVTableCallbackInterfaceBoltzEventListenerUniffiByValue = UniffiVTableCallbackInterfaceBoltzEventListenerStruct.UniffiByValue -@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?, - @JvmField public var `openDevice`: UniffiCallbackInterfaceTrezorTransportCallbackMethod1?, - @JvmField public var `closeDevice`: UniffiCallbackInterfaceTrezorTransportCallbackMethod2?, - @JvmField public var `readChunk`: UniffiCallbackInterfaceTrezorTransportCallbackMethod3?, - @JvmField public var `writeChunk`: UniffiCallbackInterfaceTrezorTransportCallbackMethod4?, - @JvmField public var `getChunkSize`: UniffiCallbackInterfaceTrezorTransportCallbackMethod5?, - @JvmField public var `callMessage`: UniffiCallbackInterfaceTrezorTransportCallbackMethod6?, - @JvmField public var `getPairingCode`: UniffiCallbackInterfaceTrezorTransportCallbackMethod7?, - @JvmField public var `saveThpCredential`: UniffiCallbackInterfaceTrezorTransportCallbackMethod8?, - @JvmField public var `loadThpCredential`: UniffiCallbackInterfaceTrezorTransportCallbackMethod9?, - @JvmField public var `logDebug`: UniffiCallbackInterfaceTrezorTransportCallbackMethod10?, - @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( - `enumerateDevices`: UniffiCallbackInterfaceTrezorTransportCallbackMethod0?, - `openDevice`: UniffiCallbackInterfaceTrezorTransportCallbackMethod1?, - `closeDevice`: UniffiCallbackInterfaceTrezorTransportCallbackMethod2?, - `readChunk`: UniffiCallbackInterfaceTrezorTransportCallbackMethod3?, - `writeChunk`: UniffiCallbackInterfaceTrezorTransportCallbackMethod4?, - `getChunkSize`: UniffiCallbackInterfaceTrezorTransportCallbackMethod5?, - `callMessage`: UniffiCallbackInterfaceTrezorTransportCallbackMethod6?, - `getPairingCode`: UniffiCallbackInterfaceTrezorTransportCallbackMethod7?, - `saveThpCredential`: UniffiCallbackInterfaceTrezorTransportCallbackMethod8?, - `loadThpCredential`: UniffiCallbackInterfaceTrezorTransportCallbackMethod9?, - `logDebug`: UniffiCallbackInterfaceTrezorTransportCallbackMethod10?, - `uniffiFree`: UniffiCallbackInterfaceFree?, - ): UniffiVTableCallbackInterfaceTrezorTransportCallback(`enumerateDevices`,`openDevice`,`closeDevice`,`readChunk`,`writeChunk`,`getChunkSize`,`callMessage`,`getPairingCode`,`saveThpCredential`,`loadThpCredential`,`logDebug`,`uniffiFree`,), Structure.ByValue -} - -internal typealias UniffiVTableCallbackInterfaceTrezorTransportCallback = UniffiVTableCallbackInterfaceTrezorTransportCallbackStruct - -internal fun UniffiVTableCallbackInterfaceTrezorTransportCallback.uniffiSetValue(other: UniffiVTableCallbackInterfaceTrezorTransportCallback) { - `enumerateDevices` = other.`enumerateDevices` - `openDevice` = other.`openDevice` - `closeDevice` = other.`closeDevice` - `readChunk` = other.`readChunk` - `writeChunk` = other.`writeChunk` - `getChunkSize` = other.`getChunkSize` - `callMessage` = other.`callMessage` - `getPairingCode` = other.`getPairingCode` - `saveThpCredential` = other.`saveThpCredential` - `loadThpCredential` = other.`loadThpCredential` - `logDebug` = other.`logDebug` - `uniffiFree` = other.`uniffiFree` -} -internal fun UniffiVTableCallbackInterfaceTrezorTransportCallback.uniffiSetValue(other: UniffiVTableCallbackInterfaceTrezorTransportCallbackUniffiByValue) { - `enumerateDevices` = other.`enumerateDevices` - `openDevice` = other.`openDevice` - `closeDevice` = other.`closeDevice` - `readChunk` = other.`readChunk` - `writeChunk` = other.`writeChunk` - `getChunkSize` = other.`getChunkSize` - `callMessage` = other.`callMessage` - `getPairingCode` = other.`getPairingCode` - `saveThpCredential` = other.`saveThpCredential` - `loadThpCredential` = other.`loadThpCredential` - `logDebug` = other.`logDebug` - `uniffiFree` = other.`uniffiFree` -} - -internal typealias UniffiVTableCallbackInterfaceTrezorTransportCallbackUniffiByValue = UniffiVTableCallbackInterfaceTrezorTransportCallbackStruct.UniffiByValue -@Structure.FieldOrder("onPinRequest", "onPassphraseRequest", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceTrezorUiCallbackStruct( - @JvmField public var `onPinRequest`: UniffiCallbackInterfaceTrezorUiCallbackMethod0?, - @JvmField public var `onPassphraseRequest`: UniffiCallbackInterfaceTrezorUiCallbackMethod1?, - @JvmField public var `uniffiFree`: UniffiCallbackInterfaceFree?, -) : com.sun.jna.Structure() { - internal constructor(): this( - - `onPinRequest` = null, - - `onPassphraseRequest` = null, - - `uniffiFree` = null, - - ) - - internal class UniffiByValue( - `onPinRequest`: UniffiCallbackInterfaceTrezorUiCallbackMethod0?, - `onPassphraseRequest`: UniffiCallbackInterfaceTrezorUiCallbackMethod1?, - `uniffiFree`: UniffiCallbackInterfaceFree?, - ): UniffiVTableCallbackInterfaceTrezorUiCallback(`onPinRequest`,`onPassphraseRequest`,`uniffiFree`,), Structure.ByValue -} - -internal typealias UniffiVTableCallbackInterfaceTrezorUiCallback = UniffiVTableCallbackInterfaceTrezorUiCallbackStruct - -internal fun UniffiVTableCallbackInterfaceTrezorUiCallback.uniffiSetValue(other: UniffiVTableCallbackInterfaceTrezorUiCallback) { - `onPinRequest` = other.`onPinRequest` - `onPassphraseRequest` = other.`onPassphraseRequest` - `uniffiFree` = other.`uniffiFree` -} -internal fun UniffiVTableCallbackInterfaceTrezorUiCallback.uniffiSetValue(other: UniffiVTableCallbackInterfaceTrezorUiCallbackUniffiByValue) { - `onPinRequest` = other.`onPinRequest` - `onPassphraseRequest` = other.`onPassphraseRequest` - `uniffiFree` = other.`uniffiFree` -} - -internal typealias UniffiVTableCallbackInterfaceTrezorUiCallbackUniffiByValue = UniffiVTableCallbackInterfaceTrezorUiCallbackStruct.UniffiByValue - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@Synchronized -private fun findLibraryName(componentName: String): String { - val libOverride = System.getProperty("uniffi.component.$componentName.libraryOverride") - if (libOverride != null) { - return libOverride - } - return "bitkitcore" -} - -// For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods -// in the interface for large crates. -// -// By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) -// we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal object IntegrityCheckingUniffiLib : Library { - init { - Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName("bitkitcore")) - uniffiCheckContractApiVersion() - uniffiCheckApiChecksums() - } - - private fun uniffiCheckContractApiVersion() { - // Get the bindings contract version from our ComponentInterface - val bindingsContractVersion = 29 - // Get the scaffolding contract version by calling the into the dylib - val scaffoldingContractVersion = ffi_bitkitcore_uniffi_contract_version() - if (bindingsContractVersion != scaffoldingContractVersion) { - throw RuntimeException("UniFFI contract version mismatch: try cleaning and rebuilding your project") - } - } - private fun uniffiCheckApiChecksums() { - if (uniffi_bitkitcore_checksum_func_activities_from_json() != 13556) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_activities_to_json() != 63832) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_activity_tags_from_json() != 21773) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_activity_tags_to_json() != 43518) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_activity_wipe_all() != 19332) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_add_pre_activity_metadata() != 17211) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_add_pre_activity_metadata_tags() != 5813) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_add_tags() != 61276) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_approve_pubky_auth() != 22222) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_blocktank_remove_all_cjit_entries() != 40127) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_blocktank_remove_all_orders() != 38913) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_blocktank_wipe_all() != 41797) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_claim_reverse_swap() != 52516) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_create_reverse_swap() != 20570) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_create_submarine_swap() != 27933) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_get_reverse_limits() != 59203) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_get_submarine_limits() != 5900) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_get_swap() != 17473) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_list_pending_swaps() != 20926) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_list_swaps() != 16447) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_refund_submarine_swap() != 24549) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_start_swap_updates() != 168) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_boltz_stop_swap_updates() != 63683) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_broadcast_sweep_transaction() != 43422) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_calculate_channel_liquidity_options() != 51013) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_cancel_pubky_auth() != 61962) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_check_sweepable_balances() != 64201) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_closed_channels_from_json() != 4471) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_closed_channels_to_json() != 54955) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_complete_pubky_auth() != 48191) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_create_channel_request_url() != 9305) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_create_cjit_entry() != 51504) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_create_order() != 33461) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_create_withdraw_callback_url() != 39350) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_decode() != 28437) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_delete_activities_by_wallet_id() != 15848) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_delete_activity_by_id() != 13256) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_delete_pre_activity_metadata() != 63740) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_delete_transaction_details() != 43443) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_derive_bitcoin_address() != 35090) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_derive_bitcoin_addresses() != 34371) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_derive_onchain_descriptor() != 49652) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_derive_private_key() != 25155) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_derive_pubky_secret_key() != 36989) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_derive_wallet_id() != 30111) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_entropy_to_mnemonic() != 26123) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_estimate_order_fee() != 9548) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_estimate_order_fee_full() != 13361) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_fetch_pubky_contacts() != 18744) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_fetch_pubky_file() != 24890) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_fetch_pubky_file_string() != 47799) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_fetch_pubky_profile() != 19709) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_finalize_psbt() != 37120) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_generate_mnemonic() != 19292) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_activities() != 9879) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_activities_by_tag() != 16182) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_activities_tags() != 33500) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_activity_by_id() != 28490) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_activity_by_tx_id() != 28432) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_all_activities_tags() != 29245) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_all_closed_channels() != 16828) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_all_pre_activity_metadata() != 25130) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_all_transaction_details() != 36056) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_all_unique_tags() != 25431) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_bip39_suggestions() != 20658) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_bip39_wordlist() != 30814) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_cjit_entries() != 29342) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_closed_channel_by_id() != 19736) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_default_gap_limit() != 24024) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_default_lsp_balance() != 35903) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_default_wallet_id() != 19552) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_gift() != 386) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_info() != 43607) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_lnurl_invoice() != 5475) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_lnurl_invoice_for_pay_data() != 50807) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_min_zero_conf_tx_fee() != 6427) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_orders() != 47460) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_payment() != 29170) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_pre_activity_metadata() != 24738) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_pre_activity_metadata_list() != 37473) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_supported_hardware_wallets() != 61117) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_tags() != 8596) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_get_transaction_details() != 4810) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_gift_order() != 22040) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_gift_pay() != 22142) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_init_db() != 9643) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_insert_activity() != 1510) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_is_address_used() != 64038) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_is_valid_bip39_word() != 31846) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_lnurl_auth() != 58593) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_mark_activity_as_seen() != 36622) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_migrate_backup_activities_json() != 6425) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_migrate_backup_activity_tags_json() != 10809) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_migrate_backup_pre_activity_metadata_json() != 51315) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_migrate_backup_transaction_details_json() != 30436) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_mnemonic_to_entropy() != 36669) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_mnemonic_to_seed() != 40039) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_broadcast_raw_tx() != 45163) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_compose_transaction() != 20767) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_get_account_info() != 30087) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_get_address_info() != 4749) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_get_transaction_detail() != 24151) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_get_transaction_history() != 4452) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_start_watcher() != 58125) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers() != 28485) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_onchain_stop_watcher() != 2426) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_open_channel() != 21402) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_parse_pubky_auth_url() != 56972) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_passport_parse_account_export() != 62096) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pre_activity_metadata_from_json() != 61978) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pre_activity_metadata_to_json() != 3340) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_prepare_legacy_rn_native_segwit_recovery_sweep() != 42719) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_prepare_sweep_transaction() != 18273) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_public_key_from_secret() != 47481) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_put_with_secret_key() != 36562) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_session_delete() != 39070) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_session_list() != 7225) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_session_put() != 25203) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_sign_in() != 26706) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_pubky_sign_up() != 61692) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_refresh_active_cjit_entries() != 5324) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_refresh_active_orders() != 50661) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_register_device() != 14576) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_regtest_close_channel() != 48652) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_regtest_deposit() != 30356) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_regtest_get_payment() != 56623) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_regtest_mine() != 58685) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_regtest_pay() != 48342) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_remove_closed_channel_by_id() != 17150) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_remove_pre_activity_metadata_tags() != 37046) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_remove_tags() != 53863) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_reset_pre_activity_metadata_tags() != 49760) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_resolve_pubky_url() != 43253) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds() != 52496) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_serialized_extended_pubkey() != 12807) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_start_pubky_auth() != 18158) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_test_notification() != 32857) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_transaction_details_from_json() != 54361) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_transaction_details_to_json() != 51037) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_account_type_to_script_type() != 16116) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_clear_credentials() != 41940) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_connect() != 49232) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_disconnect() != 48780) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_get_address() != 12910) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_get_connected_device() != 48383) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_get_device_fingerprint() != 20344) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_get_features() != 13970) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_get_public_key() != 13743) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_initialize() != 16053) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_is_ble_available() != 12897) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_is_connected() != 42092) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_is_initialized() != 59329) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_list_devices() != 32859) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_refresh_features() != 6918) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_scan() != 54763) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_set_transport_callback() != 30209) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_set_ui_callback() != 52321) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_sign_message() != 2925) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_sign_tx() != 42467) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_sign_tx_from_psbt() != 18852) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_trezor_verify_message() != 50739) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_update_activity() != 42510) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_update_blocktank_url() != 52161) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_activities() != 58470) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_activity() != 32175) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_cjit_entries() != 57141) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_closed_channel() != 18711) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_closed_channels() != 2086) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_info() != 7349) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_lightning_activities() != 8564) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_onchain_activities() != 15461) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_orders() != 45856) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_pre_activity_metadata() != 12307) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_tags() != 47513) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_upsert_transaction_details() != 62351) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_ur_encode_crypto_psbt() != 32954) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_validate_bitcoin_address() != 56003) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_validate_mnemonic() != 31005) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_wipe_all_closed_channels() != 41511) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_wipe_all_databases() != 54605) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_func_wipe_all_transaction_details() != 65339) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_boltzeventlistener_on_event() != 11294) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_eventlistener_on_event() != 35531) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices() != 18766) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_open_device() != 44156) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_close_device() != 47933) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_read_chunk() != 7645) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_write_chunk() != 55967) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_get_chunk_size() != 4994) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_call_message() != 19414) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_get_pairing_code() != 43475) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_save_thp_credential() != 16694) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_load_thp_credential() != 48790) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezortransportcallback_log_debug() != 44848) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezoruicallback_on_pin_request() != 50474) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_trezoruicallback_on_passphrase_request() != 33994) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_urdecoder_receive() != 44279) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_method_urdecoder_reset() != 6027) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - if (uniffi_bitkitcore_checksum_constructor_urdecoder_new() != 23014) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } - } - - // Integrity check functions only - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_activities_from_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_activities_to_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_activity_tags_from_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_activity_tags_to_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_activity_wipe_all( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_add_pre_activity_metadata( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_add_pre_activity_metadata_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_add_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_approve_pubky_auth( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_blocktank_remove_all_cjit_entries( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_blocktank_remove_all_orders( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_blocktank_wipe_all( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_claim_reverse_swap( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_create_reverse_swap( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_create_submarine_swap( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_get_reverse_limits( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_get_submarine_limits( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_get_swap( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_list_pending_swaps( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_list_swaps( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_refund_submarine_swap( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_start_swap_updates( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_boltz_stop_swap_updates( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_broadcast_sweep_transaction( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_calculate_channel_liquidity_options( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_cancel_pubky_auth( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_check_sweepable_balances( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_closed_channels_from_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_closed_channels_to_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_complete_pubky_auth( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_create_channel_request_url( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_create_cjit_entry( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_create_order( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_create_withdraw_callback_url( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_decode( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_delete_activities_by_wallet_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_delete_activity_by_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_delete_pre_activity_metadata( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_delete_transaction_details( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_derive_bitcoin_address( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_derive_bitcoin_addresses( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_derive_onchain_descriptor( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_derive_private_key( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_derive_pubky_secret_key( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_derive_wallet_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_entropy_to_mnemonic( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_estimate_order_fee( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_estimate_order_fee_full( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_fetch_pubky_contacts( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_fetch_pubky_file( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_fetch_pubky_file_string( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_fetch_pubky_profile( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_finalize_psbt( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_generate_mnemonic( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_activities( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_activities_by_tag( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_activities_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_activity_by_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_activity_by_tx_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_all_activities_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_all_closed_channels( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_all_pre_activity_metadata( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_all_transaction_details( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_all_unique_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_bip39_suggestions( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_bip39_wordlist( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_cjit_entries( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_closed_channel_by_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_default_gap_limit( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_default_lsp_balance( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_default_wallet_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_gift( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_info( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_lnurl_invoice( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_lnurl_invoice_for_pay_data( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_min_zero_conf_tx_fee( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_orders( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_payment( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_pre_activity_metadata( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_pre_activity_metadata_list( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_supported_hardware_wallets( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_get_transaction_details( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_gift_order( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_gift_pay( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_init_db( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_insert_activity( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_is_address_used( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_is_valid_bip39_word( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_lnurl_auth( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_mark_activity_as_seen( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_migrate_backup_activities_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_migrate_backup_activity_tags_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_migrate_backup_pre_activity_metadata_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_migrate_backup_transaction_details_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_mnemonic_to_entropy( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_mnemonic_to_seed( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_broadcast_raw_tx( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_compose_transaction( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_get_account_info( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_get_address_info( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_get_transaction_detail( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_get_transaction_history( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_start_watcher( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_stop_all_watchers( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_onchain_stop_watcher( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_open_channel( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_parse_pubky_auth_url( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_passport_parse_account_export( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pre_activity_metadata_from_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pre_activity_metadata_to_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_prepare_legacy_rn_native_segwit_recovery_sweep( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_prepare_sweep_transaction( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_public_key_from_secret( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_put_with_secret_key( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_session_delete( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_session_list( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_session_put( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_sign_in( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_pubky_sign_up( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_refresh_active_cjit_entries( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_refresh_active_orders( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_register_device( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_regtest_close_channel( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_regtest_deposit( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_regtest_get_payment( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_regtest_mine( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_regtest_pay( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_remove_closed_channel_by_id( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_remove_pre_activity_metadata_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_remove_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_reset_pre_activity_metadata_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_resolve_pubky_url( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_serialized_extended_pubkey( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_start_pubky_auth( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_test_notification( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_transaction_details_from_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_transaction_details_to_json( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_account_type_to_script_type( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_clear_credentials( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_connect( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_disconnect( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_get_address( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_get_connected_device( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_get_device_fingerprint( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_get_features( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_get_public_key( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_initialize( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_is_ble_available( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_is_connected( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_is_initialized( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_list_devices( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_refresh_features( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_scan( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_set_transport_callback( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_set_ui_callback( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_sign_message( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_sign_tx( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_sign_tx_from_psbt( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_trezor_verify_message( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_update_activity( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_update_blocktank_url( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_activities( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_activity( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_cjit_entries( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_closed_channel( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_closed_channels( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_info( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_lightning_activities( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_onchain_activities( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_orders( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_pre_activity_metadata( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_tags( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_upsert_transaction_details( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_ur_encode_crypto_psbt( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_validate_bitcoin_address( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_validate_mnemonic( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_wipe_all_closed_channels( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_wipe_all_databases( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_func_wipe_all_transaction_details( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_boltzeventlistener_on_event( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_eventlistener_on_event( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_enumerate_devices( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_open_device( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_close_device( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_read_chunk( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_write_chunk( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_get_chunk_size( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_call_message( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_get_pairing_code( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_save_thp_credential( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_load_thp_credential( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezortransportcallback_log_debug( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezoruicallback_on_pin_request( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_trezoruicallback_on_passphrase_request( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_urdecoder_receive( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_method_urdecoder_reset( - ): Int - @JvmStatic - external fun uniffi_bitkitcore_checksum_constructor_urdecoder_new( - ): Int - @JvmStatic - external fun ffi_bitkitcore_uniffi_contract_version( - ): Int -} - -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal object UniffiLib : Library { - - init { - IntegrityCheckingUniffiLib - Native.register(UniffiLib::class.java, findLibraryName("bitkitcore")) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - uniffiCallbackInterfaceBoltzEventListener.register(this) - uniffiCallbackInterfaceEventListener.register(this) - uniffiCallbackInterfaceTrezorTransportCallback.register(this) - uniffiCallbackInterfaceTrezorUiCallback.register(this) - } - // The Cleaner for the whole library - internal val CLEANER: UniffiCleaner by lazy { - UniffiCleaner.create() - } - @JvmStatic - external fun uniffi_bitkitcore_fn_clone_boltzeventlistener( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Pointer? - @JvmStatic - external fun uniffi_bitkitcore_fn_free_boltzeventlistener( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_init_callback_vtable_boltzeventlistener( - `vtable`: UniffiVTableCallbackInterfaceBoltzEventListener, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_method_boltzeventlistener_on_event( - `ptr`: Pointer?, - `event`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @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, - ): Pointer? - @JvmStatic - external fun uniffi_bitkitcore_fn_free_trezortransportcallback( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_init_callback_vtable_trezortransportcallback( - `vtable`: UniffiVTableCallbackInterfaceTrezorTransportCallback, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_enumerate_devices( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_open_device( - `ptr`: Pointer?, - `path`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_close_device( - `ptr`: Pointer?, - `path`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_read_chunk( - `ptr`: Pointer?, - `path`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_write_chunk( - `ptr`: Pointer?, - `path`: RustBufferByValue, - `data`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_get_chunk_size( - `ptr`: Pointer?, - `path`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_call_message( - `ptr`: Pointer?, - `path`: RustBufferByValue, - `messageType`: Short, - `data`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_get_pairing_code( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_save_thp_credential( - `ptr`: Pointer?, - `deviceId`: RustBufferByValue, - `credentialJson`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_load_thp_credential( - `ptr`: Pointer?, - `deviceId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezortransportcallback_log_debug( - `ptr`: Pointer?, - `tag`: RustBufferByValue, - `message`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_clone_trezoruicallback( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Pointer? - @JvmStatic - external fun uniffi_bitkitcore_fn_free_trezoruicallback( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_init_callback_vtable_trezoruicallback( - `vtable`: UniffiVTableCallbackInterfaceTrezorUiCallback, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezoruicallback_on_pin_request( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request( - `ptr`: Pointer?, - `onDevice`: Byte, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_clone_urdecoder( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Pointer? - @JvmStatic - external fun uniffi_bitkitcore_fn_free_urdecoder( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_constructor_urdecoder_new( - uniffiCallStatus: UniffiRustCallStatus, - ): Pointer? - @JvmStatic - external fun uniffi_bitkitcore_fn_method_urdecoder_receive( - `ptr`: Pointer?, - `frame`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_method_urdecoder_reset( - `ptr`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_activities_from_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_activities_to_json( - `activities`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_activity_tags_from_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_activity_tags_to_json( - `tags`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_activity_wipe_all( - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_add_pre_activity_metadata( - `preActivityMetadata`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_add_pre_activity_metadata_tags( - `walletId`: RustBufferByValue, - `paymentId`: RustBufferByValue, - `tags`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_add_tags( - `walletId`: RustBufferByValue, - `activityId`: RustBufferByValue, - `tags`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_approve_pubky_auth( - `authUrl`: RustBufferByValue, - `secretKeyHex`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_blocktank_remove_all_cjit_entries( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_blocktank_remove_all_orders( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_blocktank_wipe_all( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_claim_reverse_swap( - `swapId`: RustBufferByValue, - `mnemonic`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `feeRateSatPerVb`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_create_reverse_swap( - `network`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `amountSat`: Long, - `claimAddress`: RustBufferByValue, - `mnemonic`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_create_submarine_swap( - `network`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `invoice`: RustBufferByValue, - `mnemonic`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_get_reverse_limits( - `network`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_get_submarine_limits( - `network`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_get_swap( - `swapId`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_list_pending_swaps( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_list_swaps( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_refund_submarine_swap( - `swapId`: RustBufferByValue, - `refundAddress`: RustBufferByValue, - `mnemonic`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `feeRateSatPerVb`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_start_swap_updates( - `network`: RustBufferByValue, - `listener`: Pointer?, - `mnemonic`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `feeRateSatPerVb`: RustBufferByValue, - `acceptZeroConf`: Byte, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_boltz_stop_swap_updates( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_broadcast_sweep_transaction( - `psbt`: RustBufferByValue, - `mnemonicPhrase`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options( - `params`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_cancel_pubky_auth( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_check_sweepable_balances( - `mnemonicPhrase`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_closed_channels_from_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_closed_channels_to_json( - `channels`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_complete_pubky_auth( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_create_channel_request_url( - `k1`: RustBufferByValue, - `callback`: RustBufferByValue, - `localNodeId`: RustBufferByValue, - `isPrivate`: Byte, - `cancel`: Byte, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_create_cjit_entry( - `channelSizeSat`: Long, - `invoiceSat`: Long, - `invoiceDescription`: RustBufferByValue, - `nodeId`: RustBufferByValue, - `channelExpiryWeeks`: Int, - `options`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_create_order( - `lspBalanceSat`: Long, - `channelExpiryWeeks`: Int, - `options`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_create_withdraw_callback_url( - `k1`: RustBufferByValue, - `callback`: RustBufferByValue, - `paymentRequest`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_decode( - `invoice`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_delete_activities_by_wallet_id( - `walletId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun uniffi_bitkitcore_fn_func_delete_activity_by_id( - `walletId`: RustBufferByValue, - `activityId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_func_delete_pre_activity_metadata( - `walletId`: RustBufferByValue, - `paymentId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_delete_transaction_details( - `walletId`: RustBufferByValue, - `txId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_func_derive_bitcoin_address( - `mnemonicPhrase`: RustBufferByValue, - `derivationPathStr`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_derive_bitcoin_addresses( - `mnemonicPhrase`: RustBufferByValue, - `derivationPathStr`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `isChange`: RustBufferByValue, - `startIndex`: RustBufferByValue, - `count`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_derive_onchain_descriptor( - `mnemonicPhrase`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `accountType`: RustBufferByValue, - `accountIndex`: Int, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_derive_private_key( - `mnemonicPhrase`: RustBufferByValue, - `derivationPathStr`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_derive_pubky_secret_key( - `seed`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_derive_wallet_id( - `deviceType`: RustBufferByValue, - `xpubs`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_entropy_to_mnemonic( - `entropy`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_estimate_order_fee( - `lspBalanceSat`: Long, - `channelExpiryWeeks`: Int, - `options`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_estimate_order_fee_full( - `lspBalanceSat`: Long, - `channelExpiryWeeks`: Int, - `options`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_fetch_pubky_contacts( - `publicKey`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_fetch_pubky_file( - `uri`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_fetch_pubky_file_string( - `uri`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_fetch_pubky_profile( - `publicKey`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_finalize_psbt( - `originalPsbt`: RustBufferByValue, - `signedPsbt`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_generate_mnemonic( - `wordCount`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_activities( - `walletId`: RustBufferByValue, - `filter`: RustBufferByValue, - `txType`: RustBufferByValue, - `tags`: RustBufferByValue, - `search`: RustBufferByValue, - `minDate`: RustBufferByValue, - `maxDate`: RustBufferByValue, - `limit`: RustBufferByValue, - `sortDirection`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_activities_by_tag( - `walletId`: RustBufferByValue, - `tag`: RustBufferByValue, - `limit`: RustBufferByValue, - `sortDirection`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_activities_tags( - `walletId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_activity_by_id( - `walletId`: RustBufferByValue, - `activityId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_activity_by_tx_id( - `walletId`: RustBufferByValue, - `txId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_all_activities_tags( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_all_closed_channels( - `sortDirection`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_all_pre_activity_metadata( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_all_transaction_details( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_all_unique_tags( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_bip39_suggestions( - `partialWord`: RustBufferByValue, - `limit`: Int, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_bip39_wordlist( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_cjit_entries( - `entryIds`: RustBufferByValue, - `filter`: RustBufferByValue, - `refresh`: Byte, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_closed_channel_by_id( - `channelId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_default_gap_limit( - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_default_lsp_balance( - `params`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_default_wallet_id( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_gift( - `giftId`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_info( - `refresh`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_lnurl_invoice( - `address`: RustBufferByValue, - `amountSatoshis`: Long, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_lnurl_invoice_for_pay_data( - `data`: RustBufferByValue, - `amountMsats`: Long, - `comment`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_min_zero_conf_tx_fee( - `orderId`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_orders( - `orderIds`: RustBufferByValue, - `filter`: RustBufferByValue, - `refresh`: Byte, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_payment( - `paymentId`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_pre_activity_metadata( - `walletId`: RustBufferByValue, - `searchKey`: RustBufferByValue, - `searchByAddress`: Byte, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_pre_activity_metadata_list( - `walletId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_supported_hardware_wallets( - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_tags( - `walletId`: RustBufferByValue, - `activityId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_get_transaction_details( - `walletId`: RustBufferByValue, - `txId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_gift_order( - `clientNodeId`: RustBufferByValue, - `code`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_gift_pay( - `invoice`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_init_db( - `basePath`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_insert_activity( - `activity`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_is_address_used( - `address`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_func_is_valid_bip39_word( - `word`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_func_lnurl_auth( - `domain`: RustBufferByValue, - `k1`: RustBufferByValue, - `callback`: RustBufferByValue, - `bip32Mnemonic`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_mark_activity_as_seen( - `walletId`: RustBufferByValue, - `activityId`: RustBufferByValue, - `seenAt`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_migrate_backup_activities_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_migrate_backup_activity_tags_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_migrate_backup_pre_activity_metadata_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_migrate_backup_transaction_details_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_mnemonic_to_entropy( - `mnemonicPhrase`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_mnemonic_to_seed( - `mnemonicPhrase`: RustBufferByValue, - `passphrase`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_onchain_broadcast_raw_tx( - `serializedTx`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_onchain_compose_transaction( - `params`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_onchain_get_account_info( - `extendedKey`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `network`: RustBufferByValue, - `gapLimit`: RustBufferByValue, - `scriptType`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_onchain_get_address_info( - `address`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `network`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_onchain_get_transaction_detail( - `extendedKey`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `txid`: RustBufferByValue, - `network`: RustBufferByValue, - `scriptType`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_onchain_get_transaction_history( - `extendedKey`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `network`: RustBufferByValue, - `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, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_parse_pubky_auth_url( - `authUrl`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_passport_parse_account_export( - `data`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pre_activity_metadata_from_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pre_activity_metadata_to_json( - `metadata`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_prepare_legacy_rn_native_segwit_recovery_sweep( - `mnemonicPhrase`: RustBufferByValue, - `network`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `destinationAddress`: RustBufferByValue, - `feeRateSatsPerVbyte`: RustBufferByValue, - `indexLimit`: Int, - `bip39Passphrase`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_prepare_sweep_transaction( - `mnemonicPhrase`: RustBufferByValue, - `network`: RustBufferByValue, - `bip39Passphrase`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `destinationAddress`: RustBufferByValue, - `feeRateSatsPerVbyte`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_public_key_from_secret( - `secretKeyHex`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_put_with_secret_key( - `secretKeyHex`: RustBufferByValue, - `path`: RustBufferByValue, - `content`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_session_delete( - `sessionSecret`: RustBufferByValue, - `path`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_session_list( - `sessionSecret`: RustBufferByValue, - `dirPath`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_session_put( - `sessionSecret`: RustBufferByValue, - `path`: RustBufferByValue, - `content`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_sign_in( - `secretKeyHex`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_pubky_sign_up( - `secretKeyHex`: RustBufferByValue, - `homeserverPublicKeyZ32`: RustBufferByValue, - `signupCode`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_refresh_active_cjit_entries( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_refresh_active_orders( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_register_device( - `deviceToken`: RustBufferByValue, - `publicKey`: RustBufferByValue, - `features`: RustBufferByValue, - `nodeId`: RustBufferByValue, - `isoTimestamp`: RustBufferByValue, - `signature`: RustBufferByValue, - `isProduction`: RustBufferByValue, - `customUrl`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_regtest_close_channel( - `fundingTxId`: RustBufferByValue, - `vout`: Int, - `forceCloseAfterS`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_regtest_deposit( - `address`: RustBufferByValue, - `amountSat`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_regtest_get_payment( - `paymentId`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_regtest_mine( - `count`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_regtest_pay( - `invoice`: RustBufferByValue, - `amountSat`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_remove_closed_channel_by_id( - `channelId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_func_remove_pre_activity_metadata_tags( - `walletId`: RustBufferByValue, - `paymentId`: RustBufferByValue, - `tags`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_remove_tags( - `walletId`: RustBufferByValue, - `activityId`: RustBufferByValue, - `tags`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_reset_pre_activity_metadata_tags( - `walletId`: RustBufferByValue, - `paymentId`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_resolve_pubky_url( - `uri`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_scan_legacy_rn_native_segwit_recovery_funds( - `mnemonicPhrase`: RustBufferByValue, - `network`: RustBufferByValue, - `electrumUrl`: RustBufferByValue, - `indexLimit`: Int, - `bip39Passphrase`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_serialized_extended_pubkey( - `xpub`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_start_pubky_auth( - `caps`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_test_notification( - `deviceToken`: RustBufferByValue, - `secretMessage`: RustBufferByValue, - `notificationType`: RustBufferByValue, - `customUrl`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_transaction_details_from_json( - `json`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_transaction_details_to_json( - `details`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_account_type_to_script_type( - `accountType`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_clear_credentials( - `deviceId`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_connect( - `deviceId`: RustBufferByValue, - `selection`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_disconnect( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_get_address( - `params`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_get_connected_device( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_get_device_fingerprint( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_get_features( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_get_public_key( - `params`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_initialize( - `credentialPath`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_is_ble_available( - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_is_connected( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_is_initialized( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_list_devices( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_refresh_features( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_scan( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_set_transport_callback( - `callback`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_set_ui_callback( - `callback`: Pointer?, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_sign_message( - `params`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_sign_tx( - `params`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_sign_tx_from_psbt( - `psbtBase64`: RustBufferByValue, - `network`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_trezor_verify_message( - `params`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_update_activity( - `activityId`: RustBufferByValue, - `activity`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_update_blocktank_url( - `newUrl`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_activities( - `activities`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_activity( - `activity`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_cjit_entries( - `entries`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_closed_channel( - `channel`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_closed_channels( - `channels`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_info( - `info`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_lightning_activities( - `activities`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_onchain_activities( - `activities`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_orders( - `orders`: RustBufferByValue, - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_pre_activity_metadata( - `preActivityMetadata`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_tags( - `activityTags`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_upsert_transaction_details( - `detailsList`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_ur_encode_crypto_psbt( - `psbt`: RustBufferByValue, - `maxFragmentLength`: Int, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_validate_bitcoin_address( - `address`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun uniffi_bitkitcore_fn_func_validate_mnemonic( - `mnemonicPhrase`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_wipe_all_closed_channels( - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun uniffi_bitkitcore_fn_func_wipe_all_databases( - ): Long - @JvmStatic - external fun uniffi_bitkitcore_fn_func_wipe_all_transaction_details( - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rustbuffer_alloc( - `size`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun ffi_bitkitcore_rustbuffer_from_bytes( - `bytes`: ForeignBytesByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun ffi_bitkitcore_rustbuffer_free( - `buf`: RustBufferByValue, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rustbuffer_reserve( - `buf`: RustBufferByValue, - `additional`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_u8( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_u8( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_u8( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_u8( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_i8( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_i8( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_i8( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_i8( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Byte - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_u16( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_u16( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_u16( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_u16( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_i16( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_i16( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_i16( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_i16( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Short - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_u32( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_u32( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_u32( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_u32( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_i32( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_i32( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_i32( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_i32( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Int - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_u64( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_u64( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_u64( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_u64( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Long - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_i64( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_i64( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_i64( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_i64( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Long - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_f32( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_f32( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_f32( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_f32( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Float - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_f64( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_f64( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_f64( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_f64( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Double - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_pointer( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_pointer( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_pointer( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_pointer( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Pointer? - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_rust_buffer( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_rust_buffer( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_rust_buffer( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_rust_buffer( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): RustBufferByValue - @JvmStatic - external fun ffi_bitkitcore_rust_future_poll_void( - `handle`: Long, - `callback`: UniffiRustFutureContinuationCallback, - `callbackData`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_cancel_void( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_free_void( - `handle`: Long, - ): Unit - @JvmStatic - external fun ffi_bitkitcore_rust_future_complete_void( - `handle`: Long, - uniffiCallStatus: UniffiRustCallStatus, - ): Unit -} - -public fun uniffiEnsureInitialized() { - UniffiLib -} - -// Public interface members begin here. - -internal const val IDX_CALLBACK_FREE = 0 -// Callback return codes -internal const val UNIFFI_CALLBACK_SUCCESS = 0 -internal const val UNIFFI_CALLBACK_ERROR = 1 -internal const val UNIFFI_CALLBACK_UNEXPECTED_ERROR = 2 - -public abstract class FfiConverterCallbackInterface: FfiConverter { - internal val handleMap = UniffiHandleMap() - - internal fun drop(handle: Long) { - handleMap.remove(handle) - } - - override fun lift(value: Long): CallbackInterface { - return handleMap.get(value) - } - - override fun read(buf: ByteBuffer): CallbackInterface = lift(buf.getLong()) - - override fun lower(value: CallbackInterface): Long = handleMap.insert(value) - - override fun allocationSize(value: CallbackInterface): ULong = 8UL - - override fun write(value: CallbackInterface, buf: ByteBuffer) { - buf.putLong(lower(value)) - } -} -// The cleaner interface for Object finalization code to run. -// This is the entry point to any implementation that we're using. -// -// The cleaner registers disposables and returns cleanables, so now we are -// defining a `UniffiCleaner` with a `UniffiClenaer.Cleanable` to abstract the -// different implementations available at compile time. -public interface UniffiCleaner { - public interface Cleanable { - public fun clean() - } - - public fun register(resource: Any, disposable: Disposable): UniffiCleaner.Cleanable - - public companion object -} -// The fallback Jna cleaner, which is available for both Android, and the JVM. -private class UniffiJnaCleaner : UniffiCleaner { - private val cleaner = com.sun.jna.internal.Cleaner.getCleaner() - - override fun register(resource: Any, disposable: Disposable): UniffiCleaner.Cleanable = - UniffiJnaCleanable(cleaner.register(resource, UniffiCleanerAction(disposable))) -} - -private class UniffiJnaCleanable( - private val cleanable: com.sun.jna.internal.Cleaner.Cleanable, -) : UniffiCleaner.Cleanable { - override fun clean() = cleanable.clean() -} - -private class UniffiCleanerAction(private val disposable: Disposable): Runnable { - override fun run() { - disposable.destroy() - } -} - -// The SystemCleaner, available from API Level 33. -// Some API Level 33 OSes do not support using it, so we require API Level 34. -@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) -private class AndroidSystemCleaner : UniffiCleaner { - private val cleaner = android.system.SystemCleaner.cleaner() - - override fun register(resource: Any, disposable: Disposable): UniffiCleaner.Cleanable = - AndroidSystemCleanable(cleaner.register(resource, UniffiCleanerAction(disposable))) -} - -@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) -private class AndroidSystemCleanable( - private val cleanable: java.lang.ref.Cleaner.Cleanable, -) : UniffiCleaner.Cleanable { - override fun clean() = cleanable.clean() -} - -private fun UniffiCleaner.Companion.create(): UniffiCleaner { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { - try { - return AndroidSystemCleaner() - } catch (_: IllegalAccessError) { - // (For Compose preview) Fallback to UniffiJnaCleaner if AndroidSystemCleaner is - // unavailable, even for API level 34 or higher. - } - } - return UniffiJnaCleaner() -} - - -public object FfiConverterUShort: FfiConverter { - override fun lift(value: Short): UShort { - return value.toUShort() - } - - public fun lift(value: Int): UShort { - return value.toUShort() - } - - override fun read(buf: ByteBuffer): UShort { - return lift(buf.getShort()) - } - - override fun lower(value: UShort): Short { - return value.toShort() - } - - override fun allocationSize(value: UShort): ULong = 2UL - - override fun write(value: UShort, buf: ByteBuffer) { - buf.putShort(value.toShort()) - } -} - - -public object FfiConverterUInt: FfiConverter { - override fun lift(value: Int): UInt { - return value.toUInt() - } - - override fun read(buf: ByteBuffer): UInt { - return lift(buf.getInt()) - } - - override fun lower(value: UInt): Int { - return value.toInt() - } - - override fun allocationSize(value: UInt): ULong = 4UL - - override fun write(value: UInt, buf: ByteBuffer) { - buf.putInt(value.toInt()) - } -} - - -public object FfiConverterULong: FfiConverter { - override fun lift(value: Long): ULong { - return value.toULong() - } - - override fun read(buf: ByteBuffer): ULong { - return lift(buf.getLong()) - } - - override fun lower(value: ULong): Long { - return value.toLong() - } - - override fun allocationSize(value: ULong): ULong = 8UL - - override fun write(value: ULong, buf: ByteBuffer) { - buf.putLong(value.toLong()) - } -} - - -public object FfiConverterLong: FfiConverter { - override fun lift(value: Long): Long { - return value - } - - override fun read(buf: ByteBuffer): Long { - return buf.getLong() - } - - override fun lower(value: Long): Long { - return value - } - - override fun allocationSize(value: Long): ULong = 8UL - - override fun write(value: Long, buf: ByteBuffer) { - buf.putLong(value) - } -} - - -public object FfiConverterFloat: FfiConverter { - override fun lift(value: Float): Float { - return value - } - - override fun read(buf: ByteBuffer): Float { - return buf.getFloat() - } - - override fun lower(value: Float): Float { - return value - } - - override fun allocationSize(value: Float): ULong = 4UL - - override fun write(value: Float, buf: ByteBuffer) { - buf.putFloat(value) - } -} - - -public object FfiConverterDouble: FfiConverter { - override fun lift(value: Double): Double { - return value - } - - override fun read(buf: ByteBuffer): Double { - return buf.getDouble() - } - - override fun lower(value: Double): Double { - return value - } - - override fun allocationSize(value: Double): ULong = 8UL - - override fun write(value: Double, buf: ByteBuffer) { - buf.putDouble(value) - } -} - - -public object FfiConverterBoolean: FfiConverter { - override fun lift(value: Byte): Boolean { - return value.toInt() != 0 - } - - override fun read(buf: ByteBuffer): Boolean { - return lift(buf.get()) - } - - override fun lower(value: Boolean): Byte { - return if (value) 1.toByte() else 0.toByte() - } - - override fun allocationSize(value: Boolean): ULong = 1UL - - override fun write(value: Boolean, buf: ByteBuffer) { - buf.put(lower(value)) - } -} - - -public object FfiConverterString: FfiConverter { - // Note: we don't inherit from FfiConverterRustBuffer, because we use a - // special encoding when lowering/lifting. We can use `RustBuffer.len` to - // store our length and avoid writing it out to the buffer. - override fun lift(value: RustBufferByValue): String { - try { - require(value.len <= Int.MAX_VALUE) { - val length = value.len - "cannot handle RustBuffer longer than Int.MAX_VALUE bytes: length is $length" - } - val byteArr = value.asByteBuffer()!!.get(value.len.toInt()) - return byteArr.decodeToString() - } finally { - RustBufferHelper.free(value) - } - } - - override fun read(buf: ByteBuffer): String { - val len = buf.getInt() - val byteArr = buf.get(len) - return byteArr.decodeToString() - } - - override fun lower(value: String): RustBufferByValue { - // TODO: prevent allocating a new byte array here - val encoded = value.encodeToByteArray(throwOnInvalidSequence = true) - return RustBufferHelper.allocValue(encoded.size.toULong()).apply { - asByteBuffer()!!.put(encoded) - } - } - - // We aren't sure exactly how many bytes our string will be once it's UTF-8 - // encoded. Allocate 3 bytes per UTF-16 code unit which will always be - // enough. - override fun allocationSize(value: String): ULong { - val sizeForLength = 4UL - val sizeForString = value.length.toULong() * 3UL - return sizeForLength + sizeForString - } - - override fun write(value: String, buf: ByteBuffer) { - // TODO: prevent allocating a new byte array here - val encoded = value.encodeToByteArray(throwOnInvalidSequence = true) - buf.putInt(encoded.size) - buf.put(encoded) - } -} - - -public object FfiConverterByteArray: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ByteArray { - val len = buf.getInt() - val byteArr = buf.get(len) - return byteArr - } - override fun allocationSize(value: ByteArray): ULong { - return 4UL + value.size.toULong() - } - override fun write(value: ByteArray, buf: ByteBuffer) { - buf.putInt(value.size) - buf.put(value) - } -} - - - -/** - * Callback interface for receiving Boltz swap lifecycle events. - * - * Implement this in Swift/Kotlin/Python and register it via - * `boltz_start_swap_updates` to receive typed notifications as swaps progress. - * Reverse swaps are claimed automatically; the [`BoltzSwapEvent::Claimed`] - * event reports the resulting transaction id. - */ -public open class BoltzEventListenerImpl: Disposable, BoltzEventListener { - - 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_boltzeventlistener(ptr, status) - } - } - } - } - - public fun uniffiClonePointer(): Pointer { - return uniffiRustCall { status -> - UniffiLib.uniffi_bitkitcore_fn_clone_boltzeventlistener(pointer!!, status) - }!! - } - - - public override fun `onEvent`(`event`: BoltzSwapEvent) { - callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_boltzeventlistener_on_event( - it, - FfiConverterTypeBoltzSwapEvent.lower(`event`), - uniffiRustCallStatus, - ) - } - } - } - - - - - - - - public companion object - -} - - - - - -public object FfiConverterTypeBoltzEventListener: FfiConverter { - internal val handleMap = UniffiHandleMap() - - override fun lower(value: BoltzEventListener): Pointer { - return handleMap.insert(value).toPointer() - } - - override fun lift(value: Pointer): BoltzEventListener { - return BoltzEventListenerImpl(value) - } - - override fun read(buf: ByteBuffer): BoltzEventListener { - // 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: BoltzEventListener): ULong = 8UL - - override fun write(value: BoltzEventListener, 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 uniffiCallbackInterfaceBoltzEventListener { - internal object `onEvent`: UniffiCallbackInterfaceBoltzEventListenerMethod0 { - override fun callback ( - `uniffiHandle`: Long, - `event`: RustBufferByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeBoltzEventListener.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`onEvent`( - FfiConverterTypeBoltzSwapEvent.lift(`event`), - ) - } - val writeReturn = { _: Unit -> - @Suppress("UNUSED_EXPRESSION") - uniffiOutReturn - Unit - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object uniffiFree: UniffiCallbackInterfaceFree { - override fun callback(handle: Long) { - FfiConverterTypeBoltzEventListener.handleMap.remove(handle) - } - } - - internal val vtable = UniffiVTableCallbackInterfaceBoltzEventListener( - `onEvent`, - uniffiFree, - ) - - internal fun register(lib: UniffiLib) { - lib.uniffi_bitkitcore_fn_init_callback_vtable_boltzeventlistener(vtable) - } -} - - - -/** - * 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 - * - * This trait must be implemented by the native iOS/Android code. - * The implementation handles actual USB or Bluetooth communication. - * - * # Android Implementation - * Use Android USB Host API for USB devices: - * - Enumerate devices with vendorId 0x1209 (0x534c for older), productId 0x53c1 - * - Request USB permission, claim interface, get endpoints - * - Chunk size: 64 bytes for USB - * - * Use Android BLE API for Bluetooth: - * - Scan for Trezor BLE service UUID: 8c000001-a59b-4d58-a9ad-073df69fa1b1 - * - Connect and discover characteristics - * - Read from: 8c000002-a59b-4d58-a9ad-073df69fa1b1 - * - Write to: 8c000003-a59b-4d58-a9ad-073df69fa1b1 - * - Chunk size: 244 bytes for BLE - * - * # iOS Implementation - * Use IOKit/CoreBluetooth with same service/characteristic UUIDs. - */ -public open class TrezorTransportCallbackImpl: Disposable, TrezorTransportCallback { - - 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_trezortransportcallback(ptr, status) - } - } - } - } - - public fun uniffiClonePointer(): Pointer { - return uniffiRustCall { status -> - UniffiLib.uniffi_bitkitcore_fn_clone_trezortransportcallback(pointer!!, status) - }!! - } - - - /** - * Enumerate all connected Trezor devices - */ - public override fun `enumerateDevices`(): List { - return FfiConverterSequenceTypeNativeDeviceInfo.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_enumerate_devices( - it, - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Open a connection to a device - */ - public override fun `openDevice`(`path`: kotlin.String): TrezorTransportWriteResult { - return FfiConverterTypeTrezorTransportWriteResult.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_open_device( - it, - FfiConverterString.lower(`path`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Close the connection to a device - */ - public override fun `closeDevice`(`path`: kotlin.String): TrezorTransportWriteResult { - return FfiConverterTypeTrezorTransportWriteResult.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_close_device( - it, - FfiConverterString.lower(`path`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Read a chunk of data from the device - */ - public override fun `readChunk`(`path`: kotlin.String): TrezorTransportReadResult { - return FfiConverterTypeTrezorTransportReadResult.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_read_chunk( - it, - FfiConverterString.lower(`path`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Write a chunk of data to the device - */ - public override fun `writeChunk`(`path`: kotlin.String, `data`: kotlin.ByteArray): TrezorTransportWriteResult { - return FfiConverterTypeTrezorTransportWriteResult.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_write_chunk( - it, - FfiConverterString.lower(`path`), - FfiConverterByteArray.lower(`data`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Get the chunk size for a device (64 for USB, 244 for Bluetooth) - */ - public override fun `getChunkSize`(`path`: kotlin.String): kotlin.UInt { - return FfiConverterUInt.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_get_chunk_size( - it, - FfiConverterString.lower(`path`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * High-level message call for BLE/THP devices. - * - * For BLE devices that use THP protocol (encrypted communication), - * the native layer should handle encryption/decryption via - * android-trezor-connect and return the raw protobuf response. - * - * Returns None if not supported (will fall back to Protocol V1 chunks). - * Returns Some(result) to use native THP handling. - * - * # Arguments - * * `path` - Device path - * * `message_type` - Protobuf message type (e.g., GetAddress = 29) - * * `data` - Serialized protobuf message data - */ - public override fun `callMessage`(`path`: kotlin.String, `messageType`: kotlin.UShort, `data`: kotlin.ByteArray): TrezorCallMessageResult? { - return FfiConverterOptionalTypeTrezorCallMessageResult.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_call_message( - it, - FfiConverterString.lower(`path`), - FfiConverterUShort.lower(`messageType`), - FfiConverterByteArray.lower(`data`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Get pairing code from user during BLE THP pairing. - * - * This is called when the Trezor device displays a 6-digit code - * that must be entered to complete Bluetooth pairing. - * - * The native layer should display a UI for the user to enter the code - * shown on the Trezor screen. - * - * Returns the 6-digit code as a string, or empty string to cancel. - */ - public override fun `getPairingCode`(): kotlin.String { - return FfiConverterString.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_get_pairing_code( - it, - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Save THP pairing credentials for a device. - * - * Called after successful BLE pairing to store credentials for reconnection. - * The credential_json is a JSON string containing the serialized ThpCredentials. - * - * # Arguments - * * `device_id` - Device identifier (e.g., BLE address like "ble:AA:BB:CC:DD:EE:FF") - * * `credential_json` - JSON string with credential data - * - * Returns true if credentials were saved successfully. - */ - public override fun `saveThpCredential`(`deviceId`: kotlin.String, `credentialJson`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_save_thp_credential( - it, - FfiConverterString.lower(`deviceId`), - FfiConverterString.lower(`credentialJson`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Load THP pairing credentials for a device. - * - * Called before BLE handshake to check for stored credentials. - * If credentials are found, they will be used to skip the pairing dialog. - * - * # Arguments - * * `device_id` - Device identifier (e.g., BLE address like "ble:AA:BB:CC:DD:EE:FF") - * - * Returns the JSON string containing ThpCredentials, or None if not found. - */ - public override fun `loadThpCredential`(`deviceId`: kotlin.String): kotlin.String? { - return FfiConverterOptionalString.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_load_thp_credential( - it, - FfiConverterString.lower(`deviceId`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Log a debug message from the Rust THP handshake layer. - * - * This forwards Rust-level errors and state information to the native - * debug UI (e.g., TrezorDebugLog on Android) so they are visible - * alongside the Kotlin-level logs. - * - * # Arguments - * * `tag` - Short tag identifying the subsystem (e.g., "HANDSHAKE", "THP") - * * `message` - Human-readable debug message - */ - public override fun `logDebug`(`tag`: kotlin.String, `message`: kotlin.String) { - callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezortransportcallback_log_debug( - it, - FfiConverterString.lower(`tag`), - FfiConverterString.lower(`message`), - uniffiRustCallStatus, - ) - } - } - } - - - - - - - - public companion object - -} - - - - - -public object FfiConverterTypeTrezorTransportCallback: FfiConverter { - internal val handleMap = UniffiHandleMap() - - override fun lower(value: TrezorTransportCallback): Pointer { - return handleMap.insert(value).toPointer() - } - - override fun lift(value: Pointer): TrezorTransportCallback { - return TrezorTransportCallbackImpl(value) - } - - override fun read(buf: ByteBuffer): TrezorTransportCallback { - // 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: TrezorTransportCallback): ULong = 8UL - - override fun write(value: TrezorTransportCallback, 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 uniffiCallbackInterfaceTrezorTransportCallback { - internal object `enumerateDevices`: UniffiCallbackInterfaceTrezorTransportCallbackMethod0 { - override fun callback ( - `uniffiHandle`: Long, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`enumerateDevices`( - ) - } - val writeReturn = { uniffiResultValue: List -> - uniffiOutReturn.setValue(FfiConverterSequenceTypeNativeDeviceInfo.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `openDevice`: UniffiCallbackInterfaceTrezorTransportCallbackMethod1 { - override fun callback ( - `uniffiHandle`: Long, - `path`: RustBufferByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`openDevice`( - FfiConverterString.lift(`path`), - ) - } - val writeReturn = { uniffiResultValue: TrezorTransportWriteResult -> - uniffiOutReturn.setValue(FfiConverterTypeTrezorTransportWriteResult.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `closeDevice`: UniffiCallbackInterfaceTrezorTransportCallbackMethod2 { - override fun callback ( - `uniffiHandle`: Long, - `path`: RustBufferByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`closeDevice`( - FfiConverterString.lift(`path`), - ) - } - val writeReturn = { uniffiResultValue: TrezorTransportWriteResult -> - uniffiOutReturn.setValue(FfiConverterTypeTrezorTransportWriteResult.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `readChunk`: UniffiCallbackInterfaceTrezorTransportCallbackMethod3 { - override fun callback ( - `uniffiHandle`: Long, - `path`: RustBufferByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`readChunk`( - FfiConverterString.lift(`path`), - ) - } - val writeReturn = { uniffiResultValue: TrezorTransportReadResult -> - uniffiOutReturn.setValue(FfiConverterTypeTrezorTransportReadResult.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `writeChunk`: UniffiCallbackInterfaceTrezorTransportCallbackMethod4 { - override fun callback ( - `uniffiHandle`: Long, - `path`: RustBufferByValue, - `data`: RustBufferByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`writeChunk`( - FfiConverterString.lift(`path`), - FfiConverterByteArray.lift(`data`), - ) - } - val writeReturn = { uniffiResultValue: TrezorTransportWriteResult -> - uniffiOutReturn.setValue(FfiConverterTypeTrezorTransportWriteResult.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `getChunkSize`: UniffiCallbackInterfaceTrezorTransportCallbackMethod5 { - override fun callback ( - `uniffiHandle`: Long, - `path`: RustBufferByValue, - `uniffiOutReturn`: IntByReference, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`getChunkSize`( - FfiConverterString.lift(`path`), - ) - } - val writeReturn = { uniffiResultValue: kotlin.UInt -> - uniffiOutReturn.setValue(FfiConverterUInt.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `callMessage`: UniffiCallbackInterfaceTrezorTransportCallbackMethod6 { - override fun callback ( - `uniffiHandle`: Long, - `path`: RustBufferByValue, - `messageType`: Short, - `data`: RustBufferByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`callMessage`( - FfiConverterString.lift(`path`), - FfiConverterUShort.lift(`messageType`), - FfiConverterByteArray.lift(`data`), - ) - } - val writeReturn = { uniffiResultValue: TrezorCallMessageResult? -> - uniffiOutReturn.setValue(FfiConverterOptionalTypeTrezorCallMessageResult.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `getPairingCode`: UniffiCallbackInterfaceTrezorTransportCallbackMethod7 { - override fun callback ( - `uniffiHandle`: Long, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`getPairingCode`( - ) - } - val writeReturn = { uniffiResultValue: kotlin.String -> - uniffiOutReturn.setValue(FfiConverterString.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `saveThpCredential`: UniffiCallbackInterfaceTrezorTransportCallbackMethod8 { - override fun callback ( - `uniffiHandle`: Long, - `deviceId`: RustBufferByValue, - `credentialJson`: RustBufferByValue, - `uniffiOutReturn`: ByteByReference, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`saveThpCredential`( - FfiConverterString.lift(`deviceId`), - FfiConverterString.lift(`credentialJson`), - ) - } - val writeReturn = { uniffiResultValue: kotlin.Boolean -> - uniffiOutReturn.setValue(FfiConverterBoolean.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `loadThpCredential`: UniffiCallbackInterfaceTrezorTransportCallbackMethod9 { - override fun callback ( - `uniffiHandle`: Long, - `deviceId`: RustBufferByValue, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`loadThpCredential`( - FfiConverterString.lift(`deviceId`), - ) - } - val writeReturn = { uniffiResultValue: kotlin.String? -> - uniffiOutReturn.setValue(FfiConverterOptionalString.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `logDebug`: UniffiCallbackInterfaceTrezorTransportCallbackMethod10 { - override fun callback ( - `uniffiHandle`: Long, - `tag`: RustBufferByValue, - `message`: RustBufferByValue, - `uniffiOutReturn`: Pointer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorTransportCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`logDebug`( - FfiConverterString.lift(`tag`), - FfiConverterString.lift(`message`), - ) - } - val writeReturn = { _: Unit -> - @Suppress("UNUSED_EXPRESSION") - uniffiOutReturn - Unit - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object uniffiFree: UniffiCallbackInterfaceFree { - override fun callback(handle: Long) { - FfiConverterTypeTrezorTransportCallback.handleMap.remove(handle) - } - } - - internal val vtable = UniffiVTableCallbackInterfaceTrezorTransportCallback( - `enumerateDevices`, - `openDevice`, - `closeDevice`, - `readChunk`, - `writeChunk`, - `getChunkSize`, - `callMessage`, - `getPairingCode`, - `saveThpCredential`, - `loadThpCredential`, - `logDebug`, - uniffiFree, - ) - - internal fun register(lib: UniffiLib) { - lib.uniffi_bitkitcore_fn_init_callback_vtable_trezortransportcallback(vtable) - } -} - - - -/** - * Callback interface for handling PIN and passphrase requests from the Trezor device. - * - * The native layer (iOS/Android) should implement this to show PIN/passphrase - * input UI when the device requests it during operations like signing. - */ -public open class TrezorUiCallbackImpl: Disposable, TrezorUiCallback { - - 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_trezoruicallback(ptr, status) - } - } - } - } - - public fun uniffiClonePointer(): Pointer { - return uniffiRustCall { status -> - UniffiLib.uniffi_bitkitcore_fn_clone_trezoruicallback(pointer!!, status) - }!! - } - - - /** - * Called when the device requests a PIN. - * - * Show a PIN matrix UI and return the matrix-encoded PIN string. - * Return empty string to cancel. - */ - public override fun `onPinRequest`(): kotlin.String { - return FfiConverterString.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezoruicallback_on_pin_request( - it, - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Called when the device requests a passphrase. - * - * If `on_device` is true, the device is asking for the passphrase to be - * entered on the Trezor itself — return `PassphraseResponse::OnDevice`. - * - * If `on_device` is false, show a passphrase input UI and return - * `Standard` (no passphrase), `Hidden { value }` (host-entered passphrase), - * `OnDevice` (defer entry to the Trezor), or `Cancel`. - */ - public override fun `onPassphraseRequest`(`onDevice`: kotlin.Boolean): PassphraseResponse { - return FfiConverterTypePassphraseResponse.lift(callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request( - it, - FfiConverterBoolean.lower(`onDevice`), - uniffiRustCallStatus, - ) - } - }) - } - - - - - - - - public companion object - -} - - - - - -public object FfiConverterTypeTrezorUiCallback: FfiConverter { - internal val handleMap = UniffiHandleMap() - - override fun lower(value: TrezorUiCallback): Pointer { - return handleMap.insert(value).toPointer() - } - - override fun lift(value: Pointer): TrezorUiCallback { - return TrezorUiCallbackImpl(value) - } - - override fun read(buf: ByteBuffer): TrezorUiCallback { - // 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: TrezorUiCallback): ULong = 8UL - - override fun write(value: TrezorUiCallback, 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 uniffiCallbackInterfaceTrezorUiCallback { - internal object `onPinRequest`: UniffiCallbackInterfaceTrezorUiCallbackMethod0 { - override fun callback ( - `uniffiHandle`: Long, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorUiCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`onPinRequest`( - ) - } - val writeReturn = { uniffiResultValue: kotlin.String -> - uniffiOutReturn.setValue(FfiConverterString.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object `onPassphraseRequest`: UniffiCallbackInterfaceTrezorUiCallbackMethod1 { - override fun callback ( - `uniffiHandle`: Long, - `onDevice`: Byte, - `uniffiOutReturn`: RustBuffer, - uniffiCallStatus: UniffiRustCallStatus, - ) { - val uniffiObj = FfiConverterTypeTrezorUiCallback.handleMap.get(uniffiHandle) - val makeCall = { -> - uniffiObj.`onPassphraseRequest`( - FfiConverterBoolean.lift(`onDevice`), - ) - } - val writeReturn = { uniffiResultValue: PassphraseResponse -> - uniffiOutReturn.setValue(FfiConverterTypePassphraseResponse.lower(uniffiResultValue)) - } - uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn) - } - } - internal object uniffiFree: UniffiCallbackInterfaceFree { - override fun callback(handle: Long) { - FfiConverterTypeTrezorUiCallback.handleMap.remove(handle) - } - } - - internal val vtable = UniffiVTableCallbackInterfaceTrezorUiCallback( - `onPinRequest`, - `onPassphraseRequest`, - uniffiFree, - ) - - internal fun register(lib: UniffiLib) { - lib.uniffi_bitkitcore_fn_init_callback_vtable_trezoruicallback(vtable) - } -} - - - -/** - * Stateful decoder for single-part and animated multipart UR QR scans. - */ -public open class UrDecoder: Disposable, UrDecoderInterface { - - 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)) - } - public constructor() : this( - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_constructor_urdecoder_new( - uniffiRustCallStatus, - ) - }!! - ) - - 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_urdecoder(ptr, status) - } - } - } - } - - public fun uniffiClonePointer(): Pointer { - return uniffiRustCall { status -> - UniffiLib.uniffi_bitkitcore_fn_clone_urdecoder(pointer!!, status) - }!! - } - - - /** - * Adds one UR fragment and returns the current decoding status. - */ - @Throws(UrException::class) - public override fun `receive`(`frame`: kotlin.String): UrDecoderStatus { - return FfiConverterTypeUrDecoderStatus.lift(callWithPointer { - uniffiRustCallWithError(UrExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_urdecoder_receive( - it, - FfiConverterString.lower(`frame`), - uniffiRustCallStatus, - ) - } - }) - } - - /** - * Clear all frames so the decoder can receive another message. - */ - public override fun `reset`() { - callWithPointer { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_method_urdecoder_reset( - it, - uniffiRustCallStatus, - ) - } - } - } - - - - - - - - public companion object - -} - - - - - -public object FfiConverterTypeUrDecoder: FfiConverter { - - override fun lower(value: UrDecoder): Pointer { - return value.uniffiClonePointer() - } - - override fun lift(value: Pointer): UrDecoder { - return UrDecoder(value) - } - - override fun read(buf: ByteBuffer): UrDecoder { - // 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: UrDecoder): ULong = 8UL - - override fun write(value: UrDecoder, 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()) - } -} - - - - -public object FfiConverterTypeAccountAddresses: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AccountAddresses { - return AccountAddresses( - FfiConverterSequenceTypeAddressInfo.read(buf), - FfiConverterSequenceTypeAddressInfo.read(buf), - FfiConverterSequenceTypeAddressInfo.read(buf), - ) - } - - override fun allocationSize(value: AccountAddresses): ULong = ( - FfiConverterSequenceTypeAddressInfo.allocationSize(value.`used`) + - FfiConverterSequenceTypeAddressInfo.allocationSize(value.`unused`) + - FfiConverterSequenceTypeAddressInfo.allocationSize(value.`change`) - ) - - override fun write(value: AccountAddresses, buf: ByteBuffer) { - FfiConverterSequenceTypeAddressInfo.write(value.`used`, buf) - FfiConverterSequenceTypeAddressInfo.write(value.`unused`, buf) - FfiConverterSequenceTypeAddressInfo.write(value.`change`, buf) - } -} - - - - -public object FfiConverterTypeAccountInfoResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AccountInfoResult { - return AccountInfoResult( - FfiConverterTypeComposeAccount.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterTypeAccountType.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: AccountInfoResult): ULong = ( - FfiConverterTypeComposeAccount.allocationSize(value.`account`) + - FfiConverterULong.allocationSize(value.`balance`) + - FfiConverterUInt.allocationSize(value.`utxoCount`) + - FfiConverterTypeAccountType.allocationSize(value.`accountType`) + - FfiConverterUInt.allocationSize(value.`blockHeight`) - ) - - override fun write(value: AccountInfoResult, buf: ByteBuffer) { - FfiConverterTypeComposeAccount.write(value.`account`, buf) - FfiConverterULong.write(value.`balance`, buf) - FfiConverterUInt.write(value.`utxoCount`, buf) - FfiConverterTypeAccountType.write(value.`accountType`, buf) - FfiConverterUInt.write(value.`blockHeight`, buf) - } -} - - - - -public object FfiConverterTypeAccountUtxo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AccountUtxo { - return AccountUtxo( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - ) - } - - override fun allocationSize(value: AccountUtxo): ULong = ( - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterUInt.allocationSize(value.`vout`) + - FfiConverterULong.allocationSize(value.`amount`) + - FfiConverterUInt.allocationSize(value.`blockHeight`) + - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`path`) + - FfiConverterUInt.allocationSize(value.`confirmations`) + - FfiConverterBoolean.allocationSize(value.`coinbase`) + - FfiConverterBoolean.allocationSize(value.`own`) + - FfiConverterOptionalBoolean.allocationSize(value.`required`) - ) - - override fun write(value: AccountUtxo, buf: ByteBuffer) { - FfiConverterString.write(value.`txid`, buf) - FfiConverterUInt.write(value.`vout`, buf) - FfiConverterULong.write(value.`amount`, buf) - FfiConverterUInt.write(value.`blockHeight`, buf) - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`path`, buf) - FfiConverterUInt.write(value.`confirmations`, buf) - FfiConverterBoolean.write(value.`coinbase`, buf) - FfiConverterBoolean.write(value.`own`, buf) - FfiConverterOptionalBoolean.write(value.`required`, buf) - } -} - - - - -public object FfiConverterTypeActivityTags: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ActivityTags { - return ActivityTags( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - ) - } - - override fun allocationSize(value: ActivityTags): ULong = ( - FfiConverterString.allocationSize(value.`walletId`) + - FfiConverterString.allocationSize(value.`activityId`) + - FfiConverterSequenceString.allocationSize(value.`tags`) - ) - - override fun write(value: ActivityTags, buf: ByteBuffer) { - FfiConverterString.write(value.`walletId`, buf) - FfiConverterString.write(value.`activityId`, buf) - FfiConverterSequenceString.write(value.`tags`, buf) - } -} - - - - -public object FfiConverterTypeAddressInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AddressInfo { - return AddressInfo( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: AddressInfo): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`path`) + - FfiConverterUInt.allocationSize(value.`transfers`) - ) - - override fun write(value: AddressInfo, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`path`, buf) - FfiConverterUInt.write(value.`transfers`, buf) - } -} - - - - -public object FfiConverterTypeBoltzPairInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BoltzPairInfo { - return BoltzPairInfo( - FfiConverterString.read(buf), - FfiConverterDouble.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterDouble.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: BoltzPairInfo): ULong = ( - FfiConverterString.allocationSize(value.`hash`) + - FfiConverterDouble.allocationSize(value.`rate`) + - FfiConverterULong.allocationSize(value.`minimalSat`) + - FfiConverterULong.allocationSize(value.`maximalSat`) + - FfiConverterDouble.allocationSize(value.`feePercentage`) + - FfiConverterULong.allocationSize(value.`minerFeesSat`) - ) - - override fun write(value: BoltzPairInfo, buf: ByteBuffer) { - FfiConverterString.write(value.`hash`, buf) - FfiConverterDouble.write(value.`rate`, buf) - FfiConverterULong.write(value.`minimalSat`, buf) - FfiConverterULong.write(value.`maximalSat`, buf) - FfiConverterDouble.write(value.`feePercentage`, buf) - FfiConverterULong.write(value.`minerFeesSat`, buf) - } -} - - - - -public object FfiConverterTypeBoltzSwap: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BoltzSwap { - return BoltzSwap( - FfiConverterString.read(buf), - FfiConverterTypeBoltzSwapType.read(buf), - FfiConverterTypeBoltzSwapStatus.read(buf), - FfiConverterTypeBoltzNetwork.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: BoltzSwap): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterTypeBoltzSwapType.allocationSize(value.`swapType`) + - FfiConverterTypeBoltzSwapStatus.allocationSize(value.`status`) + - FfiConverterTypeBoltzNetwork.allocationSize(value.`network`) + - FfiConverterULong.allocationSize(value.`swapIndex`) + - FfiConverterULong.allocationSize(value.`amountSat`) + - FfiConverterOptionalULong.allocationSize(value.`onchainAmountSat`) + - FfiConverterOptionalString.allocationSize(value.`invoice`) + - FfiConverterOptionalString.allocationSize(value.`lockupAddress`) + - FfiConverterOptionalString.allocationSize(value.`onchainAddress`) + - FfiConverterULong.allocationSize(value.`timeoutBlockHeight`) + - FfiConverterULong.allocationSize(value.`createdAt`) + - FfiConverterOptionalString.allocationSize(value.`claimTxId`) + - FfiConverterOptionalString.allocationSize(value.`refundTxId`) - ) - - override fun write(value: BoltzSwap, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterTypeBoltzSwapType.write(value.`swapType`, buf) - FfiConverterTypeBoltzSwapStatus.write(value.`status`, buf) - FfiConverterTypeBoltzNetwork.write(value.`network`, buf) - FfiConverterULong.write(value.`swapIndex`, buf) - FfiConverterULong.write(value.`amountSat`, buf) - FfiConverterOptionalULong.write(value.`onchainAmountSat`, buf) - FfiConverterOptionalString.write(value.`invoice`, buf) - FfiConverterOptionalString.write(value.`lockupAddress`, buf) - FfiConverterOptionalString.write(value.`onchainAddress`, buf) - FfiConverterULong.write(value.`timeoutBlockHeight`, buf) - FfiConverterULong.write(value.`createdAt`, buf) - FfiConverterOptionalString.write(value.`claimTxId`, buf) - FfiConverterOptionalString.write(value.`refundTxId`, buf) - } -} - - - - -public object FfiConverterTypeChannelLiquidityOptions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ChannelLiquidityOptions { - return ChannelLiquidityOptions( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: ChannelLiquidityOptions): ULong = ( - FfiConverterULong.allocationSize(value.`defaultLspBalanceSat`) + - FfiConverterULong.allocationSize(value.`minLspBalanceSat`) + - FfiConverterULong.allocationSize(value.`maxLspBalanceSat`) + - FfiConverterULong.allocationSize(value.`maxClientBalanceSat`) - ) - - override fun write(value: ChannelLiquidityOptions, buf: ByteBuffer) { - FfiConverterULong.write(value.`defaultLspBalanceSat`, buf) - FfiConverterULong.write(value.`minLspBalanceSat`, buf) - FfiConverterULong.write(value.`maxLspBalanceSat`, buf) - FfiConverterULong.write(value.`maxClientBalanceSat`, buf) - } -} - - - - -public object FfiConverterTypeChannelLiquidityParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ChannelLiquidityParams { - return ChannelLiquidityParams( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: ChannelLiquidityParams): ULong = ( - FfiConverterULong.allocationSize(value.`clientBalanceSat`) + - FfiConverterULong.allocationSize(value.`existingChannelsTotalSat`) + - FfiConverterULong.allocationSize(value.`minChannelSizeSat`) + - FfiConverterULong.allocationSize(value.`maxChannelSizeSat`) + - FfiConverterULong.allocationSize(value.`satsPerEur`) - ) - - override fun write(value: ChannelLiquidityParams, buf: ByteBuffer) { - FfiConverterULong.write(value.`clientBalanceSat`, buf) - FfiConverterULong.write(value.`existingChannelsTotalSat`, buf) - FfiConverterULong.write(value.`minChannelSizeSat`, buf) - FfiConverterULong.write(value.`maxChannelSizeSat`, buf) - FfiConverterULong.write(value.`satsPerEur`, buf) - } -} - - - - -public object FfiConverterTypeClosedChannelDetails: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ClosedChannelDetails { - return ClosedChannelDetails( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: ClosedChannelDetails): ULong = ( - FfiConverterString.allocationSize(value.`channelId`) + - FfiConverterString.allocationSize(value.`counterpartyNodeId`) + - FfiConverterString.allocationSize(value.`fundingTxoTxid`) + - FfiConverterUInt.allocationSize(value.`fundingTxoIndex`) + - FfiConverterULong.allocationSize(value.`channelValueSats`) + - FfiConverterULong.allocationSize(value.`closedAt`) + - FfiConverterULong.allocationSize(value.`outboundCapacityMsat`) + - FfiConverterULong.allocationSize(value.`inboundCapacityMsat`) + - FfiConverterULong.allocationSize(value.`counterpartyUnspendablePunishmentReserve`) + - FfiConverterULong.allocationSize(value.`unspendablePunishmentReserve`) + - FfiConverterUInt.allocationSize(value.`forwardingFeeProportionalMillionths`) + - FfiConverterUInt.allocationSize(value.`forwardingFeeBaseMsat`) + - FfiConverterString.allocationSize(value.`channelName`) + - FfiConverterString.allocationSize(value.`channelClosureReason`) - ) - - override fun write(value: ClosedChannelDetails, buf: ByteBuffer) { - FfiConverterString.write(value.`channelId`, buf) - FfiConverterString.write(value.`counterpartyNodeId`, buf) - FfiConverterString.write(value.`fundingTxoTxid`, buf) - FfiConverterUInt.write(value.`fundingTxoIndex`, buf) - FfiConverterULong.write(value.`channelValueSats`, buf) - FfiConverterULong.write(value.`closedAt`, buf) - FfiConverterULong.write(value.`outboundCapacityMsat`, buf) - FfiConverterULong.write(value.`inboundCapacityMsat`, buf) - FfiConverterULong.write(value.`counterpartyUnspendablePunishmentReserve`, buf) - FfiConverterULong.write(value.`unspendablePunishmentReserve`, buf) - FfiConverterUInt.write(value.`forwardingFeeProportionalMillionths`, buf) - FfiConverterUInt.write(value.`forwardingFeeBaseMsat`, buf) - FfiConverterString.write(value.`channelName`, buf) - FfiConverterString.write(value.`channelClosureReason`, buf) - } -} - - - - -public object FfiConverterTypeCompletedTransaction: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CompletedTransaction { - return CompletedTransaction( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: CompletedTransaction): ULong = ( - FfiConverterString.allocationSize(value.`serializedTx`) + - FfiConverterString.allocationSize(value.`txid`) - ) - - override fun write(value: CompletedTransaction, buf: ByteBuffer) { - FfiConverterString.write(value.`serializedTx`, buf) - FfiConverterString.write(value.`txid`, buf) - } -} - - - - -public object FfiConverterTypeComposeAccount: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ComposeAccount { - return ComposeAccount( - FfiConverterString.read(buf), - FfiConverterTypeAccountAddresses.read(buf), - FfiConverterSequenceTypeAccountUtxo.read(buf), - ) - } - - override fun allocationSize(value: ComposeAccount): ULong = ( - FfiConverterString.allocationSize(value.`path`) + - FfiConverterTypeAccountAddresses.allocationSize(value.`addresses`) + - FfiConverterSequenceTypeAccountUtxo.allocationSize(value.`utxo`) - ) - - override fun write(value: ComposeAccount, buf: ByteBuffer) { - FfiConverterString.write(value.`path`, buf) - FfiConverterTypeAccountAddresses.write(value.`addresses`, buf) - FfiConverterSequenceTypeAccountUtxo.write(value.`utxo`, buf) - } -} - - - - -public object FfiConverterTypeComposeParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ComposeParams { - return ComposeParams( - FfiConverterTypeWalletParams.read(buf), - FfiConverterSequenceTypeComposeOutput.read(buf), - FfiConverterSequenceFloat.read(buf), - FfiConverterOptionalTypeCoinSelection.read(buf), - ) - } - - override fun allocationSize(value: ComposeParams): ULong = ( - FfiConverterTypeWalletParams.allocationSize(value.`wallet`) + - FfiConverterSequenceTypeComposeOutput.allocationSize(value.`outputs`) + - FfiConverterSequenceFloat.allocationSize(value.`feeRates`) + - FfiConverterOptionalTypeCoinSelection.allocationSize(value.`coinSelection`) - ) - - override fun write(value: ComposeParams, buf: ByteBuffer) { - FfiConverterTypeWalletParams.write(value.`wallet`, buf) - FfiConverterSequenceTypeComposeOutput.write(value.`outputs`, buf) - FfiConverterSequenceFloat.write(value.`feeRates`, buf) - FfiConverterOptionalTypeCoinSelection.write(value.`coinSelection`, buf) - } -} - - - - -public object FfiConverterTypeCreateCjitOptions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CreateCjitOptions { - return CreateCjitOptions( - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: CreateCjitOptions): ULong = ( - FfiConverterOptionalString.allocationSize(value.`source`) + - FfiConverterOptionalString.allocationSize(value.`discountCode`) - ) - - override fun write(value: CreateCjitOptions, buf: ByteBuffer) { - FfiConverterOptionalString.write(value.`source`, buf) - FfiConverterOptionalString.write(value.`discountCode`, buf) - } -} - - - - -public object FfiConverterTypeCreateOrderOptions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CreateOrderOptions { - return CreateOrderOptions( - FfiConverterULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterBoolean.read(buf), - ) - } - - override fun allocationSize(value: CreateOrderOptions): ULong = ( - FfiConverterULong.allocationSize(value.`clientBalanceSat`) + - FfiConverterOptionalString.allocationSize(value.`lspNodeId`) + - FfiConverterString.allocationSize(value.`couponCode`) + - FfiConverterOptionalString.allocationSize(value.`source`) + - FfiConverterOptionalString.allocationSize(value.`discountCode`) + - FfiConverterBoolean.allocationSize(value.`zeroConf`) + - FfiConverterOptionalBoolean.allocationSize(value.`zeroConfPayment`) + - FfiConverterBoolean.allocationSize(value.`zeroReserve`) + - FfiConverterOptionalString.allocationSize(value.`clientNodeId`) + - FfiConverterOptionalString.allocationSize(value.`signature`) + - FfiConverterOptionalString.allocationSize(value.`timestamp`) + - FfiConverterOptionalString.allocationSize(value.`refundOnchainAddress`) + - FfiConverterBoolean.allocationSize(value.`announceChannel`) - ) - - override fun write(value: CreateOrderOptions, buf: ByteBuffer) { - FfiConverterULong.write(value.`clientBalanceSat`, buf) - FfiConverterOptionalString.write(value.`lspNodeId`, buf) - FfiConverterString.write(value.`couponCode`, buf) - FfiConverterOptionalString.write(value.`source`, buf) - FfiConverterOptionalString.write(value.`discountCode`, buf) - FfiConverterBoolean.write(value.`zeroConf`, buf) - FfiConverterOptionalBoolean.write(value.`zeroConfPayment`, buf) - FfiConverterBoolean.write(value.`zeroReserve`, buf) - FfiConverterOptionalString.write(value.`clientNodeId`, buf) - FfiConverterOptionalString.write(value.`signature`, buf) - FfiConverterOptionalString.write(value.`timestamp`, buf) - FfiConverterOptionalString.write(value.`refundOnchainAddress`, buf) - FfiConverterBoolean.write(value.`announceChannel`, buf) - } -} - - - - -public object FfiConverterTypeDefaultLspBalanceParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): DefaultLspBalanceParams { - return DefaultLspBalanceParams( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: DefaultLspBalanceParams): ULong = ( - FfiConverterULong.allocationSize(value.`clientBalanceSat`) + - FfiConverterULong.allocationSize(value.`maxChannelSizeSat`) + - FfiConverterULong.allocationSize(value.`satsPerEur`) - ) - - override fun write(value: DefaultLspBalanceParams, buf: ByteBuffer) { - FfiConverterULong.write(value.`clientBalanceSat`, buf) - FfiConverterULong.write(value.`maxChannelSizeSat`, buf) - FfiConverterULong.write(value.`satsPerEur`, buf) - } -} - - - - -public object FfiConverterTypeErrorData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ErrorData { - return ErrorData( - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: ErrorData): ULong = ( - FfiConverterString.allocationSize(value.`errorDetails`) - ) - - override fun write(value: ErrorData, buf: ByteBuffer) { - FfiConverterString.write(value.`errorDetails`, buf) - } -} - - - - -public object FfiConverterTypeFeeRates: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FeeRates { - return FeeRates( - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: FeeRates): ULong = ( - FfiConverterUInt.allocationSize(value.`fast`) + - FfiConverterUInt.allocationSize(value.`mid`) + - FfiConverterUInt.allocationSize(value.`slow`) - ) - - override fun write(value: FeeRates, buf: ByteBuffer) { - FfiConverterUInt.write(value.`fast`, buf) - FfiConverterUInt.write(value.`mid`, buf) - FfiConverterUInt.write(value.`slow`, buf) - } -} - - - - -public object FfiConverterTypeFundingTx: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): FundingTx { - return FundingTx( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: FundingTx): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterULong.allocationSize(value.`vout`) - ) - - override fun write(value: FundingTx, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterULong.write(value.`vout`, buf) - } -} - - - - -public object FfiConverterTypeGetAddressResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): GetAddressResponse { - return GetAddressResponse( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: GetAddressResponse): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`path`) + - FfiConverterString.allocationSize(value.`publicKey`) - ) - - override fun write(value: GetAddressResponse, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`path`, buf) - FfiConverterString.write(value.`publicKey`, buf) - } -} - - - - -public object FfiConverterTypeGetAddressesResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): GetAddressesResponse { - return GetAddressesResponse( - FfiConverterSequenceTypeGetAddressResponse.read(buf), - ) - } - - override fun allocationSize(value: GetAddressesResponse): ULong = ( - FfiConverterSequenceTypeGetAddressResponse.allocationSize(value.`addresses`) - ) - - override fun write(value: GetAddressesResponse, buf: ByteBuffer) { - FfiConverterSequenceTypeGetAddressResponse.write(value.`addresses`, buf) - } -} - - - - -public object FfiConverterTypeHistoryTransaction: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): HistoryTransaction { - return HistoryTransaction( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterLong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalDouble.read(buf), - FfiConverterULong.read(buf), - FfiConverterTypeTxDirection.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: HistoryTransaction): ULong = ( - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterULong.allocationSize(value.`received`) + - FfiConverterULong.allocationSize(value.`sent`) + - FfiConverterLong.allocationSize(value.`net`) + - FfiConverterOptionalULong.allocationSize(value.`fee`) + - FfiConverterOptionalDouble.allocationSize(value.`feeRate`) + - FfiConverterULong.allocationSize(value.`amount`) + - FfiConverterTypeTxDirection.allocationSize(value.`direction`) + - FfiConverterOptionalUInt.allocationSize(value.`blockHeight`) + - FfiConverterOptionalULong.allocationSize(value.`timestamp`) + - FfiConverterUInt.allocationSize(value.`confirmations`) - ) - - override fun write(value: HistoryTransaction, buf: ByteBuffer) { - FfiConverterString.write(value.`txid`, buf) - FfiConverterULong.write(value.`received`, buf) - FfiConverterULong.write(value.`sent`, buf) - FfiConverterLong.write(value.`net`, buf) - FfiConverterOptionalULong.write(value.`fee`, buf) - FfiConverterOptionalDouble.write(value.`feeRate`, buf) - FfiConverterULong.write(value.`amount`, buf) - FfiConverterTypeTxDirection.write(value.`direction`, buf) - FfiConverterOptionalUInt.write(value.`blockHeight`, buf) - FfiConverterOptionalULong.write(value.`timestamp`, buf) - FfiConverterUInt.write(value.`confirmations`, buf) - } -} - - - - -public object FfiConverterTypeIBt0ConfMinTxFeeWindow: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBt0ConfMinTxFeeWindow { - return IBt0ConfMinTxFeeWindow( - FfiConverterDouble.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IBt0ConfMinTxFeeWindow): ULong = ( - FfiConverterDouble.allocationSize(value.`satPerVbyte`) + - FfiConverterString.allocationSize(value.`validityEndsAt`) - ) - - override fun write(value: IBt0ConfMinTxFeeWindow, buf: ByteBuffer) { - FfiConverterDouble.write(value.`satPerVbyte`, buf) - FfiConverterString.write(value.`validityEndsAt`, buf) - } -} - - - - -public object FfiConverterTypeIBtBolt11Invoice: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtBolt11Invoice { - return IBtBolt11Invoice( - FfiConverterString.read(buf), - FfiConverterTypeBtBolt11InvoiceState.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IBtBolt11Invoice): ULong = ( - FfiConverterString.allocationSize(value.`request`) + - FfiConverterTypeBtBolt11InvoiceState.allocationSize(value.`state`) + - FfiConverterString.allocationSize(value.`expiresAt`) + - FfiConverterString.allocationSize(value.`updatedAt`) - ) - - override fun write(value: IBtBolt11Invoice, buf: ByteBuffer) { - FfiConverterString.write(value.`request`, buf) - FfiConverterTypeBtBolt11InvoiceState.write(value.`state`, buf) - FfiConverterString.write(value.`expiresAt`, buf) - FfiConverterString.write(value.`updatedAt`, buf) - } -} - - - - -public object FfiConverterTypeIBtChannel: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtChannel { - return IBtChannel( - FfiConverterTypeBtOpenChannelState.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterTypeFundingTx.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIBtChannelClose.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: IBtChannel): ULong = ( - FfiConverterTypeBtOpenChannelState.allocationSize(value.`state`) + - FfiConverterString.allocationSize(value.`lspNodePubkey`) + - FfiConverterString.allocationSize(value.`clientNodePubkey`) + - FfiConverterBoolean.allocationSize(value.`announceChannel`) + - FfiConverterTypeFundingTx.allocationSize(value.`fundingTx`) + - FfiConverterOptionalString.allocationSize(value.`closingTxId`) + - FfiConverterOptionalTypeIBtChannelClose.allocationSize(value.`close`) + - FfiConverterOptionalString.allocationSize(value.`shortChannelId`) - ) - - override fun write(value: IBtChannel, buf: ByteBuffer) { - FfiConverterTypeBtOpenChannelState.write(value.`state`, buf) - FfiConverterString.write(value.`lspNodePubkey`, buf) - FfiConverterString.write(value.`clientNodePubkey`, buf) - FfiConverterBoolean.write(value.`announceChannel`, buf) - FfiConverterTypeFundingTx.write(value.`fundingTx`, buf) - FfiConverterOptionalString.write(value.`closingTxId`, buf) - FfiConverterOptionalTypeIBtChannelClose.write(value.`close`, buf) - FfiConverterOptionalString.write(value.`shortChannelId`, buf) - } -} - - - - -public object FfiConverterTypeIBtChannelClose: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtChannelClose { - return IBtChannelClose( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IBtChannelClose): ULong = ( - FfiConverterString.allocationSize(value.`txId`) + - FfiConverterString.allocationSize(value.`closeType`) + - FfiConverterString.allocationSize(value.`initiator`) + - FfiConverterString.allocationSize(value.`registeredAt`) - ) - - override fun write(value: IBtChannelClose, buf: ByteBuffer) { - FfiConverterString.write(value.`txId`, buf) - FfiConverterString.write(value.`closeType`, buf) - FfiConverterString.write(value.`initiator`, buf) - FfiConverterString.write(value.`registeredAt`, buf) - } -} - - - - -public object FfiConverterTypeIBtEstimateFeeResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtEstimateFeeResponse { - return IBtEstimateFeeResponse( - FfiConverterULong.read(buf), - FfiConverterTypeIBt0ConfMinTxFeeWindow.read(buf), - ) - } - - override fun allocationSize(value: IBtEstimateFeeResponse): ULong = ( - FfiConverterULong.allocationSize(value.`feeSat`) + - FfiConverterTypeIBt0ConfMinTxFeeWindow.allocationSize(value.`min0ConfTxFee`) - ) - - override fun write(value: IBtEstimateFeeResponse, buf: ByteBuffer) { - FfiConverterULong.write(value.`feeSat`, buf) - FfiConverterTypeIBt0ConfMinTxFeeWindow.write(value.`min0ConfTxFee`, buf) - } -} - - - - -public object FfiConverterTypeIBtEstimateFeeResponse2: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtEstimateFeeResponse2 { - return IBtEstimateFeeResponse2( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterTypeIBt0ConfMinTxFeeWindow.read(buf), - ) - } - - override fun allocationSize(value: IBtEstimateFeeResponse2): ULong = ( - FfiConverterULong.allocationSize(value.`feeSat`) + - FfiConverterULong.allocationSize(value.`networkFeeSat`) + - FfiConverterULong.allocationSize(value.`serviceFeeSat`) + - FfiConverterTypeIBt0ConfMinTxFeeWindow.allocationSize(value.`min0ConfTxFee`) - ) - - override fun write(value: IBtEstimateFeeResponse2, buf: ByteBuffer) { - FfiConverterULong.write(value.`feeSat`, buf) - FfiConverterULong.write(value.`networkFeeSat`, buf) - FfiConverterULong.write(value.`serviceFeeSat`, buf) - FfiConverterTypeIBt0ConfMinTxFeeWindow.write(value.`min0ConfTxFee`, buf) - } -} - - - - -public object FfiConverterTypeIBtInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtInfo { - return IBtInfo( - FfiConverterUInt.read(buf), - FfiConverterSequenceTypeILspNode.read(buf), - FfiConverterTypeIBtInfoOptions.read(buf), - FfiConverterTypeIBtInfoVersions.read(buf), - FfiConverterTypeIBtInfoOnchain.read(buf), - ) - } - - override fun allocationSize(value: IBtInfo): ULong = ( - FfiConverterUInt.allocationSize(value.`version`) + - FfiConverterSequenceTypeILspNode.allocationSize(value.`nodes`) + - FfiConverterTypeIBtInfoOptions.allocationSize(value.`options`) + - FfiConverterTypeIBtInfoVersions.allocationSize(value.`versions`) + - FfiConverterTypeIBtInfoOnchain.allocationSize(value.`onchain`) - ) - - override fun write(value: IBtInfo, buf: ByteBuffer) { - FfiConverterUInt.write(value.`version`, buf) - FfiConverterSequenceTypeILspNode.write(value.`nodes`, buf) - FfiConverterTypeIBtInfoOptions.write(value.`options`, buf) - FfiConverterTypeIBtInfoVersions.write(value.`versions`, buf) - FfiConverterTypeIBtInfoOnchain.write(value.`onchain`, buf) - } -} - - - - -public object FfiConverterTypeIBtInfoOnchain: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtInfoOnchain { - return IBtInfoOnchain( - FfiConverterTypeBitcoinNetworkEnum.read(buf), - FfiConverterTypeFeeRates.read(buf), - ) - } - - override fun allocationSize(value: IBtInfoOnchain): ULong = ( - FfiConverterTypeBitcoinNetworkEnum.allocationSize(value.`network`) + - FfiConverterTypeFeeRates.allocationSize(value.`feeRates`) - ) - - override fun write(value: IBtInfoOnchain, buf: ByteBuffer) { - FfiConverterTypeBitcoinNetworkEnum.write(value.`network`, buf) - FfiConverterTypeFeeRates.write(value.`feeRates`, buf) - } -} - - - - -public object FfiConverterTypeIBtInfoOptions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtInfoOptions { - return IBtInfoOptions( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: IBtInfoOptions): ULong = ( - FfiConverterULong.allocationSize(value.`minChannelSizeSat`) + - FfiConverterULong.allocationSize(value.`maxChannelSizeSat`) + - FfiConverterUInt.allocationSize(value.`minExpiryWeeks`) + - FfiConverterUInt.allocationSize(value.`maxExpiryWeeks`) + - FfiConverterUInt.allocationSize(value.`minPaymentConfirmations`) + - FfiConverterUInt.allocationSize(value.`minHighRiskPaymentConfirmations`) + - FfiConverterULong.allocationSize(value.`max0ConfClientBalanceSat`) + - FfiConverterULong.allocationSize(value.`maxClientBalanceSat`) - ) - - override fun write(value: IBtInfoOptions, buf: ByteBuffer) { - FfiConverterULong.write(value.`minChannelSizeSat`, buf) - FfiConverterULong.write(value.`maxChannelSizeSat`, buf) - FfiConverterUInt.write(value.`minExpiryWeeks`, buf) - FfiConverterUInt.write(value.`maxExpiryWeeks`, buf) - FfiConverterUInt.write(value.`minPaymentConfirmations`, buf) - FfiConverterUInt.write(value.`minHighRiskPaymentConfirmations`, buf) - FfiConverterULong.write(value.`max0ConfClientBalanceSat`, buf) - FfiConverterULong.write(value.`maxClientBalanceSat`, buf) - } -} - - - - -public object FfiConverterTypeIBtInfoVersions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtInfoVersions { - return IBtInfoVersions( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IBtInfoVersions): ULong = ( - FfiConverterString.allocationSize(value.`http`) + - FfiConverterString.allocationSize(value.`btc`) + - FfiConverterString.allocationSize(value.`ln2`) - ) - - override fun write(value: IBtInfoVersions, buf: ByteBuffer) { - FfiConverterString.write(value.`http`, buf) - FfiConverterString.write(value.`btc`, buf) - FfiConverterString.write(value.`ln2`, buf) - } -} - - - - -public object FfiConverterTypeIBtOnchainTransaction: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtOnchainTransaction { - return IBtOnchainTransaction( - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterDouble.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IBtOnchainTransaction): ULong = ( - FfiConverterULong.allocationSize(value.`amountSat`) + - FfiConverterString.allocationSize(value.`txId`) + - FfiConverterUInt.allocationSize(value.`vout`) + - FfiConverterOptionalUInt.allocationSize(value.`blockHeight`) + - FfiConverterUInt.allocationSize(value.`blockConfirmationCount`) + - FfiConverterDouble.allocationSize(value.`feeRateSatPerVbyte`) + - FfiConverterBoolean.allocationSize(value.`confirmed`) + - FfiConverterString.allocationSize(value.`suspicious0ConfReason`) - ) - - override fun write(value: IBtOnchainTransaction, buf: ByteBuffer) { - FfiConverterULong.write(value.`amountSat`, buf) - FfiConverterString.write(value.`txId`, buf) - FfiConverterUInt.write(value.`vout`, buf) - FfiConverterOptionalUInt.write(value.`blockHeight`, buf) - FfiConverterUInt.write(value.`blockConfirmationCount`, buf) - FfiConverterDouble.write(value.`feeRateSatPerVbyte`, buf) - FfiConverterBoolean.write(value.`confirmed`, buf) - FfiConverterString.write(value.`suspicious0ConfReason`, buf) - } -} - - - - -public object FfiConverterTypeIBtOnchainTransactions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtOnchainTransactions { - return IBtOnchainTransactions( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterSequenceTypeIBtOnchainTransaction.read(buf), - ) - } - - override fun allocationSize(value: IBtOnchainTransactions): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterULong.allocationSize(value.`confirmedSat`) + - FfiConverterUInt.allocationSize(value.`requiredConfirmations`) + - FfiConverterSequenceTypeIBtOnchainTransaction.allocationSize(value.`transactions`) - ) - - override fun write(value: IBtOnchainTransactions, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterULong.write(value.`confirmedSat`, buf) - FfiConverterUInt.write(value.`requiredConfirmations`, buf) - FfiConverterSequenceTypeIBtOnchainTransaction.write(value.`transactions`, buf) - } -} - - - - -public object FfiConverterTypeIBtOrder: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtOrder { - return IBtOrder( - FfiConverterString.read(buf), - FfiConverterTypeBtOrderState.read(buf), - FfiConverterOptionalTypeBtOrderState2.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalTypeIBtChannel.read(buf), - FfiConverterOptionalTypeILspNode.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIBtPayment.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIDiscount.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IBtOrder): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterTypeBtOrderState.allocationSize(value.`state`) + - FfiConverterOptionalTypeBtOrderState2.allocationSize(value.`state2`) + - FfiConverterULong.allocationSize(value.`feeSat`) + - FfiConverterULong.allocationSize(value.`networkFeeSat`) + - FfiConverterULong.allocationSize(value.`serviceFeeSat`) + - FfiConverterULong.allocationSize(value.`lspBalanceSat`) + - FfiConverterULong.allocationSize(value.`clientBalanceSat`) + - FfiConverterBoolean.allocationSize(value.`zeroConf`) + - FfiConverterBoolean.allocationSize(value.`zeroReserve`) + - FfiConverterOptionalString.allocationSize(value.`clientNodeId`) + - FfiConverterUInt.allocationSize(value.`channelExpiryWeeks`) + - FfiConverterString.allocationSize(value.`channelExpiresAt`) + - FfiConverterString.allocationSize(value.`orderExpiresAt`) + - FfiConverterOptionalTypeIBtChannel.allocationSize(value.`channel`) + - FfiConverterOptionalTypeILspNode.allocationSize(value.`lspNode`) + - FfiConverterOptionalString.allocationSize(value.`lnurl`) + - FfiConverterOptionalTypeIBtPayment.allocationSize(value.`payment`) + - FfiConverterOptionalString.allocationSize(value.`couponCode`) + - FfiConverterOptionalString.allocationSize(value.`source`) + - FfiConverterOptionalTypeIDiscount.allocationSize(value.`discount`) + - FfiConverterString.allocationSize(value.`updatedAt`) + - FfiConverterString.allocationSize(value.`createdAt`) - ) - - override fun write(value: IBtOrder, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterTypeBtOrderState.write(value.`state`, buf) - FfiConverterOptionalTypeBtOrderState2.write(value.`state2`, buf) - FfiConverterULong.write(value.`feeSat`, buf) - FfiConverterULong.write(value.`networkFeeSat`, buf) - FfiConverterULong.write(value.`serviceFeeSat`, buf) - FfiConverterULong.write(value.`lspBalanceSat`, buf) - FfiConverterULong.write(value.`clientBalanceSat`, buf) - FfiConverterBoolean.write(value.`zeroConf`, buf) - FfiConverterBoolean.write(value.`zeroReserve`, buf) - FfiConverterOptionalString.write(value.`clientNodeId`, buf) - FfiConverterUInt.write(value.`channelExpiryWeeks`, buf) - FfiConverterString.write(value.`channelExpiresAt`, buf) - FfiConverterString.write(value.`orderExpiresAt`, buf) - FfiConverterOptionalTypeIBtChannel.write(value.`channel`, buf) - FfiConverterOptionalTypeILspNode.write(value.`lspNode`, buf) - FfiConverterOptionalString.write(value.`lnurl`, buf) - FfiConverterOptionalTypeIBtPayment.write(value.`payment`, buf) - FfiConverterOptionalString.write(value.`couponCode`, buf) - FfiConverterOptionalString.write(value.`source`, buf) - FfiConverterOptionalTypeIDiscount.write(value.`discount`, buf) - FfiConverterString.write(value.`updatedAt`, buf) - FfiConverterString.write(value.`createdAt`, buf) - } -} - - - - -public object FfiConverterTypeIBtPayment: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtPayment { - return IBtPayment( - FfiConverterTypeBtPaymentState.read(buf), - FfiConverterOptionalTypeBtPaymentState2.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalTypeIBtBolt11Invoice.read(buf), - FfiConverterOptionalTypeIBtOnchainTransactions.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalSequenceTypeIManualRefund.read(buf), - ) - } - - override fun allocationSize(value: IBtPayment): ULong = ( - FfiConverterTypeBtPaymentState.allocationSize(value.`state`) + - FfiConverterOptionalTypeBtPaymentState2.allocationSize(value.`state2`) + - FfiConverterULong.allocationSize(value.`paidSat`) + - FfiConverterOptionalTypeIBtBolt11Invoice.allocationSize(value.`bolt11Invoice`) + - FfiConverterOptionalTypeIBtOnchainTransactions.allocationSize(value.`onchain`) + - FfiConverterOptionalBoolean.allocationSize(value.`isManuallyPaid`) + - FfiConverterOptionalSequenceTypeIManualRefund.allocationSize(value.`manualRefunds`) - ) - - override fun write(value: IBtPayment, buf: ByteBuffer) { - FfiConverterTypeBtPaymentState.write(value.`state`, buf) - FfiConverterOptionalTypeBtPaymentState2.write(value.`state2`, buf) - FfiConverterULong.write(value.`paidSat`, buf) - FfiConverterOptionalTypeIBtBolt11Invoice.write(value.`bolt11Invoice`, buf) - FfiConverterOptionalTypeIBtOnchainTransactions.write(value.`onchain`, buf) - FfiConverterOptionalBoolean.write(value.`isManuallyPaid`, buf) - FfiConverterOptionalSequenceTypeIManualRefund.write(value.`manualRefunds`, buf) - } -} - - - - -public object FfiConverterTypeICJitEntry: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IcJitEntry { - return IcJitEntry( - FfiConverterString.read(buf), - FfiConverterTypeCJitStateEnum.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterString.read(buf), - FfiConverterTypeIBtBolt11Invoice.read(buf), - FfiConverterOptionalTypeIBtChannel.read(buf), - FfiConverterTypeILspNode.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIDiscount.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IcJitEntry): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterTypeCJitStateEnum.allocationSize(value.`state`) + - FfiConverterULong.allocationSize(value.`feeSat`) + - FfiConverterULong.allocationSize(value.`networkFeeSat`) + - FfiConverterULong.allocationSize(value.`serviceFeeSat`) + - FfiConverterULong.allocationSize(value.`channelSizeSat`) + - FfiConverterUInt.allocationSize(value.`channelExpiryWeeks`) + - FfiConverterOptionalString.allocationSize(value.`channelOpenError`) + - FfiConverterString.allocationSize(value.`nodeId`) + - FfiConverterTypeIBtBolt11Invoice.allocationSize(value.`invoice`) + - FfiConverterOptionalTypeIBtChannel.allocationSize(value.`channel`) + - FfiConverterTypeILspNode.allocationSize(value.`lspNode`) + - FfiConverterString.allocationSize(value.`couponCode`) + - FfiConverterOptionalString.allocationSize(value.`source`) + - FfiConverterOptionalTypeIDiscount.allocationSize(value.`discount`) + - FfiConverterString.allocationSize(value.`expiresAt`) + - FfiConverterString.allocationSize(value.`updatedAt`) + - FfiConverterString.allocationSize(value.`createdAt`) - ) - - override fun write(value: IcJitEntry, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterTypeCJitStateEnum.write(value.`state`, buf) - FfiConverterULong.write(value.`feeSat`, buf) - FfiConverterULong.write(value.`networkFeeSat`, buf) - FfiConverterULong.write(value.`serviceFeeSat`, buf) - FfiConverterULong.write(value.`channelSizeSat`, buf) - FfiConverterUInt.write(value.`channelExpiryWeeks`, buf) - FfiConverterOptionalString.write(value.`channelOpenError`, buf) - FfiConverterString.write(value.`nodeId`, buf) - FfiConverterTypeIBtBolt11Invoice.write(value.`invoice`, buf) - FfiConverterOptionalTypeIBtChannel.write(value.`channel`, buf) - FfiConverterTypeILspNode.write(value.`lspNode`, buf) - FfiConverterString.write(value.`couponCode`, buf) - FfiConverterOptionalString.write(value.`source`, buf) - FfiConverterOptionalTypeIDiscount.write(value.`discount`, buf) - FfiConverterString.write(value.`expiresAt`, buf) - FfiConverterString.write(value.`updatedAt`, buf) - FfiConverterString.write(value.`createdAt`, buf) - } -} - - - - -public object FfiConverterTypeIDiscount: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IDiscount { - return IDiscount( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterDouble.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: IDiscount): ULong = ( - FfiConverterString.allocationSize(value.`code`) + - FfiConverterULong.allocationSize(value.`absoluteSat`) + - FfiConverterDouble.allocationSize(value.`relative`) + - FfiConverterULong.allocationSize(value.`overallSat`) - ) - - override fun write(value: IDiscount, buf: ByteBuffer) { - FfiConverterString.write(value.`code`, buf) - FfiConverterULong.write(value.`absoluteSat`, buf) - FfiConverterDouble.write(value.`relative`, buf) - FfiConverterULong.write(value.`overallSat`, buf) - } -} - - - - -public object FfiConverterTypeIGift: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGift { - return IGift( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIGiftOrder.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIGiftPayment.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIGiftCode.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: IGift): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`nodeId`) + - FfiConverterOptionalString.allocationSize(value.`orderId`) + - FfiConverterOptionalTypeIGiftOrder.allocationSize(value.`order`) + - FfiConverterOptionalString.allocationSize(value.`bolt11PaymentId`) + - FfiConverterOptionalTypeIGiftPayment.allocationSize(value.`bolt11Payment`) + - FfiConverterOptionalString.allocationSize(value.`appliedGiftCodeId`) + - FfiConverterOptionalTypeIGiftCode.allocationSize(value.`appliedGiftCode`) + - FfiConverterOptionalString.allocationSize(value.`createdAt`) + - FfiConverterOptionalString.allocationSize(value.`updatedAt`) - ) - - override fun write(value: IGift, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`nodeId`, buf) - FfiConverterOptionalString.write(value.`orderId`, buf) - FfiConverterOptionalTypeIGiftOrder.write(value.`order`, buf) - FfiConverterOptionalString.write(value.`bolt11PaymentId`, buf) - FfiConverterOptionalTypeIGiftPayment.write(value.`bolt11Payment`, buf) - FfiConverterOptionalString.write(value.`appliedGiftCodeId`, buf) - FfiConverterOptionalTypeIGiftCode.write(value.`appliedGiftCode`, buf) - FfiConverterOptionalString.write(value.`createdAt`, buf) - FfiConverterOptionalString.write(value.`updatedAt`, buf) - } -} - - - - -public object FfiConverterTypeIGiftBolt11Invoice: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftBolt11Invoice { - return IGiftBolt11Invoice( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: IGiftBolt11Invoice): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`request`) + - FfiConverterString.allocationSize(value.`state`) + - FfiConverterOptionalBoolean.allocationSize(value.`isHodlInvoice`) + - FfiConverterOptionalString.allocationSize(value.`paymentHash`) + - FfiConverterOptionalULong.allocationSize(value.`amountSat`) + - FfiConverterOptionalString.allocationSize(value.`amountMsat`) + - FfiConverterOptionalString.allocationSize(value.`internalNodePubkey`) + - FfiConverterOptionalString.allocationSize(value.`updatedAt`) + - FfiConverterOptionalString.allocationSize(value.`createdAt`) + - FfiConverterOptionalString.allocationSize(value.`expiresAt`) - ) - - override fun write(value: IGiftBolt11Invoice, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`request`, buf) - FfiConverterString.write(value.`state`, buf) - FfiConverterOptionalBoolean.write(value.`isHodlInvoice`, buf) - FfiConverterOptionalString.write(value.`paymentHash`, buf) - FfiConverterOptionalULong.write(value.`amountSat`, buf) - FfiConverterOptionalString.write(value.`amountMsat`, buf) - FfiConverterOptionalString.write(value.`internalNodePubkey`, buf) - FfiConverterOptionalString.write(value.`updatedAt`, buf) - FfiConverterOptionalString.write(value.`createdAt`, buf) - FfiConverterOptionalString.write(value.`expiresAt`, buf) - } -} - - - - -public object FfiConverterTypeIGiftBtcAddress: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftBtcAddress { - return IGiftBtcAddress( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - FfiConverterSequenceString.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: IGiftBtcAddress): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`address`) + - FfiConverterSequenceString.allocationSize(value.`transactions`) + - FfiConverterSequenceString.allocationSize(value.`allTransactions`) + - FfiConverterOptionalBoolean.allocationSize(value.`isBlacklisted`) + - FfiConverterOptionalString.allocationSize(value.`watchUntil`) + - FfiConverterOptionalUInt.allocationSize(value.`watchForBlockConfirmations`) + - FfiConverterOptionalString.allocationSize(value.`updatedAt`) + - FfiConverterOptionalString.allocationSize(value.`createdAt`) - ) - - override fun write(value: IGiftBtcAddress, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`address`, buf) - FfiConverterSequenceString.write(value.`transactions`, buf) - FfiConverterSequenceString.write(value.`allTransactions`, buf) - FfiConverterOptionalBoolean.write(value.`isBlacklisted`, buf) - FfiConverterOptionalString.write(value.`watchUntil`, buf) - FfiConverterOptionalUInt.write(value.`watchForBlockConfirmations`, buf) - FfiConverterOptionalString.write(value.`updatedAt`, buf) - FfiConverterOptionalString.write(value.`createdAt`, buf) - } -} - - - - -public object FfiConverterTypeIGiftCode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftCode { - return IGiftCode( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalUInt.read(buf), - ) - } - - override fun allocationSize(value: IGiftCode): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`code`) + - FfiConverterString.allocationSize(value.`createdAt`) + - FfiConverterString.allocationSize(value.`updatedAt`) + - FfiConverterString.allocationSize(value.`expiresAt`) + - FfiConverterOptionalULong.allocationSize(value.`giftSat`) + - FfiConverterOptionalString.allocationSize(value.`scope`) + - FfiConverterOptionalUInt.allocationSize(value.`maxCount`) - ) - - override fun write(value: IGiftCode, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`code`, buf) - FfiConverterString.write(value.`createdAt`, buf) - FfiConverterString.write(value.`updatedAt`, buf) - FfiConverterString.write(value.`expiresAt`, buf) - FfiConverterOptionalULong.write(value.`giftSat`, buf) - FfiConverterOptionalString.write(value.`scope`, buf) - FfiConverterOptionalUInt.write(value.`maxCount`, buf) - } -} - - - - -public object FfiConverterTypeIGiftLspNode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftLspNode { - return IGiftLspNode( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - ) - } - - override fun allocationSize(value: IGiftLspNode): ULong = ( - FfiConverterString.allocationSize(value.`alias`) + - FfiConverterString.allocationSize(value.`pubkey`) + - FfiConverterSequenceString.allocationSize(value.`connectionStrings`) - ) - - override fun write(value: IGiftLspNode, buf: ByteBuffer) { - FfiConverterString.write(value.`alias`, buf) - FfiConverterString.write(value.`pubkey`, buf) - FfiConverterSequenceString.write(value.`connectionStrings`, buf) - } -} - - - - -public object FfiConverterTypeIGiftOrder: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftOrder { - return IGiftOrder( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalTypeIGiftPayment.read(buf), - FfiConverterOptionalTypeIGiftLspNode.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalBoolean.read(buf), - ) - } - - override fun allocationSize(value: IGiftOrder): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`state`) + - FfiConverterOptionalString.allocationSize(value.`oldState`) + - FfiConverterOptionalBoolean.allocationSize(value.`isChannelExpired`) + - FfiConverterOptionalBoolean.allocationSize(value.`isOrderExpired`) + - FfiConverterOptionalULong.allocationSize(value.`lspBalanceSat`) + - FfiConverterOptionalULong.allocationSize(value.`clientBalanceSat`) + - FfiConverterOptionalUInt.allocationSize(value.`channelExpiryWeeks`) + - FfiConverterOptionalBoolean.allocationSize(value.`zeroConf`) + - FfiConverterOptionalBoolean.allocationSize(value.`zeroReserve`) + - FfiConverterOptionalBoolean.allocationSize(value.`announced`) + - FfiConverterOptionalString.allocationSize(value.`clientNodeId`) + - FfiConverterOptionalString.allocationSize(value.`channelExpiresAt`) + - FfiConverterOptionalString.allocationSize(value.`orderExpiresAt`) + - FfiConverterOptionalULong.allocationSize(value.`feeSat`) + - FfiConverterOptionalULong.allocationSize(value.`networkFeeSat`) + - FfiConverterOptionalULong.allocationSize(value.`serviceFeeSat`) + - FfiConverterOptionalTypeIGiftPayment.allocationSize(value.`payment`) + - FfiConverterOptionalTypeIGiftLspNode.allocationSize(value.`lspNode`) + - FfiConverterOptionalString.allocationSize(value.`updatedAt`) + - FfiConverterOptionalString.allocationSize(value.`createdAt`) + - FfiConverterOptionalBoolean.allocationSize(value.`nodeIdVerified`) - ) - - override fun write(value: IGiftOrder, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`state`, buf) - FfiConverterOptionalString.write(value.`oldState`, buf) - FfiConverterOptionalBoolean.write(value.`isChannelExpired`, buf) - FfiConverterOptionalBoolean.write(value.`isOrderExpired`, buf) - FfiConverterOptionalULong.write(value.`lspBalanceSat`, buf) - FfiConverterOptionalULong.write(value.`clientBalanceSat`, buf) - FfiConverterOptionalUInt.write(value.`channelExpiryWeeks`, buf) - FfiConverterOptionalBoolean.write(value.`zeroConf`, buf) - FfiConverterOptionalBoolean.write(value.`zeroReserve`, buf) - FfiConverterOptionalBoolean.write(value.`announced`, buf) - FfiConverterOptionalString.write(value.`clientNodeId`, buf) - FfiConverterOptionalString.write(value.`channelExpiresAt`, buf) - FfiConverterOptionalString.write(value.`orderExpiresAt`, buf) - FfiConverterOptionalULong.write(value.`feeSat`, buf) - FfiConverterOptionalULong.write(value.`networkFeeSat`, buf) - FfiConverterOptionalULong.write(value.`serviceFeeSat`, buf) - FfiConverterOptionalTypeIGiftPayment.write(value.`payment`, buf) - FfiConverterOptionalTypeIGiftLspNode.write(value.`lspNode`, buf) - FfiConverterOptionalString.write(value.`updatedAt`, buf) - FfiConverterOptionalString.write(value.`createdAt`, buf) - FfiConverterOptionalBoolean.write(value.`nodeIdVerified`, buf) - } -} - - - - -public object FfiConverterTypeIGiftPayment: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftPayment { - return IGiftPayment( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalTypeIGiftBtcAddress.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeIGiftBolt11Invoice.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterSequenceString.read(buf), - ) - } - - override fun allocationSize(value: IGiftPayment): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`state`) + - FfiConverterOptionalString.allocationSize(value.`oldState`) + - FfiConverterOptionalString.allocationSize(value.`onchainState`) + - FfiConverterOptionalString.allocationSize(value.`lnState`) + - FfiConverterOptionalULong.allocationSize(value.`paidOnchainSat`) + - FfiConverterOptionalULong.allocationSize(value.`paidLnSat`) + - FfiConverterOptionalULong.allocationSize(value.`paidSat`) + - FfiConverterOptionalBoolean.allocationSize(value.`isOverpaid`) + - FfiConverterOptionalBoolean.allocationSize(value.`isRefunded`) + - FfiConverterOptionalULong.allocationSize(value.`overpaidAmountSat`) + - FfiConverterOptionalUInt.allocationSize(value.`requiredOnchainConfirmations`) + - FfiConverterOptionalString.allocationSize(value.`settlementState`) + - FfiConverterOptionalULong.allocationSize(value.`expectedAmountSat`) + - FfiConverterOptionalBoolean.allocationSize(value.`isManuallyPaid`) + - FfiConverterOptionalTypeIGiftBtcAddress.allocationSize(value.`btcAddress`) + - FfiConverterOptionalString.allocationSize(value.`btcAddressId`) + - FfiConverterOptionalTypeIGiftBolt11Invoice.allocationSize(value.`bolt11Invoice`) + - FfiConverterOptionalString.allocationSize(value.`bolt11InvoiceId`) + - FfiConverterSequenceString.allocationSize(value.`manualRefunds`) - ) - - override fun write(value: IGiftPayment, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`state`, buf) - FfiConverterOptionalString.write(value.`oldState`, buf) - FfiConverterOptionalString.write(value.`onchainState`, buf) - FfiConverterOptionalString.write(value.`lnState`, buf) - FfiConverterOptionalULong.write(value.`paidOnchainSat`, buf) - FfiConverterOptionalULong.write(value.`paidLnSat`, buf) - FfiConverterOptionalULong.write(value.`paidSat`, buf) - FfiConverterOptionalBoolean.write(value.`isOverpaid`, buf) - FfiConverterOptionalBoolean.write(value.`isRefunded`, buf) - FfiConverterOptionalULong.write(value.`overpaidAmountSat`, buf) - FfiConverterOptionalUInt.write(value.`requiredOnchainConfirmations`, buf) - FfiConverterOptionalString.write(value.`settlementState`, buf) - FfiConverterOptionalULong.write(value.`expectedAmountSat`, buf) - FfiConverterOptionalBoolean.write(value.`isManuallyPaid`, buf) - FfiConverterOptionalTypeIGiftBtcAddress.write(value.`btcAddress`, buf) - FfiConverterOptionalString.write(value.`btcAddressId`, buf) - FfiConverterOptionalTypeIGiftBolt11Invoice.write(value.`bolt11Invoice`, buf) - FfiConverterOptionalString.write(value.`bolt11InvoiceId`, buf) - FfiConverterSequenceString.write(value.`manualRefunds`, buf) - } -} - - - - -public object FfiConverterTypeILspNode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ILspNode { - return ILspNode( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - FfiConverterOptionalBoolean.read(buf), - ) - } - - override fun allocationSize(value: ILspNode): ULong = ( - FfiConverterString.allocationSize(value.`alias`) + - FfiConverterString.allocationSize(value.`pubkey`) + - FfiConverterSequenceString.allocationSize(value.`connectionStrings`) + - FfiConverterOptionalBoolean.allocationSize(value.`readonly`) - ) - - override fun write(value: ILspNode, buf: ByteBuffer) { - FfiConverterString.write(value.`alias`, buf) - FfiConverterString.write(value.`pubkey`, buf) - FfiConverterSequenceString.write(value.`connectionStrings`, buf) - FfiConverterOptionalBoolean.write(value.`readonly`, buf) - } -} - - - - -public object FfiConverterTypeIManualRefund: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IManualRefund { - return IManualRefund( - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - FfiConverterTypeManualRefundStateEnum.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: IManualRefund): ULong = ( - FfiConverterULong.allocationSize(value.`amountSat`) + - FfiConverterString.allocationSize(value.`target`) + - FfiConverterTypeManualRefundStateEnum.allocationSize(value.`state`) + - FfiConverterString.allocationSize(value.`createdByName`) + - FfiConverterOptionalString.allocationSize(value.`votedByName`) + - FfiConverterOptionalString.allocationSize(value.`reason`) + - FfiConverterString.allocationSize(value.`targetType`) - ) - - override fun write(value: IManualRefund, buf: ByteBuffer) { - FfiConverterULong.write(value.`amountSat`, buf) - FfiConverterString.write(value.`target`, buf) - FfiConverterTypeManualRefundStateEnum.write(value.`state`, buf) - FfiConverterString.write(value.`createdByName`, buf) - FfiConverterOptionalString.write(value.`votedByName`, buf) - FfiConverterOptionalString.write(value.`reason`, buf) - FfiConverterString.write(value.`targetType`, buf) - } -} - - - - -public object FfiConverterTypeLegacyRnCloseRecoveryScanResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LegacyRnCloseRecoveryScanResult { - return LegacyRnCloseRecoveryScanResult( - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: LegacyRnCloseRecoveryScanResult): ULong = ( - FfiConverterULong.allocationSize(value.`totalAmount`) + - FfiConverterUInt.allocationSize(value.`outputsCount`) - ) - - override fun write(value: LegacyRnCloseRecoveryScanResult, buf: ByteBuffer) { - FfiConverterULong.write(value.`totalAmount`, buf) - FfiConverterUInt.write(value.`outputsCount`, buf) - } -} - - - - -public object FfiConverterTypeLegacyRnCloseRecoverySweepPreview: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LegacyRnCloseRecoverySweepPreview { - return LegacyRnCloseRecoverySweepPreview( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: LegacyRnCloseRecoverySweepPreview): ULong = ( - FfiConverterString.allocationSize(value.`txHex`) + - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterULong.allocationSize(value.`totalAmount`) + - FfiConverterULong.allocationSize(value.`estimatedFee`) + - FfiConverterULong.allocationSize(value.`estimatedVsize`) + - FfiConverterUInt.allocationSize(value.`outputsCount`) + - FfiConverterString.allocationSize(value.`destinationAddress`) + - FfiConverterULong.allocationSize(value.`amountAfterFees`) - ) - - override fun write(value: LegacyRnCloseRecoverySweepPreview, buf: ByteBuffer) { - FfiConverterString.write(value.`txHex`, buf) - FfiConverterString.write(value.`txid`, buf) - FfiConverterULong.write(value.`totalAmount`, buf) - FfiConverterULong.write(value.`estimatedFee`, buf) - FfiConverterULong.write(value.`estimatedVsize`, buf) - FfiConverterUInt.write(value.`outputsCount`, buf) - FfiConverterString.write(value.`destinationAddress`, buf) - FfiConverterULong.write(value.`amountAfterFees`, buf) - } -} - - - - -public object FfiConverterTypeLightningActivity: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LightningActivity { - return LightningActivity( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterTypePaymentType.read(buf), - FfiConverterTypePaymentState.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - ) - } - - override fun allocationSize(value: LightningActivity): ULong = ( - FfiConverterString.allocationSize(value.`walletId`) + - FfiConverterString.allocationSize(value.`id`) + - FfiConverterTypePaymentType.allocationSize(value.`txType`) + - FfiConverterTypePaymentState.allocationSize(value.`status`) + - FfiConverterULong.allocationSize(value.`value`) + - FfiConverterOptionalULong.allocationSize(value.`fee`) + - FfiConverterString.allocationSize(value.`invoice`) + - FfiConverterString.allocationSize(value.`message`) + - FfiConverterULong.allocationSize(value.`timestamp`) + - FfiConverterOptionalString.allocationSize(value.`preimage`) + - FfiConverterOptionalString.allocationSize(value.`contact`) + - FfiConverterOptionalULong.allocationSize(value.`createdAt`) + - FfiConverterOptionalULong.allocationSize(value.`updatedAt`) + - FfiConverterOptionalULong.allocationSize(value.`seenAt`) - ) - - override fun write(value: LightningActivity, buf: ByteBuffer) { - FfiConverterString.write(value.`walletId`, buf) - FfiConverterString.write(value.`id`, buf) - FfiConverterTypePaymentType.write(value.`txType`, buf) - FfiConverterTypePaymentState.write(value.`status`, buf) - FfiConverterULong.write(value.`value`, buf) - FfiConverterOptionalULong.write(value.`fee`, buf) - FfiConverterString.write(value.`invoice`, buf) - FfiConverterString.write(value.`message`, buf) - FfiConverterULong.write(value.`timestamp`, buf) - FfiConverterOptionalString.write(value.`preimage`, buf) - FfiConverterOptionalString.write(value.`contact`, buf) - FfiConverterOptionalULong.write(value.`createdAt`, buf) - FfiConverterOptionalULong.write(value.`updatedAt`, buf) - FfiConverterOptionalULong.write(value.`seenAt`, buf) - } -} - - - - -public object FfiConverterTypeLightningInvoice: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LightningInvoice { - return LightningInvoice( - FfiConverterString.read(buf), - FfiConverterByteArray.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterTypeNetworkType.read(buf), - FfiConverterOptionalByteArray.read(buf), - ) - } - - override fun allocationSize(value: LightningInvoice): ULong = ( - FfiConverterString.allocationSize(value.`bolt11`) + - FfiConverterByteArray.allocationSize(value.`paymentHash`) + - FfiConverterULong.allocationSize(value.`amountSatoshis`) + - FfiConverterULong.allocationSize(value.`timestampSeconds`) + - FfiConverterULong.allocationSize(value.`expirySeconds`) + - FfiConverterBoolean.allocationSize(value.`isExpired`) + - FfiConverterOptionalString.allocationSize(value.`description`) + - FfiConverterTypeNetworkType.allocationSize(value.`networkType`) + - FfiConverterOptionalByteArray.allocationSize(value.`payeeNodeId`) - ) - - override fun write(value: LightningInvoice, buf: ByteBuffer) { - FfiConverterString.write(value.`bolt11`, buf) - FfiConverterByteArray.write(value.`paymentHash`, buf) - FfiConverterULong.write(value.`amountSatoshis`, buf) - FfiConverterULong.write(value.`timestampSeconds`, buf) - FfiConverterULong.write(value.`expirySeconds`, buf) - FfiConverterBoolean.write(value.`isExpired`, buf) - FfiConverterOptionalString.write(value.`description`, buf) - FfiConverterTypeNetworkType.write(value.`networkType`, buf) - FfiConverterOptionalByteArray.write(value.`payeeNodeId`, buf) - } -} - - - - -public object FfiConverterTypeLnurlAddressData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LnurlAddressData { - return LnurlAddressData( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: LnurlAddressData): ULong = ( - FfiConverterString.allocationSize(value.`uri`) + - FfiConverterString.allocationSize(value.`domain`) + - FfiConverterString.allocationSize(value.`username`) - ) - - override fun write(value: LnurlAddressData, buf: ByteBuffer) { - FfiConverterString.write(value.`uri`, buf) - FfiConverterString.write(value.`domain`, buf) - FfiConverterString.write(value.`username`, buf) - } -} - - - - -public object FfiConverterTypeLnurlAuthData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LnurlAuthData { - return LnurlAuthData( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: LnurlAuthData): ULong = ( - FfiConverterString.allocationSize(value.`uri`) + - FfiConverterString.allocationSize(value.`tag`) + - FfiConverterString.allocationSize(value.`k1`) + - FfiConverterString.allocationSize(value.`domain`) - ) - - override fun write(value: LnurlAuthData, buf: ByteBuffer) { - FfiConverterString.write(value.`uri`, buf) - FfiConverterString.write(value.`tag`, buf) - FfiConverterString.write(value.`k1`, buf) - FfiConverterString.write(value.`domain`, buf) - } -} - - - - -public object FfiConverterTypeLnurlChannelData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LnurlChannelData { - return LnurlChannelData( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: LnurlChannelData): ULong = ( - FfiConverterString.allocationSize(value.`uri`) + - FfiConverterString.allocationSize(value.`callback`) + - FfiConverterString.allocationSize(value.`k1`) + - FfiConverterString.allocationSize(value.`tag`) - ) - - override fun write(value: LnurlChannelData, buf: ByteBuffer) { - FfiConverterString.write(value.`uri`, buf) - FfiConverterString.write(value.`callback`, buf) - FfiConverterString.write(value.`k1`, buf) - FfiConverterString.write(value.`tag`, buf) - } -} - - - - -public object FfiConverterTypeLnurlPayData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LnurlPayData { - return LnurlPayData( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalByteArray.read(buf), - ) - } - - override fun allocationSize(value: LnurlPayData): ULong = ( - FfiConverterString.allocationSize(value.`uri`) + - FfiConverterString.allocationSize(value.`callback`) + - FfiConverterULong.allocationSize(value.`minSendable`) + - FfiConverterULong.allocationSize(value.`maxSendable`) + - FfiConverterString.allocationSize(value.`metadataStr`) + - FfiConverterOptionalUInt.allocationSize(value.`commentAllowed`) + - FfiConverterBoolean.allocationSize(value.`allowsNostr`) + - FfiConverterOptionalByteArray.allocationSize(value.`nostrPubkey`) - ) - - override fun write(value: LnurlPayData, buf: ByteBuffer) { - FfiConverterString.write(value.`uri`, buf) - FfiConverterString.write(value.`callback`, buf) - FfiConverterULong.write(value.`minSendable`, buf) - FfiConverterULong.write(value.`maxSendable`, buf) - FfiConverterString.write(value.`metadataStr`, buf) - FfiConverterOptionalUInt.write(value.`commentAllowed`, buf) - FfiConverterBoolean.write(value.`allowsNostr`, buf) - FfiConverterOptionalByteArray.write(value.`nostrPubkey`, buf) - } -} - - - - -public object FfiConverterTypeLnurlWithdrawData: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LnurlWithdrawData { - return LnurlWithdrawData( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: LnurlWithdrawData): ULong = ( - FfiConverterString.allocationSize(value.`uri`) + - FfiConverterString.allocationSize(value.`callback`) + - FfiConverterString.allocationSize(value.`k1`) + - FfiConverterString.allocationSize(value.`defaultDescription`) + - FfiConverterOptionalULong.allocationSize(value.`minWithdrawable`) + - FfiConverterULong.allocationSize(value.`maxWithdrawable`) + - FfiConverterString.allocationSize(value.`tag`) - ) - - override fun write(value: LnurlWithdrawData, buf: ByteBuffer) { - FfiConverterString.write(value.`uri`, buf) - FfiConverterString.write(value.`callback`, buf) - FfiConverterString.write(value.`k1`, buf) - FfiConverterString.write(value.`defaultDescription`, buf) - FfiConverterOptionalULong.write(value.`minWithdrawable`, buf) - FfiConverterULong.write(value.`maxWithdrawable`, buf) - FfiConverterString.write(value.`tag`, buf) - } -} - - - - -public object FfiConverterTypeNativeDeviceInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): NativeDeviceInfo { - return NativeDeviceInfo( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalUShort.read(buf), - FfiConverterOptionalUShort.read(buf), - ) - } - - override fun allocationSize(value: NativeDeviceInfo): ULong = ( - FfiConverterString.allocationSize(value.`path`) + - FfiConverterString.allocationSize(value.`transportType`) + - FfiConverterOptionalString.allocationSize(value.`name`) + - FfiConverterOptionalUShort.allocationSize(value.`vendorId`) + - FfiConverterOptionalUShort.allocationSize(value.`productId`) - ) - - override fun write(value: NativeDeviceInfo, buf: ByteBuffer) { - FfiConverterString.write(value.`path`, buf) - FfiConverterString.write(value.`transportType`, buf) - FfiConverterOptionalString.write(value.`name`, buf) - FfiConverterOptionalUShort.write(value.`vendorId`, buf) - FfiConverterOptionalUShort.write(value.`productId`, buf) - } -} - - - - -public object FfiConverterTypeOnChainInvoice: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): OnChainInvoice { - return OnChainInvoice( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalMapStringString.read(buf), - ) - } - - override fun allocationSize(value: OnChainInvoice): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterULong.allocationSize(value.`amountSatoshis`) + - FfiConverterOptionalString.allocationSize(value.`label`) + - FfiConverterOptionalString.allocationSize(value.`message`) + - FfiConverterOptionalMapStringString.allocationSize(value.`params`) - ) - - override fun write(value: OnChainInvoice, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterULong.write(value.`amountSatoshis`, buf) - FfiConverterOptionalString.write(value.`label`, buf) - FfiConverterOptionalString.write(value.`message`, buf) - FfiConverterOptionalMapStringString.write(value.`params`, buf) - } -} - - - - -public object FfiConverterTypeOnchainActivity: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): OnchainActivity { - return OnchainActivity( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterTypePaymentType.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterULong.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterSequenceString.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterOptionalULong.read(buf), - ) - } - - override fun allocationSize(value: OnchainActivity): ULong = ( - FfiConverterString.allocationSize(value.`walletId`) + - FfiConverterString.allocationSize(value.`id`) + - FfiConverterTypePaymentType.allocationSize(value.`txType`) + - FfiConverterString.allocationSize(value.`txId`) + - FfiConverterULong.allocationSize(value.`value`) + - FfiConverterULong.allocationSize(value.`fee`) + - FfiConverterULong.allocationSize(value.`feeRate`) + - FfiConverterString.allocationSize(value.`address`) + - FfiConverterBoolean.allocationSize(value.`confirmed`) + - FfiConverterULong.allocationSize(value.`timestamp`) + - FfiConverterBoolean.allocationSize(value.`isBoosted`) + - FfiConverterSequenceString.allocationSize(value.`boostTxIds`) + - FfiConverterBoolean.allocationSize(value.`isTransfer`) + - FfiConverterBoolean.allocationSize(value.`doesExist`) + - FfiConverterOptionalULong.allocationSize(value.`confirmTimestamp`) + - FfiConverterOptionalString.allocationSize(value.`channelId`) + - FfiConverterOptionalString.allocationSize(value.`transferTxId`) + - FfiConverterOptionalString.allocationSize(value.`contact`) + - FfiConverterOptionalULong.allocationSize(value.`createdAt`) + - FfiConverterOptionalULong.allocationSize(value.`updatedAt`) + - FfiConverterOptionalULong.allocationSize(value.`seenAt`) - ) - - override fun write(value: OnchainActivity, buf: ByteBuffer) { - FfiConverterString.write(value.`walletId`, buf) - FfiConverterString.write(value.`id`, buf) - FfiConverterTypePaymentType.write(value.`txType`, buf) - FfiConverterString.write(value.`txId`, buf) - FfiConverterULong.write(value.`value`, buf) - FfiConverterULong.write(value.`fee`, buf) - FfiConverterULong.write(value.`feeRate`, buf) - FfiConverterString.write(value.`address`, buf) - FfiConverterBoolean.write(value.`confirmed`, buf) - FfiConverterULong.write(value.`timestamp`, buf) - FfiConverterBoolean.write(value.`isBoosted`, buf) - FfiConverterSequenceString.write(value.`boostTxIds`, buf) - FfiConverterBoolean.write(value.`isTransfer`, buf) - FfiConverterBoolean.write(value.`doesExist`, buf) - FfiConverterOptionalULong.write(value.`confirmTimestamp`, buf) - FfiConverterOptionalString.write(value.`channelId`, buf) - FfiConverterOptionalString.write(value.`transferTxId`, buf) - FfiConverterOptionalString.write(value.`contact`, buf) - FfiConverterOptionalULong.write(value.`createdAt`, buf) - FfiConverterOptionalULong.write(value.`updatedAt`, buf) - FfiConverterOptionalULong.write(value.`seenAt`, buf) - } -} - - - - -public object FfiConverterTypePassportAccount: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PassportAccount { - return PassportAccount( - FfiConverterTypeAccountType.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: PassportAccount): ULong = ( - FfiConverterTypeAccountType.allocationSize(value.`accountType`) + - FfiConverterString.allocationSize(value.`xpub`) + - FfiConverterString.allocationSize(value.`derivationPath`) - ) - - override fun write(value: PassportAccount, buf: ByteBuffer) { - FfiConverterTypeAccountType.write(value.`accountType`, buf) - FfiConverterString.write(value.`xpub`, buf) - FfiConverterString.write(value.`derivationPath`, buf) - } -} - - - - -public object FfiConverterTypePassportAccountExport: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PassportAccountExport { - return PassportAccountExport( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterSequenceTypePassportAccount.read(buf), - ) - } - - override fun allocationSize(value: PassportAccountExport): ULong = ( - FfiConverterString.allocationSize(value.`masterFingerprint`) + - FfiConverterUInt.allocationSize(value.`accountIndex`) + - FfiConverterSequenceTypePassportAccount.allocationSize(value.`accounts`) - ) - - override fun write(value: PassportAccountExport, buf: ByteBuffer) { - FfiConverterString.write(value.`masterFingerprint`, buf) - FfiConverterUInt.write(value.`accountIndex`, buf) - FfiConverterSequenceTypePassportAccount.write(value.`accounts`, buf) - } -} - - - - -public object FfiConverterTypePreActivityMetadata: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PreActivityMetadata { - return PreActivityMetadata( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterULong.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: PreActivityMetadata): ULong = ( - FfiConverterString.allocationSize(value.`walletId`) + - FfiConverterString.allocationSize(value.`paymentId`) + - FfiConverterSequenceString.allocationSize(value.`tags`) + - FfiConverterOptionalString.allocationSize(value.`paymentHash`) + - FfiConverterOptionalString.allocationSize(value.`txId`) + - FfiConverterOptionalString.allocationSize(value.`address`) + - FfiConverterBoolean.allocationSize(value.`isReceive`) + - FfiConverterULong.allocationSize(value.`feeRate`) + - FfiConverterBoolean.allocationSize(value.`isTransfer`) + - FfiConverterOptionalString.allocationSize(value.`channelId`) + - FfiConverterULong.allocationSize(value.`createdAt`) - ) - - override fun write(value: PreActivityMetadata, buf: ByteBuffer) { - FfiConverterString.write(value.`walletId`, buf) - FfiConverterString.write(value.`paymentId`, buf) - FfiConverterSequenceString.write(value.`tags`, buf) - FfiConverterOptionalString.write(value.`paymentHash`, buf) - FfiConverterOptionalString.write(value.`txId`, buf) - FfiConverterOptionalString.write(value.`address`, buf) - FfiConverterBoolean.write(value.`isReceive`, buf) - FfiConverterULong.write(value.`feeRate`, buf) - FfiConverterBoolean.write(value.`isTransfer`, buf) - FfiConverterOptionalString.write(value.`channelId`, buf) - FfiConverterULong.write(value.`createdAt`, buf) - } -} - - - - -public object FfiConverterTypePubkyAuth: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PubkyAuth { - return PubkyAuth( - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: PubkyAuth): ULong = ( - FfiConverterString.allocationSize(value.`data`) - ) - - override fun write(value: PubkyAuth, buf: ByteBuffer) { - FfiConverterString.write(value.`data`, buf) - } -} - - - - -public object FfiConverterTypePubkyAuthDetails: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PubkyAuthDetails { - return PubkyAuthDetails( - FfiConverterTypePubkyAuthKind.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: PubkyAuthDetails): ULong = ( - FfiConverterTypePubkyAuthKind.allocationSize(value.`kind`) + - FfiConverterString.allocationSize(value.`capabilities`) + - FfiConverterString.allocationSize(value.`relay`) + - FfiConverterOptionalString.allocationSize(value.`homeserver`) + - FfiConverterOptionalString.allocationSize(value.`signupToken`) - ) - - override fun write(value: PubkyAuthDetails, buf: ByteBuffer) { - FfiConverterTypePubkyAuthKind.write(value.`kind`, buf) - FfiConverterString.write(value.`capabilities`, buf) - FfiConverterString.write(value.`relay`, buf) - FfiConverterOptionalString.write(value.`homeserver`, buf) - FfiConverterOptionalString.write(value.`signupToken`, buf) - } -} - - - - -public object FfiConverterTypePubkyProfile: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PubkyProfile { - return PubkyProfile( - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalSequenceTypePubkyProfileLink.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: PubkyProfile): ULong = ( - FfiConverterString.allocationSize(value.`name`) + - FfiConverterOptionalString.allocationSize(value.`bio`) + - FfiConverterOptionalString.allocationSize(value.`image`) + - FfiConverterOptionalSequenceTypePubkyProfileLink.allocationSize(value.`links`) + - FfiConverterOptionalString.allocationSize(value.`status`) - ) - - override fun write(value: PubkyProfile, buf: ByteBuffer) { - FfiConverterString.write(value.`name`, buf) - FfiConverterOptionalString.write(value.`bio`, buf) - FfiConverterOptionalString.write(value.`image`, buf) - FfiConverterOptionalSequenceTypePubkyProfileLink.write(value.`links`, buf) - FfiConverterOptionalString.write(value.`status`, buf) - } -} - - - - -public object FfiConverterTypePubkyProfileLink: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PubkyProfileLink { - return PubkyProfileLink( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: PubkyProfileLink): ULong = ( - FfiConverterString.allocationSize(value.`title`) + - FfiConverterString.allocationSize(value.`url`) - ) - - override fun write(value: PubkyProfileLink, buf: ByteBuffer) { - FfiConverterString.write(value.`title`, buf) - FfiConverterString.write(value.`url`, buf) - } -} - - - - -public object FfiConverterTypeReverseSwapResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ReverseSwapResponse { - return ReverseSwapResponse( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: ReverseSwapResponse): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`invoice`) + - FfiConverterString.allocationSize(value.`lockupAddress`) + - FfiConverterULong.allocationSize(value.`onchainAmountSat`) + - FfiConverterULong.allocationSize(value.`timeoutBlockHeight`) - ) - - override fun write(value: ReverseSwapResponse, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`invoice`, buf) - FfiConverterString.write(value.`lockupAddress`, buf) - FfiConverterULong.write(value.`onchainAmountSat`, buf) - FfiConverterULong.write(value.`timeoutBlockHeight`, buf) - } -} - - - - -public object FfiConverterTypeSingleAddressInfoResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SingleAddressInfoResult { - return SingleAddressInfoResult( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterSequenceTypeAccountUtxo.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: SingleAddressInfoResult): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterULong.allocationSize(value.`balance`) + - FfiConverterSequenceTypeAccountUtxo.allocationSize(value.`utxos`) + - FfiConverterUInt.allocationSize(value.`transfers`) + - FfiConverterUInt.allocationSize(value.`blockHeight`) - ) - - override fun write(value: SingleAddressInfoResult, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterULong.write(value.`balance`, buf) - FfiConverterSequenceTypeAccountUtxo.write(value.`utxos`, buf) - FfiConverterUInt.write(value.`transfers`, buf) - FfiConverterUInt.write(value.`blockHeight`, buf) - } -} - - - - -public object FfiConverterTypeSubmarineSwapResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SubmarineSwapResponse { - return SubmarineSwapResponse( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: SubmarineSwapResponse): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`bip21`) + - FfiConverterULong.allocationSize(value.`expectedAmountSat`) + - FfiConverterBoolean.allocationSize(value.`acceptZeroConf`) + - FfiConverterULong.allocationSize(value.`timeoutBlockHeight`) - ) - - override fun write(value: SubmarineSwapResponse, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`bip21`, buf) - FfiConverterULong.write(value.`expectedAmountSat`, buf) - FfiConverterBoolean.write(value.`acceptZeroConf`, buf) - FfiConverterULong.write(value.`timeoutBlockHeight`, buf) - } -} - - - - -public object FfiConverterTypeSupportedHardwareWallet: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SupportedHardwareWallet { - return SupportedHardwareWallet( - FfiConverterTypeHardwareWalletVendor.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceTypeHardwareWalletTransport.read(buf), - ) - } - - override fun allocationSize(value: SupportedHardwareWallet): ULong = ( - FfiConverterTypeHardwareWalletVendor.allocationSize(value.`vendor`) + - FfiConverterString.allocationSize(value.`vendorName`) + - FfiConverterString.allocationSize(value.`model`) + - FfiConverterString.allocationSize(value.`displayName`) + - FfiConverterSequenceTypeHardwareWalletTransport.allocationSize(value.`transports`) - ) - - override fun write(value: SupportedHardwareWallet, buf: ByteBuffer) { - FfiConverterTypeHardwareWalletVendor.write(value.`vendor`, buf) - FfiConverterString.write(value.`vendorName`, buf) - FfiConverterString.write(value.`model`, buf) - FfiConverterString.write(value.`displayName`, buf) - FfiConverterSequenceTypeHardwareWalletTransport.write(value.`transports`, buf) - } -} - - - - -public object FfiConverterTypeSweepResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SweepResult { - return SweepResult( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: SweepResult): ULong = ( - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterULong.allocationSize(value.`amountSwept`) + - FfiConverterULong.allocationSize(value.`feePaid`) + - FfiConverterUInt.allocationSize(value.`utxosSwept`) - ) - - override fun write(value: SweepResult, buf: ByteBuffer) { - FfiConverterString.write(value.`txid`, buf) - FfiConverterULong.write(value.`amountSwept`, buf) - FfiConverterULong.write(value.`feePaid`, buf) - FfiConverterUInt.write(value.`utxosSwept`, buf) - } -} - - - - -public object FfiConverterTypeSweepTransactionPreview: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SweepTransactionPreview { - return SweepTransactionPreview( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: SweepTransactionPreview): ULong = ( - FfiConverterString.allocationSize(value.`psbt`) + - FfiConverterULong.allocationSize(value.`totalAmount`) + - FfiConverterULong.allocationSize(value.`estimatedFee`) + - FfiConverterULong.allocationSize(value.`estimatedVsize`) + - FfiConverterUInt.allocationSize(value.`utxosCount`) + - FfiConverterString.allocationSize(value.`destinationAddress`) + - FfiConverterULong.allocationSize(value.`amountAfterFees`) - ) - - override fun write(value: SweepTransactionPreview, buf: ByteBuffer) { - FfiConverterString.write(value.`psbt`, buf) - FfiConverterULong.write(value.`totalAmount`, buf) - FfiConverterULong.write(value.`estimatedFee`, buf) - FfiConverterULong.write(value.`estimatedVsize`, buf) - FfiConverterUInt.write(value.`utxosCount`, buf) - FfiConverterString.write(value.`destinationAddress`, buf) - FfiConverterULong.write(value.`amountAfterFees`, buf) - } -} - - - - -public object FfiConverterTypeSweepableBalances: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SweepableBalances { - return SweepableBalances( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: SweepableBalances): ULong = ( - FfiConverterULong.allocationSize(value.`legacyBalance`) + - FfiConverterULong.allocationSize(value.`p2shBalance`) + - FfiConverterULong.allocationSize(value.`taprootBalance`) + - FfiConverterULong.allocationSize(value.`totalBalance`) + - FfiConverterUInt.allocationSize(value.`legacyUtxosCount`) + - FfiConverterUInt.allocationSize(value.`p2shUtxosCount`) + - FfiConverterUInt.allocationSize(value.`taprootUtxosCount`) + - FfiConverterUInt.allocationSize(value.`totalUtxosCount`) - ) - - override fun write(value: SweepableBalances, buf: ByteBuffer) { - FfiConverterULong.write(value.`legacyBalance`, buf) - FfiConverterULong.write(value.`p2shBalance`, buf) - FfiConverterULong.write(value.`taprootBalance`, buf) - FfiConverterULong.write(value.`totalBalance`, buf) - FfiConverterUInt.write(value.`legacyUtxosCount`, buf) - FfiConverterUInt.write(value.`p2shUtxosCount`, buf) - FfiConverterUInt.write(value.`taprootUtxosCount`, buf) - FfiConverterUInt.write(value.`totalUtxosCount`, buf) - } -} - - - - -public object FfiConverterTypeTransactionDetail: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TransactionDetail { - return TransactionDetail( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterLong.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterTypeTxDirection.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalULong.read(buf), - FfiConverterUInt.read(buf), - FfiConverterSequenceTypeTxDetailInput.read(buf), - FfiConverterSequenceTypeTxDetailOutput.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterOptionalDouble.read(buf), - ) - } - - override fun allocationSize(value: TransactionDetail): ULong = ( - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterULong.allocationSize(value.`received`) + - FfiConverterULong.allocationSize(value.`sent`) + - FfiConverterLong.allocationSize(value.`net`) + - FfiConverterULong.allocationSize(value.`amount`) + - FfiConverterOptionalULong.allocationSize(value.`fee`) + - FfiConverterTypeTxDirection.allocationSize(value.`direction`) + - FfiConverterOptionalUInt.allocationSize(value.`blockHeight`) + - FfiConverterOptionalULong.allocationSize(value.`timestamp`) + - FfiConverterUInt.allocationSize(value.`confirmations`) + - FfiConverterSequenceTypeTxDetailInput.allocationSize(value.`inputs`) + - FfiConverterSequenceTypeTxDetailOutput.allocationSize(value.`outputs`) + - FfiConverterUInt.allocationSize(value.`size`) + - FfiConverterUInt.allocationSize(value.`vsize`) + - FfiConverterUInt.allocationSize(value.`weight`) + - FfiConverterOptionalDouble.allocationSize(value.`feeRate`) - ) - - override fun write(value: TransactionDetail, buf: ByteBuffer) { - FfiConverterString.write(value.`txid`, buf) - FfiConverterULong.write(value.`received`, buf) - FfiConverterULong.write(value.`sent`, buf) - FfiConverterLong.write(value.`net`, buf) - FfiConverterULong.write(value.`amount`, buf) - FfiConverterOptionalULong.write(value.`fee`, buf) - FfiConverterTypeTxDirection.write(value.`direction`, buf) - FfiConverterOptionalUInt.write(value.`blockHeight`, buf) - FfiConverterOptionalULong.write(value.`timestamp`, buf) - FfiConverterUInt.write(value.`confirmations`, buf) - FfiConverterSequenceTypeTxDetailInput.write(value.`inputs`, buf) - FfiConverterSequenceTypeTxDetailOutput.write(value.`outputs`, buf) - FfiConverterUInt.write(value.`size`, buf) - FfiConverterUInt.write(value.`vsize`, buf) - FfiConverterUInt.write(value.`weight`, buf) - FfiConverterOptionalDouble.write(value.`feeRate`, buf) - } -} - - - - -public object FfiConverterTypeTransactionDetails: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TransactionDetails { - return TransactionDetails( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterLong.read(buf), - FfiConverterSequenceTypeTxInput.read(buf), - FfiConverterSequenceTypeTxOutput.read(buf), - ) - } - - override fun allocationSize(value: TransactionDetails): ULong = ( - FfiConverterString.allocationSize(value.`walletId`) + - FfiConverterString.allocationSize(value.`txId`) + - FfiConverterLong.allocationSize(value.`amountSats`) + - FfiConverterSequenceTypeTxInput.allocationSize(value.`inputs`) + - FfiConverterSequenceTypeTxOutput.allocationSize(value.`outputs`) - ) - - override fun write(value: TransactionDetails, buf: ByteBuffer) { - FfiConverterString.write(value.`walletId`, buf) - FfiConverterString.write(value.`txId`, buf) - FfiConverterLong.write(value.`amountSats`, buf) - FfiConverterSequenceTypeTxInput.write(value.`inputs`, buf) - FfiConverterSequenceTypeTxOutput.write(value.`outputs`, buf) - } -} - - - - -public object FfiConverterTypeTransactionHistoryResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TransactionHistoryResult { - return TransactionHistoryResult( - FfiConverterSequenceTypeHistoryTransaction.read(buf), - FfiConverterTypeWalletBalance.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterTypeAccountType.read(buf), - ) - } - - override fun allocationSize(value: TransactionHistoryResult): ULong = ( - FfiConverterSequenceTypeHistoryTransaction.allocationSize(value.`transactions`) + - FfiConverterTypeWalletBalance.allocationSize(value.`balance`) + - FfiConverterUInt.allocationSize(value.`txCount`) + - FfiConverterUInt.allocationSize(value.`blockHeight`) + - FfiConverterTypeAccountType.allocationSize(value.`accountType`) - ) - - override fun write(value: TransactionHistoryResult, buf: ByteBuffer) { - 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) - } -} - - - - -public object FfiConverterTypeTrezorAddressResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorAddressResponse { - return TrezorAddressResponse( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: TrezorAddressResponse): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`path`) - ) - - override fun write(value: TrezorAddressResponse, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`path`, buf) - } -} - - - - -public object FfiConverterTypeTrezorCallMessageResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorCallMessageResult { - return TrezorCallMessageResult( - FfiConverterBoolean.read(buf), - FfiConverterUShort.read(buf), - FfiConverterByteArray.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorTransportErrorCode.read(buf), - ) - } - - override fun allocationSize(value: TrezorCallMessageResult): ULong = ( - FfiConverterBoolean.allocationSize(value.`success`) + - FfiConverterUShort.allocationSize(value.`messageType`) + - FfiConverterByteArray.allocationSize(value.`data`) + - FfiConverterString.allocationSize(value.`error`) + - FfiConverterOptionalTypeTrezorTransportErrorCode.allocationSize(value.`errorCode`) - ) - - override fun write(value: TrezorCallMessageResult, buf: ByteBuffer) { - FfiConverterBoolean.write(value.`success`, buf) - FfiConverterUShort.write(value.`messageType`, buf) - FfiConverterByteArray.write(value.`data`, buf) - FfiConverterString.write(value.`error`, buf) - FfiConverterOptionalTypeTrezorTransportErrorCode.write(value.`errorCode`, buf) - } -} - - - - -public object FfiConverterTypeTrezorDeviceInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorDeviceInfo { - return TrezorDeviceInfo( - FfiConverterString.read(buf), - FfiConverterTypeTrezorTransportType.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterBoolean.read(buf), - ) - } - - override fun allocationSize(value: TrezorDeviceInfo): ULong = ( - FfiConverterString.allocationSize(value.`id`) + - FfiConverterTypeTrezorTransportType.allocationSize(value.`transportType`) + - FfiConverterOptionalString.allocationSize(value.`name`) + - FfiConverterString.allocationSize(value.`path`) + - FfiConverterOptionalString.allocationSize(value.`label`) + - FfiConverterOptionalString.allocationSize(value.`model`) + - FfiConverterBoolean.allocationSize(value.`isBootloader`) - ) - - override fun write(value: TrezorDeviceInfo, buf: ByteBuffer) { - FfiConverterString.write(value.`id`, buf) - FfiConverterTypeTrezorTransportType.write(value.`transportType`, buf) - FfiConverterOptionalString.write(value.`name`, buf) - FfiConverterString.write(value.`path`, buf) - FfiConverterOptionalString.write(value.`label`, buf) - FfiConverterOptionalString.write(value.`model`, buf) - FfiConverterBoolean.write(value.`isBootloader`, buf) - } -} - - - - -public object FfiConverterTypeTrezorFeatures: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorFeatures { - return TrezorFeatures( - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - FfiConverterOptionalBoolean.read(buf), - ) - } - - override fun allocationSize(value: TrezorFeatures): ULong = ( - FfiConverterOptionalString.allocationSize(value.`vendor`) + - FfiConverterOptionalString.allocationSize(value.`model`) + - FfiConverterOptionalString.allocationSize(value.`label`) + - FfiConverterOptionalString.allocationSize(value.`deviceId`) + - FfiConverterOptionalUInt.allocationSize(value.`majorVersion`) + - FfiConverterOptionalUInt.allocationSize(value.`minorVersion`) + - FfiConverterOptionalUInt.allocationSize(value.`patchVersion`) + - FfiConverterOptionalBoolean.allocationSize(value.`pinProtection`) + - FfiConverterOptionalBoolean.allocationSize(value.`unlocked`) + - FfiConverterOptionalBoolean.allocationSize(value.`passphraseProtection`) + - FfiConverterOptionalBoolean.allocationSize(value.`initialized`) + - FfiConverterOptionalBoolean.allocationSize(value.`needsBackup`) + - FfiConverterOptionalBoolean.allocationSize(value.`passphraseEntryCapable`) - ) - - override fun write(value: TrezorFeatures, buf: ByteBuffer) { - FfiConverterOptionalString.write(value.`vendor`, buf) - FfiConverterOptionalString.write(value.`model`, buf) - FfiConverterOptionalString.write(value.`label`, buf) - FfiConverterOptionalString.write(value.`deviceId`, buf) - FfiConverterOptionalUInt.write(value.`majorVersion`, buf) - FfiConverterOptionalUInt.write(value.`minorVersion`, buf) - FfiConverterOptionalUInt.write(value.`patchVersion`, buf) - FfiConverterOptionalBoolean.write(value.`pinProtection`, buf) - FfiConverterOptionalBoolean.write(value.`unlocked`, buf) - FfiConverterOptionalBoolean.write(value.`passphraseProtection`, buf) - FfiConverterOptionalBoolean.write(value.`initialized`, buf) - FfiConverterOptionalBoolean.write(value.`needsBackup`, buf) - FfiConverterOptionalBoolean.write(value.`passphraseEntryCapable`, buf) - } -} - - - - -public object FfiConverterTypeTrezorGetAddressParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorGetAddressParams { - return TrezorGetAddressParams( - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorCoinType.read(buf), - FfiConverterBoolean.read(buf), - FfiConverterOptionalTypeTrezorScriptType.read(buf), - ) - } - - override fun allocationSize(value: TrezorGetAddressParams): ULong = ( - FfiConverterString.allocationSize(value.`path`) + - FfiConverterOptionalTypeTrezorCoinType.allocationSize(value.`coin`) + - FfiConverterBoolean.allocationSize(value.`showOnTrezor`) + - FfiConverterOptionalTypeTrezorScriptType.allocationSize(value.`scriptType`) - ) - - override fun write(value: TrezorGetAddressParams, buf: ByteBuffer) { - FfiConverterString.write(value.`path`, buf) - FfiConverterOptionalTypeTrezorCoinType.write(value.`coin`, buf) - FfiConverterBoolean.write(value.`showOnTrezor`, buf) - FfiConverterOptionalTypeTrezorScriptType.write(value.`scriptType`, buf) - } -} - - - - -public object FfiConverterTypeTrezorGetPublicKeyParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorGetPublicKeyParams { - return TrezorGetPublicKeyParams( - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorCoinType.read(buf), - FfiConverterBoolean.read(buf), - ) - } - - override fun allocationSize(value: TrezorGetPublicKeyParams): ULong = ( - FfiConverterString.allocationSize(value.`path`) + - FfiConverterOptionalTypeTrezorCoinType.allocationSize(value.`coin`) + - FfiConverterBoolean.allocationSize(value.`showOnTrezor`) - ) - - override fun write(value: TrezorGetPublicKeyParams, buf: ByteBuffer) { - FfiConverterString.write(value.`path`, buf) - FfiConverterOptionalTypeTrezorCoinType.write(value.`coin`, buf) - FfiConverterBoolean.write(value.`showOnTrezor`, buf) - } -} - - - - -public object FfiConverterTypeTrezorPrevTx: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorPrevTx { - return TrezorPrevTx( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterSequenceTypeTrezorPrevTxInput.read(buf), - FfiConverterSequenceTypeTrezorPrevTxOutput.read(buf), - ) - } - - override fun allocationSize(value: TrezorPrevTx): ULong = ( - FfiConverterString.allocationSize(value.`hash`) + - FfiConverterUInt.allocationSize(value.`version`) + - FfiConverterUInt.allocationSize(value.`lockTime`) + - FfiConverterSequenceTypeTrezorPrevTxInput.allocationSize(value.`inputs`) + - FfiConverterSequenceTypeTrezorPrevTxOutput.allocationSize(value.`outputs`) - ) - - override fun write(value: TrezorPrevTx, buf: ByteBuffer) { - FfiConverterString.write(value.`hash`, buf) - FfiConverterUInt.write(value.`version`, buf) - FfiConverterUInt.write(value.`lockTime`, buf) - FfiConverterSequenceTypeTrezorPrevTxInput.write(value.`inputs`, buf) - FfiConverterSequenceTypeTrezorPrevTxOutput.write(value.`outputs`, buf) - } -} - - - - -public object FfiConverterTypeTrezorPrevTxInput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorPrevTxInput { - return TrezorPrevTxInput( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: TrezorPrevTxInput): ULong = ( - FfiConverterString.allocationSize(value.`prevHash`) + - FfiConverterUInt.allocationSize(value.`prevIndex`) + - FfiConverterString.allocationSize(value.`scriptSig`) + - FfiConverterUInt.allocationSize(value.`sequence`) - ) - - override fun write(value: TrezorPrevTxInput, buf: ByteBuffer) { - FfiConverterString.write(value.`prevHash`, buf) - FfiConverterUInt.write(value.`prevIndex`, buf) - FfiConverterString.write(value.`scriptSig`, buf) - FfiConverterUInt.write(value.`sequence`, buf) - } -} - - - - -public object FfiConverterTypeTrezorPrevTxOutput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorPrevTxOutput { - return TrezorPrevTxOutput( - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: TrezorPrevTxOutput): ULong = ( - FfiConverterULong.allocationSize(value.`amount`) + - FfiConverterString.allocationSize(value.`scriptPubkey`) - ) - - override fun write(value: TrezorPrevTxOutput, buf: ByteBuffer) { - FfiConverterULong.write(value.`amount`, buf) - FfiConverterString.write(value.`scriptPubkey`, buf) - } -} - - - - -public object FfiConverterTypeTrezorPublicKeyResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorPublicKeyResponse { - return TrezorPublicKeyResponse( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterOptionalUInt.read(buf), - ) - } - - override fun allocationSize(value: TrezorPublicKeyResponse): ULong = ( - FfiConverterString.allocationSize(value.`xpub`) + - FfiConverterString.allocationSize(value.`path`) + - FfiConverterString.allocationSize(value.`publicKey`) + - FfiConverterString.allocationSize(value.`chainCode`) + - FfiConverterUInt.allocationSize(value.`fingerprint`) + - FfiConverterUInt.allocationSize(value.`depth`) + - FfiConverterOptionalUInt.allocationSize(value.`rootFingerprint`) - ) - - override fun write(value: TrezorPublicKeyResponse, buf: ByteBuffer) { - FfiConverterString.write(value.`xpub`, buf) - FfiConverterString.write(value.`path`, buf) - FfiConverterString.write(value.`publicKey`, buf) - FfiConverterString.write(value.`chainCode`, buf) - FfiConverterUInt.write(value.`fingerprint`, buf) - FfiConverterUInt.write(value.`depth`, buf) - FfiConverterOptionalUInt.write(value.`rootFingerprint`, buf) - } -} - - - - -public object FfiConverterTypeTrezorSignMessageParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorSignMessageParams { - return TrezorSignMessageParams( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorCoinType.read(buf), - ) - } - - override fun allocationSize(value: TrezorSignMessageParams): ULong = ( - FfiConverterString.allocationSize(value.`path`) + - FfiConverterString.allocationSize(value.`message`) + - FfiConverterOptionalTypeTrezorCoinType.allocationSize(value.`coin`) - ) - - override fun write(value: TrezorSignMessageParams, buf: ByteBuffer) { - FfiConverterString.write(value.`path`, buf) - FfiConverterString.write(value.`message`, buf) - FfiConverterOptionalTypeTrezorCoinType.write(value.`coin`, buf) - } -} - - - - -public object FfiConverterTypeTrezorSignTxParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorSignTxParams { - return TrezorSignTxParams( - FfiConverterSequenceTypeTrezorTxInput.read(buf), - FfiConverterSequenceTypeTrezorTxOutput.read(buf), - FfiConverterOptionalTypeTrezorCoinType.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterSequenceTypeTrezorPrevTx.read(buf), - ) - } - - override fun allocationSize(value: TrezorSignTxParams): ULong = ( - FfiConverterSequenceTypeTrezorTxInput.allocationSize(value.`inputs`) + - FfiConverterSequenceTypeTrezorTxOutput.allocationSize(value.`outputs`) + - FfiConverterOptionalTypeTrezorCoinType.allocationSize(value.`coin`) + - FfiConverterOptionalUInt.allocationSize(value.`lockTime`) + - FfiConverterOptionalUInt.allocationSize(value.`version`) + - FfiConverterSequenceTypeTrezorPrevTx.allocationSize(value.`prevTxs`) - ) - - override fun write(value: TrezorSignTxParams, buf: ByteBuffer) { - FfiConverterSequenceTypeTrezorTxInput.write(value.`inputs`, buf) - FfiConverterSequenceTypeTrezorTxOutput.write(value.`outputs`, buf) - FfiConverterOptionalTypeTrezorCoinType.write(value.`coin`, buf) - FfiConverterOptionalUInt.write(value.`lockTime`, buf) - FfiConverterOptionalUInt.write(value.`version`, buf) - FfiConverterSequenceTypeTrezorPrevTx.write(value.`prevTxs`, buf) - } -} - - - - -public object FfiConverterTypeTrezorSignedMessageResponse: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorSignedMessageResponse { - return TrezorSignedMessageResponse( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - } - - override fun allocationSize(value: TrezorSignedMessageResponse): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`signature`) - ) - - override fun write(value: TrezorSignedMessageResponse, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`signature`, buf) - } -} - - - - -public object FfiConverterTypeTrezorSignedTx: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorSignedTx { - return TrezorSignedTx( - FfiConverterSequenceString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - ) - } - - override fun allocationSize(value: TrezorSignedTx): ULong = ( - FfiConverterSequenceString.allocationSize(value.`signatures`) + - FfiConverterString.allocationSize(value.`serializedTx`) + - FfiConverterOptionalString.allocationSize(value.`txid`) - ) - - override fun write(value: TrezorSignedTx, buf: ByteBuffer) { - FfiConverterSequenceString.write(value.`signatures`, buf) - FfiConverterString.write(value.`serializedTx`, buf) - FfiConverterOptionalString.write(value.`txid`, buf) - } -} - - - - -public object FfiConverterTypeTrezorTransportReadResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTransportReadResult { - return TrezorTransportReadResult( - FfiConverterBoolean.read(buf), - FfiConverterByteArray.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorTransportErrorCode.read(buf), - ) - } - - override fun allocationSize(value: TrezorTransportReadResult): ULong = ( - FfiConverterBoolean.allocationSize(value.`success`) + - FfiConverterByteArray.allocationSize(value.`data`) + - FfiConverterString.allocationSize(value.`error`) + - FfiConverterOptionalTypeTrezorTransportErrorCode.allocationSize(value.`errorCode`) - ) - - override fun write(value: TrezorTransportReadResult, buf: ByteBuffer) { - FfiConverterBoolean.write(value.`success`, buf) - FfiConverterByteArray.write(value.`data`, buf) - FfiConverterString.write(value.`error`, buf) - FfiConverterOptionalTypeTrezorTransportErrorCode.write(value.`errorCode`, buf) - } -} - - - - -public object FfiConverterTypeTrezorTransportWriteResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTransportWriteResult { - return TrezorTransportWriteResult( - FfiConverterBoolean.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorTransportErrorCode.read(buf), - ) - } - - override fun allocationSize(value: TrezorTransportWriteResult): ULong = ( - FfiConverterBoolean.allocationSize(value.`success`) + - FfiConverterString.allocationSize(value.`error`) + - FfiConverterOptionalTypeTrezorTransportErrorCode.allocationSize(value.`errorCode`) - ) - - override fun write(value: TrezorTransportWriteResult, buf: ByteBuffer) { - FfiConverterBoolean.write(value.`success`, buf) - FfiConverterString.write(value.`error`, buf) - FfiConverterOptionalTypeTrezorTransportErrorCode.write(value.`errorCode`, buf) - } -} - - - - -public object FfiConverterTypeTrezorTxInput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTxInput { - return TrezorTxInput( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterTypeTrezorScriptType.read(buf), - FfiConverterOptionalUInt.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalUInt.read(buf), - ) - } - - override fun allocationSize(value: TrezorTxInput): ULong = ( - FfiConverterString.allocationSize(value.`prevHash`) + - FfiConverterUInt.allocationSize(value.`prevIndex`) + - FfiConverterString.allocationSize(value.`path`) + - FfiConverterULong.allocationSize(value.`amount`) + - FfiConverterTypeTrezorScriptType.allocationSize(value.`scriptType`) + - FfiConverterOptionalUInt.allocationSize(value.`sequence`) + - FfiConverterOptionalString.allocationSize(value.`origHash`) + - FfiConverterOptionalUInt.allocationSize(value.`origIndex`) - ) - - override fun write(value: TrezorTxInput, buf: ByteBuffer) { - FfiConverterString.write(value.`prevHash`, buf) - FfiConverterUInt.write(value.`prevIndex`, buf) - FfiConverterString.write(value.`path`, buf) - FfiConverterULong.write(value.`amount`, buf) - FfiConverterTypeTrezorScriptType.write(value.`scriptType`, buf) - FfiConverterOptionalUInt.write(value.`sequence`, buf) - FfiConverterOptionalString.write(value.`origHash`, buf) - FfiConverterOptionalUInt.write(value.`origIndex`, buf) - } -} - - - - -public object FfiConverterTypeTrezorTxOutput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTxOutput { - return TrezorTxOutput( - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterULong.read(buf), - FfiConverterOptionalTypeTrezorScriptType.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalUInt.read(buf), - ) - } - - override fun allocationSize(value: TrezorTxOutput): ULong = ( - FfiConverterOptionalString.allocationSize(value.`address`) + - FfiConverterOptionalString.allocationSize(value.`path`) + - FfiConverterULong.allocationSize(value.`amount`) + - FfiConverterOptionalTypeTrezorScriptType.allocationSize(value.`scriptType`) + - FfiConverterOptionalString.allocationSize(value.`opReturnData`) + - FfiConverterOptionalString.allocationSize(value.`origHash`) + - FfiConverterOptionalUInt.allocationSize(value.`origIndex`) - ) - - override fun write(value: TrezorTxOutput, buf: ByteBuffer) { - FfiConverterOptionalString.write(value.`address`, buf) - FfiConverterOptionalString.write(value.`path`, buf) - FfiConverterULong.write(value.`amount`, buf) - FfiConverterOptionalTypeTrezorScriptType.write(value.`scriptType`, buf) - FfiConverterOptionalString.write(value.`opReturnData`, buf) - FfiConverterOptionalString.write(value.`origHash`, buf) - FfiConverterOptionalUInt.write(value.`origIndex`, buf) - } -} - - - - -public object FfiConverterTypeTrezorVerifyMessageParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorVerifyMessageParams { - return TrezorVerifyMessageParams( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalTypeTrezorCoinType.read(buf), - ) - } - - override fun allocationSize(value: TrezorVerifyMessageParams): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterString.allocationSize(value.`signature`) + - FfiConverterString.allocationSize(value.`message`) + - FfiConverterOptionalTypeTrezorCoinType.allocationSize(value.`coin`) - ) - - override fun write(value: TrezorVerifyMessageParams, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterString.write(value.`signature`, buf) - FfiConverterString.write(value.`message`, buf) - FfiConverterOptionalTypeTrezorCoinType.write(value.`coin`, buf) - } -} - - - - -public object FfiConverterTypeTxDetailInput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TxDetailInput { - return TxDetailInput( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - ) - } - - override fun allocationSize(value: TxDetailInput): ULong = ( - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterUInt.allocationSize(value.`vout`) + - FfiConverterUInt.allocationSize(value.`sequence`) + - FfiConverterString.allocationSize(value.`scriptSig`) + - FfiConverterSequenceString.allocationSize(value.`witness`) - ) - - override fun write(value: TxDetailInput, buf: ByteBuffer) { - FfiConverterString.write(value.`txid`, buf) - FfiConverterUInt.write(value.`vout`, buf) - FfiConverterUInt.write(value.`sequence`, buf) - FfiConverterString.write(value.`scriptSig`, buf) - FfiConverterSequenceString.write(value.`witness`, buf) - } -} - - - - -public object FfiConverterTypeTxDetailOutput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TxDetailOutput { - return TxDetailOutput( - FfiConverterULong.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterBoolean.read(buf), - ) - } - - override fun allocationSize(value: TxDetailOutput): ULong = ( - FfiConverterULong.allocationSize(value.`value`) + - FfiConverterString.allocationSize(value.`scriptPubkey`) + - FfiConverterOptionalString.allocationSize(value.`address`) + - FfiConverterBoolean.allocationSize(value.`isMine`) - ) - - override fun write(value: TxDetailOutput, buf: ByteBuffer) { - FfiConverterULong.write(value.`value`, buf) - FfiConverterString.write(value.`scriptPubkey`, buf) - FfiConverterOptionalString.write(value.`address`, buf) - FfiConverterBoolean.write(value.`isMine`, buf) - } -} - - - - -public object FfiConverterTypeTxInput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TxInput { - return TxInput( - FfiConverterString.read(buf), - FfiConverterUInt.read(buf), - FfiConverterString.read(buf), - FfiConverterSequenceString.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: TxInput): ULong = ( - FfiConverterString.allocationSize(value.`txid`) + - FfiConverterUInt.allocationSize(value.`vout`) + - FfiConverterString.allocationSize(value.`scriptsig`) + - FfiConverterSequenceString.allocationSize(value.`witness`) + - FfiConverterUInt.allocationSize(value.`sequence`) - ) - - override fun write(value: TxInput, buf: ByteBuffer) { - FfiConverterString.write(value.`txid`, buf) - FfiConverterUInt.write(value.`vout`, buf) - FfiConverterString.write(value.`scriptsig`, buf) - FfiConverterSequenceString.write(value.`witness`, buf) - FfiConverterUInt.write(value.`sequence`, buf) - } -} - - - - -public object FfiConverterTypeTxOutput: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TxOutput { - return TxOutput( - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterLong.read(buf), - FfiConverterUInt.read(buf), - ) - } - - override fun allocationSize(value: TxOutput): ULong = ( - FfiConverterString.allocationSize(value.`scriptpubkey`) + - FfiConverterOptionalString.allocationSize(value.`scriptpubkeyType`) + - FfiConverterOptionalString.allocationSize(value.`scriptpubkeyAddress`) + - FfiConverterLong.allocationSize(value.`value`) + - FfiConverterUInt.allocationSize(value.`n`) - ) - - override fun write(value: TxOutput, buf: ByteBuffer) { - FfiConverterString.write(value.`scriptpubkey`, buf) - FfiConverterOptionalString.write(value.`scriptpubkeyType`, buf) - FfiConverterOptionalString.write(value.`scriptpubkeyAddress`, buf) - FfiConverterLong.write(value.`value`, buf) - FfiConverterUInt.write(value.`n`, buf) - } -} - - - - -public object FfiConverterTypeUrDecoderStatus: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): UrDecoderStatus { - return UrDecoderStatus( - FfiConverterDouble.read(buf), - FfiConverterUInt.read(buf), - FfiConverterOptionalTypeUrPayload.read(buf), - ) - } - - override fun allocationSize(value: UrDecoderStatus): ULong = ( - FfiConverterDouble.allocationSize(value.`progress`) + - FfiConverterUInt.allocationSize(value.`fragmentCount`) + - FfiConverterOptionalTypeUrPayload.allocationSize(value.`payload`) - ) - - override fun write(value: UrDecoderStatus, buf: ByteBuffer) { - FfiConverterDouble.write(value.`progress`, buf) - FfiConverterUInt.write(value.`fragmentCount`, buf) - FfiConverterOptionalTypeUrPayload.write(value.`payload`, buf) - } -} - - - - -public object FfiConverterTypeValidationResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ValidationResult { - return ValidationResult( - FfiConverterString.read(buf), - FfiConverterTypeNetworkType.read(buf), - FfiConverterTypeAddressType.read(buf), - ) - } - - override fun allocationSize(value: ValidationResult): ULong = ( - FfiConverterString.allocationSize(value.`address`) + - FfiConverterTypeNetworkType.allocationSize(value.`network`) + - FfiConverterTypeAddressType.allocationSize(value.`addressType`) - ) - - override fun write(value: ValidationResult, buf: ByteBuffer) { - FfiConverterString.write(value.`address`, buf) - FfiConverterTypeNetworkType.write(value.`network`, buf) - FfiConverterTypeAddressType.write(value.`addressType`, buf) - } -} - - - - -public object FfiConverterTypeWalletBalance: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): WalletBalance { - return WalletBalance( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - } - - override fun allocationSize(value: WalletBalance): ULong = ( - FfiConverterULong.allocationSize(value.`confirmed`) + - FfiConverterULong.allocationSize(value.`immature`) + - FfiConverterULong.allocationSize(value.`trustedPending`) + - FfiConverterULong.allocationSize(value.`untrustedPending`) + - FfiConverterULong.allocationSize(value.`spendable`) + - FfiConverterULong.allocationSize(value.`total`) - ) - - override fun write(value: WalletBalance, buf: ByteBuffer) { - FfiConverterULong.write(value.`confirmed`, buf) - FfiConverterULong.write(value.`immature`, buf) - FfiConverterULong.write(value.`trustedPending`, buf) - FfiConverterULong.write(value.`untrustedPending`, buf) - FfiConverterULong.write(value.`spendable`, buf) - FfiConverterULong.write(value.`total`, buf) - } -} - - - - -public object FfiConverterTypeWalletParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): WalletParams { - return WalletParams( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - FfiConverterOptionalString.read(buf), - FfiConverterOptionalTypeNetwork.read(buf), - FfiConverterOptionalTypeAccountType.read(buf), - ) - } - - override fun allocationSize(value: WalletParams): ULong = ( - FfiConverterString.allocationSize(value.`extendedKey`) + - FfiConverterString.allocationSize(value.`electrumUrl`) + - FfiConverterOptionalString.allocationSize(value.`fingerprint`) + - FfiConverterOptionalTypeNetwork.allocationSize(value.`network`) + - FfiConverterOptionalTypeAccountType.allocationSize(value.`accountType`) - ) - - override fun write(value: WalletParams, buf: ByteBuffer) { - FfiConverterString.write(value.`extendedKey`, buf) - FfiConverterString.write(value.`electrumUrl`, buf) - FfiConverterOptionalString.write(value.`fingerprint`, buf) - FfiConverterOptionalTypeNetwork.write(value.`network`, buf) - FfiConverterOptionalTypeAccountType.write(value.`accountType`, buf) - } -} - - - - -public object FfiConverterTypeWatcherParams: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): WatcherParams { - return WatcherParams( - FfiConverterString.read(buf), - 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.`walletId`) + - 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.`walletId`, 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) -} - -public object FfiConverterTypeAccountInfoError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AccountInfoException { - return when (buf.getInt()) { - 1 -> AccountInfoException.InvalidExtendedKey( - FfiConverterString.read(buf), - ) - 2 -> AccountInfoException.InvalidAddress( - FfiConverterString.read(buf), - ) - 3 -> AccountInfoException.ElectrumException( - FfiConverterString.read(buf), - ) - 4 -> AccountInfoException.WalletException( - FfiConverterString.read(buf), - ) - 5 -> AccountInfoException.SyncException( - FfiConverterString.read(buf), - ) - 6 -> AccountInfoException.UnsupportedKeyType( - FfiConverterString.read(buf), - ) - 7 -> AccountInfoException.NetworkMismatch( - FfiConverterString.read(buf), - ) - 8 -> AccountInfoException.InvalidTxid( - FfiConverterString.read(buf), - ) - 9 -> AccountInfoException.TransactionNotFound( - FfiConverterString.read(buf), - ) - 10 -> AccountInfoException.WatcherException( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: AccountInfoException): ULong { - return when (value) { - is AccountInfoException.InvalidExtendedKey -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.InvalidAddress -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.ElectrumException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.WalletException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.SyncException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.UnsupportedKeyType -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.NetworkMismatch -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.InvalidTxid -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.TransactionNotFound -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is AccountInfoException.WatcherException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: AccountInfoException, buf: ByteBuffer) { - when (value) { - is AccountInfoException.InvalidExtendedKey -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.InvalidAddress -> { - buf.putInt(2) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.ElectrumException -> { - buf.putInt(3) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.WalletException -> { - buf.putInt(4) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.SyncException -> { - buf.putInt(5) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.UnsupportedKeyType -> { - buf.putInt(6) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.NetworkMismatch -> { - buf.putInt(7) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.InvalidTxid -> { - buf.putInt(8) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.TransactionNotFound -> { - buf.putInt(9) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is AccountInfoException.WatcherException -> { - buf.putInt(10) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeAccountType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AccountType = try { - AccountType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: AccountType): ULong = 4UL - - override fun write(value: AccountType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeActivity : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): Activity { - return when(buf.getInt()) { - 1 -> Activity.Onchain( - FfiConverterTypeOnchainActivity.read(buf), - ) - 2 -> Activity.Lightning( - FfiConverterTypeLightningActivity.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: Activity): ULong = when(value) { - is Activity.Onchain -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeOnchainActivity.allocationSize(value.v1) - ) - } - is Activity.Lightning -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLightningActivity.allocationSize(value.v1) - ) - } - } - - override fun write(value: Activity, buf: ByteBuffer) { - when(value) { - is Activity.Onchain -> { - buf.putInt(1) - FfiConverterTypeOnchainActivity.write(value.v1, buf) - Unit - } - is Activity.Lightning -> { - buf.putInt(2) - FfiConverterTypeLightningActivity.write(value.v1, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - -public object ActivityExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): ActivityException = FfiConverterTypeActivityError.lift(errorBuf) -} - -public object FfiConverterTypeActivityError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ActivityException { - return when (buf.getInt()) { - 1 -> ActivityException.InvalidActivity( - FfiConverterString.read(buf), - ) - 2 -> ActivityException.InitializationException( - FfiConverterString.read(buf), - ) - 3 -> ActivityException.InsertException( - FfiConverterString.read(buf), - ) - 4 -> ActivityException.RetrievalException( - FfiConverterString.read(buf), - ) - 5 -> ActivityException.DataException( - FfiConverterString.read(buf), - ) - 6 -> ActivityException.ConnectionException( - FfiConverterString.read(buf), - ) - 7 -> ActivityException.SerializationException( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: ActivityException): ULong { - return when (value) { - is ActivityException.InvalidActivity -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is ActivityException.InitializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is ActivityException.InsertException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is ActivityException.RetrievalException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is ActivityException.DataException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is ActivityException.ConnectionException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is ActivityException.SerializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: ActivityException, buf: ByteBuffer) { - when (value) { - is ActivityException.InvalidActivity -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is ActivityException.InitializationException -> { - buf.putInt(2) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is ActivityException.InsertException -> { - buf.putInt(3) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is ActivityException.RetrievalException -> { - buf.putInt(4) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is ActivityException.DataException -> { - buf.putInt(5) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is ActivityException.ConnectionException -> { - buf.putInt(6) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is ActivityException.SerializationException -> { - buf.putInt(7) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeActivityFilter: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ActivityFilter = try { - ActivityFilter.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: ActivityFilter): ULong = 4UL - - override fun write(value: ActivityFilter, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeActivityType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ActivityType = try { - ActivityType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: ActivityType): ULong = 4UL - - override fun write(value: ActivityType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object AddressExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): AddressException = FfiConverterTypeAddressError.lift(errorBuf) -} - -public object FfiConverterTypeAddressError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AddressException { - return when (buf.getInt()) { - 1 -> AddressException.InvalidAddress() - 2 -> AddressException.InvalidNetwork() - 3 -> AddressException.MnemonicGenerationFailed() - 4 -> AddressException.InvalidMnemonic() - 5 -> AddressException.InvalidEntropy() - 6 -> AddressException.AddressDerivationFailed() - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: AddressException): ULong { - return when (value) { - is AddressException.InvalidAddress -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is AddressException.InvalidNetwork -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is AddressException.MnemonicGenerationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is AddressException.InvalidMnemonic -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is AddressException.InvalidEntropy -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is AddressException.AddressDerivationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - } - } - - override fun write(value: AddressException, buf: ByteBuffer) { - when (value) { - is AddressException.InvalidAddress -> { - buf.putInt(1) - Unit - } - is AddressException.InvalidNetwork -> { - buf.putInt(2) - Unit - } - is AddressException.MnemonicGenerationFailed -> { - buf.putInt(3) - Unit - } - is AddressException.InvalidMnemonic -> { - buf.putInt(4) - Unit - } - is AddressException.InvalidEntropy -> { - buf.putInt(5) - Unit - } - is AddressException.AddressDerivationFailed -> { - buf.putInt(6) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeAddressType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AddressType = try { - AddressType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: AddressType): ULong = 4UL - - override fun write(value: AddressType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBitcoinNetworkEnum: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BitcoinNetworkEnum = try { - BitcoinNetworkEnum.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BitcoinNetworkEnum): ULong = 4UL - - override fun write(value: BitcoinNetworkEnum, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object BlocktankExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): BlocktankException = FfiConverterTypeBlocktankError.lift(errorBuf) -} - -public object FfiConverterTypeBlocktankError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BlocktankException { - return when (buf.getInt()) { - 1 -> BlocktankException.HttpClient( - FfiConverterString.read(buf), - ) - 2 -> BlocktankException.BlocktankClient( - FfiConverterString.read(buf), - ) - 3 -> BlocktankException.InvalidBlocktank( - FfiConverterString.read(buf), - ) - 4 -> BlocktankException.InitializationException( - FfiConverterString.read(buf), - ) - 5 -> BlocktankException.InsertException( - FfiConverterString.read(buf), - ) - 6 -> BlocktankException.RetrievalException( - FfiConverterString.read(buf), - ) - 7 -> BlocktankException.DataException( - FfiConverterString.read(buf), - ) - 8 -> BlocktankException.ConnectionException( - FfiConverterString.read(buf), - ) - 9 -> BlocktankException.SerializationException( - FfiConverterString.read(buf), - ) - 10 -> BlocktankException.ChannelOpen( - FfiConverterTypeBtChannelOrderErrorType.read(buf), - FfiConverterString.read(buf), - ) - 11 -> BlocktankException.OrderState( - FfiConverterString.read(buf), - ) - 12 -> BlocktankException.InvalidParameter( - FfiConverterString.read(buf), - ) - 13 -> BlocktankException.DatabaseException( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: BlocktankException): ULong { - return when (value) { - is BlocktankException.HttpClient -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.BlocktankClient -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.InvalidBlocktank -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.InitializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.InsertException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.RetrievalException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.DataException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.ConnectionException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.SerializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.ChannelOpen -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterTypeBtChannelOrderErrorType.allocationSize(value.`errorType`) - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.OrderState -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.InvalidParameter -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BlocktankException.DatabaseException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: BlocktankException, buf: ByteBuffer) { - when (value) { - is BlocktankException.HttpClient -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.BlocktankClient -> { - buf.putInt(2) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.InvalidBlocktank -> { - buf.putInt(3) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.InitializationException -> { - buf.putInt(4) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.InsertException -> { - buf.putInt(5) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.RetrievalException -> { - buf.putInt(6) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.DataException -> { - buf.putInt(7) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.ConnectionException -> { - buf.putInt(8) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.SerializationException -> { - buf.putInt(9) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.ChannelOpen -> { - buf.putInt(10) - FfiConverterTypeBtChannelOrderErrorType.write(value.`errorType`, buf) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.OrderState -> { - buf.putInt(11) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.InvalidParameter -> { - buf.putInt(12) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BlocktankException.DatabaseException -> { - buf.putInt(13) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - -public object BoltzExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): BoltzException = FfiConverterTypeBoltzError.lift(errorBuf) -} - -public object FfiConverterTypeBoltzError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BoltzException { - return when (buf.getInt()) { - 1 -> BoltzException.InitializationException( - FfiConverterString.read(buf), - ) - 2 -> BoltzException.ConnectionException( - FfiConverterString.read(buf), - ) - 3 -> BoltzException.DatabaseException( - FfiConverterString.read(buf), - ) - 4 -> BoltzException.ApiException( - FfiConverterString.read(buf), - ) - 5 -> BoltzException.SwapException( - FfiConverterString.read(buf), - ) - 6 -> BoltzException.BroadcastException( - FfiConverterString.read(buf), - ) - 7 -> BoltzException.InvalidInput( - FfiConverterString.read(buf), - ) - 8 -> BoltzException.SerializationException( - FfiConverterString.read(buf), - ) - 9 -> BoltzException.NotFound( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: BoltzException): ULong { - return when (value) { - is BoltzException.InitializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.ConnectionException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.DatabaseException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.ApiException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.SwapException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.BroadcastException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.InvalidInput -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.SerializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BoltzException.NotFound -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: BoltzException, buf: ByteBuffer) { - when (value) { - is BoltzException.InitializationException -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.ConnectionException -> { - buf.putInt(2) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.DatabaseException -> { - buf.putInt(3) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.ApiException -> { - buf.putInt(4) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.SwapException -> { - buf.putInt(5) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.BroadcastException -> { - buf.putInt(6) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.InvalidInput -> { - buf.putInt(7) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.SerializationException -> { - buf.putInt(8) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BoltzException.NotFound -> { - buf.putInt(9) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeBoltzNetwork: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BoltzNetwork = try { - BoltzNetwork.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BoltzNetwork): ULong = 4UL - - override fun write(value: BoltzNetwork, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBoltzSwapEvent : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): BoltzSwapEvent { - return when(buf.getInt()) { - 1 -> BoltzSwapEvent.StatusUpdate( - FfiConverterString.read(buf), - FfiConverterTypeBoltzSwapStatus.read(buf), - ) - 2 -> BoltzSwapEvent.Claimed( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - 3 -> BoltzSwapEvent.Refunded( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - 4 -> BoltzSwapEvent.Error( - FfiConverterString.read(buf), - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: BoltzSwapEvent): ULong = when(value) { - is BoltzSwapEvent.StatusUpdate -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`swapId`) - + FfiConverterTypeBoltzSwapStatus.allocationSize(value.`status`) - ) - } - is BoltzSwapEvent.Claimed -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`swapId`) - + FfiConverterString.allocationSize(value.`txid`) - ) - } - is BoltzSwapEvent.Refunded -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`swapId`) - + FfiConverterString.allocationSize(value.`txid`) - ) - } - is BoltzSwapEvent.Error -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`swapId`) - + FfiConverterString.allocationSize(value.`message`) - ) - } - } - - override fun write(value: BoltzSwapEvent, buf: ByteBuffer) { - when(value) { - is BoltzSwapEvent.StatusUpdate -> { - buf.putInt(1) - FfiConverterString.write(value.`swapId`, buf) - FfiConverterTypeBoltzSwapStatus.write(value.`status`, buf) - Unit - } - is BoltzSwapEvent.Claimed -> { - buf.putInt(2) - FfiConverterString.write(value.`swapId`, buf) - FfiConverterString.write(value.`txid`, buf) - Unit - } - is BoltzSwapEvent.Refunded -> { - buf.putInt(3) - FfiConverterString.write(value.`swapId`, buf) - FfiConverterString.write(value.`txid`, buf) - Unit - } - is BoltzSwapEvent.Error -> { - buf.putInt(4) - FfiConverterString.write(value.`swapId`, buf) - FfiConverterString.write(value.`message`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeBoltzSwapStatus : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): BoltzSwapStatus { - return when(buf.getInt()) { - 1 -> BoltzSwapStatus.SwapCreated - 2 -> BoltzSwapStatus.InvoiceSet - 3 -> BoltzSwapStatus.TransactionMempool - 4 -> BoltzSwapStatus.TransactionConfirmed - 5 -> BoltzSwapStatus.InvoicePending - 6 -> BoltzSwapStatus.InvoicePaid - 7 -> BoltzSwapStatus.InvoiceSettled - 8 -> BoltzSwapStatus.InvoiceFailedToPay - 9 -> BoltzSwapStatus.InvoiceExpired - 10 -> BoltzSwapStatus.TransactionClaimPending - 11 -> BoltzSwapStatus.TransactionClaimed - 12 -> BoltzSwapStatus.TransactionRefunded - 13 -> BoltzSwapStatus.TransactionLockupFailed - 14 -> BoltzSwapStatus.TransactionFailed - 15 -> BoltzSwapStatus.SwapExpired - 16 -> BoltzSwapStatus.Unknown( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: BoltzSwapStatus): ULong = when(value) { - is BoltzSwapStatus.SwapCreated -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.InvoiceSet -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionMempool -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionConfirmed -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.InvoicePending -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.InvoicePaid -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.InvoiceSettled -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.InvoiceFailedToPay -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.InvoiceExpired -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionClaimPending -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionClaimed -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionRefunded -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionLockupFailed -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.TransactionFailed -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.SwapExpired -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is BoltzSwapStatus.Unknown -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`raw`) - ) - } - } - - override fun write(value: BoltzSwapStatus, buf: ByteBuffer) { - when(value) { - is BoltzSwapStatus.SwapCreated -> { - buf.putInt(1) - Unit - } - is BoltzSwapStatus.InvoiceSet -> { - buf.putInt(2) - Unit - } - is BoltzSwapStatus.TransactionMempool -> { - buf.putInt(3) - Unit - } - is BoltzSwapStatus.TransactionConfirmed -> { - buf.putInt(4) - Unit - } - is BoltzSwapStatus.InvoicePending -> { - buf.putInt(5) - Unit - } - is BoltzSwapStatus.InvoicePaid -> { - buf.putInt(6) - Unit - } - is BoltzSwapStatus.InvoiceSettled -> { - buf.putInt(7) - Unit - } - is BoltzSwapStatus.InvoiceFailedToPay -> { - buf.putInt(8) - Unit - } - is BoltzSwapStatus.InvoiceExpired -> { - buf.putInt(9) - Unit - } - is BoltzSwapStatus.TransactionClaimPending -> { - buf.putInt(10) - Unit - } - is BoltzSwapStatus.TransactionClaimed -> { - buf.putInt(11) - Unit - } - is BoltzSwapStatus.TransactionRefunded -> { - buf.putInt(12) - Unit - } - is BoltzSwapStatus.TransactionLockupFailed -> { - buf.putInt(13) - Unit - } - is BoltzSwapStatus.TransactionFailed -> { - buf.putInt(14) - Unit - } - is BoltzSwapStatus.SwapExpired -> { - buf.putInt(15) - Unit - } - is BoltzSwapStatus.Unknown -> { - buf.putInt(16) - FfiConverterString.write(value.`raw`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeBoltzSwapType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BoltzSwapType = try { - BoltzSwapType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BoltzSwapType): ULong = 4UL - - override fun write(value: BoltzSwapType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object BroadcastExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): BroadcastException = FfiConverterTypeBroadcastError.lift(errorBuf) -} - -public object FfiConverterTypeBroadcastError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BroadcastException { - return when (buf.getInt()) { - 1 -> BroadcastException.InvalidHex( - FfiConverterString.read(buf), - ) - 2 -> BroadcastException.InvalidTransaction( - FfiConverterString.read(buf), - ) - 3 -> BroadcastException.ElectrumException( - FfiConverterString.read(buf), - ) - 4 -> BroadcastException.TaskException( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: BroadcastException): ULong { - return when (value) { - is BroadcastException.InvalidHex -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BroadcastException.InvalidTransaction -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BroadcastException.ElectrumException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is BroadcastException.TaskException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: BroadcastException, buf: ByteBuffer) { - when (value) { - is BroadcastException.InvalidHex -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BroadcastException.InvalidTransaction -> { - buf.putInt(2) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BroadcastException.ElectrumException -> { - buf.putInt(3) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is BroadcastException.TaskException -> { - buf.putInt(4) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeBtBolt11InvoiceState: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtBolt11InvoiceState = try { - BtBolt11InvoiceState.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtBolt11InvoiceState): ULong = 4UL - - override fun write(value: BtBolt11InvoiceState, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBtChannelOrderErrorType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtChannelOrderErrorType = try { - BtChannelOrderErrorType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtChannelOrderErrorType): ULong = 4UL - - override fun write(value: BtChannelOrderErrorType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBtOpenChannelState: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtOpenChannelState = try { - BtOpenChannelState.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtOpenChannelState): ULong = 4UL - - override fun write(value: BtOpenChannelState, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBtOrderState: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtOrderState = try { - BtOrderState.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtOrderState): ULong = 4UL - - override fun write(value: BtOrderState, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBtOrderState2: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtOrderState2 = try { - BtOrderState2.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtOrderState2): ULong = 4UL - - override fun write(value: BtOrderState2, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBtPaymentState: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtPaymentState = try { - BtPaymentState.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtPaymentState): ULong = 4UL - - override fun write(value: BtPaymentState, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeBtPaymentState2: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtPaymentState2 = try { - BtPaymentState2.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: BtPaymentState2): ULong = 4UL - - override fun write(value: BtPaymentState2, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeCJitStateEnum: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CJitStateEnum = try { - CJitStateEnum.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: CJitStateEnum): ULong = 4UL - - override fun write(value: CJitStateEnum, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeCoinSelection: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CoinSelection = try { - CoinSelection.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: CoinSelection): ULong = 4UL - - override fun write(value: CoinSelection, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeComposeOutput : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): ComposeOutput { - return when(buf.getInt()) { - 1 -> ComposeOutput.Payment( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - ) - 2 -> ComposeOutput.SendMax( - FfiConverterString.read(buf), - ) - 3 -> ComposeOutput.OpReturn( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: ComposeOutput): ULong = when(value) { - is ComposeOutput.Payment -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`address`) - + FfiConverterULong.allocationSize(value.`amountSats`) - ) - } - is ComposeOutput.SendMax -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`address`) - ) - } - is ComposeOutput.OpReturn -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`dataHex`) - ) - } - } - - override fun write(value: ComposeOutput, buf: ByteBuffer) { - when(value) { - is ComposeOutput.Payment -> { - buf.putInt(1) - FfiConverterString.write(value.`address`, buf) - FfiConverterULong.write(value.`amountSats`, buf) - Unit - } - is ComposeOutput.SendMax -> { - buf.putInt(2) - FfiConverterString.write(value.`address`, buf) - Unit - } - is ComposeOutput.OpReturn -> { - buf.putInt(3) - FfiConverterString.write(value.`dataHex`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeComposeResult : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): ComposeResult { - return when(buf.getInt()) { - 1 -> ComposeResult.Success( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - FfiConverterFloat.read(buf), - FfiConverterULong.read(buf), - ) - 2 -> ComposeResult.Error( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: ComposeResult): ULong = when(value) { - is ComposeResult.Success -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`psbt`) - + FfiConverterULong.allocationSize(value.`fee`) - + FfiConverterFloat.allocationSize(value.`feeRate`) - + FfiConverterULong.allocationSize(value.`totalSpent`) - ) - } - is ComposeResult.Error -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`error`) - ) - } - } - - override fun write(value: ComposeResult, buf: ByteBuffer) { - when(value) { - is ComposeResult.Success -> { - buf.putInt(1) - FfiConverterString.write(value.`psbt`, buf) - FfiConverterULong.write(value.`fee`, buf) - FfiConverterFloat.write(value.`feeRate`, buf) - FfiConverterULong.write(value.`totalSpent`, buf) - Unit - } - is ComposeResult.Error -> { - buf.putInt(2) - FfiConverterString.write(value.`error`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - -public object DbExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): DbException = FfiConverterTypeDbError.lift(errorBuf) -} - -public object FfiConverterTypeDbError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): DbException { - return when (buf.getInt()) { - 1 -> DbException.DbActivityException( - FfiConverterTypeActivityError.read(buf), - ) - 2 -> DbException.DbBlocktankException( - FfiConverterTypeBlocktankError.read(buf), - ) - 3 -> DbException.DbBoltzException( - FfiConverterTypeBoltzError.read(buf), - ) - 4 -> DbException.InitializationException( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: DbException): ULong { - return when (value) { - is DbException.DbActivityException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterTypeActivityError.allocationSize(value.`errorDetails`) - ) - is DbException.DbBlocktankException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterTypeBlocktankError.allocationSize(value.`errorDetails`) - ) - is DbException.DbBoltzException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterTypeBoltzError.allocationSize(value.`errorDetails`) - ) - is DbException.InitializationException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: DbException, buf: ByteBuffer) { - when (value) { - is DbException.DbActivityException -> { - buf.putInt(1) - FfiConverterTypeActivityError.write(value.`errorDetails`, buf) - Unit - } - is DbException.DbBlocktankException -> { - buf.putInt(2) - FfiConverterTypeBlocktankError.write(value.`errorDetails`, buf) - Unit - } - is DbException.DbBoltzException -> { - buf.putInt(3) - FfiConverterTypeBoltzError.write(value.`errorDetails`, buf) - Unit - } - is DbException.InitializationException -> { - buf.putInt(4) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - -public object DecodingExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): DecodingException = FfiConverterTypeDecodingError.lift(errorBuf) -} - -public object FfiConverterTypeDecodingError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): DecodingException { - return when (buf.getInt()) { - 1 -> DecodingException.InvalidFormat() - 2 -> DecodingException.InvalidNetwork() - 3 -> DecodingException.InvalidAmount() - 4 -> DecodingException.InvalidLnurlPayAmount( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - 5 -> DecodingException.InvalidTimestamp() - 6 -> DecodingException.InvalidChecksum() - 7 -> DecodingException.InvalidResponse() - 8 -> DecodingException.UnsupportedType() - 9 -> DecodingException.InvalidAddress() - 10 -> DecodingException.RequestFailed() - 11 -> DecodingException.ClientCreationFailed() - 12 -> DecodingException.InvoiceCreationFailed( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: DecodingException): ULong { - return when (value) { - is DecodingException.InvalidFormat -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvalidNetwork -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvalidAmount -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvalidLnurlPayAmount -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterULong.allocationSize(value.`amountSatoshis`) - + FfiConverterULong.allocationSize(value.`min`) - + FfiConverterULong.allocationSize(value.`max`) - ) - is DecodingException.InvalidTimestamp -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvalidChecksum -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvalidResponse -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.UnsupportedType -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvalidAddress -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.RequestFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.ClientCreationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is DecodingException.InvoiceCreationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorMessage`) - ) - } - } - - override fun write(value: DecodingException, buf: ByteBuffer) { - when (value) { - is DecodingException.InvalidFormat -> { - buf.putInt(1) - Unit - } - is DecodingException.InvalidNetwork -> { - buf.putInt(2) - Unit - } - is DecodingException.InvalidAmount -> { - buf.putInt(3) - Unit - } - is DecodingException.InvalidLnurlPayAmount -> { - buf.putInt(4) - FfiConverterULong.write(value.`amountSatoshis`, buf) - FfiConverterULong.write(value.`min`, buf) - FfiConverterULong.write(value.`max`, buf) - Unit - } - is DecodingException.InvalidTimestamp -> { - buf.putInt(5) - Unit - } - is DecodingException.InvalidChecksum -> { - buf.putInt(6) - Unit - } - is DecodingException.InvalidResponse -> { - buf.putInt(7) - Unit - } - is DecodingException.UnsupportedType -> { - buf.putInt(8) - Unit - } - is DecodingException.InvalidAddress -> { - buf.putInt(9) - Unit - } - is DecodingException.RequestFailed -> { - buf.putInt(10) - Unit - } - is DecodingException.ClientCreationFailed -> { - buf.putInt(11) - Unit - } - is DecodingException.InvoiceCreationFailed -> { - buf.putInt(12) - FfiConverterString.write(value.`errorMessage`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeHardwareWalletTransport: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): HardwareWalletTransport = try { - HardwareWalletTransport.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: HardwareWalletTransport): ULong = 4UL - - override fun write(value: HardwareWalletTransport, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeHardwareWalletVendor: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): HardwareWalletVendor = try { - HardwareWalletVendor.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: HardwareWalletVendor): ULong = 4UL - - override fun write(value: HardwareWalletVendor, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object LnurlExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): LnurlException = FfiConverterTypeLnurlError.lift(errorBuf) -} - -public object FfiConverterTypeLnurlError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): LnurlException { - return when (buf.getInt()) { - 1 -> LnurlException.InvalidAddress() - 2 -> LnurlException.ClientCreationFailed() - 3 -> LnurlException.RequestFailed() - 4 -> LnurlException.InvalidResponse() - 5 -> LnurlException.InvalidAmount( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - 6 -> LnurlException.InvoiceCreationFailed( - FfiConverterString.read(buf), - ) - 7 -> LnurlException.AmountMismatch( - FfiConverterULong.read(buf), - FfiConverterULong.read(buf), - ) - 8 -> LnurlException.AuthenticationFailed() - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: LnurlException): ULong { - return when (value) { - is LnurlException.InvalidAddress -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is LnurlException.ClientCreationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is LnurlException.RequestFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is LnurlException.InvalidResponse -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is LnurlException.InvalidAmount -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterULong.allocationSize(value.`amountSatoshis`) - + FfiConverterULong.allocationSize(value.`min`) - + FfiConverterULong.allocationSize(value.`max`) - ) - is LnurlException.InvoiceCreationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is LnurlException.AmountMismatch -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterULong.allocationSize(value.`requestedMsats`) - + FfiConverterULong.allocationSize(value.`invoiceMsats`) - ) - is LnurlException.AuthenticationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - } - } - - override fun write(value: LnurlException, buf: ByteBuffer) { - when (value) { - is LnurlException.InvalidAddress -> { - buf.putInt(1) - Unit - } - is LnurlException.ClientCreationFailed -> { - buf.putInt(2) - Unit - } - is LnurlException.RequestFailed -> { - buf.putInt(3) - Unit - } - is LnurlException.InvalidResponse -> { - buf.putInt(4) - Unit - } - is LnurlException.InvalidAmount -> { - buf.putInt(5) - FfiConverterULong.write(value.`amountSatoshis`, buf) - FfiConverterULong.write(value.`min`, buf) - FfiConverterULong.write(value.`max`, buf) - Unit - } - is LnurlException.InvoiceCreationFailed -> { - buf.putInt(6) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is LnurlException.AmountMismatch -> { - buf.putInt(7) - FfiConverterULong.write(value.`requestedMsats`, buf) - FfiConverterULong.write(value.`invoiceMsats`, buf) - Unit - } - is LnurlException.AuthenticationFailed -> { - buf.putInt(8) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeManualRefundStateEnum: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ManualRefundStateEnum = try { - ManualRefundStateEnum.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: ManualRefundStateEnum): ULong = 4UL - - override fun write(value: ManualRefundStateEnum, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeNetwork: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): Network = try { - Network.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: Network): ULong = 4UL - - override fun write(value: Network, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeNetworkType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): NetworkType = try { - NetworkType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: NetworkType): ULong = 4UL - - override fun write(value: NetworkType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object OnchainExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): OnchainException = FfiConverterTypeOnchainError.lift(errorBuf) -} - -public object FfiConverterTypeOnchainError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): OnchainException { - return when (buf.getInt()) { - 1 -> OnchainException.InvalidExtendedPublicKey( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: OnchainException): ULong { - return when (value) { - is OnchainException.InvalidExtendedPublicKey -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: OnchainException, buf: ByteBuffer) { - when (value) { - is OnchainException.InvalidExtendedPublicKey -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypePassphraseResponse : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): PassphraseResponse { - return when(buf.getInt()) { - 1 -> PassphraseResponse.Cancel - 2 -> PassphraseResponse.Standard - 3 -> PassphraseResponse.Hidden( - FfiConverterString.read(buf), - ) - 4 -> PassphraseResponse.OnDevice - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: PassphraseResponse): ULong = when(value) { - is PassphraseResponse.Cancel -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is PassphraseResponse.Standard -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is PassphraseResponse.Hidden -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`value`) - ) - } - is PassphraseResponse.OnDevice -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - } - - override fun write(value: PassphraseResponse, buf: ByteBuffer) { - when(value) { - is PassphraseResponse.Cancel -> { - buf.putInt(1) - Unit - } - is PassphraseResponse.Standard -> { - buf.putInt(2) - Unit - } - is PassphraseResponse.Hidden -> { - buf.putInt(3) - FfiConverterString.write(value.`value`, buf) - Unit - } - is PassphraseResponse.OnDevice -> { - buf.putInt(4) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypePaymentState: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PaymentState = try { - PaymentState.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: PaymentState): ULong = 4UL - - override fun write(value: PaymentState, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypePaymentType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PaymentType = try { - PaymentType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: PaymentType): ULong = 4UL - - override fun write(value: PaymentType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object PsbtCompletionExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): PsbtCompletionException = FfiConverterTypePsbtCompletionError.lift(errorBuf) -} - -public object FfiConverterTypePsbtCompletionError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PsbtCompletionException { - return when (buf.getInt()) { - 1 -> PsbtCompletionException.InvalidPsbt( - FfiConverterString.read(buf), - ) - 2 -> PsbtCompletionException.CombineFailed( - FfiConverterString.read(buf), - ) - 3 -> PsbtCompletionException.FinalizationFailed( - FfiConverterString.read(buf), - ) - 4 -> PsbtCompletionException.VerificationFailed( - FfiConverterString.read(buf), - ) - 5 -> PsbtCompletionException.ExtractionFailed( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: PsbtCompletionException): ULong { - return when (value) { - is PsbtCompletionException.InvalidPsbt -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PsbtCompletionException.CombineFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PsbtCompletionException.FinalizationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PsbtCompletionException.VerificationFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PsbtCompletionException.ExtractionFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - } - } - - override fun write(value: PsbtCompletionException, buf: ByteBuffer) { - when (value) { - is PsbtCompletionException.InvalidPsbt -> { - buf.putInt(1) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PsbtCompletionException.CombineFailed -> { - buf.putInt(2) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PsbtCompletionException.FinalizationFailed -> { - buf.putInt(3) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PsbtCompletionException.VerificationFailed -> { - buf.putInt(4) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PsbtCompletionException.ExtractionFailed -> { - buf.putInt(5) - FfiConverterString.write(value.`reason`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypePubkyAuthKind: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PubkyAuthKind = try { - PubkyAuthKind.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: PubkyAuthKind): ULong = 4UL - - override fun write(value: PubkyAuthKind, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object PubkyExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): PubkyException = FfiConverterTypePubkyError.lift(errorBuf) -} - -public object FfiConverterTypePubkyError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PubkyException { - return when (buf.getInt()) { - 1 -> PubkyException.InvalidCapabilities( - FfiConverterString.read(buf), - ) - 2 -> PubkyException.AuthFailed( - FfiConverterString.read(buf), - ) - 3 -> PubkyException.NoActiveFlow() - 4 -> PubkyException.ResolutionFailed( - FfiConverterString.read(buf), - ) - 5 -> PubkyException.FetchFailed( - FfiConverterString.read(buf), - ) - 6 -> PubkyException.ProfileNotFound() - 7 -> PubkyException.ProfileParseFailed( - FfiConverterString.read(buf), - ) - 8 -> PubkyException.KeyException( - FfiConverterString.read(buf), - ) - 9 -> PubkyException.WriteFailed( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: PubkyException): ULong { - return when (value) { - is PubkyException.InvalidCapabilities -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PubkyException.AuthFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PubkyException.NoActiveFlow -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is PubkyException.ResolutionFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PubkyException.FetchFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PubkyException.ProfileNotFound -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is PubkyException.ProfileParseFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PubkyException.KeyException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is PubkyException.WriteFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - } - } - - override fun write(value: PubkyException, buf: ByteBuffer) { - when (value) { - is PubkyException.InvalidCapabilities -> { - buf.putInt(1) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PubkyException.AuthFailed -> { - buf.putInt(2) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PubkyException.NoActiveFlow -> { - buf.putInt(3) - Unit - } - is PubkyException.ResolutionFailed -> { - buf.putInt(4) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PubkyException.FetchFailed -> { - buf.putInt(5) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PubkyException.ProfileNotFound -> { - buf.putInt(6) - Unit - } - is PubkyException.ProfileParseFailed -> { - buf.putInt(7) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PubkyException.KeyException -> { - buf.putInt(8) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is PubkyException.WriteFailed -> { - buf.putInt(9) - FfiConverterString.write(value.`reason`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeScanner : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): Scanner { - return when(buf.getInt()) { - 1 -> Scanner.OnChain( - FfiConverterTypeOnChainInvoice.read(buf), - ) - 2 -> Scanner.Lightning( - FfiConverterTypeLightningInvoice.read(buf), - ) - 3 -> Scanner.PubkyAuth( - FfiConverterString.read(buf), - ) - 4 -> Scanner.LnurlChannel( - FfiConverterTypeLnurlChannelData.read(buf), - ) - 5 -> Scanner.LnurlAuth( - FfiConverterTypeLnurlAuthData.read(buf), - ) - 6 -> Scanner.LnurlWithdraw( - FfiConverterTypeLnurlWithdrawData.read(buf), - ) - 7 -> Scanner.LnurlAddress( - FfiConverterTypeLnurlAddressData.read(buf), - ) - 8 -> Scanner.LnurlPay( - FfiConverterTypeLnurlPayData.read(buf), - ) - 9 -> Scanner.NodeId( - FfiConverterString.read(buf), - FfiConverterTypeNetworkType.read(buf), - ) - 10 -> Scanner.Gift( - FfiConverterString.read(buf), - FfiConverterULong.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: Scanner): ULong = when(value) { - is Scanner.OnChain -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeOnChainInvoice.allocationSize(value.`invoice`) - ) - } - is Scanner.Lightning -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLightningInvoice.allocationSize(value.`invoice`) - ) - } - is Scanner.PubkyAuth -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`data`) - ) - } - is Scanner.LnurlChannel -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLnurlChannelData.allocationSize(value.`data`) - ) - } - is Scanner.LnurlAuth -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLnurlAuthData.allocationSize(value.`data`) - ) - } - is Scanner.LnurlWithdraw -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLnurlWithdrawData.allocationSize(value.`data`) - ) - } - is Scanner.LnurlAddress -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLnurlAddressData.allocationSize(value.`data`) - ) - } - is Scanner.LnurlPay -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterTypeLnurlPayData.allocationSize(value.`data`) - ) - } - is Scanner.NodeId -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`url`) - + FfiConverterTypeNetworkType.allocationSize(value.`network`) - ) - } - is Scanner.Gift -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`code`) - + FfiConverterULong.allocationSize(value.`amount`) - ) - } - } - - override fun write(value: Scanner, buf: ByteBuffer) { - when(value) { - is Scanner.OnChain -> { - buf.putInt(1) - FfiConverterTypeOnChainInvoice.write(value.`invoice`, buf) - Unit - } - is Scanner.Lightning -> { - buf.putInt(2) - FfiConverterTypeLightningInvoice.write(value.`invoice`, buf) - Unit - } - is Scanner.PubkyAuth -> { - buf.putInt(3) - FfiConverterString.write(value.`data`, buf) - Unit - } - is Scanner.LnurlChannel -> { - buf.putInt(4) - FfiConverterTypeLnurlChannelData.write(value.`data`, buf) - Unit - } - is Scanner.LnurlAuth -> { - buf.putInt(5) - FfiConverterTypeLnurlAuthData.write(value.`data`, buf) - Unit - } - is Scanner.LnurlWithdraw -> { - buf.putInt(6) - FfiConverterTypeLnurlWithdrawData.write(value.`data`, buf) - Unit - } - is Scanner.LnurlAddress -> { - buf.putInt(7) - FfiConverterTypeLnurlAddressData.write(value.`data`, buf) - Unit - } - is Scanner.LnurlPay -> { - buf.putInt(8) - FfiConverterTypeLnurlPayData.write(value.`data`, buf) - Unit - } - is Scanner.NodeId -> { - buf.putInt(9) - FfiConverterString.write(value.`url`, buf) - FfiConverterTypeNetworkType.write(value.`network`, buf) - Unit - } - is Scanner.Gift -> { - buf.putInt(10) - FfiConverterString.write(value.`code`, buf) - FfiConverterULong.write(value.`amount`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeSortDirection: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SortDirection = try { - SortDirection.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: SortDirection): ULong = 4UL - - override fun write(value: SortDirection, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object SweepExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): SweepException = FfiConverterTypeSweepError.lift(errorBuf) -} - -public object FfiConverterTypeSweepError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SweepException { - return when (buf.getInt()) { - 1 -> SweepException.SweepFailed( - FfiConverterString.read(buf), - ) - 2 -> SweepException.NoUtxosFound() - 3 -> SweepException.InvalidMnemonic() - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: SweepException): ULong { - return when (value) { - is SweepException.SweepFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.v1) - ) - is SweepException.NoUtxosFound -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is SweepException.InvalidMnemonic -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - } - } - - override fun write(value: SweepException, buf: ByteBuffer) { - when (value) { - is SweepException.SweepFailed -> { - buf.putInt(1) - FfiConverterString.write(value.v1, buf) - Unit - } - is SweepException.NoUtxosFound -> { - buf.putInt(2) - Unit - } - is SweepException.InvalidMnemonic -> { - buf.putInt(3) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeTrezorCoinType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorCoinType = try { - TrezorCoinType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: TrezorCoinType): ULong = 4UL - - override fun write(value: TrezorCoinType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object TrezorExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): TrezorException = FfiConverterTypeTrezorError.lift(errorBuf) -} - -public object FfiConverterTypeTrezorError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorException { - return when (buf.getInt()) { - 1 -> TrezorException.TransportException( - FfiConverterString.read(buf), - ) - 2 -> TrezorException.DeviceNotFound() - 3 -> TrezorException.DeviceDisconnected() - 4 -> TrezorException.DeviceBusy() - 5 -> TrezorException.ConnectionException( - FfiConverterString.read(buf), - ) - 6 -> TrezorException.ProtocolException( - FfiConverterString.read(buf), - ) - 7 -> TrezorException.PairingRequired() - 8 -> TrezorException.PairingFailed( - FfiConverterString.read(buf), - ) - 9 -> TrezorException.PinRequired() - 10 -> TrezorException.PinCancelled() - 11 -> TrezorException.InvalidPin() - 12 -> TrezorException.PassphraseRequired() - 13 -> TrezorException.PassphraseCancelled() - 14 -> TrezorException.UserCancelled() - 15 -> TrezorException.Timeout() - 16 -> TrezorException.InvalidPath( - FfiConverterString.read(buf), - ) - 17 -> TrezorException.DeviceException( - FfiConverterString.read(buf), - ) - 18 -> TrezorException.NotInitialized() - 19 -> TrezorException.NotConnected() - 20 -> TrezorException.SessionException( - FfiConverterString.read(buf), - ) - 21 -> TrezorException.IoException( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: TrezorException): ULong { - return when (value) { - is TrezorException.TransportException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.DeviceNotFound -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.DeviceDisconnected -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.DeviceBusy -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.ConnectionException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.ProtocolException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.PairingRequired -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.PairingFailed -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.PinRequired -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.PinCancelled -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.InvalidPin -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.PassphraseRequired -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.PassphraseCancelled -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.UserCancelled -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.Timeout -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.InvalidPath -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.DeviceException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.NotInitialized -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.NotConnected -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - ) - is TrezorException.SessionException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - is TrezorException.IoException -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`errorDetails`) - ) - } - } - - override fun write(value: TrezorException, buf: ByteBuffer) { - when (value) { - is TrezorException.TransportException -> { - buf.putInt(1) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.DeviceNotFound -> { - buf.putInt(2) - Unit - } - is TrezorException.DeviceDisconnected -> { - buf.putInt(3) - Unit - } - is TrezorException.DeviceBusy -> { - buf.putInt(4) - Unit - } - is TrezorException.ConnectionException -> { - buf.putInt(5) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.ProtocolException -> { - buf.putInt(6) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.PairingRequired -> { - buf.putInt(7) - Unit - } - is TrezorException.PairingFailed -> { - buf.putInt(8) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.PinRequired -> { - buf.putInt(9) - Unit - } - is TrezorException.PinCancelled -> { - buf.putInt(10) - Unit - } - is TrezorException.InvalidPin -> { - buf.putInt(11) - Unit - } - is TrezorException.PassphraseRequired -> { - buf.putInt(12) - Unit - } - is TrezorException.PassphraseCancelled -> { - buf.putInt(13) - Unit - } - is TrezorException.UserCancelled -> { - buf.putInt(14) - Unit - } - is TrezorException.Timeout -> { - buf.putInt(15) - Unit - } - is TrezorException.InvalidPath -> { - buf.putInt(16) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.DeviceException -> { - buf.putInt(17) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.NotInitialized -> { - buf.putInt(18) - Unit - } - is TrezorException.NotConnected -> { - buf.putInt(19) - Unit - } - is TrezorException.SessionException -> { - buf.putInt(20) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - is TrezorException.IoException -> { - buf.putInt(21) - FfiConverterString.write(value.`errorDetails`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeTrezorScriptType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorScriptType = try { - TrezorScriptType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: TrezorScriptType): ULong = 4UL - - override fun write(value: TrezorScriptType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeTrezorTransportErrorCode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTransportErrorCode = try { - TrezorTransportErrorCode.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: TrezorTransportErrorCode): ULong = 4UL - - override fun write(value: TrezorTransportErrorCode, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeTrezorTransportType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTransportType = try { - TrezorTransportType.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: TrezorTransportType): ULong = 4UL - - override fun write(value: TrezorTransportType, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - - -public object FfiConverterTypeTxDirection: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TxDirection = try { - TxDirection.entries[buf.getInt() - 1] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: TxDirection): ULong = 4UL - - override fun write(value: TxDirection, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object UrExceptionErrorHandler : UniffiRustCallStatusErrorHandler { - override fun lift(errorBuf: RustBufferByValue): UrException = FfiConverterTypeUrError.lift(errorBuf) -} - -public object FfiConverterTypeUrError : FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): UrException { - return when (buf.getInt()) { - 1 -> UrException.InvalidUr( - FfiConverterString.read(buf), - ) - 2 -> UrException.TooLarge( - FfiConverterString.read(buf), - ) - 3 -> UrException.InvalidPayload( - FfiConverterString.read(buf), - ) - 4 -> UrException.InvalidPsbt( - FfiConverterString.read(buf), - ) - 5 -> UrException.InvalidPassportExport( - FfiConverterString.read(buf), - ) - else -> throw RuntimeException("invalid error enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: UrException): ULong { - return when (value) { - is UrException.InvalidUr -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is UrException.TooLarge -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is UrException.InvalidPayload -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is UrException.InvalidPsbt -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - is UrException.InvalidPassportExport -> ( - // Add the size for the Int that specifies the variant plus the size needed for all fields - 4UL - + FfiConverterString.allocationSize(value.`reason`) - ) - } - } - - override fun write(value: UrException, buf: ByteBuffer) { - when (value) { - is UrException.InvalidUr -> { - buf.putInt(1) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is UrException.TooLarge -> { - buf.putInt(2) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is UrException.InvalidPayload -> { - buf.putInt(3) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is UrException.InvalidPsbt -> { - buf.putInt(4) - FfiConverterString.write(value.`reason`, buf) - Unit - } - is UrException.InvalidPassportExport -> { - buf.putInt(5) - FfiConverterString.write(value.`reason`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeUrPayload : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): UrPayload { - return when(buf.getInt()) { - 1 -> UrPayload.Bytes( - FfiConverterByteArray.read(buf), - ) - 2 -> UrPayload.CryptoPsbt( - FfiConverterString.read(buf), - ) - 3 -> UrPayload.Cbor( - FfiConverterString.read(buf), - FfiConverterByteArray.read(buf), - ) - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: UrPayload): ULong = when(value) { - is UrPayload.Bytes -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterByteArray.allocationSize(value.`data`) - ) - } - is UrPayload.CryptoPsbt -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`psbt`) - ) - } - is UrPayload.Cbor -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`urType`) - + FfiConverterByteArray.allocationSize(value.`cbor`) - ) - } - } - - override fun write(value: UrPayload, buf: ByteBuffer) { - when(value) { - is UrPayload.Bytes -> { - buf.putInt(1) - FfiConverterByteArray.write(value.`data`, buf) - Unit - } - is UrPayload.CryptoPsbt -> { - buf.putInt(2) - FfiConverterString.write(value.`psbt`, buf) - Unit - } - is UrPayload.Cbor -> { - buf.putInt(3) - FfiConverterString.write(value.`urType`, buf) - FfiConverterByteArray.write(value.`cbor`, buf) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeWalletSelection : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): WalletSelection { - return when(buf.getInt()) { - 1 -> WalletSelection.Standard - 2 -> WalletSelection.Hidden( - FfiConverterString.read(buf), - ) - 3 -> WalletSelection.OnDevice - else -> throw RuntimeException("invalid enum value, something is very wrong!!") - } - } - - override fun allocationSize(value: WalletSelection): ULong = when(value) { - is WalletSelection.Standard -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - is WalletSelection.Hidden -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - + FfiConverterString.allocationSize(value.`passphrase`) - ) - } - is WalletSelection.OnDevice -> { - // Add the size for the Int that specifies the variant plus the size needed for all fields - ( - 4UL - ) - } - } - - override fun write(value: WalletSelection, buf: ByteBuffer) { - when(value) { - is WalletSelection.Standard -> { - buf.putInt(1) - Unit - } - is WalletSelection.Hidden -> { - buf.putInt(2) - FfiConverterString.write(value.`passphrase`, buf) - Unit - } - is WalletSelection.OnDevice -> { - buf.putInt(3) - Unit - } - }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } - } -} - - - - - -public object FfiConverterTypeWatcherEvent : FfiConverterRustBuffer{ - override fun read(buf: ByteBuffer): WatcherEvent { - return when(buf.getInt()) { - 1 -> WatcherEvent.TransactionsChanged( - FfiConverterSequenceTypeActivity.read(buf), - FfiConverterSequenceTypeTransactionDetails.read(buf), - FfiConverterTypeWalletBalance.read(buf), - FfiConverterUInt.read(buf), - FfiConverterUInt.read(buf), - FfiConverterTypeAccountType.read(buf), - FfiConverterTypeAddressInfo.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 - + FfiConverterSequenceTypeActivity.allocationSize(value.`activities`) - + FfiConverterSequenceTypeTransactionDetails.allocationSize(value.`transactionDetails`) - + FfiConverterTypeWalletBalance.allocationSize(value.`balance`) - + FfiConverterUInt.allocationSize(value.`txCount`) - + FfiConverterUInt.allocationSize(value.`blockHeight`) - + FfiConverterTypeAccountType.allocationSize(value.`accountType`) - + FfiConverterTypeAddressInfo.allocationSize(value.`nextUnusedExternalAddress`) - ) - } - 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) - FfiConverterSequenceTypeActivity.write(value.`activities`, buf) - FfiConverterSequenceTypeTransactionDetails.write(value.`transactionDetails`, buf) - FfiConverterTypeWalletBalance.write(value.`balance`, buf) - FfiConverterUInt.write(value.`txCount`, buf) - FfiConverterUInt.write(value.`blockHeight`, buf) - FfiConverterTypeAccountType.write(value.`accountType`, buf) - FfiConverterTypeAddressInfo.write(value.`nextUnusedExternalAddress`, 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] - } catch (e: IndexOutOfBoundsException) { - throw RuntimeException("invalid enum value, something is very wrong!!", e) - } - - override fun allocationSize(value: WordCount): ULong = 4UL - - override fun write(value: WordCount, buf: ByteBuffer) { - buf.putInt(value.ordinal + 1) - } -} - - - - -public object FfiConverterOptionalUShort: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.UShort? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterUShort.read(buf) - } - - override fun allocationSize(value: kotlin.UShort?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterUShort.allocationSize(value) - } - } - - override fun write(value: kotlin.UShort?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterUShort.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalUInt: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.UInt? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterUInt.read(buf) - } - - override fun allocationSize(value: kotlin.UInt?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterUInt.allocationSize(value) - } - } - - override fun write(value: kotlin.UInt?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterUInt.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalULong: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.ULong? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterULong.read(buf) - } - - override fun allocationSize(value: kotlin.ULong?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterULong.allocationSize(value) - } - } - - override fun write(value: kotlin.ULong?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterULong.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalDouble: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.Double? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterDouble.read(buf) - } - - override fun allocationSize(value: kotlin.Double?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterDouble.allocationSize(value) - } - } - - override fun write(value: kotlin.Double?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterDouble.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalBoolean: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.Boolean? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterBoolean.read(buf) - } - - override fun allocationSize(value: kotlin.Boolean?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterBoolean.allocationSize(value) - } - } - - override fun write(value: kotlin.Boolean?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterBoolean.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalString: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.String? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterString.read(buf) - } - - override fun allocationSize(value: kotlin.String?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterString.allocationSize(value) - } - } - - override fun write(value: kotlin.String?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterString.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalByteArray: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): kotlin.ByteArray? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterByteArray.read(buf) - } - - override fun allocationSize(value: kotlin.ByteArray?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterByteArray.allocationSize(value) - } - } - - override fun write(value: kotlin.ByteArray?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterByteArray.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeBoltzSwap: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BoltzSwap? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeBoltzSwap.read(buf) - } - - override fun allocationSize(value: BoltzSwap?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeBoltzSwap.allocationSize(value) - } - } - - override fun write(value: BoltzSwap?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeBoltzSwap.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeClosedChannelDetails: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ClosedChannelDetails? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeClosedChannelDetails.read(buf) - } - - override fun allocationSize(value: ClosedChannelDetails?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeClosedChannelDetails.allocationSize(value) - } - } - - override fun write(value: ClosedChannelDetails?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeClosedChannelDetails.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeCreateCjitOptions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CreateCjitOptions? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeCreateCjitOptions.read(buf) - } - - override fun allocationSize(value: CreateCjitOptions?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeCreateCjitOptions.allocationSize(value) - } - } - - override fun write(value: CreateCjitOptions?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeCreateCjitOptions.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeCreateOrderOptions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CreateOrderOptions? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeCreateOrderOptions.read(buf) - } - - override fun allocationSize(value: CreateOrderOptions?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeCreateOrderOptions.allocationSize(value) - } - } - - override fun write(value: CreateOrderOptions?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeCreateOrderOptions.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIBtBolt11Invoice: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtBolt11Invoice? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIBtBolt11Invoice.read(buf) - } - - override fun allocationSize(value: IBtBolt11Invoice?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIBtBolt11Invoice.allocationSize(value) - } - } - - override fun write(value: IBtBolt11Invoice?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIBtBolt11Invoice.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIBtChannel: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtChannel? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIBtChannel.read(buf) - } - - override fun allocationSize(value: IBtChannel?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIBtChannel.allocationSize(value) - } - } - - override fun write(value: IBtChannel?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIBtChannel.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIBtChannelClose: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtChannelClose? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIBtChannelClose.read(buf) - } - - override fun allocationSize(value: IBtChannelClose?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIBtChannelClose.allocationSize(value) - } - } - - override fun write(value: IBtChannelClose?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIBtChannelClose.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIBtInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtInfo? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIBtInfo.read(buf) - } - - override fun allocationSize(value: IBtInfo?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIBtInfo.allocationSize(value) - } - } - - override fun write(value: IBtInfo?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIBtInfo.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIBtOnchainTransactions: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtOnchainTransactions? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIBtOnchainTransactions.read(buf) - } - - override fun allocationSize(value: IBtOnchainTransactions?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIBtOnchainTransactions.allocationSize(value) - } - } - - override fun write(value: IBtOnchainTransactions?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIBtOnchainTransactions.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIBtPayment: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IBtPayment? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIBtPayment.read(buf) - } - - override fun allocationSize(value: IBtPayment?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIBtPayment.allocationSize(value) - } - } - - override fun write(value: IBtPayment?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIBtPayment.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIDiscount: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IDiscount? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIDiscount.read(buf) - } - - override fun allocationSize(value: IDiscount?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIDiscount.allocationSize(value) - } - } - - override fun write(value: IDiscount?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIDiscount.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIGiftBolt11Invoice: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftBolt11Invoice? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIGiftBolt11Invoice.read(buf) - } - - override fun allocationSize(value: IGiftBolt11Invoice?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIGiftBolt11Invoice.allocationSize(value) - } - } - - override fun write(value: IGiftBolt11Invoice?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIGiftBolt11Invoice.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIGiftBtcAddress: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftBtcAddress? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIGiftBtcAddress.read(buf) - } - - override fun allocationSize(value: IGiftBtcAddress?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIGiftBtcAddress.allocationSize(value) - } - } - - override fun write(value: IGiftBtcAddress?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIGiftBtcAddress.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIGiftCode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftCode? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIGiftCode.read(buf) - } - - override fun allocationSize(value: IGiftCode?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIGiftCode.allocationSize(value) - } - } - - override fun write(value: IGiftCode?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIGiftCode.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIGiftLspNode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftLspNode? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIGiftLspNode.read(buf) - } - - override fun allocationSize(value: IGiftLspNode?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIGiftLspNode.allocationSize(value) - } - } - - override fun write(value: IGiftLspNode?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIGiftLspNode.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIGiftOrder: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftOrder? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIGiftOrder.read(buf) - } - - override fun allocationSize(value: IGiftOrder?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIGiftOrder.allocationSize(value) - } - } - - override fun write(value: IGiftOrder?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIGiftOrder.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeIGiftPayment: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): IGiftPayment? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeIGiftPayment.read(buf) - } - - override fun allocationSize(value: IGiftPayment?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeIGiftPayment.allocationSize(value) - } - } - - override fun write(value: IGiftPayment?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeIGiftPayment.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeILspNode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ILspNode? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeILspNode.read(buf) - } - - override fun allocationSize(value: ILspNode?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeILspNode.allocationSize(value) - } - } - - override fun write(value: ILspNode?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeILspNode.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeOnchainActivity: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): OnchainActivity? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeOnchainActivity.read(buf) - } - - override fun allocationSize(value: OnchainActivity?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeOnchainActivity.allocationSize(value) - } - } - - override fun write(value: OnchainActivity?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeOnchainActivity.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypePreActivityMetadata: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PreActivityMetadata? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypePreActivityMetadata.read(buf) - } - - override fun allocationSize(value: PreActivityMetadata?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypePreActivityMetadata.allocationSize(value) - } - } - - override fun write(value: PreActivityMetadata?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypePreActivityMetadata.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTransactionDetails: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TransactionDetails? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTransactionDetails.read(buf) - } - - override fun allocationSize(value: TransactionDetails?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTransactionDetails.allocationSize(value) - } - } - - override fun write(value: TransactionDetails?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTransactionDetails.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTrezorCallMessageResult: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorCallMessageResult? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTrezorCallMessageResult.read(buf) - } - - override fun allocationSize(value: TrezorCallMessageResult?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTrezorCallMessageResult.allocationSize(value) - } - } - - override fun write(value: TrezorCallMessageResult?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTrezorCallMessageResult.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTrezorDeviceInfo: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorDeviceInfo? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTrezorDeviceInfo.read(buf) - } - - override fun allocationSize(value: TrezorDeviceInfo?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTrezorDeviceInfo.allocationSize(value) - } - } - - override fun write(value: TrezorDeviceInfo?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTrezorDeviceInfo.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTrezorFeatures: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorFeatures? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTrezorFeatures.read(buf) - } - - override fun allocationSize(value: TrezorFeatures?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTrezorFeatures.allocationSize(value) - } - } - - override fun write(value: TrezorFeatures?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTrezorFeatures.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeAccountType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): AccountType? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeAccountType.read(buf) - } - - override fun allocationSize(value: AccountType?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeAccountType.allocationSize(value) - } - } - - override fun write(value: AccountType?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeAccountType.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeActivity: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): Activity? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeActivity.read(buf) - } - - override fun allocationSize(value: Activity?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeActivity.allocationSize(value) - } - } - - override fun write(value: Activity?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeActivity.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeActivityFilter: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): ActivityFilter? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeActivityFilter.read(buf) - } - - override fun allocationSize(value: ActivityFilter?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeActivityFilter.allocationSize(value) - } - } - - override fun write(value: ActivityFilter?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeActivityFilter.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeBtOrderState2: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtOrderState2? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeBtOrderState2.read(buf) - } - - override fun allocationSize(value: BtOrderState2?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeBtOrderState2.allocationSize(value) - } - } - - override fun write(value: BtOrderState2?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeBtOrderState2.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeBtPaymentState2: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): BtPaymentState2? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeBtPaymentState2.read(buf) - } - - override fun allocationSize(value: BtPaymentState2?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeBtPaymentState2.allocationSize(value) - } - } - - override fun write(value: BtPaymentState2?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeBtPaymentState2.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeCJitStateEnum: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CJitStateEnum? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeCJitStateEnum.read(buf) - } - - override fun allocationSize(value: CJitStateEnum?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeCJitStateEnum.allocationSize(value) - } - } - - override fun write(value: CJitStateEnum?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeCJitStateEnum.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeCoinSelection: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): CoinSelection? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeCoinSelection.read(buf) - } - - override fun allocationSize(value: CoinSelection?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeCoinSelection.allocationSize(value) - } - } - - override fun write(value: CoinSelection?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeCoinSelection.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeNetwork: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): Network? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeNetwork.read(buf) - } - - override fun allocationSize(value: Network?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeNetwork.allocationSize(value) - } - } - - override fun write(value: Network?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeNetwork.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypePaymentType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): PaymentType? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypePaymentType.read(buf) - } - - override fun allocationSize(value: PaymentType?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypePaymentType.allocationSize(value) - } - } - - override fun write(value: PaymentType?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypePaymentType.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeSortDirection: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): SortDirection? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeSortDirection.read(buf) - } - - override fun allocationSize(value: SortDirection?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeSortDirection.allocationSize(value) - } - } - - override fun write(value: SortDirection?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeSortDirection.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTrezorCoinType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorCoinType? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTrezorCoinType.read(buf) - } - - override fun allocationSize(value: TrezorCoinType?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTrezorCoinType.allocationSize(value) - } - } - - override fun write(value: TrezorCoinType?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTrezorCoinType.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTrezorScriptType: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorScriptType? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTrezorScriptType.read(buf) - } - - override fun allocationSize(value: TrezorScriptType?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTrezorScriptType.allocationSize(value) - } - } - - override fun write(value: TrezorScriptType?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTrezorScriptType.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeTrezorTransportErrorCode: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): TrezorTransportErrorCode? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeTrezorTransportErrorCode.read(buf) - } - - override fun allocationSize(value: TrezorTransportErrorCode?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeTrezorTransportErrorCode.allocationSize(value) - } - } - - override fun write(value: TrezorTransportErrorCode?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeTrezorTransportErrorCode.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeUrPayload: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): UrPayload? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeUrPayload.read(buf) - } - - override fun allocationSize(value: UrPayload?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeUrPayload.allocationSize(value) - } - } - - override fun write(value: UrPayload?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeUrPayload.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalTypeWordCount: FfiConverterRustBuffer { - override fun read(buf: ByteBuffer): WordCount? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterTypeWordCount.read(buf) - } - - override fun allocationSize(value: WordCount?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterTypeWordCount.allocationSize(value) - } - } - - override fun write(value: WordCount?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterTypeWordCount.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalSequenceString: FfiConverterRustBuffer?> { - override fun read(buf: ByteBuffer): List? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterSequenceString.read(buf) - } - - override fun allocationSize(value: List?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterSequenceString.allocationSize(value) - } - } - - override fun write(value: List?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterSequenceString.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalSequenceTypeIManualRefund: FfiConverterRustBuffer?> { - override fun read(buf: ByteBuffer): List? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterSequenceTypeIManualRefund.read(buf) - } - - override fun allocationSize(value: List?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterSequenceTypeIManualRefund.allocationSize(value) - } - } - - override fun write(value: List?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterSequenceTypeIManualRefund.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalSequenceTypePubkyProfileLink: FfiConverterRustBuffer?> { - override fun read(buf: ByteBuffer): List? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterSequenceTypePubkyProfileLink.read(buf) - } - - override fun allocationSize(value: List?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterSequenceTypePubkyProfileLink.allocationSize(value) - } - } - - override fun write(value: List?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterSequenceTypePubkyProfileLink.write(value, buf) - } - } -} - - - - -public object FfiConverterOptionalMapStringString: FfiConverterRustBuffer?> { - override fun read(buf: ByteBuffer): Map? { - if (buf.get().toInt() == 0) { - return null - } - return FfiConverterMapStringString.read(buf) - } - - override fun allocationSize(value: Map?): ULong { - if (value == null) { - return 1UL - } else { - return 1UL + FfiConverterMapStringString.allocationSize(value) - } - } - - override fun write(value: Map?, buf: ByteBuffer) { - if (value == null) { - buf.put(0) - } else { - buf.put(1) - FfiConverterMapStringString.write(value, buf) - } - } -} - - - - -public object FfiConverterSequenceFloat: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterFloat.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterFloat.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterFloat.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceString: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterString.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterString.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterString.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeAccountUtxo: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeAccountUtxo.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeAccountUtxo.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeAccountUtxo.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeActivityTags: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeActivityTags.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeActivityTags.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeActivityTags.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeAddressInfo: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeAddressInfo.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeAddressInfo.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeAddressInfo.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeBoltzSwap: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeBoltzSwap.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeBoltzSwap.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeBoltzSwap.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeClosedChannelDetails: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeClosedChannelDetails.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeClosedChannelDetails.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeClosedChannelDetails.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeGetAddressResponse: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeGetAddressResponse.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeGetAddressResponse.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeGetAddressResponse.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeHistoryTransaction: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeHistoryTransaction.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeHistoryTransaction.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeHistoryTransaction.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeIBtOnchainTransaction: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeIBtOnchainTransaction.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeIBtOnchainTransaction.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeIBtOnchainTransaction.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeIBtOrder: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeIBtOrder.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeIBtOrder.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeIBtOrder.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeICJitEntry: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeICJitEntry.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeICJitEntry.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeICJitEntry.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeILspNode: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeILspNode.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeILspNode.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeILspNode.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeIManualRefund: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeIManualRefund.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeIManualRefund.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeIManualRefund.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeLightningActivity: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeLightningActivity.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeLightningActivity.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeLightningActivity.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeNativeDeviceInfo: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeNativeDeviceInfo.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeNativeDeviceInfo.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeNativeDeviceInfo.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeOnchainActivity: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeOnchainActivity.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeOnchainActivity.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeOnchainActivity.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypePassportAccount: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypePassportAccount.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypePassportAccount.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypePassportAccount.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypePreActivityMetadata: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypePreActivityMetadata.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypePreActivityMetadata.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypePreActivityMetadata.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypePubkyProfileLink: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypePubkyProfileLink.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypePubkyProfileLink.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypePubkyProfileLink.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeSupportedHardwareWallet: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeSupportedHardwareWallet.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeSupportedHardwareWallet.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeSupportedHardwareWallet.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTransactionDetails: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTransactionDetails.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTransactionDetails.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTransactionDetails.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTrezorDeviceInfo: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTrezorDeviceInfo.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTrezorDeviceInfo.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTrezorDeviceInfo.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTrezorPrevTx: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTrezorPrevTx.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTrezorPrevTx.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTrezorPrevTx.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTrezorPrevTxInput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTrezorPrevTxInput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTrezorPrevTxInput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTrezorPrevTxInput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTrezorPrevTxOutput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTrezorPrevTxOutput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTrezorPrevTxOutput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTrezorPrevTxOutput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTrezorTxInput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTrezorTxInput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTrezorTxInput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTrezorTxInput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTrezorTxOutput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTrezorTxOutput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTrezorTxOutput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTrezorTxOutput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTxDetailInput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTxDetailInput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTxDetailInput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTxDetailInput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTxDetailOutput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTxDetailOutput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTxDetailOutput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTxDetailOutput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTxInput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTxInput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTxInput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTxInput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeTxOutput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeTxOutput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeTxOutput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeTxOutput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeActivity: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeActivity.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeActivity.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeActivity.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeComposeOutput: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeComposeOutput.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeComposeOutput.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeComposeOutput.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeComposeResult: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeComposeResult.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeComposeResult.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeComposeResult.write(it, buf) - } - } -} - - - - -public object FfiConverterSequenceTypeHardwareWalletTransport: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): List { - val len = buf.getInt() - return List(len) { - FfiConverterTypeHardwareWalletTransport.read(buf) - } - } - - override fun allocationSize(value: List): ULong { - val sizeForLength = 4UL - val sizeForItems = value.sumOf { FfiConverterTypeHardwareWalletTransport.allocationSize(it) } - return sizeForLength + sizeForItems - } - - override fun write(value: List, buf: ByteBuffer) { - buf.putInt(value.size) - value.iterator().forEach { - FfiConverterTypeHardwareWalletTransport.write(it, buf) - } - } -} - - - -public object FfiConverterMapStringString: FfiConverterRustBuffer> { - override fun read(buf: ByteBuffer): Map { - val len = buf.getInt() - return buildMap(len) { - repeat(len) { - val k = FfiConverterString.read(buf) - val v = FfiConverterString.read(buf) - this[k] = v - } - } - } - - override fun allocationSize(value: Map): ULong { - val spaceForMapSize = 4UL - val spaceForChildren = value.entries.sumOf { (k, v) -> - FfiConverterString.allocationSize(k) + - FfiConverterString.allocationSize(v) - } - return spaceForMapSize + spaceForChildren - } - - override fun write(value: Map, buf: ByteBuffer) { - buf.putInt(value.size) - // The parens on `(k, v)` here ensure we're calling the right method, - // which is important for compatibility with older android devices. - // Ref https://blog.danlew.net/2017/03/16/kotlin-puzzler-whose-line-is-it-anyways/ - value.forEach { (k, v) -> - FfiConverterString.write(k, buf) - FfiConverterString.write(v, buf) - } - } -} - - - - - - - - - - - - -/** - * Decode activities from Core's canonical backup JSON, defaulting a - * missing/empty wallet id to [`DEFAULT_WALLET_ID`]. - */ -@Throws(ActivityException::class) -public fun `activitiesFromJson`(`json`: kotlin.String): List { - return FfiConverterSequenceTypeActivity.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_activities_from_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Serialize activities to Core's canonical backup JSON. - */ -@Throws(ActivityException::class) -public fun `activitiesToJson`(`activities`: List): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_activities_to_json( - FfiConverterSequenceTypeActivity.lower(`activities`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Decode activity tags from Core's canonical backup JSON, defaulting a - * missing/empty wallet id to [`DEFAULT_WALLET_ID`]. - */ -@Throws(ActivityException::class) -public fun `activityTagsFromJson`(`json`: kotlin.String): List { - return FfiConverterSequenceTypeActivityTags.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_activity_tags_from_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Serialize activity tags to Core's canonical backup JSON. - */ -@Throws(ActivityException::class) -public fun `activityTagsToJson`(`tags`: List): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_activity_tags_to_json( - FfiConverterSequenceTypeActivityTags.lower(`tags`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `activityWipeAll`() { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_activity_wipe_all( - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `addPreActivityMetadata`(`preActivityMetadata`: PreActivityMetadata) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_add_pre_activity_metadata( - FfiConverterTypePreActivityMetadata.lower(`preActivityMetadata`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `addPreActivityMetadataTags`(`walletId`: kotlin.String, `paymentId`: kotlin.String, `tags`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_add_pre_activity_metadata_tags( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`paymentId`), - FfiConverterSequenceString.lower(`tags`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `addTags`(`walletId`: kotlin.String, `activityId`: kotlin.String, `tags`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_add_tags( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`activityId`), - FfiConverterSequenceString.lower(`tags`), - uniffiRustCallStatus, - ) - } -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `approvePubkyAuth`(`authUrl`: kotlin.String, `secretKeyHex`: kotlin.String) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_approve_pubky_auth( - FfiConverterString.lower(`authUrl`), - FfiConverterString.lower(`secretKeyHex`), - ), - { 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 - PubkyExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `blocktankRemoveAllCjitEntries`() { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_blocktank_remove_all_cjit_entries( - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `blocktankRemoveAllOrders`() { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_blocktank_remove_all_orders( - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `blocktankWipeAll`() { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_blocktank_wipe_all( - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -/** - * Claim a reverse swap's onchain funds to its claim address, returning the - * broadcast claim transaction id. Normally happens automatically via the - * updates stream; exposed for manual recovery. The claim key is re-derived from - * `mnemonic`. Claims are serialized per swap, so calling this while the updates - * stream is auto-claiming the same swap waits for that claim and returns its - * txid rather than broadcasting a second transaction. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzClaimReverseSwap`(`swapId`: kotlin.String, `mnemonic`: kotlin.String, `bip39Passphrase`: kotlin.String?, `feeRateSatPerVb`: kotlin.Double?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_claim_reverse_swap( - FfiConverterString.lower(`swapId`), - FfiConverterString.lower(`mnemonic`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterOptionalDouble.lower(`feeRateSatPerVb`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Create a reverse swap (Lightning -> onchain). - * - * The caller pays the returned hold invoice from its Lightning node; - * `claim_address` is the onchain address the received funds are claimed to. - * The claim key and preimage are derived deterministically from `mnemonic` - * (only the derivation index is persisted, never the secrets) so the claim can - * be made automatically once Boltz locks the funds. `bip39_passphrase` must - * match the wallet's, or claims will derive the wrong key. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzCreateReverseSwap`(`network`: BoltzNetwork, `electrumUrl`: kotlin.String, `amountSat`: kotlin.ULong, `claimAddress`: kotlin.String, `mnemonic`: kotlin.String, `bip39Passphrase`: kotlin.String?): ReverseSwapResponse { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_create_reverse_swap( - FfiConverterTypeBoltzNetwork.lower(`network`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterULong.lower(`amountSat`), - FfiConverterString.lower(`claimAddress`), - FfiConverterString.lower(`mnemonic`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeReverseSwapResponse.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Create a submarine swap (onchain -> Lightning). - * - * `invoice` is a BOLT11 invoice the caller's Lightning node generated. The - * caller funds the returned lockup address from its onchain wallet. The refund - * key is derived deterministically from `mnemonic` (only the derivation index - * is persisted, never the key), and the swap is tracked if an updates stream is - * running. `bip39_passphrase` must match the wallet's, or refunds will derive - * the wrong key. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzCreateSubmarineSwap`(`network`: BoltzNetwork, `electrumUrl`: kotlin.String, `invoice`: kotlin.String, `mnemonic`: kotlin.String, `bip39Passphrase`: kotlin.String?): SubmarineSwapResponse { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_create_submarine_swap( - FfiConverterTypeBoltzNetwork.lower(`network`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterString.lower(`invoice`), - FfiConverterString.lower(`mnemonic`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeSubmarineSwapResponse.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Fetch fees and limits for reverse swaps (Lightning -> onchain). - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzGetReverseLimits`(`network`: BoltzNetwork): BoltzPairInfo { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_get_reverse_limits( - FfiConverterTypeBoltzNetwork.lower(`network`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeBoltzPairInfo.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Fetch fees and limits for submarine swaps (onchain -> Lightning). - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzGetSubmarineLimits`(`network`: BoltzNetwork): BoltzPairInfo { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_get_submarine_limits( - FfiConverterTypeBoltzNetwork.lower(`network`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeBoltzPairInfo.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Fetch a single swap by id. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzGetSwap`(`swapId`: kotlin.String): BoltzSwap? { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_get_swap( - FfiConverterString.lower(`swapId`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterOptionalTypeBoltzSwap.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * List swaps that have not reached a terminal state (for recovery/resume). - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzListPendingSwaps`(): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_list_pending_swaps( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeBoltzSwap.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * List every persisted swap, newest first. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzListSwaps`(): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_list_swaps( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeBoltzSwap.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Refund a submarine swap's locked funds to `refund_address`, returning the - * broadcast refund transaction id. Used when Boltz fails to pay the invoice or - * the swap expires. The refund key is re-derived from `mnemonic`. Refunds are - * serialized per swap, so two concurrent calls cannot both broadcast: the second - * waits for the first and returns its txid. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzRefundSubmarineSwap`(`swapId`: kotlin.String, `refundAddress`: kotlin.String, `mnemonic`: kotlin.String, `bip39Passphrase`: kotlin.String?, `feeRateSatPerVb`: kotlin.Double?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_refund_submarine_swap( - FfiConverterString.lower(`swapId`), - FfiConverterString.lower(`refundAddress`), - FfiConverterString.lower(`mnemonic`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterOptionalDouble.lower(`feeRateSatPerVb`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BoltzExceptionErrorHandler, - ) -} - -/** - * Open a Boltz WebSocket for `network`, subscribe to all pending swaps, and - * drive their lifecycle (auto-claiming reverse swaps) until stopped. Replaces - * any previously running updates stream (only one network is tracked at a - * time). `mnemonic` is held in memory for the lifetime of the stream so - * confirmed reverse swaps can be auto-claimed; it is never persisted. Events - * are delivered to `listener`. - * - * `fee_rate_sat_per_vb` is the fee rate used for automatic claim transactions. - * Bitkit owns fee estimation and should pass its current recommended rate; when - * `None`, a conservative built-in default is used. To auto-claim at an updated - * fee rate, call this again (it restarts the stream). - * - * `accept_zero_conf` claims reverse swaps as soon as Boltz's lockup enters the - * mempool instead of waiting for its confirmation. That reveals the preimage - * against an unconfirmed lockup: if the lockup were replaced before - * confirming, the user would be debited on Lightning without receiving - * onchain funds. Pass `false` to keep the confirmation-gated default. - */ -@Throws(BoltzException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `boltzStartSwapUpdates`(`network`: BoltzNetwork, `listener`: BoltzEventListener, `mnemonic`: kotlin.String, `bip39Passphrase`: kotlin.String?, `feeRateSatPerVb`: kotlin.Double?, `acceptZeroConf`: kotlin.Boolean) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_start_swap_updates( - FfiConverterTypeBoltzNetwork.lower(`network`), - FfiConverterTypeBoltzEventListener.lower(`listener`), - FfiConverterString.lower(`mnemonic`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterOptionalDouble.lower(`feeRateSatPerVb`), - FfiConverterBoolean.lower(`acceptZeroConf`), - ), - { 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 - BoltzExceptionErrorHandler, - ) -} - -/** - * Stop the running Boltz updates stream, if any. - */ -public suspend fun `boltzStopSwapUpdates`() { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_boltz_stop_swap_updates( - ), - { 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 - UniffiNullRustCallStatusErrorHandler, - ) -} - -@Throws(SweepException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `broadcastSweepTransaction`(`psbt`: kotlin.String, `mnemonicPhrase`: kotlin.String, `network`: Network?, `bip39Passphrase`: kotlin.String?, `electrumUrl`: kotlin.String): SweepResult { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_broadcast_sweep_transaction( - FfiConverterString.lower(`psbt`), - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterString.lower(`electrumUrl`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeSweepResult.lift(it) }, - // Error FFI converter - SweepExceptionErrorHandler, - ) -} - -public fun `calculateChannelLiquidityOptions`(`params`: ChannelLiquidityParams): ChannelLiquidityOptions { - return FfiConverterTypeChannelLiquidityOptions.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options( - FfiConverterTypeChannelLiquidityParams.lower(`params`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `cancelPubkyAuth`() { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_cancel_pubky_auth( - ), - { 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 - PubkyExceptionErrorHandler, - ) -} - -@Throws(SweepException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `checkSweepableBalances`(`mnemonicPhrase`: kotlin.String, `network`: Network?, `bip39Passphrase`: kotlin.String?, `electrumUrl`: kotlin.String): SweepableBalances { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_check_sweepable_balances( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterString.lower(`electrumUrl`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeSweepableBalances.lift(it) }, - // Error FFI converter - SweepExceptionErrorHandler, - ) -} - -/** - * Decode closed channels from Core's canonical backup JSON. - */ -@Throws(ActivityException::class) -public fun `closedChannelsFromJson`(`json`: kotlin.String): List { - return FfiConverterSequenceTypeClosedChannelDetails.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_closed_channels_from_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Serialize closed channels to Core's canonical backup JSON. Closed channels - * are not wallet-scoped, so no wallet-id normalization is applied. - */ -@Throws(ActivityException::class) -public fun `closedChannelsToJson`(`channels`: List): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_closed_channels_to_json( - FfiConverterSequenceTypeClosedChannelDetails.lower(`channels`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `completePubkyAuth`(): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_complete_pubky_auth( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(LnurlException::class) -public fun `createChannelRequestUrl`(`k1`: kotlin.String, `callback`: kotlin.String, `localNodeId`: kotlin.String, `isPrivate`: kotlin.Boolean, `cancel`: kotlin.Boolean): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(LnurlExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_create_channel_request_url( - FfiConverterString.lower(`k1`), - FfiConverterString.lower(`callback`), - FfiConverterString.lower(`localNodeId`), - FfiConverterBoolean.lower(`isPrivate`), - FfiConverterBoolean.lower(`cancel`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `createCjitEntry`(`channelSizeSat`: kotlin.ULong, `invoiceSat`: kotlin.ULong, `invoiceDescription`: kotlin.String, `nodeId`: kotlin.String, `channelExpiryWeeks`: kotlin.UInt, `options`: CreateCjitOptions?): IcJitEntry { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_create_cjit_entry( - FfiConverterULong.lower(`channelSizeSat`), - FfiConverterULong.lower(`invoiceSat`), - FfiConverterString.lower(`invoiceDescription`), - FfiConverterString.lower(`nodeId`), - FfiConverterUInt.lower(`channelExpiryWeeks`), - FfiConverterOptionalTypeCreateCjitOptions.lower(`options`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeICJitEntry.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `createOrder`(`lspBalanceSat`: kotlin.ULong, `channelExpiryWeeks`: kotlin.UInt, `options`: CreateOrderOptions?): IBtOrder { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_create_order( - FfiConverterULong.lower(`lspBalanceSat`), - FfiConverterUInt.lower(`channelExpiryWeeks`), - FfiConverterOptionalTypeCreateOrderOptions.lower(`options`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBtOrder.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(LnurlException::class) -public fun `createWithdrawCallbackUrl`(`k1`: kotlin.String, `callback`: kotlin.String, `paymentRequest`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(LnurlExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_create_withdraw_callback_url( - FfiConverterString.lower(`k1`), - FfiConverterString.lower(`callback`), - FfiConverterString.lower(`paymentRequest`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(DecodingException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `decode`(`invoice`: kotlin.String): Scanner { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_decode( - FfiConverterString.lower(`invoice`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeScanner.lift(it) }, - // Error FFI converter - DecodingExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `deleteActivitiesByWalletId`(`walletId`: kotlin.String): kotlin.UInt { - return FfiConverterUInt.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_delete_activities_by_wallet_id( - FfiConverterString.lower(`walletId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `deleteActivityById`(`walletId`: kotlin.String, `activityId`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_delete_activity_by_id( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`activityId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `deletePreActivityMetadata`(`walletId`: kotlin.String, `paymentId`: kotlin.String) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_delete_pre_activity_metadata( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`paymentId`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `deleteTransactionDetails`(`walletId`: kotlin.String, `txId`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_delete_transaction_details( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`txId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `deriveBitcoinAddress`(`mnemonicPhrase`: kotlin.String, `derivationPathStr`: kotlin.String?, `network`: Network?, `bip39Passphrase`: kotlin.String?): GetAddressResponse { - return FfiConverterTypeGetAddressResponse.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_derive_bitcoin_address( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalString.lower(`derivationPathStr`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `deriveBitcoinAddresses`(`mnemonicPhrase`: kotlin.String, `derivationPathStr`: kotlin.String?, `network`: Network?, `bip39Passphrase`: kotlin.String?, `isChange`: kotlin.Boolean?, `startIndex`: kotlin.UInt?, `count`: kotlin.UInt?): GetAddressesResponse { - return FfiConverterTypeGetAddressesResponse.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_derive_bitcoin_addresses( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalString.lower(`derivationPathStr`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterOptionalBoolean.lower(`isChange`), - FfiConverterOptionalUInt.lower(`startIndex`), - FfiConverterOptionalUInt.lower(`count`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `deriveOnchainDescriptor`(`mnemonicPhrase`: kotlin.String, `network`: Network, `bip39Passphrase`: kotlin.String?, `accountType`: AccountType, `accountIndex`: kotlin.UInt): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_derive_onchain_descriptor( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterTypeAccountType.lower(`accountType`), - FfiConverterUInt.lower(`accountIndex`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `derivePrivateKey`(`mnemonicPhrase`: kotlin.String, `derivationPathStr`: kotlin.String?, `network`: Network?, `bip39Passphrase`: kotlin.String?): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_derive_private_key( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalString.lower(`derivationPathStr`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(PubkyException::class) -public fun `derivePubkySecretKey`(`seed`: kotlin.ByteArray): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(PubkyExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_derive_pubky_secret_key( - FfiConverterByteArray.lower(`seed`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Derive a stable, cross-platform `wallet_id` for a hardware (watch-only) wallet - * from its account extended public keys. See `derive_wallet_id` in the activity - * module for the exact derivation. Order of `xpubs` does not matter. Returns an - * error if `device_type` is blank or `xpubs` is empty / has a blank entry. - */ -@Throws(ActivityException::class) -public fun `deriveWalletId`(`deviceType`: kotlin.String, `xpubs`: List): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_derive_wallet_id( - FfiConverterString.lower(`deviceType`), - FfiConverterSequenceString.lower(`xpubs`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `entropyToMnemonic`(`entropy`: kotlin.ByteArray): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_entropy_to_mnemonic( - FfiConverterByteArray.lower(`entropy`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `estimateOrderFee`(`lspBalanceSat`: kotlin.ULong, `channelExpiryWeeks`: kotlin.UInt, `options`: CreateOrderOptions?): IBtEstimateFeeResponse { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_estimate_order_fee( - FfiConverterULong.lower(`lspBalanceSat`), - FfiConverterUInt.lower(`channelExpiryWeeks`), - FfiConverterOptionalTypeCreateOrderOptions.lower(`options`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBtEstimateFeeResponse.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `estimateOrderFeeFull`(`lspBalanceSat`: kotlin.ULong, `channelExpiryWeeks`: kotlin.UInt, `options`: CreateOrderOptions?): IBtEstimateFeeResponse2 { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_estimate_order_fee_full( - FfiConverterULong.lower(`lspBalanceSat`), - FfiConverterUInt.lower(`channelExpiryWeeks`), - FfiConverterOptionalTypeCreateOrderOptions.lower(`options`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBtEstimateFeeResponse2.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `fetchPubkyContacts`(`publicKey`: kotlin.String): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_contacts( - FfiConverterString.lower(`publicKey`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `fetchPubkyFile`(`uri`: kotlin.String): kotlin.ByteArray { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_file( - FfiConverterString.lower(`uri`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterByteArray.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `fetchPubkyFileString`(`uri`: kotlin.String): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_file_string( - FfiConverterString.lower(`uri`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `fetchPubkyProfile`(`publicKey`: kotlin.String): PubkyProfile { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_fetch_pubky_profile( - FfiConverterString.lower(`publicKey`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypePubkyProfile.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -/** - * Combine and finalize a signed PSBT, then extract its broadcastable transaction. - */ -@Throws(PsbtCompletionException::class) -public fun `finalizePsbt`(`originalPsbt`: kotlin.String, `signedPsbt`: kotlin.String): CompletedTransaction { - return FfiConverterTypeCompletedTransaction.lift(uniffiRustCallWithError(PsbtCompletionExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_finalize_psbt( - FfiConverterString.lower(`originalPsbt`), - FfiConverterString.lower(`signedPsbt`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `generateMnemonic`(`wordCount`: WordCount?): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_generate_mnemonic( - FfiConverterOptionalTypeWordCount.lower(`wordCount`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getActivities`(`walletId`: kotlin.String?, `filter`: ActivityFilter?, `txType`: PaymentType?, `tags`: List?, `search`: kotlin.String?, `minDate`: kotlin.ULong?, `maxDate`: kotlin.ULong?, `limit`: kotlin.UInt?, `sortDirection`: SortDirection?): List { - return FfiConverterSequenceTypeActivity.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_activities( - FfiConverterOptionalString.lower(`walletId`), - FfiConverterOptionalTypeActivityFilter.lower(`filter`), - FfiConverterOptionalTypePaymentType.lower(`txType`), - FfiConverterOptionalSequenceString.lower(`tags`), - FfiConverterOptionalString.lower(`search`), - FfiConverterOptionalULong.lower(`minDate`), - FfiConverterOptionalULong.lower(`maxDate`), - FfiConverterOptionalUInt.lower(`limit`), - FfiConverterOptionalTypeSortDirection.lower(`sortDirection`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getActivitiesByTag`(`walletId`: kotlin.String?, `tag`: kotlin.String, `limit`: kotlin.UInt?, `sortDirection`: SortDirection?): List { - return FfiConverterSequenceTypeActivity.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_activities_by_tag( - FfiConverterOptionalString.lower(`walletId`), - FfiConverterString.lower(`tag`), - FfiConverterOptionalUInt.lower(`limit`), - FfiConverterOptionalTypeSortDirection.lower(`sortDirection`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Activity tags for a single wallet scope, or every scope when `wallet_id` is `None`. - */ -@Throws(ActivityException::class) -public fun `getActivitiesTags`(`walletId`: kotlin.String?): List { - return FfiConverterSequenceTypeActivityTags.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_activities_tags( - FfiConverterOptionalString.lower(`walletId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getActivityById`(`walletId`: kotlin.String, `activityId`: kotlin.String): Activity? { - return FfiConverterOptionalTypeActivity.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_activity_by_id( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`activityId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getActivityByTxId`(`walletId`: kotlin.String, `txId`: kotlin.String): OnchainActivity? { - return FfiConverterOptionalTypeOnchainActivity.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_activity_by_tx_id( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`txId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getAllActivitiesTags`(): List { - return FfiConverterSequenceTypeActivityTags.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_all_activities_tags( - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getAllClosedChannels`(`sortDirection`: SortDirection?): List { - return FfiConverterSequenceTypeClosedChannelDetails.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_all_closed_channels( - FfiConverterOptionalTypeSortDirection.lower(`sortDirection`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getAllPreActivityMetadata`(): List { - return FfiConverterSequenceTypePreActivityMetadata.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_all_pre_activity_metadata( - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getAllTransactionDetails`(): List { - return FfiConverterSequenceTypeTransactionDetails.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_all_transaction_details( - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getAllUniqueTags`(): List { - return FfiConverterSequenceString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_all_unique_tags( - uniffiRustCallStatus, - ) - }) -} - -public fun `getBip39Suggestions`(`partialWord`: kotlin.String, `limit`: kotlin.UInt): List { - return FfiConverterSequenceString.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_bip39_suggestions( - FfiConverterString.lower(`partialWord`), - FfiConverterUInt.lower(`limit`), - uniffiRustCallStatus, - ) - }) -} - -public fun `getBip39Wordlist`(): List { - return FfiConverterSequenceString.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_bip39_wordlist( - uniffiRustCallStatus, - ) - }) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getCjitEntries`(`entryIds`: List?, `filter`: CJitStateEnum?, `refresh`: kotlin.Boolean): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_cjit_entries( - FfiConverterOptionalSequenceString.lower(`entryIds`), - FfiConverterOptionalTypeCJitStateEnum.lower(`filter`), - FfiConverterBoolean.lower(`refresh`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeICJitEntry.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `getClosedChannelById`(`channelId`: kotlin.String): ClosedChannelDetails? { - return FfiConverterOptionalTypeClosedChannelDetails.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_closed_channel_by_id( - FfiConverterString.lower(`channelId`), - uniffiRustCallStatus, - ) - }) -} - -/** - * The default address gap limit used by account scanning and the xpub watcher. - * Exposed so platforms reference one source of truth instead of hardcoding 20. - */ -public fun `getDefaultGapLimit`(): kotlin.UInt { - return FfiConverterUInt.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_default_gap_limit( - uniffiRustCallStatus, - ) - }) -} - -public fun `getDefaultLspBalance`(`params`: DefaultLspBalanceParams): kotlin.ULong { - return FfiConverterULong.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_default_lsp_balance( - FfiConverterTypeDefaultLspBalanceParams.lower(`params`), - uniffiRustCallStatus, - ) - }) -} - -public fun `getDefaultWalletId`(): kotlin.String { - return FfiConverterString.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_default_wallet_id( - uniffiRustCallStatus, - ) - }) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getGift`(`giftId`: kotlin.String): IGift { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_gift( - FfiConverterString.lower(`giftId`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIGift.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getInfo`(`refresh`: kotlin.Boolean?): IBtInfo? { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_info( - FfiConverterOptionalBoolean.lower(`refresh`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterOptionalTypeIBtInfo.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(LnurlException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getLnurlInvoice`(`address`: kotlin.String, `amountSatoshis`: kotlin.ULong): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_lnurl_invoice( - FfiConverterString.lower(`address`), - FfiConverterULong.lower(`amountSatoshis`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - LnurlExceptionErrorHandler, - ) -} - -@Throws(LnurlException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getLnurlInvoiceForPayData`(`data`: LnurlPayData, `amountMsats`: kotlin.ULong, `comment`: kotlin.String?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_lnurl_invoice_for_pay_data( - FfiConverterTypeLnurlPayData.lower(`data`), - FfiConverterULong.lower(`amountMsats`), - FfiConverterOptionalString.lower(`comment`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - LnurlExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getMinZeroConfTxFee`(`orderId`: kotlin.String): IBt0ConfMinTxFeeWindow { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_min_zero_conf_tx_fee( - FfiConverterString.lower(`orderId`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBt0ConfMinTxFeeWindow.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getOrders`(`orderIds`: List?, `filter`: BtOrderState2?, `refresh`: kotlin.Boolean): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_orders( - FfiConverterOptionalSequenceString.lower(`orderIds`), - FfiConverterOptionalTypeBtOrderState2.lower(`filter`), - FfiConverterBoolean.lower(`refresh`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeIBtOrder.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `getPayment`(`paymentId`: kotlin.String): IBtBolt11Invoice { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_get_payment( - FfiConverterString.lower(`paymentId`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBtBolt11Invoice.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `getPreActivityMetadata`(`walletId`: kotlin.String, `searchKey`: kotlin.String, `searchByAddress`: kotlin.Boolean): PreActivityMetadata? { - return FfiConverterOptionalTypePreActivityMetadata.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_pre_activity_metadata( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`searchKey`), - FfiConverterBoolean.lower(`searchByAddress`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Pre-activity metadata for a single wallet scope, or every scope when `wallet_id` is `None`. - */ -@Throws(ActivityException::class) -public fun `getPreActivityMetadataList`(`walletId`: kotlin.String?): List { - return FfiConverterSequenceTypePreActivityMetadata.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_pre_activity_metadata_list( - FfiConverterOptionalString.lower(`walletId`), - uniffiRustCallStatus, - ) - }) -} - -/** - * The hardware-wallet models supported by Bitkit and their available transports. - */ -public fun `getSupportedHardwareWallets`(): List { - return FfiConverterSequenceTypeSupportedHardwareWallet.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_supported_hardware_wallets( - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getTags`(`walletId`: kotlin.String, `activityId`: kotlin.String): List { - return FfiConverterSequenceString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_tags( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`activityId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `getTransactionDetails`(`walletId`: kotlin.String, `txId`: kotlin.String): TransactionDetails? { - return FfiConverterOptionalTypeTransactionDetails.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_get_transaction_details( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`txId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `giftOrder`(`clientNodeId`: kotlin.String, `code`: kotlin.String): IGift { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_gift_order( - FfiConverterString.lower(`clientNodeId`), - FfiConverterString.lower(`code`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIGift.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `giftPay`(`invoice`: kotlin.String): IGift { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_gift_pay( - FfiConverterString.lower(`invoice`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIGift.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(DbException::class) -public fun `initDb`(`basePath`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(DbExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_init_db( - FfiConverterString.lower(`basePath`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `insertActivity`(`activity`: Activity) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_insert_activity( - FfiConverterTypeActivity.lower(`activity`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `isAddressUsed`(`address`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_is_address_used( - FfiConverterString.lower(`address`), - uniffiRustCallStatus, - ) - }) -} - -public fun `isValidBip39Word`(`word`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_is_valid_bip39_word( - FfiConverterString.lower(`word`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(LnurlException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `lnurlAuth`(`domain`: kotlin.String, `k1`: kotlin.String, `callback`: kotlin.String, `bip32Mnemonic`: kotlin.String, `network`: Network?, `bip39Passphrase`: kotlin.String?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_lnurl_auth( - FfiConverterString.lower(`domain`), - FfiConverterString.lower(`k1`), - FfiConverterString.lower(`callback`), - FfiConverterString.lower(`bip32Mnemonic`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - LnurlExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `markActivityAsSeen`(`walletId`: kotlin.String, `activityId`: kotlin.String, `seenAt`: kotlin.ULong) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_mark_activity_as_seen( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`activityId`), - FfiConverterULong.lower(`seenAt`), - uniffiRustCallStatus, - ) - } -} - -/** - * Inject the default wallet id into a serialized `activities` slice from an - * app backup envelope, preserving the app's original JSON shape. Handles the - * Android, iOS and canonical `Activity`-union encodings. - */ -@Throws(ActivityException::class) -public fun `migrateBackupActivitiesJson`(`json`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_migrate_backup_activities_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Inject the default wallet id into a serialized `activityTags` slice. - */ -@Throws(ActivityException::class) -public fun `migrateBackupActivityTagsJson`(`json`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_migrate_backup_activity_tags_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Inject the default wallet id into a serialized pre-activity metadata slice. - */ -@Throws(ActivityException::class) -public fun `migrateBackupPreActivityMetadataJson`(`json`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_migrate_backup_pre_activity_metadata_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Inject the default wallet id into a serialized transaction-details slice. - * Transaction details are not in the current backup envelopes, but the helper - * is provided for parity if they are ever added. - */ -@Throws(ActivityException::class) -public fun `migrateBackupTransactionDetailsJson`(`json`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_migrate_backup_transaction_details_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `mnemonicToEntropy`(`mnemonicPhrase`: kotlin.String): kotlin.ByteArray { - return FfiConverterByteArray.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_mnemonic_to_entropy( - FfiConverterString.lower(`mnemonicPhrase`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `mnemonicToSeed`(`mnemonicPhrase`: kotlin.String, `passphrase`: kotlin.String?): kotlin.ByteArray { - return FfiConverterByteArray.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_mnemonic_to_seed( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalString.lower(`passphrase`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Broadcast a signed raw transaction via Electrum. - * - * Takes a hex-encoded serialized transaction and an Electrum server URL. - * Returns the transaction ID on success. - */ -@Throws(BroadcastException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `onchainBroadcastRawTx`(`serializedTx`: kotlin.String, `electrumUrl`: kotlin.String): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_onchain_broadcast_raw_tx( - FfiConverterString.lower(`serializedTx`), - FfiConverterString.lower(`electrumUrl`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BroadcastExceptionErrorHandler, - ) -} - -/** - * Compose a transaction for multiple fee rates, returning one PSBT per rate. - * - * Creates a BDK wallet from the extended key, syncs via Electrum, then - * builds PSBTs using BDK's TxBuilder. The PSBTs include BIP32 derivation - * paths (when fingerprint is provided) and are ready for signing by any - * PSBT-compatible signer (Trezor, Ledger, software wallet, etc.). - */ -public suspend fun `onchainComposeTransaction`(`params`: ComposeParams): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_onchain_compose_transaction( - FfiConverterTypeComposeParams.lower(`params`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeComposeResult.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) -} - -/** - * Query account information for an extended public key via Electrum. - */ -@Throws(AccountInfoException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `onchainGetAccountInfo`(`extendedKey`: kotlin.String, `electrumUrl`: kotlin.String, `network`: Network?, `gapLimit`: kotlin.UInt?, `scriptType`: AccountType?): AccountInfoResult { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_account_info( - FfiConverterString.lower(`extendedKey`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalUInt.lower(`gapLimit`), - FfiConverterOptionalTypeAccountType.lower(`scriptType`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeAccountInfoResult.lift(it) }, - // Error FFI converter - AccountInfoExceptionErrorHandler, - ) -} - -/** - * Query balance and UTXOs for a single Bitcoin address via Electrum. - */ -@Throws(AccountInfoException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `onchainGetAddressInfo`(`address`: kotlin.String, `electrumUrl`: kotlin.String, `network`: Network?): SingleAddressInfoResult { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_address_info( - FfiConverterString.lower(`address`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterOptionalTypeNetwork.lower(`network`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeSingleAddressInfoResult.lift(it) }, - // Error FFI converter - AccountInfoExceptionErrorHandler, - ) -} - -/** - * Get full details for a single transaction by txid. - */ -@Throws(AccountInfoException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `onchainGetTransactionDetail`(`extendedKey`: kotlin.String, `electrumUrl`: kotlin.String, `txid`: kotlin.String, `network`: Network?, `scriptType`: AccountType?): TransactionDetail { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_transaction_detail( - FfiConverterString.lower(`extendedKey`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterString.lower(`txid`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalTypeAccountType.lower(`scriptType`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTransactionDetail.lift(it) }, - // Error FFI converter - AccountInfoExceptionErrorHandler, - ) -} - -/** - * Query transaction history and balance for an extended public key via Electrum. - */ -@Throws(AccountInfoException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `onchainGetTransactionHistory`(`extendedKey`: kotlin.String, `electrumUrl`: kotlin.String, `network`: Network?, `scriptType`: AccountType?): TransactionHistoryResult { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_onchain_get_transaction_history( - FfiConverterString.lower(`extendedKey`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalTypeAccountType.lower(`scriptType`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTransactionHistoryResult.lift(it) }, - // Error FFI converter - AccountInfoExceptionErrorHandler, - ) -} - -/** - * 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( - UniffiLib.uniffi_bitkitcore_fn_func_open_channel( - FfiConverterString.lower(`orderId`), - FfiConverterString.lower(`connectionString`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBtOrder.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class) -public fun `parsePubkyAuthUrl`(`authUrl`: kotlin.String): PubkyAuthDetails { - return FfiConverterTypePubkyAuthDetails.lift(uniffiRustCallWithError(PubkyExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_parse_pubky_auth_url( - FfiConverterString.lower(`authUrl`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Parse Passport's generic JSON account export from a decoded `ur:bytes` payload. - * - * Parses BIP44, BIP49, BIP84, and BIP86 single-signature accounts. BIP48 - * multisig entries are ignored. - */ -@Throws(UrException::class) -public fun `passportParseAccountExport`(`data`: kotlin.ByteArray): PassportAccountExport { - return FfiConverterTypePassportAccountExport.lift(uniffiRustCallWithError(UrExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_passport_parse_account_export( - FfiConverterByteArray.lower(`data`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Decode pre-activity metadata from Core's canonical backup JSON, defaulting a - * missing/empty wallet id to [`DEFAULT_WALLET_ID`]. - */ -@Throws(ActivityException::class) -public fun `preActivityMetadataFromJson`(`json`: kotlin.String): List { - return FfiConverterSequenceTypePreActivityMetadata.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_pre_activity_metadata_from_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Serialize pre-activity metadata to Core's canonical backup JSON. - */ -@Throws(ActivityException::class) -public fun `preActivityMetadataToJson`(`metadata`: List): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_pre_activity_metadata_to_json( - FfiConverterSequenceTypePreActivityMetadata.lower(`metadata`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(SweepException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `prepareLegacyRnNativeSegwitRecoverySweep`(`mnemonicPhrase`: kotlin.String, `network`: Network?, `electrumUrl`: kotlin.String, `destinationAddress`: kotlin.String, `feeRateSatsPerVbyte`: kotlin.UInt?, `indexLimit`: kotlin.UInt, `bip39Passphrase`: kotlin.String?): LegacyRnCloseRecoverySweepPreview { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_prepare_legacy_rn_native_segwit_recovery_sweep( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterString.lower(`destinationAddress`), - FfiConverterOptionalUInt.lower(`feeRateSatsPerVbyte`), - FfiConverterUInt.lower(`indexLimit`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeLegacyRnCloseRecoverySweepPreview.lift(it) }, - // Error FFI converter - SweepExceptionErrorHandler, - ) -} - -@Throws(SweepException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `prepareSweepTransaction`(`mnemonicPhrase`: kotlin.String, `network`: Network?, `bip39Passphrase`: kotlin.String?, `electrumUrl`: kotlin.String, `destinationAddress`: kotlin.String, `feeRateSatsPerVbyte`: kotlin.UInt?): SweepTransactionPreview { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_prepare_sweep_transaction( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterString.lower(`destinationAddress`), - FfiConverterOptionalUInt.lower(`feeRateSatsPerVbyte`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeSweepTransactionPreview.lift(it) }, - // Error FFI converter - SweepExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class) -public fun `pubkyPublicKeyFromSecret`(`secretKeyHex`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(PubkyExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_pubky_public_key_from_secret( - FfiConverterString.lower(`secretKeyHex`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `pubkyPutWithSecretKey`(`secretKeyHex`: kotlin.String, `path`: kotlin.String, `content`: kotlin.ByteArray) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_pubky_put_with_secret_key( - FfiConverterString.lower(`secretKeyHex`), - FfiConverterString.lower(`path`), - FfiConverterByteArray.lower(`content`), - ), - { 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 - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `pubkySessionDelete`(`sessionSecret`: kotlin.String, `path`: kotlin.String) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_pubky_session_delete( - FfiConverterString.lower(`sessionSecret`), - FfiConverterString.lower(`path`), - ), - { 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 - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `pubkySessionList`(`sessionSecret`: kotlin.String, `dirPath`: kotlin.String): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_pubky_session_list( - FfiConverterString.lower(`sessionSecret`), - FfiConverterString.lower(`dirPath`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `pubkySessionPut`(`sessionSecret`: kotlin.String, `path`: kotlin.String, `content`: kotlin.ByteArray) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_pubky_session_put( - FfiConverterString.lower(`sessionSecret`), - FfiConverterString.lower(`path`), - FfiConverterByteArray.lower(`content`), - ), - { 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 - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `pubkySignIn`(`secretKeyHex`: kotlin.String): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_pubky_sign_in( - FfiConverterString.lower(`secretKeyHex`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `pubkySignUp`(`secretKeyHex`: kotlin.String, `homeserverPublicKeyZ32`: kotlin.String, `signupCode`: kotlin.String?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_pubky_sign_up( - FfiConverterString.lower(`secretKeyHex`), - FfiConverterString.lower(`homeserverPublicKeyZ32`), - FfiConverterOptionalString.lower(`signupCode`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -/** - * Refresh all active CJIT entries in the database with latest data from the LSP - */ -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `refreshActiveCjitEntries`(): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_refresh_active_cjit_entries( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeICJitEntry.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -/** - * Refresh all active orders in the database with latest data from the LSP - */ -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `refreshActiveOrders`(): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_refresh_active_orders( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeIBtOrder.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `registerDevice`(`deviceToken`: kotlin.String, `publicKey`: kotlin.String, `features`: List, `nodeId`: kotlin.String, `isoTimestamp`: kotlin.String, `signature`: kotlin.String, `isProduction`: kotlin.Boolean?, `customUrl`: kotlin.String?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_register_device( - FfiConverterString.lower(`deviceToken`), - FfiConverterString.lower(`publicKey`), - FfiConverterSequenceString.lower(`features`), - FfiConverterString.lower(`nodeId`), - FfiConverterString.lower(`isoTimestamp`), - FfiConverterString.lower(`signature`), - FfiConverterOptionalBoolean.lower(`isProduction`), - FfiConverterOptionalString.lower(`customUrl`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `regtestCloseChannel`(`fundingTxId`: kotlin.String, `vout`: kotlin.UInt, `forceCloseAfterS`: kotlin.ULong?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_regtest_close_channel( - FfiConverterString.lower(`fundingTxId`), - FfiConverterUInt.lower(`vout`), - FfiConverterOptionalULong.lower(`forceCloseAfterS`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `regtestDeposit`(`address`: kotlin.String, `amountSat`: kotlin.ULong?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_regtest_deposit( - FfiConverterString.lower(`address`), - FfiConverterOptionalULong.lower(`amountSat`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `regtestGetPayment`(`paymentId`: kotlin.String): IBtBolt11Invoice { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_regtest_get_payment( - FfiConverterString.lower(`paymentId`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeIBtBolt11Invoice.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `regtestMine`(`count`: kotlin.UInt?) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_regtest_mine( - FfiConverterOptionalUInt.lower(`count`), - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `regtestPay`(`invoice`: kotlin.String, `amountSat`: kotlin.ULong?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_regtest_pay( - FfiConverterString.lower(`invoice`), - FfiConverterOptionalULong.lower(`amountSat`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `removeClosedChannelById`(`channelId`: kotlin.String): kotlin.Boolean { - return FfiConverterBoolean.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_remove_closed_channel_by_id( - FfiConverterString.lower(`channelId`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(ActivityException::class) -public fun `removePreActivityMetadataTags`(`walletId`: kotlin.String, `paymentId`: kotlin.String, `tags`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_remove_pre_activity_metadata_tags( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`paymentId`), - FfiConverterSequenceString.lower(`tags`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `removeTags`(`walletId`: kotlin.String, `activityId`: kotlin.String, `tags`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_remove_tags( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`activityId`), - FfiConverterSequenceString.lower(`tags`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `resetPreActivityMetadataTags`(`walletId`: kotlin.String, `paymentId`: kotlin.String) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_reset_pre_activity_metadata_tags( - FfiConverterString.lower(`walletId`), - FfiConverterString.lower(`paymentId`), - uniffiRustCallStatus, - ) - } -} - -@Throws(PubkyException::class) -public fun `resolvePubkyUrl`(`uri`: kotlin.String): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(PubkyExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_resolve_pubky_url( - FfiConverterString.lower(`uri`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(SweepException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `scanLegacyRnNativeSegwitRecoveryFunds`(`mnemonicPhrase`: kotlin.String, `network`: Network?, `electrumUrl`: kotlin.String, `indexLimit`: kotlin.UInt, `bip39Passphrase`: kotlin.String?): LegacyRnCloseRecoveryScanResult { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_scan_legacy_rn_native_segwit_recovery_funds( - FfiConverterString.lower(`mnemonicPhrase`), - FfiConverterOptionalTypeNetwork.lower(`network`), - FfiConverterString.lower(`electrumUrl`), - FfiConverterUInt.lower(`indexLimit`), - FfiConverterOptionalString.lower(`bip39Passphrase`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeLegacyRnCloseRecoveryScanResult.lift(it) }, - // Error FFI converter - SweepExceptionErrorHandler, - ) -} - -@Throws(OnchainException::class) -public fun `serializedExtendedPubkey`(`xpub`: kotlin.String): kotlin.ByteArray { - return FfiConverterByteArray.lift(uniffiRustCallWithError(OnchainExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_serialized_extended_pubkey( - FfiConverterString.lower(`xpub`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(PubkyException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `startPubkyAuth`(`caps`: kotlin.String): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_start_pubky_auth( - FfiConverterString.lower(`caps`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - PubkyExceptionErrorHandler, - ) -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `testNotification`(`deviceToken`: kotlin.String, `secretMessage`: kotlin.String, `notificationType`: kotlin.String?, `customUrl`: kotlin.String?): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_test_notification( - FfiConverterString.lower(`deviceToken`), - FfiConverterString.lower(`secretMessage`), - FfiConverterOptionalString.lower(`notificationType`), - FfiConverterOptionalString.lower(`customUrl`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - BlocktankExceptionErrorHandler, - ) -} - -/** - * Decode transaction details from Core's canonical backup JSON, defaulting a - * missing/empty wallet id to [`DEFAULT_WALLET_ID`]. - */ -@Throws(ActivityException::class) -public fun `transactionDetailsFromJson`(`json`: kotlin.String): List { - return FfiConverterSequenceTypeTransactionDetails.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_transaction_details_from_json( - FfiConverterString.lower(`json`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Serialize transaction details to Core's canonical backup JSON. - */ -@Throws(ActivityException::class) -public fun `transactionDetailsToJson`(`details`: List): kotlin.String { - return FfiConverterString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_transaction_details_to_json( - FfiConverterSequenceTypeTransactionDetails.lower(`details`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Convert an account type to its corresponding Trezor script type. - */ -public fun `trezorAccountTypeToScriptType`(`accountType`: AccountType): TrezorScriptType { - return FfiConverterTypeTrezorScriptType.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_trezor_account_type_to_script_type( - FfiConverterTypeAccountType.lower(`accountType`), - uniffiRustCallStatus, - ) - }) -} - -/** - * Clear stored Bluetooth pairing credentials for a specific Trezor device. - * - * This removes any stored credentials, requiring re-pairing on the next connection. - * Useful when a device has been reset or credentials have become stale. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorClearCredentials`(`deviceId`: kotlin.String) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_clear_credentials( - FfiConverterString.lower(`deviceId`), - ), - { 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 - TrezorExceptionErrorHandler, - ) -} - -/** - * Connect to a Trezor device by its ID. - * - * For Bluetooth devices, this will use stored credentials if available, - * or trigger pairing if needed. - * - * `selection` chooses which wallet to open. On THP devices (Safe 5/7) it is - * bound to the session at creation, so it must be supplied on every connect; - * there is no separate "set passphrase" step and nothing is cached between - * calls. Reconnect with a different `selection` to switch wallets. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorConnect`(`deviceId`: kotlin.String, `selection`: WalletSelection): TrezorFeatures { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_connect( - FfiConverterString.lower(`deviceId`), - FfiConverterTypeWalletSelection.lower(`selection`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorFeatures.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Disconnect from the currently connected Trezor device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorDisconnect`() { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_disconnect( - ), - { 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 - TrezorExceptionErrorHandler, - ) -} - -/** - * Get a Bitcoin address from the connected Trezor device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorGetAddress`(`params`: TrezorGetAddressParams): TrezorAddressResponse { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_address( - FfiConverterTypeTrezorGetAddressParams.lower(`params`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorAddressResponse.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Get information about the currently connected Trezor device. - */ -public suspend fun `trezorGetConnectedDevice`(): TrezorDeviceInfo? { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_connected_device( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterOptionalTypeTrezorDeviceInfo.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) -} - -/** - * Get the device's master root fingerprint as an 8-character hex string. - * - * Returns the root fingerprint in the standard descriptor format (e.g., "73c5da0a"). - * Requires a connected device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorGetDeviceFingerprint`(): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_device_fingerprint( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Get the cached features of the currently connected Trezor device. - * - * Returns the features that were obtained during `trezor_connect()`, without - * triggering any device interaction. Returns None if no device is connected. - */ -public suspend fun `trezorGetFeatures`(): TrezorFeatures? { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_features( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterOptionalTypeTrezorFeatures.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) -} - -/** - * Get a public key (xpub) from the connected Trezor device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorGetPublicKey`(`params`: TrezorGetPublicKeyParams): TrezorPublicKeyResponse { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_get_public_key( - FfiConverterTypeTrezorGetPublicKeyParams.lower(`params`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorPublicKeyResponse.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Initialize the Trezor manager with optional credential storage. - * - * The credential_path is used to persist Bluetooth pairing credentials, - * allowing reconnection without re-pairing. - * - * NOTE: On Android, you must call the native initBle() function first! - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorInitialize`(`credentialPath`: kotlin.String?) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_initialize( - FfiConverterOptionalString.lower(`credentialPath`), - ), - { 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 - TrezorExceptionErrorHandler, - ) -} - -/** - * Check if BLE has been initialized. - * - * On Android: Returns true if BluetoothInit.nativeInit() was called successfully. - * On other platforms: Always returns true (BLE works natively). - */ -public fun `trezorIsBleAvailable`(): kotlin.Boolean { - return FfiConverterBoolean.lift(uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_trezor_is_ble_available( - uniffiRustCallStatus, - ) - }) -} - -/** - * Check if a Trezor device is currently connected. - */ -public suspend fun `trezorIsConnected`(): kotlin.Boolean { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_is_connected( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_i8(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_i8(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_i8(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_i8(future) }, - // lift function - { FfiConverterBoolean.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) -} - -/** - * Check if the Trezor manager is initialized. - */ -public suspend fun `trezorIsInitialized`(): kotlin.Boolean { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_is_initialized( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_i8(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_i8(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_i8(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_i8(future) }, - // lift function - { FfiConverterBoolean.lift(it) }, - // Error FFI converter - UniffiNullRustCallStatusErrorHandler, - ) -} - -/** - * List previously discovered devices without triggering a new scan. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorListDevices`(): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_list_devices( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeTrezorDeviceInfo.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Refresh features from the currently connected Trezor device. - * - * This performs a single explicit device request and updates the connected - * device's cached features. It does not start polling. Returns `NotConnected` - * if there is no connected device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorRefreshFeatures`(): TrezorFeatures { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_refresh_features( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorFeatures.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Scan for available Trezor devices (USB + Bluetooth). - * - * This performs an active Bluetooth scan and enumerates USB devices. - * Returns a list of discovered devices. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorScan`(): List { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_scan( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterSequenceTypeTrezorDeviceInfo.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Initialize the Trezor transport with a native callback implementation - * - * This must be called before any Trezor scanning/connection operations. - * The native layer (iOS/Android) must implement the TrezorTransportCallback interface. - */ -public fun `trezorSetTransportCallback`(`callback`: TrezorTransportCallback) { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_trezor_set_transport_callback( - FfiConverterTypeTrezorTransportCallback.lower(`callback`), - uniffiRustCallStatus, - ) - } -} - -/** - * Set the UI callback for handling PIN and passphrase requests. - * - * This should be called before connecting to a Trezor device if you want - * the library to handle PIN/passphrase requests via your UI instead of - * returning errors. - */ -public fun `trezorSetUiCallback`(`callback`: TrezorUiCallback) { - uniffiRustCall { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_trezor_set_ui_callback( - FfiConverterTypeTrezorUiCallback.lower(`callback`), - uniffiRustCallStatus, - ) - } -} - -/** - * Sign a message with the connected Trezor device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorSignMessage`(`params`: TrezorSignMessageParams): TrezorSignedMessageResponse { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_sign_message( - FfiConverterTypeTrezorSignMessageParams.lower(`params`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorSignedMessageResponse.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Sign a Bitcoin transaction with the connected Trezor device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorSignTx`(`params`: TrezorSignTxParams): TrezorSignedTx { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_sign_tx( - FfiConverterTypeTrezorSignTxParams.lower(`params`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorSignedTx.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Sign a Bitcoin transaction from a PSBT (base64-encoded). - * - * Parses the PSBT, extracts inputs/outputs/prev_txs, signs via the connected - * Trezor device, and returns the signed transaction. - * - * # Arguments - * * `psbt_base64` - Base64-encoded PSBT data - * * `network` - Bitcoin network type. Defaults to Bitcoin (mainnet) if None. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorSignTxFromPsbt`(`psbtBase64`: kotlin.String, `network`: TrezorCoinType?): TrezorSignedTx { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_sign_tx_from_psbt( - FfiConverterString.lower(`psbtBase64`), - FfiConverterOptionalTypeTrezorCoinType.lower(`network`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterTypeTrezorSignedTx.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -/** - * Verify a message signature with the connected Trezor device. - */ -@Throws(TrezorException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `trezorVerifyMessage`(`params`: TrezorVerifyMessageParams): kotlin.Boolean { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_trezor_verify_message( - FfiConverterTypeTrezorVerifyMessageParams.lower(`params`), - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_i8(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_i8(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_i8(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_i8(future) }, - // lift function - { FfiConverterBoolean.lift(it) }, - // Error FFI converter - TrezorExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `updateActivity`(`activityId`: kotlin.String, `activity`: Activity) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_update_activity( - FfiConverterString.lower(`activityId`), - FfiConverterTypeActivity.lower(`activity`), - uniffiRustCallStatus, - ) - } -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `updateBlocktankUrl`(`newUrl`: kotlin.String) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_update_blocktank_url( - FfiConverterString.lower(`newUrl`), - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `upsertActivities`(`activities`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_activities( - FfiConverterSequenceTypeActivity.lower(`activities`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `upsertActivity`(`activity`: Activity) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_activity( - FfiConverterTypeActivity.lower(`activity`), - uniffiRustCallStatus, - ) - } -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `upsertCjitEntries`(`entries`: List) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_upsert_cjit_entries( - FfiConverterSequenceTypeICJitEntry.lower(`entries`), - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `upsertClosedChannel`(`channel`: ClosedChannelDetails) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_closed_channel( - FfiConverterTypeClosedChannelDetails.lower(`channel`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `upsertClosedChannels`(`channels`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_closed_channels( - FfiConverterSequenceTypeClosedChannelDetails.lower(`channels`), - uniffiRustCallStatus, - ) - } -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `upsertInfo`(`info`: IBtInfo) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_upsert_info( - FfiConverterTypeIBtInfo.lower(`info`), - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `upsertLightningActivities`(`activities`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_lightning_activities( - FfiConverterSequenceTypeLightningActivity.lower(`activities`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `upsertOnchainActivities`(`activities`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_onchain_activities( - FfiConverterSequenceTypeOnchainActivity.lower(`activities`), - uniffiRustCallStatus, - ) - } -} - -@Throws(BlocktankException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `upsertOrders`(`orders`: List) { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_upsert_orders( - FfiConverterSequenceTypeIBtOrder.lower(`orders`), - ), - { 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 - BlocktankExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `upsertPreActivityMetadata`(`preActivityMetadata`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_pre_activity_metadata( - FfiConverterSequenceTypePreActivityMetadata.lower(`preActivityMetadata`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `upsertTags`(`activityTags`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_tags( - FfiConverterSequenceTypeActivityTags.lower(`activityTags`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `upsertTransactionDetails`(`detailsList`: List) { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_upsert_transaction_details( - FfiConverterSequenceTypeTransactionDetails.lower(`detailsList`), - uniffiRustCallStatus, - ) - } -} - -/** - * Encode a base64 PSBT as one cycle of `crypto-psbt` UR frames. - * - * The returned cycle contains every original fountain fragment once. Apps can - * loop it while rendering an animated QR. - */ -@Throws(UrException::class) -public fun `urEncodeCryptoPsbt`(`psbt`: kotlin.String, `maxFragmentLength`: kotlin.UInt): List { - return FfiConverterSequenceString.lift(uniffiRustCallWithError(UrExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_ur_encode_crypto_psbt( - FfiConverterString.lower(`psbt`), - FfiConverterUInt.lower(`maxFragmentLength`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `validateBitcoinAddress`(`address`: kotlin.String): ValidationResult { - return FfiConverterTypeValidationResult.lift(uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_validate_bitcoin_address( - FfiConverterString.lower(`address`), - uniffiRustCallStatus, - ) - }) -} - -@Throws(AddressException::class) -public fun `validateMnemonic`(`mnemonicPhrase`: kotlin.String) { - uniffiRustCallWithError(AddressExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_validate_mnemonic( - FfiConverterString.lower(`mnemonicPhrase`), - uniffiRustCallStatus, - ) - } -} - -@Throws(ActivityException::class) -public fun `wipeAllClosedChannels`() { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_wipe_all_closed_channels( - uniffiRustCallStatus, - ) - } -} - -@Throws(DbException::class, kotlin.coroutines.cancellation.CancellationException::class) -public suspend fun `wipeAllDatabases`(): kotlin.String { - return uniffiRustCallAsync( - UniffiLib.uniffi_bitkitcore_fn_func_wipe_all_databases( - ), - { future, callback, continuation -> UniffiLib.ffi_bitkitcore_rust_future_poll_rust_buffer(future, callback, continuation) }, - { future, continuation -> UniffiLib.ffi_bitkitcore_rust_future_complete_rust_buffer(future, continuation) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_free_rust_buffer(future) }, - { future -> UniffiLib.ffi_bitkitcore_rust_future_cancel_rust_buffer(future) }, - // lift function - { FfiConverterString.lift(it) }, - // Error FFI converter - DbExceptionErrorHandler, - ) -} - -@Throws(ActivityException::class) -public fun `wipeAllTransactionDetails`() { - uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus -> - UniffiLib.uniffi_bitkitcore_fn_func_wipe_all_transaction_details( - uniffiRustCallStatus, - ) - } -} - - -// Async support - -internal const val UNIFFI_RUST_FUTURE_POLL_READY = 0.toByte() -internal const val UNIFFI_RUST_FUTURE_POLL_MAYBE_READY = 1.toByte() - -internal val uniffiContinuationHandleMap = UniffiHandleMap>() - -// FFI type for Rust future continuations -internal suspend fun uniffiRustCallAsync( - rustFuture: Long, - pollFunc: (Long, UniffiRustFutureContinuationCallback, Long) -> Unit, - completeFunc: (Long, UniffiRustCallStatus) -> F, - freeFunc: (Long) -> Unit, - cancelFunc: (Long) -> Unit, - liftFunc: (F) -> T, - errorHandler: UniffiRustCallStatusErrorHandler -): T { - return withContext(Dispatchers.IO) { - try { - do { - val pollResult = suspendCancellableCoroutine { continuation -> - val handle = uniffiContinuationHandleMap.insert(continuation) - continuation.invokeOnCancellation { - cancelFunc(rustFuture) - } - pollFunc( - rustFuture, - uniffiRustFutureContinuationCallbackCallback, - handle - ) - } - } while (pollResult != UNIFFI_RUST_FUTURE_POLL_READY); - - return@withContext liftFunc( - uniffiRustCallWithError(errorHandler) { status -> completeFunc(rustFuture, status) } - ) - } finally { - freeFunc(rustFuture) - } - } -} - -internal object uniffiRustFutureContinuationCallbackCallback: UniffiRustFutureContinuationCallback { - override fun callback(data: Long, pollResult: Byte) { - uniffiContinuationHandleMap.remove(data).resume(pollResult) - } -} \ No newline at end of file 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 deleted file mode 100644 index 14bc3b40..00000000 --- a/bindings/android/lib/src/main/kotlin/com/synonym/bitkitcore/bitkitcore.common.kt +++ /dev/null @@ -1,5257 +0,0 @@ - - -@file:Suppress("RemoveRedundantBackticks") - -package com.synonym.bitkitcore - -// Common helper code. -// -// Ideally this would live in a separate .kt file where it can be unittested etc -// in isolation, and perhaps even published as a re-useable package. -// -// However, it's important that the details of how this helper code works (e.g. the -// way that different builtin types are passed across the FFI) exactly match what's -// expected by the Rust code on the other side of the interface. In practice right -// now that means coming from the exact some version of `uniffi` that was used to -// compile the Rust component. The easiest way to ensure this is to bundle the Kotlin -// helpers directly inline like we're doing here. - -public class InternalException(message: String) : kotlin.Exception(message) - -// Public interface members begin here. - - -// Interface implemented by anything that can contain an object reference. -// -// Such types expose a `destroy()` method that must be called to cleanly -// dispose of the contained objects. Failure to call this method may result -// in memory leaks. -// -// The easiest way to ensure this method is called is to use the `.use` -// helper method to execute a block and destroy the object at the end. -@OptIn(ExperimentalStdlibApi::class) -public interface Disposable : AutoCloseable { - public fun destroy() - override fun close(): Unit = destroy() - public companion object { - internal fun destroy(vararg args: Any?) { - for (arg in args) { - when (arg) { - is Disposable -> arg.destroy() - is ArrayList<*> -> { - for (idx in arg.indices) { - val element = arg[idx] - if (element is Disposable) { - element.destroy() - } - } - } - is Map<*, *> -> { - for (element in arg.values) { - if (element is Disposable) { - element.destroy() - } - } - } - is Array<*> -> { - for (element in arg) { - if (element is Disposable) { - element.destroy() - } - } - } - is Iterable<*> -> { - for (element in arg) { - if (element is Disposable) { - element.destroy() - } - } - } - } - } - } - } -} - -@OptIn(kotlin.contracts.ExperimentalContracts::class) -public inline fun T.use(block: (T) -> R): R { - kotlin.contracts.contract { - callsInPlace(block, kotlin.contracts.InvocationKind.EXACTLY_ONCE) - } - return try { - block(this) - } finally { - try { - // N.B. our implementation is on the nullable type `Disposable?`. - this?.destroy() - } catch (e: Throwable) { - // swallow - } - } -} - -/** Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. */ -public object NoPointer - - - - - - - - - - - - - - - - - - - - - -/** - * Callback interface for receiving Boltz swap lifecycle events. - * - * Implement this in Swift/Kotlin/Python and register it via - * `boltz_start_swap_updates` to receive typed notifications as swaps progress. - * Reverse swaps are claimed automatically; the [`BoltzSwapEvent::Claimed`] - * event reports the resulting transaction id. - */ -public interface BoltzEventListener { - - public fun `onEvent`(`event`: BoltzSwapEvent) - - public companion object -} - - - - -/** - * 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 - * - * This trait must be implemented by the native iOS/Android code. - * The implementation handles actual USB or Bluetooth communication. - * - * # Android Implementation - * Use Android USB Host API for USB devices: - * - Enumerate devices with vendorId 0x1209 (0x534c for older), productId 0x53c1 - * - Request USB permission, claim interface, get endpoints - * - Chunk size: 64 bytes for USB - * - * Use Android BLE API for Bluetooth: - * - Scan for Trezor BLE service UUID: 8c000001-a59b-4d58-a9ad-073df69fa1b1 - * - Connect and discover characteristics - * - Read from: 8c000002-a59b-4d58-a9ad-073df69fa1b1 - * - Write to: 8c000003-a59b-4d58-a9ad-073df69fa1b1 - * - Chunk size: 244 bytes for BLE - * - * # iOS Implementation - * 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. - * - * For BLE devices that use THP protocol (encrypted communication), - * the native layer should handle encryption/decryption via - * android-trezor-connect and return the raw protobuf response. - * - * Returns None if not supported (will fall back to Protocol V1 chunks). - * Returns Some(result) to use native THP handling. - * - * # Arguments - * * `path` - Device path - * * `message_type` - Protobuf message type (e.g., GetAddress = 29) - * * `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. - * - * This is called when the Trezor device displays a 6-digit code - * that must be entered to complete Bluetooth pairing. - * - * The native layer should display a UI for the user to enter the code - * shown on the Trezor screen. - * - * 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. - * - * Called after successful BLE pairing to store credentials for reconnection. - * The credential_json is a JSON string containing the serialized ThpCredentials. - * - * # Arguments - * * `device_id` - Device identifier (e.g., BLE address like "ble:AA:BB:CC:DD:EE:FF") - * * `credential_json` - JSON string with credential data - * - * 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. - * - * Called before BLE handshake to check for stored credentials. - * If credentials are found, they will be used to skip the pairing dialog. - * - * # Arguments - * * `device_id` - Device identifier (e.g., BLE address like "ble:AA:BB:CC:DD:EE:FF") - * - * 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. - * - * This forwards Rust-level errors and state information to the native - * debug UI (e.g., TrezorDebugLog on Android) so they are visible - * alongside the Kotlin-level logs. - * - * # Arguments - * * `tag` - Short tag identifying the subsystem (e.g., "HANDSHAKE", "THP") - * * `message` - Human-readable debug message - */ - public fun `logDebug`(`tag`: kotlin.String, `message`: kotlin.String) - - public companion object -} - - - - -/** - * Callback interface for handling PIN and passphrase requests from the Trezor device. - * - * The native layer (iOS/Android) should implement this to show PIN/passphrase - * input UI when the device requests it during operations like signing. - */ -public interface TrezorUiCallback { - - /** - * Called when the device requests a PIN. - * - * Show a PIN matrix UI and return the matrix-encoded PIN string. - * Return empty string to cancel. - */ - public fun `onPinRequest`(): kotlin.String - - /** - * Called when the device requests a passphrase. - * - * If `on_device` is true, the device is asking for the passphrase to be - * entered on the Trezor itself — return `PassphraseResponse::OnDevice`. - * - * If `on_device` is false, show a passphrase input UI and return - * `Standard` (no passphrase), `Hidden { value }` (host-entered passphrase), - * `OnDevice` (defer entry to the Trezor), or `Cancel`. - */ - public fun `onPassphraseRequest`(`onDevice`: kotlin.Boolean): PassphraseResponse - - public companion object -} - - - - -/** - * Stateful decoder for single-part and animated multipart UR QR scans. - */ -public interface UrDecoderInterface { - - /** - * Adds one UR fragment and returns the current decoding status. - */ - @Throws(UrException::class) - public fun `receive`(`frame`: kotlin.String): UrDecoderStatus - - /** - * Clear all frames so the decoder can receive another message. - */ - public fun `reset`() - - public companion object -} - - - - -/** - * Grouped address lists for an account. - */ -@kotlinx.serialization.Serializable -public data class AccountAddresses ( - /** - * Used receive addresses (have at least one transaction) - */ - val `used`: List, - /** - * Unused receive addresses (no transactions yet) - */ - val `unused`: List, - /** - * Change addresses - */ - val `change`: List -) { - public companion object -} - - - -/** - * Result from querying an extended public key via Electrum. - */ -@kotlinx.serialization.Serializable -public data class AccountInfoResult ( - /** - * The account structure with addresses and UTXOs - */ - val `account`: ComposeAccount, - /** - * Total confirmed balance in satoshis - */ - val `balance`: kotlin.ULong, - /** - * Number of UTXOs - */ - val `utxoCount`: kotlin.UInt, - /** - * The detected or specified account type - */ - val `accountType`: AccountType, - /** - * The current blockchain tip height - */ - val `blockHeight`: kotlin.UInt -) { - public companion object -} - - - -/** - * A UTXO associated with an account or address. - */ -@kotlinx.serialization.Serializable -public data class AccountUtxo ( - /** - * Transaction ID (hex) - */ - val `txid`: kotlin.String, - /** - * Output index - */ - val `vout`: kotlin.UInt, - /** - * Amount in satoshis - */ - val `amount`: kotlin.ULong, - /** - * Block height where the UTXO was confirmed (0 if unconfirmed) - */ - val `blockHeight`: kotlin.UInt, - /** - * Address holding this UTXO - */ - val `address`: kotlin.String, - /** - * BIP32 derivation path (e.g., "m/84'/0'/0'/0/0") - */ - val `path`: kotlin.String, - /** - * Number of confirmations (0 if unconfirmed) - */ - val `confirmations`: kotlin.UInt, - /** - * Whether this is a coinbase output - */ - val `coinbase`: kotlin.Boolean, - /** - * Whether this UTXO is owned by the account - */ - val `own`: kotlin.Boolean, - /** - * Whether this UTXO must be included in the transaction - */ - val `required`: kotlin.Boolean? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class ActivityTags ( - val `walletId`: kotlin.String, - val `activityId`: kotlin.String, - val `tags`: List -) { - public companion object -} - - - -/** - * Information about a single address in an account. - */ -@kotlinx.serialization.Serializable -public data class AddressInfo ( - /** - * The Bitcoin address - */ - val `address`: kotlin.String, - /** - * BIP32 derivation path - */ - val `path`: kotlin.String, - /** - * Number of transfers (real count in `get_address_info`, 1/0 presence flag in `get_account_info`) - */ - val `transfers`: kotlin.UInt -) { - public companion object -} - - - -/** - * Fees and limits for a swap pair, used to size a swap and present costs. - */ -@kotlinx.serialization.Serializable -public data class BoltzPairInfo ( - /** - * Pair hash identifying the current terms (passed back to Boltz if needed). - */ - val `hash`: kotlin.String, - /** - * Exchange rate of the pair. - */ - val `rate`: kotlin.Double, - /** - * Minimum swap amount in satoshis. - */ - val `minimalSat`: kotlin.ULong, - /** - * Maximum swap amount in satoshis. - */ - val `maximalSat`: kotlin.ULong, - /** - * Boltz service fee as a percentage of the swap amount. - */ - val `feePercentage`: kotlin.Double, - /** - * Estimated absolute miner fees in satoshis. - */ - val `minerFeesSat`: kotlin.ULong -) { - public companion object -} - - - -/** - * A persisted swap and its current state, returned by the listing/query APIs. - */ -@kotlinx.serialization.Serializable -public data class BoltzSwap ( - val `id`: kotlin.String, - val `swapType`: BoltzSwapType, - val `status`: BoltzSwapStatus, - val `network`: BoltzNetwork, - /** - * Deterministic BIP85 index used to derive this swap's key and preimage - * from the wallet seed. The recovery handle: given the seed and this index - * (or by scanning indices), the swap's secrets can be reconstructed. - */ - val `swapIndex`: kotlin.ULong, - /** - * For submarine swaps: the amount to lock onchain. For reverse swaps: the - * Lightning invoice amount. - */ - val `amountSat`: kotlin.ULong, - /** - * For reverse swaps: the onchain amount that will be received. - */ - val `onchainAmountSat`: kotlin.ULong?, - /** - * Lightning invoice associated with the swap (the hold invoice for reverse - * swaps, the invoice Boltz pays for submarine swaps). - */ - val `invoice`: kotlin.String?, - /** - * Onchain lockup address. - */ - val `lockupAddress`: kotlin.String?, - /** - * The address funds are claimed to (reverse) or refunded to (submarine). - */ - val `onchainAddress`: kotlin.String?, - val `timeoutBlockHeight`: kotlin.ULong, - val `createdAt`: kotlin.ULong, - /** - * Txid of the claim transaction once broadcast (reverse swaps). - */ - val `claimTxId`: kotlin.String?, - /** - * Txid of the refund transaction once broadcast (submarine swaps). - */ - val `refundTxId`: kotlin.String? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class ChannelLiquidityOptions ( - val `defaultLspBalanceSat`: kotlin.ULong, - val `minLspBalanceSat`: kotlin.ULong, - val `maxLspBalanceSat`: kotlin.ULong, - val `maxClientBalanceSat`: kotlin.ULong -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class ChannelLiquidityParams ( - val `clientBalanceSat`: kotlin.ULong, - val `existingChannelsTotalSat`: kotlin.ULong, - val `minChannelSizeSat`: kotlin.ULong, - val `maxChannelSizeSat`: kotlin.ULong, - val `satsPerEur`: kotlin.ULong -) { - public companion object -} - - - -@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 `channelClosureReason`: kotlin.String -) { - public companion object -} - - - -/** - * A finalized transaction ready to broadcast. - */ -@kotlinx.serialization.Serializable -public data class CompletedTransaction ( - /** - * Consensus-encoded transaction hex. - */ - val `serializedTx`: kotlin.String, - /** - * Canonical transaction id, excluding witness data. - */ - val `txid`: kotlin.String -) { - public companion object -} - - - -/** - * Full account structure with addresses and UTXOs. - */ -@kotlinx.serialization.Serializable -public data class ComposeAccount ( - /** - * Account derivation path (e.g., "m/84'/0'/0'") - */ - val `path`: kotlin.String, - /** - * Categorized addresses - */ - val `addresses`: AccountAddresses, - /** - * Unspent transaction outputs - */ - val `utxo`: List -) { - public companion object -} - - - -/** - * Parameters for composing a signer-agnostic transaction. - */ -@kotlinx.serialization.Serializable -public data class ComposeParams ( - /** - * Wallet configuration (key, server, network) - */ - val `wallet`: WalletParams, - /** - * Desired transaction outputs - */ - val `outputs`: List, - /** - * Fee rates to evaluate (sat/vB), one PSBT per rate - */ - val `feeRates`: List, - /** - * UTXO selection strategy (defaults to BranchAndBound) - */ - val `coinSelection`: CoinSelection? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class CreateCjitOptions ( - val `source`: kotlin.String?, - val `discountCode`: kotlin.String? -) { - public companion object -} - - - -@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 `announceChannel`: kotlin.Boolean -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class DefaultLspBalanceParams ( - val `clientBalanceSat`: kotlin.ULong, - val `maxChannelSizeSat`: kotlin.ULong, - val `satsPerEur`: kotlin.ULong -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class ErrorData ( - val `errorDetails`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class FeeRates ( - val `fast`: kotlin.UInt, - val `mid`: kotlin.UInt, - val `slow`: kotlin.UInt -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class FundingTx ( - val `id`: kotlin.String, - val `vout`: kotlin.ULong -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class GetAddressResponse ( - /** - * The generated Bitcoin address as a string - */ - val `address`: kotlin.String, - /** - * The derivation path used to generate the address - */ - val `path`: kotlin.String, - /** - * The hexadecimal representation of the public key - */ - val `publicKey`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class GetAddressesResponse ( - /** - * Vector of generated Bitcoin addresses - */ - val `addresses`: List -) { - public companion object -} - - - -/** - * A single transaction in the wallet's history. - */ -@kotlinx.serialization.Serializable -public data class HistoryTransaction ( - /** - * Transaction ID (hex) - */ - val `txid`: kotlin.String, - /** - * Amount received by the wallet (sats) - */ - val `received`: kotlin.ULong, - /** - * Amount sent by the wallet (sats) — includes change sent back to self - */ - val `sent`: kotlin.ULong, - /** - * Net value from wallet's perspective: received - sent (positive = inflow, negative = outflow) - */ - val `net`: kotlin.Long, - /** - * Transaction fee in sats (None if not available, e.g. for received-only txs) - */ - val `fee`: kotlin.ULong?, - /** - * Fee rate in sats per virtual byte (None if fee or tx size is unavailable). - */ - val `feeRate`: kotlin.Double?, - /** - * 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, - /** - * Transaction direction - */ - val `direction`: TxDirection, - /** - * Block height (None if unconfirmed/mempool) - */ - val `blockHeight`: kotlin.UInt?, - /** - * Block timestamp as unix epoch seconds (None if unconfirmed) - */ - val `timestamp`: kotlin.ULong?, - /** - * Number of confirmations (0 if unconfirmed) - */ - val `confirmations`: kotlin.UInt -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBt0ConfMinTxFeeWindow ( - val `satPerVbyte`: kotlin.Double, - val `validityEndsAt`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtBolt11Invoice ( - val `request`: kotlin.String, - val `state`: BtBolt11InvoiceState, - val `expiresAt`: kotlin.String, - val `updatedAt`: kotlin.String -) { - public companion object -} - - - -@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 `shortChannelId`: kotlin.String? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtChannelClose ( - val `txId`: kotlin.String, - val `closeType`: kotlin.String, - val `initiator`: kotlin.String, - val `registeredAt`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtEstimateFeeResponse ( - val `feeSat`: kotlin.ULong, - val `min0ConfTxFee`: IBt0ConfMinTxFeeWindow -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtEstimateFeeResponse2 ( - val `feeSat`: kotlin.ULong, - val `networkFeeSat`: kotlin.ULong, - val `serviceFeeSat`: kotlin.ULong, - val `min0ConfTxFee`: IBt0ConfMinTxFeeWindow -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtInfo ( - val `version`: kotlin.UInt, - val `nodes`: List, - val `options`: IBtInfoOptions, - val `versions`: IBtInfoVersions, - val `onchain`: IBtInfoOnchain -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtInfoOnchain ( - val `network`: BitcoinNetworkEnum, - val `feeRates`: FeeRates -) { - public companion object -} - - - -@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 `maxClientBalanceSat`: kotlin.ULong -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtInfoVersions ( - val `http`: kotlin.String, - val `btc`: kotlin.String, - val `ln2`: kotlin.String -) { - public companion object -} - - - -@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 `suspicious0ConfReason`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IBtOnchainTransactions ( - val `address`: kotlin.String, - val `confirmedSat`: kotlin.ULong, - val `requiredConfirmations`: kotlin.UInt, - val `transactions`: List -) { - public companion object -} - - - -@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 `createdAt`: kotlin.String -) { - public companion object -} - - - -@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 `manualRefunds`: List? -) { - public companion object -} - - - -@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 `createdAt`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IDiscount ( - val `code`: kotlin.String, - val `absoluteSat`: kotlin.ULong, - val `relative`: kotlin.Double, - val `overallSat`: kotlin.ULong -) { - public companion object -} - - - -@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 `updatedAt`: kotlin.String? -) { - public companion object -} - - - -@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 `expiresAt`: kotlin.String? -) { - public companion object -} - - - -@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 `createdAt`: kotlin.String? -) { - public companion object -} - - - -@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 `maxCount`: kotlin.UInt? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class IGiftLspNode ( - val `alias`: kotlin.String, - val `pubkey`: kotlin.String, - val `connectionStrings`: List -) { - public companion object -} - - - -@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 `nodeIdVerified`: kotlin.Boolean? -) { - public companion object -} - - - -@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 `manualRefunds`: List -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class ILspNode ( - val `alias`: kotlin.String, - val `pubkey`: kotlin.String, - val `connectionStrings`: List, - val `readonly`: kotlin.Boolean? -) { - public companion object -} - - - -@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 `targetType`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class LegacyRnCloseRecoveryScanResult ( - /** - * Total balance found in legacy RN P2WPKH close outputs (in satoshis). - */ - val `totalAmount`: kotlin.ULong, - /** - * Number of P2WPKH outputs found. - */ - val `outputsCount`: kotlin.UInt -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class LegacyRnCloseRecoverySweepPreview ( - /** - * Fully signed raw sweep transaction hex. Broadcast only after user confirmation. - */ - val `txHex`: kotlin.String, - /** - * Transaction id of the sweep transaction. - */ - val `txid`: kotlin.String, - /** - * Total input amount in satoshis. - */ - val `totalAmount`: kotlin.ULong, - /** - * Fee in satoshis. - */ - val `estimatedFee`: kotlin.ULong, - /** - * Transaction virtual size in vbytes. - */ - val `estimatedVsize`: kotlin.ULong, - /** - * Number of recovered outputs swept. - */ - val `outputsCount`: kotlin.UInt, - /** - * Destination address receiving the sweep. - */ - val `destinationAddress`: kotlin.String, - /** - * Amount sent to destination after fees. - */ - val `amountAfterFees`: kotlin.ULong -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class LightningActivity ( - val `walletId`: kotlin.String, - 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 -} - - - -@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 `payeeNodeId`: kotlin.ByteArray? -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this::class != other::class) return false - - other as LightningInvoice - if (`bolt11` != other.`bolt11`) return false - if (!`paymentHash`.contentEquals(other.`paymentHash`)) return false - if (`amountSatoshis` != other.`amountSatoshis`) return false - if (`timestampSeconds` != other.`timestampSeconds`) return false - if (`expirySeconds` != other.`expirySeconds`) return false - if (`isExpired` != other.`isExpired`) return false - if (`description` != other.`description`) return false - if (`networkType` != other.`networkType`) return false - if (`payeeNodeId` != null) { - if (other.`payeeNodeId` == null) return false - if (!`payeeNodeId`.contentEquals(other.`payeeNodeId`)) return false - } - - return true - } - override fun hashCode(): Int { - var result = `bolt11`.hashCode() - result = 31 * result + `paymentHash`.contentHashCode() - result = 31 * result + `amountSatoshis`.hashCode() - result = 31 * result + `timestampSeconds`.hashCode() - result = 31 * result + `expirySeconds`.hashCode() - result = 31 * result + `isExpired`.hashCode() - result = 31 * result + (`description`?.hashCode() ?: 0) - result = 31 * result + `networkType`.hashCode() - result = 31 * result + (`payeeNodeId`?.contentHashCode() ?: 0) - return result - } - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class LnurlAddressData ( - val `uri`: kotlin.String, - val `domain`: kotlin.String, - val `username`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class LnurlAuthData ( - val `uri`: kotlin.String, - val `tag`: kotlin.String, - val `k1`: kotlin.String, - val `domain`: kotlin.String -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class LnurlChannelData ( - val `uri`: kotlin.String, - val `callback`: kotlin.String, - val `k1`: kotlin.String, - val `tag`: kotlin.String -) { - public companion object -} - - - -@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 `nostrPubkey`: kotlin.ByteArray? -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this::class != other::class) return false - - other as LnurlPayData - if (`uri` != other.`uri`) return false - if (`callback` != other.`callback`) return false - if (`minSendable` != other.`minSendable`) return false - if (`maxSendable` != other.`maxSendable`) return false - if (`metadataStr` != other.`metadataStr`) return false - if (`commentAllowed` != other.`commentAllowed`) return false - if (`allowsNostr` != other.`allowsNostr`) return false - if (`nostrPubkey` != null) { - if (other.`nostrPubkey` == null) return false - if (!`nostrPubkey`.contentEquals(other.`nostrPubkey`)) return false - } - - return true - } - override fun hashCode(): Int { - var result = `uri`.hashCode() - result = 31 * result + `callback`.hashCode() - result = 31 * result + `minSendable`.hashCode() - result = 31 * result + `maxSendable`.hashCode() - result = 31 * result + `metadataStr`.hashCode() - result = 31 * result + (`commentAllowed`?.hashCode() ?: 0) - result = 31 * result + `allowsNostr`.hashCode() - result = 31 * result + (`nostrPubkey`?.contentHashCode() ?: 0) - return result - } - public companion object -} - - - -@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 `tag`: kotlin.String -) { - public companion object -} - - - -/** - * Native device information returned from enumeration - */ -@kotlinx.serialization.Serializable -public data class NativeDeviceInfo ( - /** - * Unique path/identifier for this device - */ - val `path`: kotlin.String, - /** - * Transport type: "usb" or "bluetooth" - */ - val `transportType`: kotlin.String, - /** - * Optional device name (from BLE advertisement or USB descriptor) - */ - val `name`: kotlin.String?, - /** - * USB Vendor ID (for USB devices) - */ - val `vendorId`: kotlin.UShort?, - /** - * USB Product ID (for USB devices) - */ - val `productId`: kotlin.UShort? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class OnChainInvoice ( - val `address`: kotlin.String, - val `amountSatoshis`: kotlin.ULong, - val `label`: kotlin.String?, - val `message`: kotlin.String?, - val `params`: Map? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class OnchainActivity ( - val `walletId`: kotlin.String, - 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 -} - - - -/** - * One single-signature account in Passport's generic JSON export. - */ -@kotlinx.serialization.Serializable -public data class PassportAccount ( - val `accountType`: AccountType, - /** - * Standard xpub/tpub encoding used by Passport's export. - */ - val `xpub`: kotlin.String, - /** - * Account-level BIP32 path, such as `m/84'/0'/0'`. - */ - val `derivationPath`: kotlin.String -) { - public companion object -} - - - -/** - * The single-signature accounts exported by Passport for one account index. - */ -@kotlinx.serialization.Serializable -public data class PassportAccountExport ( - /** - * Root fingerprint used in descriptors and PSBT key origins. - */ - val `masterFingerprint`: kotlin.String, - val `accountIndex`: kotlin.UInt, - val `accounts`: List -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class PreActivityMetadata ( - val `walletId`: 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 -} - - - -@kotlinx.serialization.Serializable -public data class PubkyAuth ( - val `data`: kotlin.String -) { - public companion object -} - - - -/** - * Details extracted from a `pubkyauth://` deep-link URL. - */ -@kotlinx.serialization.Serializable -public data class PubkyAuthDetails ( - /** - * Whether this is a signin or signup flow. - */ - val `kind`: PubkyAuthKind, - /** - * Requested capabilities (e.g. `"/pub/pubky.app/:rw"`). - */ - val `capabilities`: kotlin.String, - /** - * Relay URL used for the auth exchange. - */ - val `relay`: kotlin.String, - /** - * Homeserver public key (z32-encoded). Present only for signup flows. - */ - val `homeserver`: kotlin.String?, - /** - * Signup token. Present only for signup flows. - */ - val `signupToken`: kotlin.String? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class PubkyProfile ( - val `name`: kotlin.String, - val `bio`: kotlin.String?, - val `image`: kotlin.String?, - val `links`: List?, - val `status`: kotlin.String? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class PubkyProfileLink ( - val `title`: kotlin.String, - val `url`: kotlin.String -) { - public companion object -} - - - -/** - * Result of creating a reverse swap (Lightning -> onchain). - * - * The caller pays `invoice` from its Lightning node; once Boltz locks funds at - * `lockup_address`, the module claims them to the provided onchain address. - */ -@kotlinx.serialization.Serializable -public data class ReverseSwapResponse ( - val `id`: kotlin.String, - /** - * Hold invoice the caller must pay via Lightning. - */ - val `invoice`: kotlin.String, - /** - * Address Boltz locks the onchain funds to. - */ - val `lockupAddress`: kotlin.String, - /** - * Amount in satoshis that will be received onchain (after Boltz fees). - */ - val `onchainAmountSat`: kotlin.ULong, - /** - * Onchain timeout height for the swap. - */ - val `timeoutBlockHeight`: kotlin.ULong -) { - public companion object -} - - - -/** - * Result from querying a single Bitcoin address. - */ -@kotlinx.serialization.Serializable -public data class SingleAddressInfoResult ( - /** - * The queried address - */ - val `address`: kotlin.String, - /** - * Total confirmed balance in satoshis - */ - val `balance`: kotlin.ULong, - /** - * UTXOs for this address - */ - val `utxos`: List, - /** - * Number of transactions involving this address - */ - val `transfers`: kotlin.UInt, - /** - * Current blockchain tip height - */ - val `blockHeight`: kotlin.UInt -) { - public companion object -} - - - -/** - * Result of creating a submarine swap (onchain -> Lightning). - * - * The caller funds `address` with `expected_amount_sat` from its onchain - * wallet; Boltz then pays the Lightning invoice supplied at creation. - */ -@kotlinx.serialization.Serializable -public data class SubmarineSwapResponse ( - val `id`: kotlin.String, - /** - * Onchain lockup address to send funds to. - */ - val `address`: kotlin.String, - /** - * BIP21 URI for the lockup payment. - */ - val `bip21`: kotlin.String, - /** - * Exact amount in satoshis the caller must send to `address`. - */ - val `expectedAmountSat`: kotlin.ULong, - /** - * Whether Boltz will accept a zero-conf lockup. - */ - val `acceptZeroConf`: kotlin.Boolean, - /** - * Onchain timeout height after which a refund is possible. - */ - val `timeoutBlockHeight`: kotlin.ULong -) { - public companion object -} - - - -/** - * A hardware-wallet model Bitkit supports. - */ -@kotlinx.serialization.Serializable -public data class SupportedHardwareWallet ( - val `vendor`: HardwareWalletVendor, - /** - * Human-readable manufacturer name, e.g. "Foundation". - */ - val `vendorName`: kotlin.String, - /** - * Stable model identifier that applications can map to bundled assets. - */ - val `model`: kotlin.String, - /** - * Full user-facing name. - */ - val `displayName`: kotlin.String, - /** - * Transports over which the application can interact with this model. - */ - val `transports`: List -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class SweepResult ( - /** - * The transaction ID of the sweep transaction - */ - val `txid`: kotlin.String, - /** - * The total amount swept (in satoshis) - */ - val `amountSwept`: kotlin.ULong, - /** - * The fee paid (in satoshis) - */ - val `feePaid`: kotlin.ULong, - /** - * The number of UTXOs swept - */ - val `utxosSwept`: kotlin.UInt -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class SweepTransactionPreview ( - /** - * The PSBT (Partially Signed Bitcoin Transaction) in base64 format - */ - val `psbt`: kotlin.String, - /** - * The total amount available to sweep (in satoshis) - */ - val `totalAmount`: kotlin.ULong, - /** - * The estimated fee for the transaction (in satoshis) - */ - val `estimatedFee`: kotlin.ULong, - /** - * The estimated virtual size of the transaction (in vbytes) - */ - val `estimatedVsize`: kotlin.ULong, - /** - * The number of UTXOs that will be swept - */ - val `utxosCount`: kotlin.UInt, - /** - * The destination address - */ - val `destinationAddress`: kotlin.String, - /** - * The amount that will be sent to destination after fees (in satoshis) - */ - val `amountAfterFees`: kotlin.ULong -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class SweepableBalances ( - /** - * Balance in legacy (P2PKH) addresses (in satoshis) - */ - val `legacyBalance`: kotlin.ULong, - /** - * Balance in P2SH-SegWit (P2SH-P2WPKH) addresses (in satoshis) - */ - val `p2shBalance`: kotlin.ULong, - /** - * Balance in Taproot (P2TR) addresses (in satoshis) - */ - val `taprootBalance`: kotlin.ULong, - /** - * Total balance across all wallet types (in satoshis) - */ - val `totalBalance`: kotlin.ULong, - /** - * Number of UTXOs in legacy wallet - */ - val `legacyUtxosCount`: kotlin.UInt, - /** - * Number of UTXOs in P2SH-SegWit wallet - */ - val `p2shUtxosCount`: kotlin.UInt, - /** - * Number of UTXOs in Taproot wallet - */ - val `taprootUtxosCount`: kotlin.UInt, - /** - * Total number of UTXOs across all wallet types - */ - val `totalUtxosCount`: kotlin.UInt -) { - public companion object -} - - - -/** - * Full details for a single transaction, including raw inputs/outputs and size metrics. - */ -@kotlinx.serialization.Serializable -public data class TransactionDetail ( - /** - * Transaction ID (hex) - */ - val `txid`: kotlin.String, - /** - * Amount received by the wallet (sats) - */ - val `received`: kotlin.ULong, - /** - * Amount sent by the wallet (sats) — includes change sent back to self - */ - val `sent`: kotlin.ULong, - /** - * Net value from wallet's perspective: received - sent (positive = inflow, negative = outflow) - */ - val `net`: kotlin.Long, - /** - * Display amount in sats (same semantics as HistoryTransaction.amount) - */ - val `amount`: kotlin.ULong, - /** - * Transaction fee in sats (None if not available) - */ - val `fee`: kotlin.ULong?, - /** - * Transaction direction - */ - val `direction`: TxDirection, - /** - * Block height (None if unconfirmed/mempool) - */ - val `blockHeight`: kotlin.UInt?, - /** - * Block timestamp as unix epoch seconds (None if unconfirmed) - */ - val `timestamp`: kotlin.ULong?, - /** - * Number of confirmations (0 if unconfirmed) - */ - val `confirmations`: kotlin.UInt, - /** - * Transaction inputs - */ - val `inputs`: List, - /** - * Transaction outputs - */ - val `outputs`: List, - /** - * Serialized transaction size in bytes - */ - val `size`: kotlin.UInt, - /** - * Virtual size in vbytes (ceil(weight / 4)) - */ - val `vsize`: kotlin.UInt, - /** - * Transaction weight in weight units - */ - val `weight`: kotlin.UInt, - /** - * Fee rate in sat/vB (fee / vsize), None if fee is unavailable or vsize is zero - */ - val `feeRate`: kotlin.Double? -) { - public companion object -} - - - -/** - * Details about an onchain transaction. - */ -@kotlinx.serialization.Serializable -public data class TransactionDetails ( - val `walletId`: kotlin.String, - /** - * The transaction ID. - */ - val `txId`: kotlin.String, - /** - * The net amount in this transaction (in satoshis). - * - * This is calculated as: (received - sent). For incoming payments, - * this will be positive. For outgoing payments, this will be negative. - * - * Note: This amount does NOT include transaction fees. - */ - val `amountSats`: kotlin.Long, - /** - * The transaction inputs with full details. - */ - val `inputs`: List, - /** - * The transaction outputs with full details. - */ - val `outputs`: List -) { - public companion object -} - - - -/** - * Result from querying transaction history for an xpub. - */ -@kotlinx.serialization.Serializable -public data class TransactionHistoryResult ( - /** - * All transactions, sorted: unconfirmed first, then by timestamp descending - */ - val `transactions`: List, - /** - * Balance breakdown - */ - val `balance`: WalletBalance, - /** - * Total number of transactions - */ - val `txCount`: kotlin.UInt, - /** - * Current blockchain tip height - */ - val `blockHeight`: kotlin.UInt, - /** - * The detected or specified account type - */ - val `accountType`: AccountType -) { - public companion object -} - - - -/** - * Address response from device. - */ -@kotlinx.serialization.Serializable -public data class TrezorAddressResponse ( - /** - * The Bitcoin address - */ - val `address`: kotlin.String, - /** - * The serialized path (e.g., "m/84'/0'/0'/0/0") - */ - val `path`: kotlin.String -) { - public companion object -} - - - -/** - * Result from a high-level message call (for BLE/THP devices) - */ -@kotlinx.serialization.Serializable -public data class TrezorCallMessageResult ( - /** - * Whether the call succeeded - */ - val `success`: kotlin.Boolean, - /** - * Response message type - */ - val `messageType`: kotlin.UShort, - /** - * Response protobuf data - */ - val `data`: kotlin.ByteArray, - /** - * Error message (empty on success) - */ - val `error`: kotlin.String, - /** - * Structured error code (None on success or when the native error is generic) - */ - val `errorCode`: TrezorTransportErrorCode? -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this::class != other::class) return false - - other as TrezorCallMessageResult - if (`success` != other.`success`) return false - if (`messageType` != other.`messageType`) return false - if (!`data`.contentEquals(other.`data`)) return false - if (`error` != other.`error`) return false - if (`errorCode` != other.`errorCode`) return false - - return true - } - override fun hashCode(): Int { - var result = `success`.hashCode() - result = 31 * result + `messageType`.hashCode() - result = 31 * result + `data`.contentHashCode() - result = 31 * result + `error`.hashCode() - result = 31 * result + (`errorCode`?.hashCode() ?: 0) - return result - } - public companion object -} - - - -/** - * Device information exposed to FFI. - */ -@kotlinx.serialization.Serializable -public data class TrezorDeviceInfo ( - /** - * Unique identifier for the device - */ - val `id`: kotlin.String, - /** - * Transport type (USB or Bluetooth) - */ - val `transportType`: TrezorTransportType, - /** - * Device name (from BLE advertisement or USB descriptor) - */ - val `name`: kotlin.String?, - /** - * Transport-specific path (used internally for connection) - */ - val `path`: kotlin.String, - /** - * Device label (set by user during device setup) - */ - val `label`: kotlin.String?, - /** - * Device model (e.g., "T2", "Safe 5", "Safe 7") - */ - val `model`: kotlin.String?, - /** - * Whether the device is in bootloader mode - */ - val `isBootloader`: kotlin.Boolean -) { - public companion object -} - - - -/** - * Device features after initialization. - */ -@kotlinx.serialization.Serializable -public data class TrezorFeatures ( - /** - * Vendor string - */ - val `vendor`: kotlin.String?, - /** - * Device model - */ - val `model`: kotlin.String?, - /** - * Device label (set by user during device setup) - */ - val `label`: kotlin.String?, - /** - * Device ID (unique per device) - */ - val `deviceId`: kotlin.String?, - /** - * Major firmware version - */ - val `majorVersion`: kotlin.UInt?, - /** - * Minor firmware version - */ - val `minorVersion`: kotlin.UInt?, - /** - * Patch firmware version - */ - val `patchVersion`: kotlin.UInt?, - /** - * Whether PIN protection is enabled - */ - val `pinProtection`: kotlin.Boolean?, - /** - * Whether the device is currently unlocked. When PIN protection is enabled - * and this is `Some(false)`, mobile callers should back off and ask the - * user to unlock the Trezor instead of repeatedly reconnecting. - */ - val `unlocked`: kotlin.Boolean?, - /** - * Whether passphrase protection is enabled - */ - val `passphraseProtection`: kotlin.Boolean?, - /** - * Whether the device is initialized with a seed - */ - val `initialized`: kotlin.Boolean?, - /** - * Whether the device needs backup - */ - val `needsBackup`: kotlin.Boolean?, - /** - * Whether the device can accept passphrase entry on the device itself - * (`Capability_PassphraseEntry`). When false/None, use host entry only. - */ - val `passphraseEntryCapable`: kotlin.Boolean? -) { - public companion object -} - - - -/** - * Parameters for getting an address from the device. - */ -@kotlinx.serialization.Serializable -public data class TrezorGetAddressParams ( - /** - * BIP32 path (e.g., "m/84'/0'/0'/0/0") - */ - val `path`: kotlin.String, - /** - * Coin network (default: Bitcoin) - */ - val `coin`: TrezorCoinType?, - /** - * Whether to display the address on the device for confirmation - */ - val `showOnTrezor`: kotlin.Boolean, - /** - * Script type (auto-detected from path if not specified) - */ - val `scriptType`: TrezorScriptType? -) { - public companion object -} - - - -/** - * Parameters for getting a public key from the device. - */ -@kotlinx.serialization.Serializable -public data class TrezorGetPublicKeyParams ( - /** - * BIP32 path (e.g., "m/84'/0'/0'") - */ - val `path`: kotlin.String, - /** - * Coin network (default: Bitcoin) - */ - val `coin`: TrezorCoinType?, - /** - * Whether to display on device for confirmation - */ - val `showOnTrezor`: kotlin.Boolean -) { - public companion object -} - - - -/** - * Previous transaction data (for non-SegWit input verification). - */ -@kotlinx.serialization.Serializable -public data class TrezorPrevTx ( - /** - * Transaction hash (hex encoded) - */ - val `hash`: kotlin.String, - /** - * Transaction version - */ - val `version`: kotlin.UInt, - /** - * Lock time - */ - val `lockTime`: kotlin.UInt, - /** - * Transaction inputs - */ - val `inputs`: List, - /** - * Transaction outputs - */ - val `outputs`: List -) { - public companion object -} - - - -/** - * Input of a previous transaction. - */ -@kotlinx.serialization.Serializable -public data class TrezorPrevTxInput ( - /** - * Previous transaction hash (hex encoded) - */ - val `prevHash`: kotlin.String, - /** - * Previous output index - */ - val `prevIndex`: kotlin.UInt, - /** - * Script signature (hex encoded) - */ - val `scriptSig`: kotlin.String, - /** - * Sequence number - */ - val `sequence`: kotlin.UInt -) { - public companion object -} - - - -/** - * Output of a previous transaction. - */ -@kotlinx.serialization.Serializable -public data class TrezorPrevTxOutput ( - /** - * Amount in satoshis - */ - val `amount`: kotlin.ULong, - /** - * Script pubkey (hex encoded) - */ - val `scriptPubkey`: kotlin.String -) { - public companion object -} - - - -/** - * Public key response from device. - */ -@kotlinx.serialization.Serializable -public data class TrezorPublicKeyResponse ( - /** - * Extended public key (xpub) - */ - val `xpub`: kotlin.String, - /** - * The serialized path (e.g., "m/84'/0'/0'") - */ - val `path`: kotlin.String, - /** - * Compressed public key (hex encoded) - */ - val `publicKey`: kotlin.String, - /** - * Chain code (hex encoded) - */ - val `chainCode`: kotlin.String, - /** - * Parent key fingerprint - */ - val `fingerprint`: kotlin.UInt, - /** - * Derivation depth - */ - val `depth`: kotlin.UInt, - /** - * Master root fingerprint (from the device's master seed) - */ - val `rootFingerprint`: kotlin.UInt? -) { - public companion object -} - - - -/** - * Parameters for signing a message. - */ -@kotlinx.serialization.Serializable -public data class TrezorSignMessageParams ( - /** - * BIP32 path for the signing key (e.g., "m/84'/0'/0'/0/0") - */ - val `path`: kotlin.String, - /** - * Message to sign - */ - val `message`: kotlin.String, - /** - * Coin network (default: Bitcoin) - */ - val `coin`: TrezorCoinType? -) { - public companion object -} - - - -/** - * Parameters for signing a transaction. - */ -@kotlinx.serialization.Serializable -public data class TrezorSignTxParams ( - /** - * Transaction inputs - */ - val `inputs`: List, - /** - * Transaction outputs - */ - val `outputs`: List, - /** - * Coin network (default: Bitcoin) - */ - val `coin`: TrezorCoinType?, - /** - * Lock time (default: 0) - */ - val `lockTime`: kotlin.UInt?, - /** - * Version (default: 2) - */ - val `version`: kotlin.UInt?, - /** - * Previous transactions (for non-SegWit input verification) - */ - val `prevTxs`: List -) { - public companion object -} - - - -/** - * Response from signing a message. - */ -@kotlinx.serialization.Serializable -public data class TrezorSignedMessageResponse ( - /** - * Bitcoin address that signed the message - */ - val `address`: kotlin.String, - /** - * Signature (base64 encoded) - */ - val `signature`: kotlin.String -) { - public companion object -} - - - -/** - * Signed transaction result. - */ -@kotlinx.serialization.Serializable -public data class TrezorSignedTx ( - /** - * Signatures for each input (hex encoded) - */ - val `signatures`: List, - /** - * Serialized transaction (hex) - */ - val `serializedTx`: kotlin.String, - /** - * Broadcast transaction ID (populated when push=true) - */ - val `txid`: kotlin.String? -) { - public companion object -} - - - -/** - * Result from a transport read operation - */ -@kotlinx.serialization.Serializable -public data class TrezorTransportReadResult ( - /** - * Whether the read succeeded - */ - val `success`: kotlin.Boolean, - /** - * Data read (empty on failure) - */ - val `data`: kotlin.ByteArray, - /** - * Error message (empty on success) - */ - val `error`: kotlin.String, - /** - * Structured error code (None on success or when the native error is generic) - */ - val `errorCode`: TrezorTransportErrorCode? -) { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this::class != other::class) return false - - other as TrezorTransportReadResult - if (`success` != other.`success`) return false - if (!`data`.contentEquals(other.`data`)) return false - if (`error` != other.`error`) return false - if (`errorCode` != other.`errorCode`) return false - - return true - } - override fun hashCode(): Int { - var result = `success`.hashCode() - result = 31 * result + `data`.contentHashCode() - result = 31 * result + `error`.hashCode() - result = 31 * result + (`errorCode`?.hashCode() ?: 0) - return result - } - public companion object -} - - - -/** - * Result from a transport write or open operation - */ -@kotlinx.serialization.Serializable -public data class TrezorTransportWriteResult ( - /** - * Whether the operation succeeded - */ - val `success`: kotlin.Boolean, - /** - * Error message (empty on success) - */ - val `error`: kotlin.String, - /** - * Structured error code (None on success or when the native error is generic) - */ - val `errorCode`: TrezorTransportErrorCode? -) { - public companion object -} - - - -/** - * Transaction input for signing. - */ -@kotlinx.serialization.Serializable -public data class TrezorTxInput ( - /** - * Previous transaction hash (hex, 32 bytes) - */ - val `prevHash`: kotlin.String, - /** - * Previous output index - */ - val `prevIndex`: kotlin.UInt, - /** - * BIP32 derivation path (e.g., "m/84'/0'/0'/0/0") - */ - val `path`: kotlin.String, - /** - * Amount in satoshis - */ - val `amount`: kotlin.ULong, - /** - * Script type - */ - val `scriptType`: TrezorScriptType, - /** - * Sequence number (default: 0xFFFFFFFD for RBF) - */ - val `sequence`: kotlin.UInt?, - /** - * Original transaction hash for RBF replacement (hex encoded) - */ - val `origHash`: kotlin.String?, - /** - * Original input index for RBF replacement - */ - val `origIndex`: kotlin.UInt? -) { - public companion object -} - - - -/** - * Transaction output for signing. - */ -@kotlinx.serialization.Serializable -public data class TrezorTxOutput ( - /** - * Destination address (for external outputs) - */ - val `address`: kotlin.String?, - /** - * BIP32 path (for change outputs) - */ - val `path`: kotlin.String?, - /** - * Amount in satoshis - */ - val `amount`: kotlin.ULong, - /** - * Script type (for change outputs) - */ - val `scriptType`: TrezorScriptType?, - /** - * OP_RETURN data (hex encoded, for data outputs) - */ - val `opReturnData`: kotlin.String?, - /** - * Original transaction hash for RBF replacement (hex encoded) - */ - val `origHash`: kotlin.String?, - /** - * Original output index for RBF replacement - */ - val `origIndex`: kotlin.UInt? -) { - public companion object -} - - - -/** - * Parameters for verifying a message signature. - */ -@kotlinx.serialization.Serializable -public data class TrezorVerifyMessageParams ( - /** - * Bitcoin address that signed the message - */ - val `address`: kotlin.String, - /** - * Signature (base64 encoded) - */ - val `signature`: kotlin.String, - /** - * Original message - */ - val `message`: kotlin.String, - /** - * Coin network (default: Bitcoin) - */ - val `coin`: TrezorCoinType? -) { - public companion object -} - - - -/** - * A transaction input with full details. - */ -@kotlinx.serialization.Serializable -public data class TxDetailInput ( - /** - * Previous output transaction ID (hex) - */ - val `txid`: kotlin.String, - /** - * Previous output index - */ - val `vout`: kotlin.UInt, - /** - * Sequence number - */ - val `sequence`: kotlin.UInt, - /** - * Script signature (hex-encoded) - */ - val `scriptSig`: kotlin.String, - /** - * Witness stack (each element hex-encoded) - */ - val `witness`: List -) { - public companion object -} - - - -/** - * A transaction output with full details. - */ -@kotlinx.serialization.Serializable -public data class TxDetailOutput ( - /** - * Output value in sats - */ - val `value`: kotlin.ULong, - /** - * Script public key (hex-encoded) - */ - val `scriptPubkey`: kotlin.String, - /** - * Decoded address (None if script is not decodable to an address) - */ - val `address`: kotlin.String?, - /** - * Whether this output belongs to the queried wallet - */ - val `isMine`: kotlin.Boolean -) { - public companion object -} - - - -/** - * Details about a transaction input. - */ -@kotlinx.serialization.Serializable -public data class TxInput ( - /** - * The transaction ID of the previous output being spent. - */ - val `txid`: kotlin.String, - /** - * The output index of the previous output being spent. - */ - val `vout`: kotlin.UInt, - /** - * The script signature (hex-encoded). - */ - val `scriptsig`: kotlin.String, - /** - * The witness stack (hex-encoded strings). - */ - val `witness`: List, - /** - * The sequence number. - */ - val `sequence`: kotlin.UInt -) { - public companion object -} - - - -/** - * Details about a transaction output. - */ -@kotlinx.serialization.Serializable -public data class TxOutput ( - /** - * The script public key (hex-encoded). - */ - val `scriptpubkey`: kotlin.String, - /** - * The script public key type (e.g., "p2pkh", "p2sh", "p2wpkh", "p2wsh", "p2tr"). - */ - val `scriptpubkeyType`: kotlin.String?, - /** - * The address corresponding to this script (if decodable). - */ - val `scriptpubkeyAddress`: kotlin.String?, - /** - * The value in satoshis. - */ - val `value`: kotlin.Long, - /** - * The output index in the transaction. - */ - val `n`: kotlin.UInt -) { - public companion object -} - - - -/** - * Current state after accepting a scanned UR frame. - */ -@kotlinx.serialization.Serializable -public data class UrDecoderStatus ( - /** - * Estimated completion from 0.0 through 1.0. - */ - val `progress`: kotlin.Double, - /** - * Fountain source-fragment count, or 1 for a single-part UR. - */ - val `fragmentCount`: kotlin.UInt, - /** - * Present once the complete message has been decoded. - */ - val `payload`: UrPayload? -) { - public companion object -} - - - -@kotlinx.serialization.Serializable -public data class ValidationResult ( - val `address`: kotlin.String, - val `network`: NetworkType, - val `addressType`: AddressType -) { - public companion object -} - - - -/** - * Balance breakdown from BDK. - */ -@kotlinx.serialization.Serializable -public data class WalletBalance ( - /** - * Confirmed and spendable balance (sats) - */ - val `confirmed`: kotlin.ULong, - /** - * Immature coinbase outputs (sats) - */ - val `immature`: kotlin.ULong, - /** - * Unconfirmed UTXOs from trusted sources (own change) (sats) - */ - val `trustedPending`: kotlin.ULong, - /** - * Unconfirmed UTXOs from external sources (sats) - */ - val `untrustedPending`: kotlin.ULong, - /** - * Total spendable: confirmed + trusted_pending (sats) - */ - val `spendable`: kotlin.ULong, - /** - * Grand total: all categories (sats) - */ - val `total`: kotlin.ULong -) { - public companion object -} - - - -/** - * Common parameters for creating and syncing a watch-only BDK wallet. - */ -@kotlinx.serialization.Serializable -public data class WalletParams ( - /** - * Extended public key (xpub/ypub/zpub/tpub/upub/vpub) - */ - val `extendedKey`: kotlin.String, - /** - * Electrum server URL for wallet sync - */ - val `electrumUrl`: kotlin.String, - /** - * Root fingerprint hex (e.g. "73c5da0a"). Required for hardware wallet signing. - */ - val `fingerprint`: kotlin.String?, - /** - * Bitcoin network (auto-detected from key prefix if not specified) - */ - val `network`: Network?, - /** - * Override account type for ambiguous key prefixes (xpub/tpub) - */ - val `accountType`: AccountType? -) { - public companion object -} - - - -/** - * Parameters for starting an xpub transaction watcher. - */ -@kotlinx.serialization.Serializable -public data class WatcherParams ( - /** - * Caller-supplied identifier for this watcher. - */ - val `watcherId`: kotlin.String, - /** - * Wallet id that scopes the activities this watcher emits. Apps may use - * one wallet id for several account watchers and merge their snapshots. - */ - val `walletId`: 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 - * (defaults to `DEFAULT_GAP_LIMIT` when None). - */ - 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 - */ - public class InvalidExtendedKey( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * The provided address is invalid - */ - public class InvalidAddress( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Electrum connection or query failed - */ - public class ElectrumException( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * BDK wallet creation or operation error - */ - public class WalletException( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Wallet sync with Electrum failed - */ - public class SyncException( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * The key type/prefix is not recognized - */ - public class UnsupportedKeyType( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Network mismatch between key prefix and specified network - */ - public class NetworkMismatch( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Invalid transaction ID provided - */ - public class InvalidTxid( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * A valid transaction ID was not found in the wallet - */ - public class TransactionNotFound( - public val `errorDetails`: kotlin.String, - ) : AccountInfoException() { - 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` }" - } - -} - - - - -/** - * Account type classification for extended public keys. - * - * Determines the BIP standard, derivation path purpose, and script type. - */ - -@kotlinx.serialization.Serializable -public enum class AccountType { - - /** - * BIP44 legacy (P2PKH) — xpub/tpub prefix - */ - LEGACY, - /** - * BIP49 wrapped segwit (P2SH-P2WPKH) — ypub/upub prefix - */ - WRAPPED_SEGWIT, - /** - * BIP84 native segwit (P2WPKH) — zpub/vpub prefix - */ - NATIVE_SEGWIT, - /** - * BIP86 taproot (P2TR) - */ - TAPROOT; - public companion object -} - - - - - - -@kotlinx.serialization.Serializable -public sealed class Activity { - @kotlinx.serialization.Serializable - public data class Onchain( - val v1: OnchainActivity, - ) : Activity() { - } - @kotlinx.serialization.Serializable - public data class Lightning( - val v1: LightningActivity, - ) : 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` }" - } - -} - - - - - -@kotlinx.serialization.Serializable -public enum class ActivityFilter { - - ALL, - LIGHTNING, - ONCHAIN; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class ActivityType { - - ONCHAIN, - LIGHTNING; - public companion object -} - - - - - - - -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() = "" - } - -} - - - - - -@kotlinx.serialization.Serializable -public enum class AddressType { - - P2PKH, - P2SH, - P2WPKH, - P2WSH, - P2TR, - UNKNOWN; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BitcoinNetworkEnum { - - MAINNET, - TESTNET, - SIGNET, - REGTEST; - public companion object -} - - - - - - - -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, - ) : BlocktankException() { - 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` }" - } - -} - - - - - -/** - * Errors surfaced by the Boltz swaps module. - */ -public sealed class BoltzException: kotlin.Exception() { - - public class InitializationException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class ConnectionException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class DatabaseException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class ApiException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class SwapException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class BroadcastException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class InvalidInput( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class SerializationException( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class NotFound( - public val `errorDetails`: kotlin.String, - ) : BoltzException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - -} - - - - -/** - * Bitcoin network selection for Boltz swaps. Maps to the networks Boltz - * operates on (mainnet, testnet, regtest). - */ - -@kotlinx.serialization.Serializable -public enum class BoltzNetwork { - - MAINNET, - TESTNET, - REGTEST; - public companion object -} - - - - - - -/** - * Events emitted to a registered [`crate::modules::boltz::BoltzEventListener`] - * as swaps progress through their lifecycle. - */ -@kotlinx.serialization.Serializable -public sealed class BoltzSwapEvent { - - /** - * The swap transitioned to a new status. - */@kotlinx.serialization.Serializable - public data class StatusUpdate( - val `swapId`: kotlin.String, - val `status`: BoltzSwapStatus, - ) : BoltzSwapEvent() { - } - - /** - * A reverse swap was claimed onchain. `txid` is the claim transaction. - */@kotlinx.serialization.Serializable - public data class Claimed( - val `swapId`: kotlin.String, - val `txid`: kotlin.String, - ) : BoltzSwapEvent() { - } - - /** - * A submarine swap was refunded onchain. `txid` is the refund transaction. - */@kotlinx.serialization.Serializable - public data class Refunded( - val `swapId`: kotlin.String, - val `txid`: kotlin.String, - ) : BoltzSwapEvent() { - } - - /** - * An error occurred while processing the swap (e.g. an auto-claim failed). - */@kotlinx.serialization.Serializable - public data class Error( - val `swapId`: kotlin.String, - val `message`: kotlin.String, - ) : BoltzSwapEvent() { - } - -} - - - - - - -/** - * Typed view of the Boltz swap lifecycle. `Unknown` carries the raw status so - * new server-side states don't break the bindings. - * - * See . - */ -@kotlinx.serialization.Serializable -public sealed class BoltzSwapStatus { - - /** - * `swap.created` — initial state. - */ - @kotlinx.serialization.Serializable - public data object SwapCreated : BoltzSwapStatus() - - - /** - * `invoice.set` — invoice attached to a submarine swap. - */ - @kotlinx.serialization.Serializable - public data object InvoiceSet : BoltzSwapStatus() - - - /** - * `transaction.mempool` — a lockup transaction is in the mempool. - */ - @kotlinx.serialization.Serializable - public data object TransactionMempool : BoltzSwapStatus() - - - /** - * `transaction.confirmed` — a lockup transaction confirmed. - */ - @kotlinx.serialization.Serializable - public data object TransactionConfirmed : BoltzSwapStatus() - - - /** - * `invoice.pending` — Boltz is paying the submarine swap invoice. - */ - @kotlinx.serialization.Serializable - public data object InvoicePending : BoltzSwapStatus() - - - /** - * `invoice.paid` — submarine swap invoice paid by Boltz. - */ - @kotlinx.serialization.Serializable - public data object InvoicePaid : BoltzSwapStatus() - - - /** - * `invoice.settled` — reverse swap invoice settled (preimage revealed). - */ - @kotlinx.serialization.Serializable - public data object InvoiceSettled : BoltzSwapStatus() - - - /** - * `invoice.failedToPay` — submarine swap invoice could not be paid; refund. - */ - @kotlinx.serialization.Serializable - public data object InvoiceFailedToPay : BoltzSwapStatus() - - - /** - * `invoice.expired` — reverse swap invoice expired before payment. - */ - @kotlinx.serialization.Serializable - public data object InvoiceExpired : BoltzSwapStatus() - - - /** - * `transaction.claim.pending` — Boltz ready for a cooperative claim. - */ - @kotlinx.serialization.Serializable - public data object TransactionClaimPending : BoltzSwapStatus() - - - /** - * `transaction.claimed` — onchain funds claimed. - */ - @kotlinx.serialization.Serializable - public data object TransactionClaimed : BoltzSwapStatus() - - - /** - * `transaction.refunded` — onchain funds refunded. - */ - @kotlinx.serialization.Serializable - public data object TransactionRefunded : BoltzSwapStatus() - - - /** - * `transaction.lockupFailed` — wrong amount locked; can refund. - */ - @kotlinx.serialization.Serializable - public data object TransactionLockupFailed : BoltzSwapStatus() - - - /** - * `transaction.failed` — Boltz failed to lock the agreed funds. - */ - @kotlinx.serialization.Serializable - public data object TransactionFailed : BoltzSwapStatus() - - - /** - * `swap.expired` — swap expired without completing. - */ - @kotlinx.serialization.Serializable - public data object SwapExpired : BoltzSwapStatus() - - - /** - * Any status not yet modelled. `raw` holds the verbatim Boltz status. - */@kotlinx.serialization.Serializable - public data class Unknown( - val `raw`: kotlin.String, - ) : BoltzSwapStatus() { - } - -} - - - - - - -/** - * The direction of a Boltz swap. - * - * - `Submarine`: onchain Bitcoin -> Lightning (the user locks onchain funds, - * Boltz pays a Lightning invoice). - * - `Reverse`: Lightning -> onchain Bitcoin (the user pays a Boltz hold - * invoice, Boltz locks onchain funds the user then claims). - */ - -@kotlinx.serialization.Serializable -public enum class BoltzSwapType { - - SUBMARINE, - REVERSE; - public companion object -} - - - - - - - -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` }" - } - -} - - - - - -@kotlinx.serialization.Serializable -public enum class BtBolt11InvoiceState { - - PENDING, - HOLDING, - PAID, - CANCELED; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BtChannelOrderErrorType { - - WRONG_ORDER_STATE, - PEER_NOT_REACHABLE, - CHANNEL_REJECTED_BY_DESTINATION, - CHANNEL_REJECTED_BY_LSP, - BLOCKTANK_NOT_READY; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BtOpenChannelState { - - OPENING, - OPEN, - CLOSED; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BtOrderState { - - CREATED, - EXPIRED, - OPEN, - CLOSED; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BtOrderState2 { - - CREATED, - EXPIRED, - EXECUTED, - PAID; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BtPaymentState { - - CREATED, - PARTIALLY_PAID, - PAID, - REFUNDED, - REFUND_AVAILABLE; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class BtPaymentState2 { - - CREATED, - PAID, - REFUNDED, - REFUND_AVAILABLE, - CANCELED; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class CJitStateEnum { - - CREATED, - COMPLETED, - EXPIRED, - FAILED; - public companion object -} - - - - - - -/** - * Coin selection strategy for transaction composition. - */ - -@kotlinx.serialization.Serializable -public enum class CoinSelection { - - /** - * Branch-and-bound (default). Minimizes change by searching for exact matches. - */ - BRANCH_AND_BOUND, - /** - * Selects largest UTXOs first. Useful for UTXO consolidation. - */ - LARGEST_FIRST, - /** - * Selects oldest UTXOs first. Maximizes coin-age spending. - */ - OLDEST_FIRST; - public companion object -} - - - - - - -/** - * Output specification for transaction composition. - */ -@kotlinx.serialization.Serializable -public sealed class ComposeOutput { - - /** - * Payment to a specific address with a fixed amount (satoshis) - */@kotlinx.serialization.Serializable - public data class Payment( - val `address`: kotlin.String, - val `amountSats`: kotlin.ULong, - ) : ComposeOutput() { - } - - /** - * Send all remaining funds (after fees) to an address - */@kotlinx.serialization.Serializable - public data class SendMax( - val `address`: kotlin.String, - ) : ComposeOutput() { - } - - /** - * OP_RETURN data output (hex-encoded payload) - */@kotlinx.serialization.Serializable - public data class OpReturn( - val `dataHex`: kotlin.String, - ) : ComposeOutput() { - } - -} - - - - - - -/** - * Result of composing a transaction at a single fee rate. - */ -@kotlinx.serialization.Serializable -public sealed class ComposeResult { - - /** - * Successfully built a signable PSBT - */@kotlinx.serialization.Serializable - public data class Success( - /** - * Base64-encoded PSBT ready for signing - */ - val `psbt`: kotlin.String, - /** - * Total fee in satoshis - */ - val `fee`: kotlin.ULong, - /** - * Target fee rate in sat/vB (actual may differ slightly due to rounding) - */ - val `feeRate`: kotlin.Float, - /** - * Total value spent (payments + fee, excluding change). - * Uses BDK's `sent - received` semantics, which may undercount for - * self-transfers where the destination is also owned by the wallet. - */ - val `totalSpent`: kotlin.ULong, - ) : ComposeResult() { - } - - /** - * Composition failed (e.g. insufficient funds) - */@kotlinx.serialization.Serializable - public data class Error( - val `error`: kotlin.String, - ) : 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 DbBoltzException( - public val `errorDetails`: BoltzException, - ) : DbException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - public class InitializationException( - public val `errorDetails`: kotlin.String, - ) : DbException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - -} - - - - - -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, - public val `max`: kotlin.ULong, - ) : DecodingException() { - 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` }" - } - -} - - - - -/** - * How an application exchanges data with a hardware wallet. - */ - -@kotlinx.serialization.Serializable -public enum class HardwareWalletTransport { - - USB, - BLUETOOTH, - QR; - public companion object -} - - - - - - -/** - * A hardware-wallet vendor recognized by Bitkit. - */ - -@kotlinx.serialization.Serializable -public enum class HardwareWalletVendor { - - TREZOR, - FOUNDATION; - public companion object -} - - - - - - - -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, - public val `max`: kotlin.ULong, - ) : LnurlException() { - 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 AmountMismatch( - public val `requestedMsats`: kotlin.ULong, - public val `invoiceMsats`: kotlin.ULong, - ) : LnurlException() { - override val message: String - get() = "requestedMsats=${ `requestedMsats` }, invoiceMsats=${ `invoiceMsats` }" - } - - public class AuthenticationFailed( - ) : LnurlException() { - override val message: String - get() = "" - } - -} - - - - - -@kotlinx.serialization.Serializable -public enum class ManualRefundStateEnum { - - CREATED, - APPROVED, - REJECTED, - SENT; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class Network { - - /** - * Mainnet Bitcoin. - */ - BITCOIN, - /** - * Bitcoin's testnet network. - */ - TESTNET, - /** - * Bitcoin's testnet4 network. - */ - TESTNET4, - /** - * Bitcoin's signet network. - */ - SIGNET, - /** - * Bitcoin's regtest network. - */ - REGTEST; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class NetworkType { - - BITCOIN, - TESTNET, - REGTEST, - SIGNET; - public companion object -} - - - - - - - -public sealed class OnchainException: kotlin.Exception() { - - public class InvalidExtendedPublicKey( - public val `errorDetails`: kotlin.String, - ) : OnchainException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - -} - - - - -@kotlinx.serialization.Serializable -public sealed class PassphraseResponse { - - /** - * User cancelled — aborts the pending operation. - */ - @kotlinx.serialization.Serializable - public data object Cancel : PassphraseResponse() - - - /** - * Standard wallet — no passphrase, equivalent to `Some("")` on the device. - */ - @kotlinx.serialization.Serializable - public data object Standard : PassphraseResponse() - - - /** - * Hidden wallet — derived from the passphrase entered on the host. - */@kotlinx.serialization.Serializable - public data class Hidden( - 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() - - -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class PaymentState { - - PENDING, - SUCCEEDED, - FAILED; - public companion object -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class PaymentType { - - SENT, - RECEIVED; - public companion object -} - - - - - - - -public sealed class PsbtCompletionException: kotlin.Exception() { - - public class InvalidPsbt( - public val `reason`: kotlin.String, - ) : PsbtCompletionException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class CombineFailed( - public val `reason`: kotlin.String, - ) : PsbtCompletionException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class FinalizationFailed( - public val `reason`: kotlin.String, - ) : PsbtCompletionException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class VerificationFailed( - public val `reason`: kotlin.String, - ) : PsbtCompletionException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class ExtractionFailed( - public val `reason`: kotlin.String, - ) : PsbtCompletionException() { - override val message: String - get() = "reason=${ `reason` }" - } - -} - - - - -/** - * The type of a `pubkyauth://` deep-link flow. - */ - -@kotlinx.serialization.Serializable -public enum class PubkyAuthKind { - - SIGNIN, - SIGNUP; - public companion object -} - - - - - - - -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` }" - } - -} - - - - -@kotlinx.serialization.Serializable -public sealed class Scanner { - @kotlinx.serialization.Serializable - public data class OnChain( - val `invoice`: OnChainInvoice, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class Lightning( - val `invoice`: LightningInvoice, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class PubkyAuth( - val `data`: kotlin.String, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class LnurlChannel( - val `data`: LnurlChannelData, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class LnurlAuth( - val `data`: LnurlAuthData, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class LnurlWithdraw( - val `data`: LnurlWithdrawData, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class LnurlAddress( - val `data`: LnurlAddressData, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class LnurlPay( - val `data`: LnurlPayData, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class NodeId( - val `url`: kotlin.String, - val `network`: NetworkType, - ) : Scanner() { - } - @kotlinx.serialization.Serializable - public data class Gift( - val `code`: kotlin.String, - val `amount`: kotlin.ULong, - ) : Scanner() { - } - -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class SortDirection { - - ASC, - DESC; - public companion object -} - - - - - - - -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() = "" - } - -} - - - - -/** - * Bitcoin network / coin type for Trezor operations. - */ - -@kotlinx.serialization.Serializable -public enum class TrezorCoinType { - - /** - * Bitcoin mainnet - */ - BITCOIN, - /** - * Bitcoin testnet - */ - TESTNET, - /** - * Bitcoin signet (treated as testnet by the device) - */ - SIGNET, - /** - * Bitcoin regtest - */ - REGTEST; - public companion object -} - - - - - - - -/** - * Trezor-related errors exposed via FFI. - */ -public sealed class TrezorException: kotlin.Exception() { - - /** - * Transport layer error (USB/Bluetooth communication) - */ - public class TransportException( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * No Trezor device found - */ - public class DeviceNotFound( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Device disconnected during operation - */ - public class DeviceDisconnected( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Device is busy and the caller should back off before retrying - */ - public class DeviceBusy( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Connection error - */ - public class ConnectionException( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Protocol error (encoding/decoding) - */ - public class ProtocolException( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Pairing required for Bluetooth connection - */ - public class PairingRequired( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Pairing failed - */ - public class PairingFailed( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * PIN is required - */ - public class PinRequired( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * PIN entry cancelled - */ - public class PinCancelled( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Invalid PIN entered - */ - public class InvalidPin( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Passphrase is required - */ - public class PassphraseRequired( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Passphrase entry cancelled - */ - public class PassphraseCancelled( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Action cancelled by user on device - */ - public class UserCancelled( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Operation timed out - */ - public class Timeout( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Invalid derivation path - */ - public class InvalidPath( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Device returned an error - */ - public class DeviceException( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * Trezor manager not initialized - */ - public class NotInitialized( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * No device connected - */ - public class NotConnected( - ) : TrezorException() { - override val message: String - get() = "" - } - - /** - * Session error - */ - public class SessionException( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - - /** - * IO error - */ - public class IoException( - public val `errorDetails`: kotlin.String, - ) : TrezorException() { - override val message: String - get() = "errorDetails=${ `errorDetails` }" - } - -} - - - - -/** - * Script types for address derivation. - */ - -@kotlinx.serialization.Serializable -public enum class TrezorScriptType { - - /** - * P2PKH (legacy) - */ - SPEND_ADDRESS, - /** - * P2SH-P2WPKH (nested SegWit) - */ - SPEND_P2SH_WITNESS, - /** - * P2WPKH (native SegWit) - */ - SPEND_WITNESS, - /** - * P2TR (Taproot) - */ - SPEND_TAPROOT, - /** - * P2SH multisig - */ - SPEND_MULTISIG, - /** - * External/watch-only input (not signed by device) - */ - EXTERNAL; - public companion object -} - - - - - - -/** - * Structured transport error code returned by native callback operations. - */ - -@kotlinx.serialization.Serializable -public enum class TrezorTransportErrorCode { - - /** - * Device is busy and the caller should back off before retrying. - */ - DEVICE_BUSY; - public companion object -} - - - - - - -/** - * Transport type for Trezor devices. - */ - -@kotlinx.serialization.Serializable -public enum class TrezorTransportType { - - /** - * USB connection - */ - USB, - /** - * Bluetooth connection - */ - BLUETOOTH; - public companion object -} - - - - - - -/** - * Transaction direction from the wallet's perspective. - */ - -@kotlinx.serialization.Serializable -public enum class TxDirection { - - /** - * Wallet sent funds to an external address - */ - SENT, - /** - * Wallet received funds from an external source - */ - RECEIVED, - /** - * Wallet sent funds to itself (e.g. consolidation, change-only) - */ - SELF_TRANSFER; - public companion object -} - - - - - - - -public sealed class UrException: kotlin.Exception() { - - public class InvalidUr( - public val `reason`: kotlin.String, - ) : UrException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class TooLarge( - public val `reason`: kotlin.String, - ) : UrException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class InvalidPayload( - public val `reason`: kotlin.String, - ) : UrException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class InvalidPsbt( - public val `reason`: kotlin.String, - ) : UrException() { - override val message: String - get() = "reason=${ `reason` }" - } - - public class InvalidPassportExport( - public val `reason`: kotlin.String, - ) : UrException() { - override val message: String - get() = "reason=${ `reason` }" - } - -} - - - - -/** - * A completely decoded UR payload. - */ -@kotlinx.serialization.Serializable -public sealed class UrPayload { - - /** - * The byte string wrapped by a `bytes` registry item. - */@kotlinx.serialization.Serializable - public data class Bytes( - val `data`: kotlin.ByteArray, - ) : UrPayload() { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this::class != other::class) return false - - other as Bytes - return `data`.contentEquals(other.`data`) - } - override fun hashCode(): Int { - return `data`.contentHashCode() - } - } - - /** - * A `crypto-psbt` registry item, returned in Bitkit's usual base64 form. - */@kotlinx.serialization.Serializable - public data class CryptoPsbt( - val `psbt`: kotlin.String, - ) : UrPayload() { - } - - /** - * An uninterpreted UR registry item. - */@kotlinx.serialization.Serializable - public data class Cbor( - val `urType`: kotlin.String, - val `cbor`: kotlin.ByteArray, - ) : UrPayload() { - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other == null || this::class != other::class) return false - - other as Cbor - if (`urType` != other.`urType`) return false - if (!`cbor`.contentEquals(other.`cbor`)) return false - - return true - } - override fun hashCode(): Int { - var result = `urType`.hashCode() - result = 31 * result + `cbor`.contentHashCode() - return result - } - } - -} - - - - - - -/** - * Which wallet a connection should open. - * - * Passed to `trezor_connect` and consumed at connect time — the passphrase is - * a one-shot input, not retained anywhere afterwards. On THP devices (Safe - * 5/7) it is bound to the session at `ThpCreateNewSession`; on legacy devices - * the mid-operation `PassphraseRequest` is answered from the UI callback - * instead (see [`TrezorUiCallback`]). - */ -@kotlinx.serialization.Serializable -public sealed class WalletSelection { - - /** - * The standard wallet — no passphrase. - */ - @kotlinx.serialization.Serializable - public data object Standard : WalletSelection() - - - /** - * A hidden wallet whose passphrase is entered on the host. - */@kotlinx.serialization.Serializable - public data class Hidden( - val `passphrase`: kotlin.String, - ) : WalletSelection() { - } - - /** - * A hidden wallet whose passphrase is entered on the Trezor itself. - */ - @kotlinx.serialization.Serializable - 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. - * - * `activities` and `transaction_details` are persistence-ready: they carry - * the watcher's `wallet_id`, real decoded addresses, fees from the watched - * wallet's perspective, and DB-valid timestamps, so the app can store them - * directly through the normal Core activity APIs (e.g. `upsert_activity` / - * `upsert_transaction_details`). The two vecs are parallel by `tx_id`. - * `next_unused_external_address` is the synchronized wallet's current - * external receive address. - */@kotlinx.serialization.Serializable - public data class TransactionsChanged( - val `activities`: List, - val `transactionDetails`: List, - val `balance`: WalletBalance, - val `txCount`: kotlin.UInt, - val `blockHeight`: kotlin.UInt, - val `accountType`: AccountType, - val `nextUnusedExternalAddress`: AddressInfo, - ) : 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() - - -} - - - - - - - -@kotlinx.serialization.Serializable -public enum class WordCount { - - /** - * 12-word mnemonic (128 bits of entropy) - */ - WORDS12, - /** - * 15-word mnemonic (160 bits of entropy) - */ - WORDS15, - /** - * 18-word mnemonic (192 bits of entropy) - */ - WORDS18, - /** - * 21-word mnemonic (224 bits of entropy) - */ - WORDS21, - /** - * 24-word mnemonic (256 bits of entropy) - */ - WORDS24; - public companion object -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bindings/ios/BitkitCore.xcframework.zip b/bindings/ios/BitkitCore.xcframework.zip deleted file mode 100644 index 915049d8..00000000 Binary files a/bindings/ios/BitkitCore.xcframework.zip and /dev/null differ diff --git a/bindings/ios/BitkitCore.xcframework/Info.plist b/bindings/ios/BitkitCore.xcframework/Info.plist deleted file mode 100644 index b7357e03..00000000 --- a/bindings/ios/BitkitCore.xcframework/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - AvailableLibraries - - - BinaryPath - libbitkitcore.a - HeadersPath - Headers - LibraryIdentifier - ios-arm64-simulator - LibraryPath - libbitkitcore.a - SupportedArchitectures - - arm64 - - SupportedPlatform - ios - SupportedPlatformVariant - simulator - - - BinaryPath - libbitkitcore.a - HeadersPath - Headers - LibraryIdentifier - ios-arm64 - LibraryPath - libbitkitcore.a - SupportedArchitectures - - arm64 - - SupportedPlatform - ios - - - CFBundlePackageType - XFWK - XCFrameworkFormatVersion - 1.0 - - diff --git a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h b/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h deleted file mode 100644 index 79b2fb22..00000000 --- a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/bitkitcoreFFI.h +++ /dev/null @@ -1,2981 +0,0 @@ -// This file was autogenerated by some hot garbage in the `uniffi` crate. -// Trust me, you don't want to mess with it! - -#pragma once - -#include -#include -#include - -// The following structs are used to implement the lowest level -// of the FFI, and thus useful to multiple uniffied crates. -// We ensure they are declared exactly once, with a header guard, UNIFFI_SHARED_H. -#ifdef UNIFFI_SHARED_H - // We also try to prevent mixing versions of shared uniffi header structs. - // If you add anything to the #else block, you must increment the version suffix in UNIFFI_SHARED_HEADER_V4 - #ifndef UNIFFI_SHARED_HEADER_V4 - #error Combining helper code from multiple versions of uniffi is not supported - #endif // ndef UNIFFI_SHARED_HEADER_V4 -#else -#define UNIFFI_SHARED_H -#define UNIFFI_SHARED_HEADER_V4 -// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️ -// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️ - -typedef struct RustBuffer -{ - uint64_t capacity; - uint64_t len; - uint8_t *_Nullable data; -} RustBuffer; - -typedef struct ForeignBytes -{ - int32_t len; - const uint8_t *_Nullable data; -} ForeignBytes; - -// Error definitions -typedef struct RustCallStatus { - int8_t code; - RustBuffer errorBuf; -} RustCallStatus; - -// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️ -// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️ -#endif // def UNIFFI_SHARED_H -#ifndef UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK -#define UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK -typedef void (*UniffiRustFutureContinuationCallback)(uint64_t, int8_t - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_FREE -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_FREE -typedef void (*UniffiForeignFutureFree)(uint64_t - ); - -#endif -#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE -#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE -typedef void (*UniffiCallbackInterfaceFree)(uint64_t - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE -#define UNIFFI_FFIDEF_FOREIGN_FUTURE -typedef struct UniffiForeignFuture { - uint64_t handle; - UniffiForeignFutureFree _Nonnull free; -} UniffiForeignFuture; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U8 -typedef struct UniffiForeignFutureStructU8 { - uint8_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU8; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8 -typedef void (*UniffiForeignFutureCompleteU8)(uint64_t, UniffiForeignFutureStructU8 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I8 -typedef struct UniffiForeignFutureStructI8 { - int8_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI8; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8 -typedef void (*UniffiForeignFutureCompleteI8)(uint64_t, UniffiForeignFutureStructI8 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U16 -typedef struct UniffiForeignFutureStructU16 { - uint16_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU16; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16 -typedef void (*UniffiForeignFutureCompleteU16)(uint64_t, UniffiForeignFutureStructU16 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I16 -typedef struct UniffiForeignFutureStructI16 { - int16_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI16; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16 -typedef void (*UniffiForeignFutureCompleteI16)(uint64_t, UniffiForeignFutureStructI16 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U32 -typedef struct UniffiForeignFutureStructU32 { - uint32_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU32; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32 -typedef void (*UniffiForeignFutureCompleteU32)(uint64_t, UniffiForeignFutureStructU32 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I32 -typedef struct UniffiForeignFutureStructI32 { - int32_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI32; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32 -typedef void (*UniffiForeignFutureCompleteI32)(uint64_t, UniffiForeignFutureStructI32 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U64 -typedef struct UniffiForeignFutureStructU64 { - uint64_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU64; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64 -typedef void (*UniffiForeignFutureCompleteU64)(uint64_t, UniffiForeignFutureStructU64 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I64 -typedef struct UniffiForeignFutureStructI64 { - int64_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI64; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64 -typedef void (*UniffiForeignFutureCompleteI64)(uint64_t, UniffiForeignFutureStructI64 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F32 -typedef struct UniffiForeignFutureStructF32 { - float returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructF32; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32 -typedef void (*UniffiForeignFutureCompleteF32)(uint64_t, UniffiForeignFutureStructF32 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F64 -typedef struct UniffiForeignFutureStructF64 { - double returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructF64; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64 -typedef void (*UniffiForeignFutureCompleteF64)(uint64_t, UniffiForeignFutureStructF64 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_POINTER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_POINTER -typedef struct UniffiForeignFutureStructPointer { - void*_Nonnull returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructPointer; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_POINTER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_POINTER -typedef void (*UniffiForeignFutureCompletePointer)(uint64_t, UniffiForeignFutureStructPointer - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_RUST_BUFFER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_RUST_BUFFER -typedef struct UniffiForeignFutureStructRustBuffer { - RustBuffer returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructRustBuffer; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER -typedef void (*UniffiForeignFutureCompleteRustBuffer)(uint64_t, UniffiForeignFutureStructRustBuffer - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_VOID -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_VOID -typedef struct UniffiForeignFutureStructVoid { - RustCallStatus callStatus; -} UniffiForeignFutureStructVoid; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID -typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t, UniffiForeignFutureStructVoid - ); - -#endif -#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER_METHOD0 -#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER_METHOD0 -typedef void (*UniffiCallbackInterfaceBoltzEventListenerMethod0)(uint64_t, RustBuffer, void* _Nonnull, - RustCallStatus *_Nonnull uniffiCallStatus - ); - -#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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - RustCallStatus *_Nonnull uniffiCallStatus - ); - -#endif -#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER -#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER -typedef struct UniffiVTableCallbackInterfaceBoltzEventListener { - UniffiCallbackInterfaceBoltzEventListenerMethod0 _Nonnull onEvent; - UniffiCallbackInterfaceFree _Nonnull uniffiFree; -} UniffiVTableCallbackInterfaceBoltzEventListener; - -#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 -typedef struct UniffiVTableCallbackInterfaceTrezorTransportCallback { - UniffiCallbackInterfaceTrezorTransportCallbackMethod0 _Nonnull enumerateDevices; - UniffiCallbackInterfaceTrezorTransportCallbackMethod1 _Nonnull openDevice; - UniffiCallbackInterfaceTrezorTransportCallbackMethod2 _Nonnull closeDevice; - UniffiCallbackInterfaceTrezorTransportCallbackMethod3 _Nonnull readChunk; - UniffiCallbackInterfaceTrezorTransportCallbackMethod4 _Nonnull writeChunk; - UniffiCallbackInterfaceTrezorTransportCallbackMethod5 _Nonnull getChunkSize; - UniffiCallbackInterfaceTrezorTransportCallbackMethod6 _Nonnull callMessage; - UniffiCallbackInterfaceTrezorTransportCallbackMethod7 _Nonnull getPairingCode; - UniffiCallbackInterfaceTrezorTransportCallbackMethod8 _Nonnull saveThpCredential; - UniffiCallbackInterfaceTrezorTransportCallbackMethod9 _Nonnull loadThpCredential; - UniffiCallbackInterfaceTrezorTransportCallbackMethod10 _Nonnull logDebug; - UniffiCallbackInterfaceFree _Nonnull uniffiFree; -} UniffiVTableCallbackInterfaceTrezorTransportCallback; - -#endif -#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK -#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK -typedef struct UniffiVTableCallbackInterfaceTrezorUiCallback { - UniffiCallbackInterfaceTrezorUiCallbackMethod0 _Nonnull onPinRequest; - UniffiCallbackInterfaceTrezorUiCallbackMethod1 _Nonnull onPassphraseRequest; - UniffiCallbackInterfaceFree _Nonnull uniffiFree; -} UniffiVTableCallbackInterfaceTrezorUiCallback; - -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_BOLTZEVENTLISTENER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_BOLTZEVENTLISTENER -void*_Nonnull uniffi_bitkitcore_fn_clone_boltzeventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_BOLTZEVENTLISTENER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_BOLTZEVENTLISTENER -void uniffi_bitkitcore_fn_free_boltzeventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_BOLTZEVENTLISTENER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_BOLTZEVENTLISTENER -void uniffi_bitkitcore_fn_init_callback_vtable_boltzeventlistener(const UniffiVTableCallbackInterfaceBoltzEventListener* _Nonnull vtable -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_BOLTZEVENTLISTENER_ON_EVENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_BOLTZEVENTLISTENER_ON_EVENT -void uniffi_bitkitcore_fn_method_boltzeventlistener_on_event(void*_Nonnull ptr, RustBuffer event, RustCallStatus *_Nonnull out_status -); -#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 -void*_Nonnull uniffi_bitkitcore_fn_clone_trezortransportcallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORTRANSPORTCALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORTRANSPORTCALLBACK -void uniffi_bitkitcore_fn_free_trezortransportcallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORTRANSPORTCALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORTRANSPORTCALLBACK -void uniffi_bitkitcore_fn_init_callback_vtable_trezortransportcallback(const UniffiVTableCallbackInterfaceTrezorTransportCallback* _Nonnull vtable -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_enumerate_devices(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_open_device(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_close_device(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_read_chunk(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_write_chunk(void*_Nonnull ptr, RustBuffer path, RustBuffer data, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE -uint32_t uniffi_bitkitcore_fn_method_trezortransportcallback_get_chunk_size(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_call_message(void*_Nonnull ptr, RustBuffer path, uint16_t message_type, RustBuffer data, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_get_pairing_code(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL -int8_t uniffi_bitkitcore_fn_method_trezortransportcallback_save_thp_credential(void*_Nonnull ptr, RustBuffer device_id, RustBuffer credential_json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_load_thp_credential(void*_Nonnull ptr, RustBuffer device_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG -void uniffi_bitkitcore_fn_method_trezortransportcallback_log_debug(void*_Nonnull ptr, RustBuffer tag, RustBuffer message, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORUICALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORUICALLBACK -void*_Nonnull uniffi_bitkitcore_fn_clone_trezoruicallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORUICALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORUICALLBACK -void uniffi_bitkitcore_fn_free_trezoruicallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORUICALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORUICALLBACK -void uniffi_bitkitcore_fn_init_callback_vtable_trezoruicallback(const UniffiVTableCallbackInterfaceTrezorUiCallback* _Nonnull vtable -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST -RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_pin_request(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST -RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request(void*_Nonnull ptr, int8_t on_device, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_URDECODER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_URDECODER -void*_Nonnull uniffi_bitkitcore_fn_clone_urdecoder(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_URDECODER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_URDECODER -void uniffi_bitkitcore_fn_free_urdecoder(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CONSTRUCTOR_URDECODER_NEW -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CONSTRUCTOR_URDECODER_NEW -void*_Nonnull uniffi_bitkitcore_fn_constructor_urdecoder_new(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RECEIVE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RECEIVE -RustBuffer uniffi_bitkitcore_fn_method_urdecoder_receive(void*_Nonnull ptr, RustBuffer frame, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RESET -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RESET -void uniffi_bitkitcore_fn_method_urdecoder_reset(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_activities_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_activities_to_json(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_activity_tags_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_activity_tags_to_json(RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA -void uniffi_bitkitcore_fn_func_add_pre_activity_metadata(RustBuffer pre_activity_metadata, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS -void uniffi_bitkitcore_fn_func_add_pre_activity_metadata_tags(RustBuffer wallet_id, RustBuffer payment_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_TAGS -void uniffi_bitkitcore_fn_func_add_tags(RustBuffer wallet_id, RustBuffer activity_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_APPROVE_PUBKY_AUTH -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_APPROVE_PUBKY_AUTH -uint64_t uniffi_bitkitcore_fn_func_approve_pubky_auth(RustBuffer auth_url, RustBuffer secret_key_hex -); -#endif -#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_BOLTZ_CLAIM_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CLAIM_REVERSE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_claim_reverse_swap(RustBuffer swap_id, RustBuffer mnemonic, RustBuffer bip39_passphrase, RustBuffer fee_rate_sat_per_vb -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_REVERSE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_create_reverse_swap(RustBuffer network, RustBuffer electrum_url, uint64_t amount_sat, RustBuffer claim_address, RustBuffer mnemonic, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_create_submarine_swap(RustBuffer network, RustBuffer electrum_url, RustBuffer invoice, RustBuffer mnemonic, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_REVERSE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_REVERSE_LIMITS -uint64_t uniffi_bitkitcore_fn_func_boltz_get_reverse_limits(RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -uint64_t uniffi_bitkitcore_fn_func_boltz_get_submarine_limits(RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_get_swap(RustBuffer swap_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_PENDING_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_PENDING_SWAPS -uint64_t uniffi_bitkitcore_fn_func_boltz_list_pending_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_SWAPS -uint64_t uniffi_bitkitcore_fn_func_boltz_list_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_refund_submarine_swap(RustBuffer swap_id, RustBuffer refund_address, RustBuffer mnemonic, RustBuffer bip39_passphrase, RustBuffer fee_rate_sat_per_vb -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_START_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_START_SWAP_UPDATES -uint64_t uniffi_bitkitcore_fn_func_boltz_start_swap_updates(RustBuffer network, void*_Nonnull listener, RustBuffer mnemonic, RustBuffer bip39_passphrase, RustBuffer fee_rate_sat_per_vb, int8_t accept_zero_conf -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_STOP_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_STOP_SWAP_UPDATES -uint64_t uniffi_bitkitcore_fn_func_boltz_stop_swap_updates(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION -uint64_t uniffi_bitkitcore_fn_func_broadcast_sweep_transaction(RustBuffer psbt, RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer electrum_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS -RustBuffer uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options(RustBuffer params, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CHECK_SWEEPABLE_BALANCES -uint64_t uniffi_bitkitcore_fn_func_check_sweepable_balances(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer electrum_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_closed_channels_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_closed_channels_to_json(RustBuffer channels, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CHANNEL_REQUEST_URL -RustBuffer uniffi_bitkitcore_fn_func_create_channel_request_url(RustBuffer k1, RustBuffer callback, RustBuffer local_node_id, int8_t is_private, int8_t cancel, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CJIT_ENTRY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CJIT_ENTRY -uint64_t uniffi_bitkitcore_fn_func_create_cjit_entry(uint64_t channel_size_sat, uint64_t invoice_sat, RustBuffer invoice_description, RustBuffer node_id, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_ORDER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_ORDER -uint64_t uniffi_bitkitcore_fn_func_create_order(uint64_t lsp_balance_sat, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_WITHDRAW_CALLBACK_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_WITHDRAW_CALLBACK_URL -RustBuffer uniffi_bitkitcore_fn_func_create_withdraw_callback_url(RustBuffer k1, RustBuffer callback, RustBuffer payment_request, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DECODE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DECODE -uint64_t uniffi_bitkitcore_fn_func_decode(RustBuffer invoice -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITIES_BY_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITIES_BY_WALLET_ID -uint32_t uniffi_bitkitcore_fn_func_delete_activities_by_wallet_id(RustBuffer wallet_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITY_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITY_BY_ID -int8_t uniffi_bitkitcore_fn_func_delete_activity_by_id(RustBuffer wallet_id, RustBuffer activity_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_PRE_ACTIVITY_METADATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_PRE_ACTIVITY_METADATA -void uniffi_bitkitcore_fn_func_delete_pre_activity_metadata(RustBuffer wallet_id, RustBuffer payment_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_TRANSACTION_DETAILS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_TRANSACTION_DETAILS -int8_t uniffi_bitkitcore_fn_func_delete_transaction_details(RustBuffer wallet_id, RustBuffer tx_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESS -RustBuffer uniffi_bitkitcore_fn_func_derive_bitcoin_address(RustBuffer mnemonic_phrase, RustBuffer derivation_path_str, RustBuffer network, RustBuffer bip39_passphrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESSES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESSES -RustBuffer uniffi_bitkitcore_fn_func_derive_bitcoin_addresses(RustBuffer mnemonic_phrase, RustBuffer derivation_path_str, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer is_change, RustBuffer start_index, RustBuffer count, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_ONCHAIN_DESCRIPTOR -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_ONCHAIN_DESCRIPTOR -RustBuffer uniffi_bitkitcore_fn_func_derive_onchain_descriptor(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer account_type, uint32_t account_index, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PRIVATE_KEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PRIVATE_KEY -RustBuffer uniffi_bitkitcore_fn_func_derive_private_key(RustBuffer mnemonic_phrase, RustBuffer derivation_path_str, RustBuffer network, RustBuffer bip39_passphrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PUBKY_SECRET_KEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PUBKY_SECRET_KEY -RustBuffer uniffi_bitkitcore_fn_func_derive_pubky_secret_key(RustBuffer seed, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_WALLET_ID -RustBuffer uniffi_bitkitcore_fn_func_derive_wallet_id(RustBuffer device_type, RustBuffer xpubs, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ENTROPY_TO_MNEMONIC -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ENTROPY_TO_MNEMONIC -RustBuffer uniffi_bitkitcore_fn_func_entropy_to_mnemonic(RustBuffer entropy, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE -uint64_t uniffi_bitkitcore_fn_func_estimate_order_fee(uint64_t lsp_balance_sat, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE_FULL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE_FULL -uint64_t uniffi_bitkitcore_fn_func_estimate_order_fee_full(uint64_t lsp_balance_sat, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_CONTACTS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_CONTACTS -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_contacts(RustBuffer public_key -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_file(RustBuffer uri -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE_STRING -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE_STRING -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_file_string(RustBuffer uri -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_PROFILE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_PROFILE -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_profile(RustBuffer public_key -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FINALIZE_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FINALIZE_PSBT -RustBuffer uniffi_bitkitcore_fn_func_finalize_psbt(RustBuffer original_psbt, RustBuffer signed_psbt, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GENERATE_MNEMONIC -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GENERATE_MNEMONIC -RustBuffer uniffi_bitkitcore_fn_func_generate_mnemonic(RustBuffer word_count, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES -RustBuffer uniffi_bitkitcore_fn_func_get_activities(RustBuffer wallet_id, RustBuffer filter, RustBuffer tx_type, RustBuffer tags, RustBuffer search, RustBuffer min_date, RustBuffer max_date, RustBuffer limit, RustBuffer sort_direction, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_BY_TAG -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_BY_TAG -RustBuffer uniffi_bitkitcore_fn_func_get_activities_by_tag(RustBuffer wallet_id, RustBuffer tag, RustBuffer limit, RustBuffer sort_direction, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_TAGS -RustBuffer uniffi_bitkitcore_fn_func_get_activities_tags(RustBuffer wallet_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_ID -RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_id(RustBuffer wallet_id, RustBuffer activity_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_TX_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_TX_ID -RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_tx_id(RustBuffer wallet_id, RustBuffer tx_id, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_CLOSED_CHANNELS -RustBuffer uniffi_bitkitcore_fn_func_get_all_closed_channels(RustBuffer sort_direction, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_SUGGESTIONS -RustBuffer uniffi_bitkitcore_fn_func_get_bip39_suggestions(RustBuffer partial_word, uint32_t limit, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CJIT_ENTRIES -uint64_t uniffi_bitkitcore_fn_func_get_cjit_entries(RustBuffer entry_ids, RustBuffer filter, int8_t refresh -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CLOSED_CHANNEL_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CLOSED_CHANNEL_BY_ID -RustBuffer uniffi_bitkitcore_fn_func_get_closed_channel_by_id(RustBuffer channel_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_GAP_LIMIT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_GAP_LIMIT -uint32_t uniffi_bitkitcore_fn_func_get_default_gap_limit(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_LSP_BALANCE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_LSP_BALANCE -uint64_t uniffi_bitkitcore_fn_func_get_default_lsp_balance(RustBuffer params, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_WALLET_ID -RustBuffer uniffi_bitkitcore_fn_func_get_default_wallet_id(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_GIFT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_GIFT -uint64_t uniffi_bitkitcore_fn_func_get_gift(RustBuffer gift_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_INFO -uint64_t uniffi_bitkitcore_fn_func_get_info(RustBuffer refresh -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE -uint64_t uniffi_bitkitcore_fn_func_get_lnurl_invoice(RustBuffer address, uint64_t amount_satoshis -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE_FOR_PAY_DATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE_FOR_PAY_DATA -uint64_t uniffi_bitkitcore_fn_func_get_lnurl_invoice_for_pay_data(RustBuffer data, uint64_t amount_msats, RustBuffer comment -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_MIN_ZERO_CONF_TX_FEE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_MIN_ZERO_CONF_TX_FEE -uint64_t uniffi_bitkitcore_fn_func_get_min_zero_conf_tx_fee(RustBuffer order_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ORDERS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ORDERS -uint64_t uniffi_bitkitcore_fn_func_get_orders(RustBuffer order_ids, RustBuffer filter, int8_t refresh -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PAYMENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PAYMENT -uint64_t uniffi_bitkitcore_fn_func_get_payment(RustBuffer payment_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA -RustBuffer uniffi_bitkitcore_fn_func_get_pre_activity_metadata(RustBuffer wallet_id, RustBuffer search_key, int8_t search_by_address, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA_LIST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA_LIST -RustBuffer uniffi_bitkitcore_fn_func_get_pre_activity_metadata_list(RustBuffer wallet_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -RustBuffer uniffi_bitkitcore_fn_func_get_supported_hardware_wallets(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TAGS -RustBuffer uniffi_bitkitcore_fn_func_get_tags(RustBuffer wallet_id, RustBuffer activity_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TRANSACTION_DETAILS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TRANSACTION_DETAILS -RustBuffer uniffi_bitkitcore_fn_func_get_transaction_details(RustBuffer wallet_id, RustBuffer tx_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_ORDER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_ORDER -uint64_t uniffi_bitkitcore_fn_func_gift_order(RustBuffer client_node_id, RustBuffer code -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_PAY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_PAY -uint64_t uniffi_bitkitcore_fn_func_gift_pay(RustBuffer invoice -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INIT_DB -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INIT_DB -RustBuffer uniffi_bitkitcore_fn_func_init_db(RustBuffer base_path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INSERT_ACTIVITY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INSERT_ACTIVITY -void uniffi_bitkitcore_fn_func_insert_activity(RustBuffer activity, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_ADDRESS_USED -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_ADDRESS_USED -int8_t uniffi_bitkitcore_fn_func_is_address_used(RustBuffer address, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_VALID_BIP39_WORD -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_VALID_BIP39_WORD -int8_t uniffi_bitkitcore_fn_func_is_valid_bip39_word(RustBuffer word, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_LNURL_AUTH -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_LNURL_AUTH -uint64_t uniffi_bitkitcore_fn_func_lnurl_auth(RustBuffer domain, RustBuffer k1, RustBuffer callback, RustBuffer bip32_mnemonic, RustBuffer network, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MARK_ACTIVITY_AS_SEEN -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MARK_ACTIVITY_AS_SEEN -void uniffi_bitkitcore_fn_func_mark_activity_as_seen(RustBuffer wallet_id, RustBuffer activity_id, uint64_t seen_at, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITIES_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITIES_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_activities_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_activity_tags_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_pre_activity_metadata_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_transaction_details_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_ENTROPY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_ENTROPY -RustBuffer uniffi_bitkitcore_fn_func_mnemonic_to_entropy(RustBuffer mnemonic_phrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_SEED -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_SEED -RustBuffer uniffi_bitkitcore_fn_func_mnemonic_to_seed(RustBuffer mnemonic_phrase, RustBuffer passphrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_BROADCAST_RAW_TX -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_BROADCAST_RAW_TX -uint64_t uniffi_bitkitcore_fn_func_onchain_broadcast_raw_tx(RustBuffer serialized_tx, RustBuffer electrum_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_COMPOSE_TRANSACTION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_COMPOSE_TRANSACTION -uint64_t uniffi_bitkitcore_fn_func_onchain_compose_transaction(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ACCOUNT_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ACCOUNT_INFO -uint64_t uniffi_bitkitcore_fn_func_onchain_get_account_info(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer network, RustBuffer gap_limit, RustBuffer script_type -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ADDRESS_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ADDRESS_INFO -uint64_t uniffi_bitkitcore_fn_func_onchain_get_address_info(RustBuffer address, RustBuffer electrum_url, RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL -uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_detail(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer txid, RustBuffer network, RustBuffer script_type -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY -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 -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PARSE_PUBKY_AUTH_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PARSE_PUBKY_AUTH_URL -RustBuffer uniffi_bitkitcore_fn_func_parse_pubky_auth_url(RustBuffer auth_url, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PASSPORT_PARSE_ACCOUNT_EXPORT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PASSPORT_PARSE_ACCOUNT_EXPORT -RustBuffer uniffi_bitkitcore_fn_func_passport_parse_account_export(RustBuffer data, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_pre_activity_metadata_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_pre_activity_metadata_to_json(RustBuffer metadata, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP -uint64_t uniffi_bitkitcore_fn_func_prepare_legacy_rn_native_segwit_recovery_sweep(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer electrum_url, RustBuffer destination_address, RustBuffer fee_rate_sats_per_vbyte, uint32_t index_limit, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_SWEEP_TRANSACTION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_SWEEP_TRANSACTION -uint64_t uniffi_bitkitcore_fn_func_prepare_sweep_transaction(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer electrum_url, RustBuffer destination_address, RustBuffer fee_rate_sats_per_vbyte -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET -RustBuffer uniffi_bitkitcore_fn_func_pubky_public_key_from_secret(RustBuffer secret_key_hex, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUT_WITH_SECRET_KEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUT_WITH_SECRET_KEY -uint64_t uniffi_bitkitcore_fn_func_pubky_put_with_secret_key(RustBuffer secret_key_hex, RustBuffer path, RustBuffer content -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_DELETE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_DELETE -uint64_t uniffi_bitkitcore_fn_func_pubky_session_delete(RustBuffer session_secret, RustBuffer path -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_LIST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_LIST -uint64_t uniffi_bitkitcore_fn_func_pubky_session_list(RustBuffer session_secret, RustBuffer dir_path -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_PUT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_PUT -uint64_t uniffi_bitkitcore_fn_func_pubky_session_put(RustBuffer session_secret, RustBuffer path, RustBuffer content -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_IN -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_IN -uint64_t uniffi_bitkitcore_fn_func_pubky_sign_in(RustBuffer secret_key_hex -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_UP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_UP -uint64_t uniffi_bitkitcore_fn_func_pubky_sign_up(RustBuffer secret_key_hex, RustBuffer homeserver_public_key_z32, RustBuffer signup_code -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGISTER_DEVICE -uint64_t uniffi_bitkitcore_fn_func_register_device(RustBuffer device_token, RustBuffer public_key, RustBuffer features, RustBuffer node_id, RustBuffer iso_timestamp, RustBuffer signature, RustBuffer is_production, RustBuffer custom_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_CLOSE_CHANNEL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_CLOSE_CHANNEL -uint64_t uniffi_bitkitcore_fn_func_regtest_close_channel(RustBuffer funding_tx_id, uint32_t vout, RustBuffer force_close_after_s -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_DEPOSIT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_DEPOSIT -uint64_t uniffi_bitkitcore_fn_func_regtest_deposit(RustBuffer address, RustBuffer amount_sat -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_GET_PAYMENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_GET_PAYMENT -uint64_t uniffi_bitkitcore_fn_func_regtest_get_payment(RustBuffer payment_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_MINE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_MINE -uint64_t uniffi_bitkitcore_fn_func_regtest_mine(RustBuffer count -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_PAY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_PAY -uint64_t uniffi_bitkitcore_fn_func_regtest_pay(RustBuffer invoice, RustBuffer amount_sat -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID -int8_t uniffi_bitkitcore_fn_func_remove_closed_channel_by_id(RustBuffer channel_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS -void uniffi_bitkitcore_fn_func_remove_pre_activity_metadata_tags(RustBuffer wallet_id, RustBuffer payment_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_TAGS -void uniffi_bitkitcore_fn_func_remove_tags(RustBuffer wallet_id, RustBuffer activity_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS -void uniffi_bitkitcore_fn_func_reset_pre_activity_metadata_tags(RustBuffer wallet_id, RustBuffer payment_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESOLVE_PUBKY_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESOLVE_PUBKY_URL -RustBuffer uniffi_bitkitcore_fn_func_resolve_pubky_url(RustBuffer uri, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS -uint64_t uniffi_bitkitcore_fn_func_scan_legacy_rn_native_segwit_recovery_funds(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer electrum_url, uint32_t index_limit, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SERIALIZED_EXTENDED_PUBKEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SERIALIZED_EXTENDED_PUBKEY -RustBuffer uniffi_bitkitcore_fn_func_serialized_extended_pubkey(RustBuffer xpub, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_START_PUBKY_AUTH -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_START_PUBKY_AUTH -uint64_t uniffi_bitkitcore_fn_func_start_pubky_auth(RustBuffer caps -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TEST_NOTIFICATION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TEST_NOTIFICATION -uint64_t uniffi_bitkitcore_fn_func_test_notification(RustBuffer device_token, RustBuffer secret_message, RustBuffer notification_type, RustBuffer custom_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_transaction_details_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_transaction_details_to_json(RustBuffer details, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE -RustBuffer uniffi_bitkitcore_fn_func_trezor_account_type_to_script_type(RustBuffer account_type, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CLEAR_CREDENTIALS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CLEAR_CREDENTIALS -uint64_t uniffi_bitkitcore_fn_func_trezor_clear_credentials(RustBuffer device_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CONNECT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CONNECT -uint64_t uniffi_bitkitcore_fn_func_trezor_connect(RustBuffer device_id, RustBuffer selection -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_ADDRESS -uint64_t uniffi_bitkitcore_fn_func_trezor_get_address(RustBuffer params -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_PUBLIC_KEY -uint64_t uniffi_bitkitcore_fn_func_trezor_get_public_key(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_INITIALIZE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_INITIALIZE -uint64_t uniffi_bitkitcore_fn_func_trezor_initialize(RustBuffer credential_path -); -#endif -#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_REFRESH_FEATURES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_REFRESH_FEATURES -uint64_t uniffi_bitkitcore_fn_func_trezor_refresh_features(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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_TRANSPORT_CALLBACK -void uniffi_bitkitcore_fn_func_trezor_set_transport_callback(void*_Nonnull callback, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_UI_CALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_UI_CALLBACK -void uniffi_bitkitcore_fn_func_trezor_set_ui_callback(void*_Nonnull callback, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_MESSAGE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_MESSAGE -uint64_t uniffi_bitkitcore_fn_func_trezor_sign_message(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX -uint64_t uniffi_bitkitcore_fn_func_trezor_sign_tx(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX_FROM_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX_FROM_PSBT -uint64_t uniffi_bitkitcore_fn_func_trezor_sign_tx_from_psbt(RustBuffer psbt_base64, RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_VERIFY_MESSAGE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_VERIFY_MESSAGE -uint64_t uniffi_bitkitcore_fn_func_trezor_verify_message(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_ACTIVITY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_ACTIVITY -void uniffi_bitkitcore_fn_func_update_activity(RustBuffer activity_id, RustBuffer activity, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_BLOCKTANK_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_BLOCKTANK_URL -uint64_t uniffi_bitkitcore_fn_func_update_blocktank_url(RustBuffer new_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITIES -void uniffi_bitkitcore_fn_func_upsert_activities(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITY -void uniffi_bitkitcore_fn_func_upsert_activity(RustBuffer activity, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CJIT_ENTRIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CJIT_ENTRIES -uint64_t uniffi_bitkitcore_fn_func_upsert_cjit_entries(RustBuffer entries -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNEL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNEL -void uniffi_bitkitcore_fn_func_upsert_closed_channel(RustBuffer channel, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNELS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNELS -void uniffi_bitkitcore_fn_func_upsert_closed_channels(RustBuffer channels, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_INFO -uint64_t uniffi_bitkitcore_fn_func_upsert_info(RustBuffer info -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_LIGHTNING_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_LIGHTNING_ACTIVITIES -void uniffi_bitkitcore_fn_func_upsert_lightning_activities(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ONCHAIN_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ONCHAIN_ACTIVITIES -void uniffi_bitkitcore_fn_func_upsert_onchain_activities(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ORDERS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ORDERS -uint64_t uniffi_bitkitcore_fn_func_upsert_orders(RustBuffer orders -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_PRE_ACTIVITY_METADATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_PRE_ACTIVITY_METADATA -void uniffi_bitkitcore_fn_func_upsert_pre_activity_metadata(RustBuffer pre_activity_metadata, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TAGS -void uniffi_bitkitcore_fn_func_upsert_tags(RustBuffer activity_tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TRANSACTION_DETAILS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TRANSACTION_DETAILS -void uniffi_bitkitcore_fn_func_upsert_transaction_details(RustBuffer details_list, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UR_ENCODE_CRYPTO_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UR_ENCODE_CRYPTO_PSBT -RustBuffer uniffi_bitkitcore_fn_func_ur_encode_crypto_psbt(RustBuffer psbt, uint32_t max_fragment_length, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_BITCOIN_ADDRESS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_BITCOIN_ADDRESS -RustBuffer uniffi_bitkitcore_fn_func_validate_bitcoin_address(RustBuffer address, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_MNEMONIC -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_MNEMONIC -void uniffi_bitkitcore_fn_func_validate_mnemonic(RustBuffer mnemonic_phrase, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_ALLOC -RustBuffer ffi_bitkitcore_rustbuffer_alloc(uint64_t size, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FROM_BYTES -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FROM_BYTES -RustBuffer ffi_bitkitcore_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FREE -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FREE -void ffi_bitkitcore_rustbuffer_free(RustBuffer buf, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_RESERVE -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_RESERVE -RustBuffer ffi_bitkitcore_rustbuffer_reserve(RustBuffer buf, uint64_t additional, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U8 -void ffi_bitkitcore_rust_future_poll_u8(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U8 -void ffi_bitkitcore_rust_future_cancel_u8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U8 -void ffi_bitkitcore_rust_future_free_u8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U8 -uint8_t ffi_bitkitcore_rust_future_complete_u8(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I8 -void ffi_bitkitcore_rust_future_poll_i8(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I8 -void ffi_bitkitcore_rust_future_cancel_i8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I8 -void ffi_bitkitcore_rust_future_free_i8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I8 -int8_t ffi_bitkitcore_rust_future_complete_i8(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U16 -void ffi_bitkitcore_rust_future_poll_u16(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U16 -void ffi_bitkitcore_rust_future_cancel_u16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U16 -void ffi_bitkitcore_rust_future_free_u16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U16 -uint16_t ffi_bitkitcore_rust_future_complete_u16(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I16 -void ffi_bitkitcore_rust_future_poll_i16(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I16 -void ffi_bitkitcore_rust_future_cancel_i16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I16 -void ffi_bitkitcore_rust_future_free_i16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I16 -int16_t ffi_bitkitcore_rust_future_complete_i16(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U32 -void ffi_bitkitcore_rust_future_poll_u32(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U32 -void ffi_bitkitcore_rust_future_cancel_u32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U32 -void ffi_bitkitcore_rust_future_free_u32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U32 -uint32_t ffi_bitkitcore_rust_future_complete_u32(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I32 -void ffi_bitkitcore_rust_future_poll_i32(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I32 -void ffi_bitkitcore_rust_future_cancel_i32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I32 -void ffi_bitkitcore_rust_future_free_i32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I32 -int32_t ffi_bitkitcore_rust_future_complete_i32(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U64 -void ffi_bitkitcore_rust_future_poll_u64(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U64 -void ffi_bitkitcore_rust_future_cancel_u64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U64 -void ffi_bitkitcore_rust_future_free_u64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U64 -uint64_t ffi_bitkitcore_rust_future_complete_u64(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I64 -void ffi_bitkitcore_rust_future_poll_i64(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I64 -void ffi_bitkitcore_rust_future_cancel_i64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I64 -void ffi_bitkitcore_rust_future_free_i64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I64 -int64_t ffi_bitkitcore_rust_future_complete_i64(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F32 -void ffi_bitkitcore_rust_future_poll_f32(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F32 -void ffi_bitkitcore_rust_future_cancel_f32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F32 -void ffi_bitkitcore_rust_future_free_f32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F32 -float ffi_bitkitcore_rust_future_complete_f32(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F64 -void ffi_bitkitcore_rust_future_poll_f64(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F64 -void ffi_bitkitcore_rust_future_cancel_f64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F64 -void ffi_bitkitcore_rust_future_free_f64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F64 -double ffi_bitkitcore_rust_future_complete_f64(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_POINTER -void ffi_bitkitcore_rust_future_poll_pointer(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_POINTER -void ffi_bitkitcore_rust_future_cancel_pointer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_POINTER -void ffi_bitkitcore_rust_future_free_pointer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_POINTER -void*_Nonnull ffi_bitkitcore_rust_future_complete_pointer(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_RUST_BUFFER -void ffi_bitkitcore_rust_future_poll_rust_buffer(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_RUST_BUFFER -void ffi_bitkitcore_rust_future_cancel_rust_buffer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_RUST_BUFFER -void ffi_bitkitcore_rust_future_free_rust_buffer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_RUST_BUFFER -RustBuffer ffi_bitkitcore_rust_future_complete_rust_buffer(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_VOID -void ffi_bitkitcore_rust_future_poll_void(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_VOID -void ffi_bitkitcore_rust_future_cancel_void(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_VOID -void ffi_bitkitcore_rust_future_free_void(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_VOID -void ffi_bitkitcore_rust_future_complete_void(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_activities_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_activities_to_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_activity_tags_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_activity_tags_to_json(void - -); -#endif -#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_BOLTZ_CLAIM_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CLAIM_REVERSE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_claim_reverse_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_REVERSE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_create_reverse_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_create_submarine_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_REVERSE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_REVERSE_LIMITS -uint16_t uniffi_bitkitcore_checksum_func_boltz_get_reverse_limits(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -uint16_t uniffi_bitkitcore_checksum_func_boltz_get_submarine_limits(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_get_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_PENDING_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_PENDING_SWAPS -uint16_t uniffi_bitkitcore_checksum_func_boltz_list_pending_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_SWAPS -uint16_t uniffi_bitkitcore_checksum_func_boltz_list_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_refund_submarine_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_START_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_START_SWAP_UPDATES -uint16_t uniffi_bitkitcore_checksum_func_boltz_start_swap_updates(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_STOP_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_STOP_SWAP_UPDATES -uint16_t uniffi_bitkitcore_checksum_func_boltz_stop_swap_updates(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_CLOSED_CHANNELS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CLOSED_CHANNELS_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_closed_channels_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CLOSED_CHANNELS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CLOSED_CHANNELS_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_closed_channels_to_json(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_ACTIVITIES_BY_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITIES_BY_WALLET_ID -uint16_t uniffi_bitkitcore_checksum_func_delete_activities_by_wallet_id(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_DERIVE_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_WALLET_ID -uint16_t uniffi_bitkitcore_checksum_func_derive_wallet_id(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_FINALIZE_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FINALIZE_PSBT -uint16_t uniffi_bitkitcore_checksum_func_finalize_psbt(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_ACTIVITIES_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_TAGS -uint16_t uniffi_bitkitcore_checksum_func_get_activities_tags(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_GAP_LIMIT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_GAP_LIMIT -uint16_t uniffi_bitkitcore_checksum_func_get_default_gap_limit(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_DEFAULT_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_WALLET_ID -uint16_t uniffi_bitkitcore_checksum_func_get_default_wallet_id(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_LNURL_INVOICE_FOR_PAY_DATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE_FOR_PAY_DATA -uint16_t uniffi_bitkitcore_checksum_func_get_lnurl_invoice_for_pay_data(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_PRE_ACTIVITY_METADATA_LIST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA_LIST -uint16_t uniffi_bitkitcore_checksum_func_get_pre_activity_metadata_list(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -uint16_t uniffi_bitkitcore_checksum_func_get_supported_hardware_wallets(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_MIGRATE_BACKUP_ACTIVITIES_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_ACTIVITIES_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_activities_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_activity_tags_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_pre_activity_metadata_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_transaction_details_json(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_PASSPORT_PARSE_ACCOUNT_EXPORT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PASSPORT_PARSE_ACCOUNT_EXPORT -uint16_t uniffi_bitkitcore_checksum_func_passport_parse_account_export(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_pre_activity_metadata_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_pre_activity_metadata_to_json(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_SERIALIZED_EXTENDED_PUBKEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SERIALIZED_EXTENDED_PUBKEY -uint16_t uniffi_bitkitcore_checksum_func_serialized_extended_pubkey(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_TRANSACTION_DETAILS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TRANSACTION_DETAILS_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_transaction_details_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TRANSACTION_DETAILS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TRANSACTION_DETAILS_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_transaction_details_to_json(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_REFRESH_FEATURES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_REFRESH_FEATURES -uint16_t uniffi_bitkitcore_checksum_func_trezor_refresh_features(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_UR_ENCODE_CRYPTO_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UR_ENCODE_CRYPTO_PSBT -uint16_t uniffi_bitkitcore_checksum_func_ur_encode_crypto_psbt(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_BOLTZEVENTLISTENER_ON_EVENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_BOLTZEVENTLISTENER_ON_EVENT -uint16_t uniffi_bitkitcore_checksum_method_boltzeventlistener_on_event(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_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RECEIVE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RECEIVE -uint16_t uniffi_bitkitcore_checksum_method_urdecoder_receive(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RESET -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RESET -uint16_t uniffi_bitkitcore_checksum_method_urdecoder_reset(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_CONSTRUCTOR_URDECODER_NEW -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_CONSTRUCTOR_URDECODER_NEW -uint16_t uniffi_bitkitcore_checksum_constructor_urdecoder_new(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/Headers/module.modulemap b/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/module.modulemap deleted file mode 100644 index 529d3350..00000000 --- a/bindings/ios/BitkitCore.xcframework/ios-arm64-simulator/Headers/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -module bitkitcoreFFI { - header "bitkitcoreFFI.h" - export * - use "Darwin" - use "_Builtin_stdbool" - use "_Builtin_stdint" -} \ No newline at end of file diff --git a/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h b/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h deleted file mode 100644 index 79b2fb22..00000000 --- a/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/bitkitcoreFFI.h +++ /dev/null @@ -1,2981 +0,0 @@ -// This file was autogenerated by some hot garbage in the `uniffi` crate. -// Trust me, you don't want to mess with it! - -#pragma once - -#include -#include -#include - -// The following structs are used to implement the lowest level -// of the FFI, and thus useful to multiple uniffied crates. -// We ensure they are declared exactly once, with a header guard, UNIFFI_SHARED_H. -#ifdef UNIFFI_SHARED_H - // We also try to prevent mixing versions of shared uniffi header structs. - // If you add anything to the #else block, you must increment the version suffix in UNIFFI_SHARED_HEADER_V4 - #ifndef UNIFFI_SHARED_HEADER_V4 - #error Combining helper code from multiple versions of uniffi is not supported - #endif // ndef UNIFFI_SHARED_HEADER_V4 -#else -#define UNIFFI_SHARED_H -#define UNIFFI_SHARED_HEADER_V4 -// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️ -// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️ - -typedef struct RustBuffer -{ - uint64_t capacity; - uint64_t len; - uint8_t *_Nullable data; -} RustBuffer; - -typedef struct ForeignBytes -{ - int32_t len; - const uint8_t *_Nullable data; -} ForeignBytes; - -// Error definitions -typedef struct RustCallStatus { - int8_t code; - RustBuffer errorBuf; -} RustCallStatus; - -// ⚠️ Attention: If you change this #else block (ending in `#endif // def UNIFFI_SHARED_H`) you *must* ⚠️ -// ⚠️ increment the version suffix in all instances of UNIFFI_SHARED_HEADER_V4 in this file. ⚠️ -#endif // def UNIFFI_SHARED_H -#ifndef UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK -#define UNIFFI_FFIDEF_RUST_FUTURE_CONTINUATION_CALLBACK -typedef void (*UniffiRustFutureContinuationCallback)(uint64_t, int8_t - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_FREE -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_FREE -typedef void (*UniffiForeignFutureFree)(uint64_t - ); - -#endif -#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE -#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_FREE -typedef void (*UniffiCallbackInterfaceFree)(uint64_t - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE -#define UNIFFI_FFIDEF_FOREIGN_FUTURE -typedef struct UniffiForeignFuture { - uint64_t handle; - UniffiForeignFutureFree _Nonnull free; -} UniffiForeignFuture; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U8 -typedef struct UniffiForeignFutureStructU8 { - uint8_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU8; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U8 -typedef void (*UniffiForeignFutureCompleteU8)(uint64_t, UniffiForeignFutureStructU8 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I8 -typedef struct UniffiForeignFutureStructI8 { - int8_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI8; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I8 -typedef void (*UniffiForeignFutureCompleteI8)(uint64_t, UniffiForeignFutureStructI8 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U16 -typedef struct UniffiForeignFutureStructU16 { - uint16_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU16; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U16 -typedef void (*UniffiForeignFutureCompleteU16)(uint64_t, UniffiForeignFutureStructU16 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I16 -typedef struct UniffiForeignFutureStructI16 { - int16_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI16; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I16 -typedef void (*UniffiForeignFutureCompleteI16)(uint64_t, UniffiForeignFutureStructI16 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U32 -typedef struct UniffiForeignFutureStructU32 { - uint32_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU32; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U32 -typedef void (*UniffiForeignFutureCompleteU32)(uint64_t, UniffiForeignFutureStructU32 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I32 -typedef struct UniffiForeignFutureStructI32 { - int32_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI32; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I32 -typedef void (*UniffiForeignFutureCompleteI32)(uint64_t, UniffiForeignFutureStructI32 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_U64 -typedef struct UniffiForeignFutureStructU64 { - uint64_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructU64; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_U64 -typedef void (*UniffiForeignFutureCompleteU64)(uint64_t, UniffiForeignFutureStructU64 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_I64 -typedef struct UniffiForeignFutureStructI64 { - int64_t returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructI64; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_I64 -typedef void (*UniffiForeignFutureCompleteI64)(uint64_t, UniffiForeignFutureStructI64 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F32 -typedef struct UniffiForeignFutureStructF32 { - float returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructF32; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F32 -typedef void (*UniffiForeignFutureCompleteF32)(uint64_t, UniffiForeignFutureStructF32 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_F64 -typedef struct UniffiForeignFutureStructF64 { - double returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructF64; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64 -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_F64 -typedef void (*UniffiForeignFutureCompleteF64)(uint64_t, UniffiForeignFutureStructF64 - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_POINTER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_POINTER -typedef struct UniffiForeignFutureStructPointer { - void*_Nonnull returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructPointer; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_POINTER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_POINTER -typedef void (*UniffiForeignFutureCompletePointer)(uint64_t, UniffiForeignFutureStructPointer - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_RUST_BUFFER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_RUST_BUFFER -typedef struct UniffiForeignFutureStructRustBuffer { - RustBuffer returnValue; - RustCallStatus callStatus; -} UniffiForeignFutureStructRustBuffer; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_RUST_BUFFER -typedef void (*UniffiForeignFutureCompleteRustBuffer)(uint64_t, UniffiForeignFutureStructRustBuffer - ); - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_VOID -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_STRUCT_VOID -typedef struct UniffiForeignFutureStructVoid { - RustCallStatus callStatus; -} UniffiForeignFutureStructVoid; - -#endif -#ifndef UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID -#define UNIFFI_FFIDEF_FOREIGN_FUTURE_COMPLETE_VOID -typedef void (*UniffiForeignFutureCompleteVoid)(uint64_t, UniffiForeignFutureStructVoid - ); - -#endif -#ifndef UNIFFI_FFIDEF_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER_METHOD0 -#define UNIFFI_FFIDEF_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER_METHOD0 -typedef void (*UniffiCallbackInterfaceBoltzEventListenerMethod0)(uint64_t, RustBuffer, void* _Nonnull, - RustCallStatus *_Nonnull uniffiCallStatus - ); - -#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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - 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, - RustCallStatus *_Nonnull uniffiCallStatus - ); - -#endif -#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER -#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_BOLTZ_EVENT_LISTENER -typedef struct UniffiVTableCallbackInterfaceBoltzEventListener { - UniffiCallbackInterfaceBoltzEventListenerMethod0 _Nonnull onEvent; - UniffiCallbackInterfaceFree _Nonnull uniffiFree; -} UniffiVTableCallbackInterfaceBoltzEventListener; - -#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 -typedef struct UniffiVTableCallbackInterfaceTrezorTransportCallback { - UniffiCallbackInterfaceTrezorTransportCallbackMethod0 _Nonnull enumerateDevices; - UniffiCallbackInterfaceTrezorTransportCallbackMethod1 _Nonnull openDevice; - UniffiCallbackInterfaceTrezorTransportCallbackMethod2 _Nonnull closeDevice; - UniffiCallbackInterfaceTrezorTransportCallbackMethod3 _Nonnull readChunk; - UniffiCallbackInterfaceTrezorTransportCallbackMethod4 _Nonnull writeChunk; - UniffiCallbackInterfaceTrezorTransportCallbackMethod5 _Nonnull getChunkSize; - UniffiCallbackInterfaceTrezorTransportCallbackMethod6 _Nonnull callMessage; - UniffiCallbackInterfaceTrezorTransportCallbackMethod7 _Nonnull getPairingCode; - UniffiCallbackInterfaceTrezorTransportCallbackMethod8 _Nonnull saveThpCredential; - UniffiCallbackInterfaceTrezorTransportCallbackMethod9 _Nonnull loadThpCredential; - UniffiCallbackInterfaceTrezorTransportCallbackMethod10 _Nonnull logDebug; - UniffiCallbackInterfaceFree _Nonnull uniffiFree; -} UniffiVTableCallbackInterfaceTrezorTransportCallback; - -#endif -#ifndef UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK -#define UNIFFI_FFIDEF_V_TABLE_CALLBACK_INTERFACE_TREZOR_UI_CALLBACK -typedef struct UniffiVTableCallbackInterfaceTrezorUiCallback { - UniffiCallbackInterfaceTrezorUiCallbackMethod0 _Nonnull onPinRequest; - UniffiCallbackInterfaceTrezorUiCallbackMethod1 _Nonnull onPassphraseRequest; - UniffiCallbackInterfaceFree _Nonnull uniffiFree; -} UniffiVTableCallbackInterfaceTrezorUiCallback; - -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_BOLTZEVENTLISTENER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_BOLTZEVENTLISTENER -void*_Nonnull uniffi_bitkitcore_fn_clone_boltzeventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_BOLTZEVENTLISTENER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_BOLTZEVENTLISTENER -void uniffi_bitkitcore_fn_free_boltzeventlistener(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_BOLTZEVENTLISTENER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_BOLTZEVENTLISTENER -void uniffi_bitkitcore_fn_init_callback_vtable_boltzeventlistener(const UniffiVTableCallbackInterfaceBoltzEventListener* _Nonnull vtable -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_BOLTZEVENTLISTENER_ON_EVENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_BOLTZEVENTLISTENER_ON_EVENT -void uniffi_bitkitcore_fn_method_boltzeventlistener_on_event(void*_Nonnull ptr, RustBuffer event, RustCallStatus *_Nonnull out_status -); -#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 -void*_Nonnull uniffi_bitkitcore_fn_clone_trezortransportcallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORTRANSPORTCALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORTRANSPORTCALLBACK -void uniffi_bitkitcore_fn_free_trezortransportcallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORTRANSPORTCALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORTRANSPORTCALLBACK -void uniffi_bitkitcore_fn_init_callback_vtable_trezortransportcallback(const UniffiVTableCallbackInterfaceTrezorTransportCallback* _Nonnull vtable -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_ENUMERATE_DEVICES -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_enumerate_devices(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_OPEN_DEVICE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_open_device(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CLOSE_DEVICE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_close_device(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_READ_CHUNK -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_read_chunk(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_WRITE_CHUNK -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_write_chunk(void*_Nonnull ptr, RustBuffer path, RustBuffer data, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_CHUNK_SIZE -uint32_t uniffi_bitkitcore_fn_method_trezortransportcallback_get_chunk_size(void*_Nonnull ptr, RustBuffer path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_CALL_MESSAGE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_call_message(void*_Nonnull ptr, RustBuffer path, uint16_t message_type, RustBuffer data, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_GET_PAIRING_CODE -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_get_pairing_code(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_SAVE_THP_CREDENTIAL -int8_t uniffi_bitkitcore_fn_method_trezortransportcallback_save_thp_credential(void*_Nonnull ptr, RustBuffer device_id, RustBuffer credential_json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOAD_THP_CREDENTIAL -RustBuffer uniffi_bitkitcore_fn_method_trezortransportcallback_load_thp_credential(void*_Nonnull ptr, RustBuffer device_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORTRANSPORTCALLBACK_LOG_DEBUG -void uniffi_bitkitcore_fn_method_trezortransportcallback_log_debug(void*_Nonnull ptr, RustBuffer tag, RustBuffer message, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORUICALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_TREZORUICALLBACK -void*_Nonnull uniffi_bitkitcore_fn_clone_trezoruicallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORUICALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_TREZORUICALLBACK -void uniffi_bitkitcore_fn_free_trezoruicallback(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORUICALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_INIT_CALLBACK_VTABLE_TREZORUICALLBACK -void uniffi_bitkitcore_fn_init_callback_vtable_trezoruicallback(const UniffiVTableCallbackInterfaceTrezorUiCallback* _Nonnull vtable -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PIN_REQUEST -RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_pin_request(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_TREZORUICALLBACK_ON_PASSPHRASE_REQUEST -RustBuffer uniffi_bitkitcore_fn_method_trezoruicallback_on_passphrase_request(void*_Nonnull ptr, int8_t on_device, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_URDECODER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CLONE_URDECODER -void*_Nonnull uniffi_bitkitcore_fn_clone_urdecoder(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_URDECODER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FREE_URDECODER -void uniffi_bitkitcore_fn_free_urdecoder(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CONSTRUCTOR_URDECODER_NEW -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_CONSTRUCTOR_URDECODER_NEW -void*_Nonnull uniffi_bitkitcore_fn_constructor_urdecoder_new(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RECEIVE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RECEIVE -RustBuffer uniffi_bitkitcore_fn_method_urdecoder_receive(void*_Nonnull ptr, RustBuffer frame, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RESET -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_METHOD_URDECODER_RESET -void uniffi_bitkitcore_fn_method_urdecoder_reset(void*_Nonnull ptr, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_activities_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITIES_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_activities_to_json(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_activity_tags_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ACTIVITY_TAGS_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_activity_tags_to_json(RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA -void uniffi_bitkitcore_fn_func_add_pre_activity_metadata(RustBuffer pre_activity_metadata, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_PRE_ACTIVITY_METADATA_TAGS -void uniffi_bitkitcore_fn_func_add_pre_activity_metadata_tags(RustBuffer wallet_id, RustBuffer payment_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ADD_TAGS -void uniffi_bitkitcore_fn_func_add_tags(RustBuffer wallet_id, RustBuffer activity_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_APPROVE_PUBKY_AUTH -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_APPROVE_PUBKY_AUTH -uint64_t uniffi_bitkitcore_fn_func_approve_pubky_auth(RustBuffer auth_url, RustBuffer secret_key_hex -); -#endif -#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_BOLTZ_CLAIM_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CLAIM_REVERSE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_claim_reverse_swap(RustBuffer swap_id, RustBuffer mnemonic, RustBuffer bip39_passphrase, RustBuffer fee_rate_sat_per_vb -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_REVERSE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_create_reverse_swap(RustBuffer network, RustBuffer electrum_url, uint64_t amount_sat, RustBuffer claim_address, RustBuffer mnemonic, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_create_submarine_swap(RustBuffer network, RustBuffer electrum_url, RustBuffer invoice, RustBuffer mnemonic, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_REVERSE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_REVERSE_LIMITS -uint64_t uniffi_bitkitcore_fn_func_boltz_get_reverse_limits(RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -uint64_t uniffi_bitkitcore_fn_func_boltz_get_submarine_limits(RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_GET_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_get_swap(RustBuffer swap_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_PENDING_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_PENDING_SWAPS -uint64_t uniffi_bitkitcore_fn_func_boltz_list_pending_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_LIST_SWAPS -uint64_t uniffi_bitkitcore_fn_func_boltz_list_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -uint64_t uniffi_bitkitcore_fn_func_boltz_refund_submarine_swap(RustBuffer swap_id, RustBuffer refund_address, RustBuffer mnemonic, RustBuffer bip39_passphrase, RustBuffer fee_rate_sat_per_vb -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_START_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_START_SWAP_UPDATES -uint64_t uniffi_bitkitcore_fn_func_boltz_start_swap_updates(RustBuffer network, void*_Nonnull listener, RustBuffer mnemonic, RustBuffer bip39_passphrase, RustBuffer fee_rate_sat_per_vb, int8_t accept_zero_conf -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_STOP_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BOLTZ_STOP_SWAP_UPDATES -uint64_t uniffi_bitkitcore_fn_func_boltz_stop_swap_updates(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_BROADCAST_SWEEP_TRANSACTION -uint64_t uniffi_bitkitcore_fn_func_broadcast_sweep_transaction(RustBuffer psbt, RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer electrum_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CALCULATE_CHANNEL_LIQUIDITY_OPTIONS -RustBuffer uniffi_bitkitcore_fn_func_calculate_channel_liquidity_options(RustBuffer params, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CHECK_SWEEPABLE_BALANCES -uint64_t uniffi_bitkitcore_fn_func_check_sweepable_balances(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer electrum_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_closed_channels_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CLOSED_CHANNELS_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_closed_channels_to_json(RustBuffer channels, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CHANNEL_REQUEST_URL -RustBuffer uniffi_bitkitcore_fn_func_create_channel_request_url(RustBuffer k1, RustBuffer callback, RustBuffer local_node_id, int8_t is_private, int8_t cancel, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CJIT_ENTRY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_CJIT_ENTRY -uint64_t uniffi_bitkitcore_fn_func_create_cjit_entry(uint64_t channel_size_sat, uint64_t invoice_sat, RustBuffer invoice_description, RustBuffer node_id, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_ORDER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_ORDER -uint64_t uniffi_bitkitcore_fn_func_create_order(uint64_t lsp_balance_sat, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_WITHDRAW_CALLBACK_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_CREATE_WITHDRAW_CALLBACK_URL -RustBuffer uniffi_bitkitcore_fn_func_create_withdraw_callback_url(RustBuffer k1, RustBuffer callback, RustBuffer payment_request, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DECODE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DECODE -uint64_t uniffi_bitkitcore_fn_func_decode(RustBuffer invoice -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITIES_BY_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITIES_BY_WALLET_ID -uint32_t uniffi_bitkitcore_fn_func_delete_activities_by_wallet_id(RustBuffer wallet_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITY_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_ACTIVITY_BY_ID -int8_t uniffi_bitkitcore_fn_func_delete_activity_by_id(RustBuffer wallet_id, RustBuffer activity_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_PRE_ACTIVITY_METADATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_PRE_ACTIVITY_METADATA -void uniffi_bitkitcore_fn_func_delete_pre_activity_metadata(RustBuffer wallet_id, RustBuffer payment_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_TRANSACTION_DETAILS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DELETE_TRANSACTION_DETAILS -int8_t uniffi_bitkitcore_fn_func_delete_transaction_details(RustBuffer wallet_id, RustBuffer tx_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESS -RustBuffer uniffi_bitkitcore_fn_func_derive_bitcoin_address(RustBuffer mnemonic_phrase, RustBuffer derivation_path_str, RustBuffer network, RustBuffer bip39_passphrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESSES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_BITCOIN_ADDRESSES -RustBuffer uniffi_bitkitcore_fn_func_derive_bitcoin_addresses(RustBuffer mnemonic_phrase, RustBuffer derivation_path_str, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer is_change, RustBuffer start_index, RustBuffer count, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_ONCHAIN_DESCRIPTOR -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_ONCHAIN_DESCRIPTOR -RustBuffer uniffi_bitkitcore_fn_func_derive_onchain_descriptor(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer account_type, uint32_t account_index, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PRIVATE_KEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PRIVATE_KEY -RustBuffer uniffi_bitkitcore_fn_func_derive_private_key(RustBuffer mnemonic_phrase, RustBuffer derivation_path_str, RustBuffer network, RustBuffer bip39_passphrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PUBKY_SECRET_KEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_PUBKY_SECRET_KEY -RustBuffer uniffi_bitkitcore_fn_func_derive_pubky_secret_key(RustBuffer seed, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_DERIVE_WALLET_ID -RustBuffer uniffi_bitkitcore_fn_func_derive_wallet_id(RustBuffer device_type, RustBuffer xpubs, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ENTROPY_TO_MNEMONIC -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ENTROPY_TO_MNEMONIC -RustBuffer uniffi_bitkitcore_fn_func_entropy_to_mnemonic(RustBuffer entropy, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE -uint64_t uniffi_bitkitcore_fn_func_estimate_order_fee(uint64_t lsp_balance_sat, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE_FULL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ESTIMATE_ORDER_FEE_FULL -uint64_t uniffi_bitkitcore_fn_func_estimate_order_fee_full(uint64_t lsp_balance_sat, uint32_t channel_expiry_weeks, RustBuffer options -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_CONTACTS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_CONTACTS -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_contacts(RustBuffer public_key -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_file(RustBuffer uri -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE_STRING -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_FILE_STRING -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_file_string(RustBuffer uri -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_PROFILE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FETCH_PUBKY_PROFILE -uint64_t uniffi_bitkitcore_fn_func_fetch_pubky_profile(RustBuffer public_key -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FINALIZE_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_FINALIZE_PSBT -RustBuffer uniffi_bitkitcore_fn_func_finalize_psbt(RustBuffer original_psbt, RustBuffer signed_psbt, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GENERATE_MNEMONIC -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GENERATE_MNEMONIC -RustBuffer uniffi_bitkitcore_fn_func_generate_mnemonic(RustBuffer word_count, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES -RustBuffer uniffi_bitkitcore_fn_func_get_activities(RustBuffer wallet_id, RustBuffer filter, RustBuffer tx_type, RustBuffer tags, RustBuffer search, RustBuffer min_date, RustBuffer max_date, RustBuffer limit, RustBuffer sort_direction, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_BY_TAG -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_BY_TAG -RustBuffer uniffi_bitkitcore_fn_func_get_activities_by_tag(RustBuffer wallet_id, RustBuffer tag, RustBuffer limit, RustBuffer sort_direction, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITIES_TAGS -RustBuffer uniffi_bitkitcore_fn_func_get_activities_tags(RustBuffer wallet_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_ID -RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_id(RustBuffer wallet_id, RustBuffer activity_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_TX_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ACTIVITY_BY_TX_ID -RustBuffer uniffi_bitkitcore_fn_func_get_activity_by_tx_id(RustBuffer wallet_id, RustBuffer tx_id, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ALL_CLOSED_CHANNELS -RustBuffer uniffi_bitkitcore_fn_func_get_all_closed_channels(RustBuffer sort_direction, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_BIP39_SUGGESTIONS -RustBuffer uniffi_bitkitcore_fn_func_get_bip39_suggestions(RustBuffer partial_word, uint32_t limit, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CJIT_ENTRIES -uint64_t uniffi_bitkitcore_fn_func_get_cjit_entries(RustBuffer entry_ids, RustBuffer filter, int8_t refresh -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CLOSED_CHANNEL_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_CLOSED_CHANNEL_BY_ID -RustBuffer uniffi_bitkitcore_fn_func_get_closed_channel_by_id(RustBuffer channel_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_GAP_LIMIT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_GAP_LIMIT -uint32_t uniffi_bitkitcore_fn_func_get_default_gap_limit(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_LSP_BALANCE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_LSP_BALANCE -uint64_t uniffi_bitkitcore_fn_func_get_default_lsp_balance(RustBuffer params, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_DEFAULT_WALLET_ID -RustBuffer uniffi_bitkitcore_fn_func_get_default_wallet_id(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_GIFT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_GIFT -uint64_t uniffi_bitkitcore_fn_func_get_gift(RustBuffer gift_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_INFO -uint64_t uniffi_bitkitcore_fn_func_get_info(RustBuffer refresh -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE -uint64_t uniffi_bitkitcore_fn_func_get_lnurl_invoice(RustBuffer address, uint64_t amount_satoshis -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE_FOR_PAY_DATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_LNURL_INVOICE_FOR_PAY_DATA -uint64_t uniffi_bitkitcore_fn_func_get_lnurl_invoice_for_pay_data(RustBuffer data, uint64_t amount_msats, RustBuffer comment -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_MIN_ZERO_CONF_TX_FEE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_MIN_ZERO_CONF_TX_FEE -uint64_t uniffi_bitkitcore_fn_func_get_min_zero_conf_tx_fee(RustBuffer order_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ORDERS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_ORDERS -uint64_t uniffi_bitkitcore_fn_func_get_orders(RustBuffer order_ids, RustBuffer filter, int8_t refresh -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PAYMENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PAYMENT -uint64_t uniffi_bitkitcore_fn_func_get_payment(RustBuffer payment_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA -RustBuffer uniffi_bitkitcore_fn_func_get_pre_activity_metadata(RustBuffer wallet_id, RustBuffer search_key, int8_t search_by_address, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA_LIST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_PRE_ACTIVITY_METADATA_LIST -RustBuffer uniffi_bitkitcore_fn_func_get_pre_activity_metadata_list(RustBuffer wallet_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -RustBuffer uniffi_bitkitcore_fn_func_get_supported_hardware_wallets(RustCallStatus *_Nonnull out_status - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TAGS -RustBuffer uniffi_bitkitcore_fn_func_get_tags(RustBuffer wallet_id, RustBuffer activity_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TRANSACTION_DETAILS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GET_TRANSACTION_DETAILS -RustBuffer uniffi_bitkitcore_fn_func_get_transaction_details(RustBuffer wallet_id, RustBuffer tx_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_ORDER -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_ORDER -uint64_t uniffi_bitkitcore_fn_func_gift_order(RustBuffer client_node_id, RustBuffer code -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_PAY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_GIFT_PAY -uint64_t uniffi_bitkitcore_fn_func_gift_pay(RustBuffer invoice -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INIT_DB -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INIT_DB -RustBuffer uniffi_bitkitcore_fn_func_init_db(RustBuffer base_path, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INSERT_ACTIVITY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_INSERT_ACTIVITY -void uniffi_bitkitcore_fn_func_insert_activity(RustBuffer activity, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_ADDRESS_USED -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_ADDRESS_USED -int8_t uniffi_bitkitcore_fn_func_is_address_used(RustBuffer address, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_VALID_BIP39_WORD -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_IS_VALID_BIP39_WORD -int8_t uniffi_bitkitcore_fn_func_is_valid_bip39_word(RustBuffer word, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_LNURL_AUTH -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_LNURL_AUTH -uint64_t uniffi_bitkitcore_fn_func_lnurl_auth(RustBuffer domain, RustBuffer k1, RustBuffer callback, RustBuffer bip32_mnemonic, RustBuffer network, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MARK_ACTIVITY_AS_SEEN -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MARK_ACTIVITY_AS_SEEN -void uniffi_bitkitcore_fn_func_mark_activity_as_seen(RustBuffer wallet_id, RustBuffer activity_id, uint64_t seen_at, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITIES_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITIES_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_activities_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_activity_tags_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_pre_activity_metadata_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -RustBuffer uniffi_bitkitcore_fn_func_migrate_backup_transaction_details_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_ENTROPY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_ENTROPY -RustBuffer uniffi_bitkitcore_fn_func_mnemonic_to_entropy(RustBuffer mnemonic_phrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_SEED -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_MNEMONIC_TO_SEED -RustBuffer uniffi_bitkitcore_fn_func_mnemonic_to_seed(RustBuffer mnemonic_phrase, RustBuffer passphrase, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_BROADCAST_RAW_TX -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_BROADCAST_RAW_TX -uint64_t uniffi_bitkitcore_fn_func_onchain_broadcast_raw_tx(RustBuffer serialized_tx, RustBuffer electrum_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_COMPOSE_TRANSACTION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_COMPOSE_TRANSACTION -uint64_t uniffi_bitkitcore_fn_func_onchain_compose_transaction(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ACCOUNT_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ACCOUNT_INFO -uint64_t uniffi_bitkitcore_fn_func_onchain_get_account_info(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer network, RustBuffer gap_limit, RustBuffer script_type -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ADDRESS_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_ADDRESS_INFO -uint64_t uniffi_bitkitcore_fn_func_onchain_get_address_info(RustBuffer address, RustBuffer electrum_url, RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_DETAIL -uint64_t uniffi_bitkitcore_fn_func_onchain_get_transaction_detail(RustBuffer extended_key, RustBuffer electrum_url, RustBuffer txid, RustBuffer network, RustBuffer script_type -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_ONCHAIN_GET_TRANSACTION_HISTORY -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 -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PARSE_PUBKY_AUTH_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PARSE_PUBKY_AUTH_URL -RustBuffer uniffi_bitkitcore_fn_func_parse_pubky_auth_url(RustBuffer auth_url, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PASSPORT_PARSE_ACCOUNT_EXPORT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PASSPORT_PARSE_ACCOUNT_EXPORT -RustBuffer uniffi_bitkitcore_fn_func_passport_parse_account_export(RustBuffer data, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_pre_activity_metadata_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_pre_activity_metadata_to_json(RustBuffer metadata, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_SWEEP -uint64_t uniffi_bitkitcore_fn_func_prepare_legacy_rn_native_segwit_recovery_sweep(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer electrum_url, RustBuffer destination_address, RustBuffer fee_rate_sats_per_vbyte, uint32_t index_limit, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_SWEEP_TRANSACTION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PREPARE_SWEEP_TRANSACTION -uint64_t uniffi_bitkitcore_fn_func_prepare_sweep_transaction(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer bip39_passphrase, RustBuffer electrum_url, RustBuffer destination_address, RustBuffer fee_rate_sats_per_vbyte -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUBLIC_KEY_FROM_SECRET -RustBuffer uniffi_bitkitcore_fn_func_pubky_public_key_from_secret(RustBuffer secret_key_hex, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUT_WITH_SECRET_KEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_PUT_WITH_SECRET_KEY -uint64_t uniffi_bitkitcore_fn_func_pubky_put_with_secret_key(RustBuffer secret_key_hex, RustBuffer path, RustBuffer content -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_DELETE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_DELETE -uint64_t uniffi_bitkitcore_fn_func_pubky_session_delete(RustBuffer session_secret, RustBuffer path -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_LIST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_LIST -uint64_t uniffi_bitkitcore_fn_func_pubky_session_list(RustBuffer session_secret, RustBuffer dir_path -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_PUT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SESSION_PUT -uint64_t uniffi_bitkitcore_fn_func_pubky_session_put(RustBuffer session_secret, RustBuffer path, RustBuffer content -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_IN -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_IN -uint64_t uniffi_bitkitcore_fn_func_pubky_sign_in(RustBuffer secret_key_hex -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_UP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_PUBKY_SIGN_UP -uint64_t uniffi_bitkitcore_fn_func_pubky_sign_up(RustBuffer secret_key_hex, RustBuffer homeserver_public_key_z32, RustBuffer signup_code -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGISTER_DEVICE -uint64_t uniffi_bitkitcore_fn_func_register_device(RustBuffer device_token, RustBuffer public_key, RustBuffer features, RustBuffer node_id, RustBuffer iso_timestamp, RustBuffer signature, RustBuffer is_production, RustBuffer custom_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_CLOSE_CHANNEL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_CLOSE_CHANNEL -uint64_t uniffi_bitkitcore_fn_func_regtest_close_channel(RustBuffer funding_tx_id, uint32_t vout, RustBuffer force_close_after_s -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_DEPOSIT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_DEPOSIT -uint64_t uniffi_bitkitcore_fn_func_regtest_deposit(RustBuffer address, RustBuffer amount_sat -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_GET_PAYMENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_GET_PAYMENT -uint64_t uniffi_bitkitcore_fn_func_regtest_get_payment(RustBuffer payment_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_MINE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_MINE -uint64_t uniffi_bitkitcore_fn_func_regtest_mine(RustBuffer count -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_PAY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REGTEST_PAY -uint64_t uniffi_bitkitcore_fn_func_regtest_pay(RustBuffer invoice, RustBuffer amount_sat -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_CLOSED_CHANNEL_BY_ID -int8_t uniffi_bitkitcore_fn_func_remove_closed_channel_by_id(RustBuffer channel_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_PRE_ACTIVITY_METADATA_TAGS -void uniffi_bitkitcore_fn_func_remove_pre_activity_metadata_tags(RustBuffer wallet_id, RustBuffer payment_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_REMOVE_TAGS -void uniffi_bitkitcore_fn_func_remove_tags(RustBuffer wallet_id, RustBuffer activity_id, RustBuffer tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESET_PRE_ACTIVITY_METADATA_TAGS -void uniffi_bitkitcore_fn_func_reset_pre_activity_metadata_tags(RustBuffer wallet_id, RustBuffer payment_id, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESOLVE_PUBKY_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_RESOLVE_PUBKY_URL -RustBuffer uniffi_bitkitcore_fn_func_resolve_pubky_url(RustBuffer uri, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SCAN_LEGACY_RN_NATIVE_SEGWIT_RECOVERY_FUNDS -uint64_t uniffi_bitkitcore_fn_func_scan_legacy_rn_native_segwit_recovery_funds(RustBuffer mnemonic_phrase, RustBuffer network, RustBuffer electrum_url, uint32_t index_limit, RustBuffer bip39_passphrase -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SERIALIZED_EXTENDED_PUBKEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_SERIALIZED_EXTENDED_PUBKEY -RustBuffer uniffi_bitkitcore_fn_func_serialized_extended_pubkey(RustBuffer xpub, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_START_PUBKY_AUTH -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_START_PUBKY_AUTH -uint64_t uniffi_bitkitcore_fn_func_start_pubky_auth(RustBuffer caps -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TEST_NOTIFICATION -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TEST_NOTIFICATION -uint64_t uniffi_bitkitcore_fn_func_test_notification(RustBuffer device_token, RustBuffer secret_message, RustBuffer notification_type, RustBuffer custom_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_FROM_JSON -RustBuffer uniffi_bitkitcore_fn_func_transaction_details_from_json(RustBuffer json, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TRANSACTION_DETAILS_TO_JSON -RustBuffer uniffi_bitkitcore_fn_func_transaction_details_to_json(RustBuffer details, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_ACCOUNT_TYPE_TO_SCRIPT_TYPE -RustBuffer uniffi_bitkitcore_fn_func_trezor_account_type_to_script_type(RustBuffer account_type, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CLEAR_CREDENTIALS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CLEAR_CREDENTIALS -uint64_t uniffi_bitkitcore_fn_func_trezor_clear_credentials(RustBuffer device_id -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CONNECT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_CONNECT -uint64_t uniffi_bitkitcore_fn_func_trezor_connect(RustBuffer device_id, RustBuffer selection -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_ADDRESS -uint64_t uniffi_bitkitcore_fn_func_trezor_get_address(RustBuffer params -); -#endif -#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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_GET_PUBLIC_KEY -uint64_t uniffi_bitkitcore_fn_func_trezor_get_public_key(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_INITIALIZE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_INITIALIZE -uint64_t uniffi_bitkitcore_fn_func_trezor_initialize(RustBuffer credential_path -); -#endif -#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_REFRESH_FEATURES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_REFRESH_FEATURES -uint64_t uniffi_bitkitcore_fn_func_trezor_refresh_features(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 -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_TRANSPORT_CALLBACK -void uniffi_bitkitcore_fn_func_trezor_set_transport_callback(void*_Nonnull callback, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_UI_CALLBACK -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SET_UI_CALLBACK -void uniffi_bitkitcore_fn_func_trezor_set_ui_callback(void*_Nonnull callback, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_MESSAGE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_MESSAGE -uint64_t uniffi_bitkitcore_fn_func_trezor_sign_message(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX -uint64_t uniffi_bitkitcore_fn_func_trezor_sign_tx(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX_FROM_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_SIGN_TX_FROM_PSBT -uint64_t uniffi_bitkitcore_fn_func_trezor_sign_tx_from_psbt(RustBuffer psbt_base64, RustBuffer network -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_VERIFY_MESSAGE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_TREZOR_VERIFY_MESSAGE -uint64_t uniffi_bitkitcore_fn_func_trezor_verify_message(RustBuffer params -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_ACTIVITY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_ACTIVITY -void uniffi_bitkitcore_fn_func_update_activity(RustBuffer activity_id, RustBuffer activity, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_BLOCKTANK_URL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPDATE_BLOCKTANK_URL -uint64_t uniffi_bitkitcore_fn_func_update_blocktank_url(RustBuffer new_url -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITIES -void uniffi_bitkitcore_fn_func_upsert_activities(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ACTIVITY -void uniffi_bitkitcore_fn_func_upsert_activity(RustBuffer activity, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CJIT_ENTRIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CJIT_ENTRIES -uint64_t uniffi_bitkitcore_fn_func_upsert_cjit_entries(RustBuffer entries -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNEL -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNEL -void uniffi_bitkitcore_fn_func_upsert_closed_channel(RustBuffer channel, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNELS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_CLOSED_CHANNELS -void uniffi_bitkitcore_fn_func_upsert_closed_channels(RustBuffer channels, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_INFO -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_INFO -uint64_t uniffi_bitkitcore_fn_func_upsert_info(RustBuffer info -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_LIGHTNING_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_LIGHTNING_ACTIVITIES -void uniffi_bitkitcore_fn_func_upsert_lightning_activities(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ONCHAIN_ACTIVITIES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ONCHAIN_ACTIVITIES -void uniffi_bitkitcore_fn_func_upsert_onchain_activities(RustBuffer activities, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ORDERS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_ORDERS -uint64_t uniffi_bitkitcore_fn_func_upsert_orders(RustBuffer orders -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_PRE_ACTIVITY_METADATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_PRE_ACTIVITY_METADATA -void uniffi_bitkitcore_fn_func_upsert_pre_activity_metadata(RustBuffer pre_activity_metadata, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TAGS -void uniffi_bitkitcore_fn_func_upsert_tags(RustBuffer activity_tags, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TRANSACTION_DETAILS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UPSERT_TRANSACTION_DETAILS -void uniffi_bitkitcore_fn_func_upsert_transaction_details(RustBuffer details_list, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UR_ENCODE_CRYPTO_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_UR_ENCODE_CRYPTO_PSBT -RustBuffer uniffi_bitkitcore_fn_func_ur_encode_crypto_psbt(RustBuffer psbt, uint32_t max_fragment_length, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_BITCOIN_ADDRESS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_BITCOIN_ADDRESS -RustBuffer uniffi_bitkitcore_fn_func_validate_bitcoin_address(RustBuffer address, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_MNEMONIC -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_FN_FUNC_VALIDATE_MNEMONIC -void uniffi_bitkitcore_fn_func_validate_mnemonic(RustBuffer mnemonic_phrase, RustCallStatus *_Nonnull out_status -); -#endif -#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 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_ALLOC -RustBuffer ffi_bitkitcore_rustbuffer_alloc(uint64_t size, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FROM_BYTES -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FROM_BYTES -RustBuffer ffi_bitkitcore_rustbuffer_from_bytes(ForeignBytes bytes, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FREE -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_FREE -void ffi_bitkitcore_rustbuffer_free(RustBuffer buf, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_RESERVE -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUSTBUFFER_RESERVE -RustBuffer ffi_bitkitcore_rustbuffer_reserve(RustBuffer buf, uint64_t additional, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U8 -void ffi_bitkitcore_rust_future_poll_u8(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U8 -void ffi_bitkitcore_rust_future_cancel_u8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U8 -void ffi_bitkitcore_rust_future_free_u8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U8 -uint8_t ffi_bitkitcore_rust_future_complete_u8(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I8 -void ffi_bitkitcore_rust_future_poll_i8(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I8 -void ffi_bitkitcore_rust_future_cancel_i8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I8 -void ffi_bitkitcore_rust_future_free_i8(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I8 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I8 -int8_t ffi_bitkitcore_rust_future_complete_i8(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U16 -void ffi_bitkitcore_rust_future_poll_u16(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U16 -void ffi_bitkitcore_rust_future_cancel_u16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U16 -void ffi_bitkitcore_rust_future_free_u16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U16 -uint16_t ffi_bitkitcore_rust_future_complete_u16(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I16 -void ffi_bitkitcore_rust_future_poll_i16(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I16 -void ffi_bitkitcore_rust_future_cancel_i16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I16 -void ffi_bitkitcore_rust_future_free_i16(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I16 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I16 -int16_t ffi_bitkitcore_rust_future_complete_i16(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U32 -void ffi_bitkitcore_rust_future_poll_u32(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U32 -void ffi_bitkitcore_rust_future_cancel_u32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U32 -void ffi_bitkitcore_rust_future_free_u32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U32 -uint32_t ffi_bitkitcore_rust_future_complete_u32(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I32 -void ffi_bitkitcore_rust_future_poll_i32(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I32 -void ffi_bitkitcore_rust_future_cancel_i32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I32 -void ffi_bitkitcore_rust_future_free_i32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I32 -int32_t ffi_bitkitcore_rust_future_complete_i32(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_U64 -void ffi_bitkitcore_rust_future_poll_u64(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_U64 -void ffi_bitkitcore_rust_future_cancel_u64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_U64 -void ffi_bitkitcore_rust_future_free_u64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_U64 -uint64_t ffi_bitkitcore_rust_future_complete_u64(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_I64 -void ffi_bitkitcore_rust_future_poll_i64(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_I64 -void ffi_bitkitcore_rust_future_cancel_i64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_I64 -void ffi_bitkitcore_rust_future_free_i64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_I64 -int64_t ffi_bitkitcore_rust_future_complete_i64(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F32 -void ffi_bitkitcore_rust_future_poll_f32(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F32 -void ffi_bitkitcore_rust_future_cancel_f32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F32 -void ffi_bitkitcore_rust_future_free_f32(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F32 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F32 -float ffi_bitkitcore_rust_future_complete_f32(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_F64 -void ffi_bitkitcore_rust_future_poll_f64(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_F64 -void ffi_bitkitcore_rust_future_cancel_f64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_F64 -void ffi_bitkitcore_rust_future_free_f64(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F64 -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_F64 -double ffi_bitkitcore_rust_future_complete_f64(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_POINTER -void ffi_bitkitcore_rust_future_poll_pointer(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_POINTER -void ffi_bitkitcore_rust_future_cancel_pointer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_POINTER -void ffi_bitkitcore_rust_future_free_pointer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_POINTER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_POINTER -void*_Nonnull ffi_bitkitcore_rust_future_complete_pointer(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_RUST_BUFFER -void ffi_bitkitcore_rust_future_poll_rust_buffer(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_RUST_BUFFER -void ffi_bitkitcore_rust_future_cancel_rust_buffer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_RUST_BUFFER -void ffi_bitkitcore_rust_future_free_rust_buffer(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_RUST_BUFFER -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_RUST_BUFFER -RustBuffer ffi_bitkitcore_rust_future_complete_rust_buffer(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_POLL_VOID -void ffi_bitkitcore_rust_future_poll_void(uint64_t handle, UniffiRustFutureContinuationCallback _Nonnull callback, uint64_t callback_data -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_CANCEL_VOID -void ffi_bitkitcore_rust_future_cancel_void(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_FREE_VOID -void ffi_bitkitcore_rust_future_free_void(uint64_t handle -); -#endif -#ifndef UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_VOID -#define UNIFFI_FFIDEF_FFI_BITKITCORE_RUST_FUTURE_COMPLETE_VOID -void ffi_bitkitcore_rust_future_complete_void(uint64_t handle, RustCallStatus *_Nonnull out_status -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_activities_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITIES_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_activities_to_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_activity_tags_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_ACTIVITY_TAGS_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_activity_tags_to_json(void - -); -#endif -#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_BOLTZ_CLAIM_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CLAIM_REVERSE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_claim_reverse_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_REVERSE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_REVERSE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_create_reverse_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_CREATE_SUBMARINE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_create_submarine_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_REVERSE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_REVERSE_LIMITS -uint16_t uniffi_bitkitcore_checksum_func_boltz_get_reverse_limits(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SUBMARINE_LIMITS -uint16_t uniffi_bitkitcore_checksum_func_boltz_get_submarine_limits(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_GET_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_get_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_PENDING_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_PENDING_SWAPS -uint16_t uniffi_bitkitcore_checksum_func_boltz_list_pending_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_SWAPS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_LIST_SWAPS -uint16_t uniffi_bitkitcore_checksum_func_boltz_list_swaps(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_REFUND_SUBMARINE_SWAP -uint16_t uniffi_bitkitcore_checksum_func_boltz_refund_submarine_swap(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_START_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_START_SWAP_UPDATES -uint16_t uniffi_bitkitcore_checksum_func_boltz_start_swap_updates(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_STOP_SWAP_UPDATES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_BOLTZ_STOP_SWAP_UPDATES -uint16_t uniffi_bitkitcore_checksum_func_boltz_stop_swap_updates(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_CLOSED_CHANNELS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CLOSED_CHANNELS_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_closed_channels_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CLOSED_CHANNELS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_CLOSED_CHANNELS_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_closed_channels_to_json(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_ACTIVITIES_BY_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DELETE_ACTIVITIES_BY_WALLET_ID -uint16_t uniffi_bitkitcore_checksum_func_delete_activities_by_wallet_id(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_DERIVE_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_DERIVE_WALLET_ID -uint16_t uniffi_bitkitcore_checksum_func_derive_wallet_id(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_FINALIZE_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_FINALIZE_PSBT -uint16_t uniffi_bitkitcore_checksum_func_finalize_psbt(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_ACTIVITIES_TAGS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_ACTIVITIES_TAGS -uint16_t uniffi_bitkitcore_checksum_func_get_activities_tags(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_GAP_LIMIT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_GAP_LIMIT -uint16_t uniffi_bitkitcore_checksum_func_get_default_gap_limit(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_DEFAULT_WALLET_ID -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_DEFAULT_WALLET_ID -uint16_t uniffi_bitkitcore_checksum_func_get_default_wallet_id(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_LNURL_INVOICE_FOR_PAY_DATA -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_LNURL_INVOICE_FOR_PAY_DATA -uint16_t uniffi_bitkitcore_checksum_func_get_lnurl_invoice_for_pay_data(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_PRE_ACTIVITY_METADATA_LIST -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_PRE_ACTIVITY_METADATA_LIST -uint16_t uniffi_bitkitcore_checksum_func_get_pre_activity_metadata_list(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_GET_SUPPORTED_HARDWARE_WALLETS -uint16_t uniffi_bitkitcore_checksum_func_get_supported_hardware_wallets(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_MIGRATE_BACKUP_ACTIVITIES_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_ACTIVITIES_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_activities_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_ACTIVITY_TAGS_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_activity_tags_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_PRE_ACTIVITY_METADATA_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_pre_activity_metadata_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_MIGRATE_BACKUP_TRANSACTION_DETAILS_JSON -uint16_t uniffi_bitkitcore_checksum_func_migrate_backup_transaction_details_json(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_PASSPORT_PARSE_ACCOUNT_EXPORT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PASSPORT_PARSE_ACCOUNT_EXPORT -uint16_t uniffi_bitkitcore_checksum_func_passport_parse_account_export(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_pre_activity_metadata_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_PRE_ACTIVITY_METADATA_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_pre_activity_metadata_to_json(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_SERIALIZED_EXTENDED_PUBKEY -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_SERIALIZED_EXTENDED_PUBKEY -uint16_t uniffi_bitkitcore_checksum_func_serialized_extended_pubkey(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_TRANSACTION_DETAILS_FROM_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TRANSACTION_DETAILS_FROM_JSON -uint16_t uniffi_bitkitcore_checksum_func_transaction_details_from_json(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TRANSACTION_DETAILS_TO_JSON -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TRANSACTION_DETAILS_TO_JSON -uint16_t uniffi_bitkitcore_checksum_func_transaction_details_to_json(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_REFRESH_FEATURES -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_TREZOR_REFRESH_FEATURES -uint16_t uniffi_bitkitcore_checksum_func_trezor_refresh_features(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_UR_ENCODE_CRYPTO_PSBT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_FUNC_UR_ENCODE_CRYPTO_PSBT -uint16_t uniffi_bitkitcore_checksum_func_ur_encode_crypto_psbt(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_BOLTZEVENTLISTENER_ON_EVENT -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_BOLTZEVENTLISTENER_ON_EVENT -uint16_t uniffi_bitkitcore_checksum_method_boltzeventlistener_on_event(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_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RECEIVE -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RECEIVE -uint16_t uniffi_bitkitcore_checksum_method_urdecoder_receive(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RESET -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_METHOD_URDECODER_RESET -uint16_t uniffi_bitkitcore_checksum_method_urdecoder_reset(void - -); -#endif -#ifndef UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_CONSTRUCTOR_URDECODER_NEW -#define UNIFFI_FFIDEF_UNIFFI_BITKITCORE_CHECKSUM_CONSTRUCTOR_URDECODER_NEW -uint16_t uniffi_bitkitcore_checksum_constructor_urdecoder_new(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/Headers/module.modulemap b/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/module.modulemap deleted file mode 100644 index 529d3350..00000000 --- a/bindings/ios/BitkitCore.xcframework/ios-arm64/Headers/module.modulemap +++ /dev/null @@ -1,7 +0,0 @@ -module bitkitcoreFFI { - header "bitkitcoreFFI.h" - export * - use "Darwin" - use "_Builtin_stdbool" - use "_Builtin_stdint" -} \ No newline at end of file diff --git a/build_ios.sh b/build_ios.sh index 1bf1787a..27e198a5 100755 --- a/build_ios.sh +++ b/build_ios.sh @@ -12,6 +12,11 @@ rm -rf ios/ # Create necessary directories echo "Creating build directories..." mkdir -p bindings/ios/ +DIST_DIR="dist/ios" +XCFRAMEWORK_PATH="$DIST_DIR/BitkitCore.xcframework" +XCFRAMEWORK_ZIP="$DIST_DIR/BitkitCore.xcframework.zip" +rm -rf "$DIST_DIR" +mkdir -p "$DIST_DIR" # Set iOS deployment target export IPHONEOS_DEPLOYMENT_TARGET=13.4 @@ -81,7 +86,7 @@ echo "Creating XCFramework..." xcodebuild -create-xcframework \ -library ./target/aarch64-apple-ios-sim/release/libbitkitcore.a -headers "bindings/ios/ios-arm64-sim/Headers" \ -library ./target/aarch64-apple-ios/release/libbitkitcore.a -headers "bindings/ios/ios-arm64/Headers" \ - -output "bindings/ios/BitkitCore.xcframework" \ + -output "$XCFRAMEWORK_PATH" \ || { echo "Failed to create XCFramework"; exit 1; } # Clean up temporary directories @@ -91,16 +96,20 @@ rm -rf "bindings/ios/ios-arm64-sim" # Create zip file for distribution and checksum calculation echo "Creating XCFramework zip file..." -rm -f ./bindings/ios/BitkitCore.xcframework.zip -ditto -c -k --sequesterRsrc --keepParent ./bindings/ios/BitkitCore.xcframework ./bindings/ios/BitkitCore.xcframework.zip || { echo "Failed to create zip file"; exit 1; } +rm -f "$XCFRAMEWORK_ZIP" +find "$XCFRAMEWORK_PATH" -exec touch -t 198001010000 {} + +( + cd "$DIST_DIR" + find BitkitCore.xcframework -print | LC_ALL=C sort | zip -X -q -r BitkitCore.xcframework.zip -@ +) || { echo "Failed to create zip file"; exit 1; } # Compute checksum echo "Computing checksum..." -CHECKSUM=`swift package compute-checksum ./bindings/ios/BitkitCore.xcframework.zip` || { echo "Failed to compute checksum"; exit 1; } +CHECKSUM=`swift package compute-checksum "$XCFRAMEWORK_ZIP"` || { echo "Failed to compute checksum"; exit 1; } echo "New checksum: $CHECKSUM" # Update Package.swift with the new checksum using Python script echo "Updating Package.swift with new checksum..." python3 ./update_package.py --checksum "$CHECKSUM" || { echo "Failed to update Package.swift"; exit 1; } -echo "iOS build process completed successfully!" \ No newline at end of file +echo "iOS build process completed successfully!"