Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitkitcore"
version = "0.4.1"
version = "0.4.2"
edition = "2021"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import PackageDescription

let tag = "v0.4.1"
let checksum = "867bea0633b707c5da7eef38439b4a91310540cad07baa11be4ddf43da60b0f7"
let tag = "v0.4.2"
let checksum = "4d33cb126c8427668db63969950742822fd0ce9ee67043886fba7140f01a6365"
let url = "https://github.com/synonymdev/bitkit-core/releases/download/\(tag)/BitkitCore.xcframework.zip"

let package = Package(
Expand Down
2 changes: 1 addition & 1 deletion bindings/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
group=com.synonym
version=0.4.1
version=0.4.2
Binary file not shown.
Binary file not shown.
Binary file modified bindings/android/lib/src/main/jniLibs/x86/libbitkitcore.so
Binary file not shown.
Binary file modified bindings/android/lib/src/main/jniLibs/x86_64/libbitkitcore.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,8 @@ internal typealias UniffiVTableCallbackInterfaceTrezorUiCallbackUniffiByValue =








Expand Down Expand Up @@ -1918,6 +1920,9 @@ internal object IntegrityCheckingUniffiLib : Library {
if (uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds() != 52496.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (uniffi_bitkitcore_checksum_func_serialized_extended_pubkey() != 12807.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (uniffi_bitkitcore_checksum_func_start_pubky_auth() != 18158.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -2456,6 +2461,9 @@ internal object IntegrityCheckingUniffiLib : Library {
external fun uniffi_bitkitcore_checksum_func_scan_legacy_rn_native_segwit_recovery_funds(
): Short
@JvmStatic
external fun uniffi_bitkitcore_checksum_func_serialized_extended_pubkey(
): Short
@JvmStatic
external fun uniffi_bitkitcore_checksum_func_start_pubky_auth(
): Short
@JvmStatic
Expand Down Expand Up @@ -3447,6 +3455,11 @@ internal object UniffiLib : Library {
`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
Expand Down Expand Up @@ -10041,6 +10054,44 @@ public object FfiConverterTypeNetworkType: FfiConverterRustBuffer<NetworkType> {



public object OnchainExceptionErrorHandler : UniffiRustCallStatusErrorHandler<OnchainException> {
override fun lift(errorBuf: RustBufferByValue): OnchainException = FfiConverterTypeOnchainError.lift(errorBuf)
}

public object FfiConverterTypeOnchainError : FfiConverterRustBuffer<OnchainException> {
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<PassphraseResponse>{
override fun read(buf: ByteBuffer): PassphraseResponse {
Expand Down Expand Up @@ -15119,6 +15170,16 @@ public suspend fun `scanLegacyRnNativeSegwitRecoveryFunds`(`mnemonicPhrase`: kot
)
}

@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(
Expand Down
Loading
Loading