Skip to content
Merged
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.3.4"
version = "0.3.5"
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.3.4"
let checksum = "a34aafd347e8fdb2cba31b504e441083467ba2974b437e5934ffa23eeb950923"
let tag = "v0.3.5"
let checksum = "bd1dcde687950d5dcaa5ea86d8fb8e3b8e68fd3cfdfca024e3bc4ee54746ea07"
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.3.4
version=0.3.5
Binary file modified bindings/android/lib/src/main/jniLibs/arm64-v8a/libbitkitcore.so
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 @@ -1487,6 +1487,8 @@ internal typealias UniffiVTableCallbackInterfaceTrezorUiCallbackUniffiByValue =








Expand Down Expand Up @@ -1706,6 +1708,9 @@ internal object IntegrityCheckingUniffiLib : Library {
if (uniffi_bitkitcore_checksum_func_get_pre_activity_metadata() != 24738.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (uniffi_bitkitcore_checksum_func_get_supported_hardware_wallets() != 36542.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (uniffi_bitkitcore_checksum_func_get_tags() != 8596.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -2196,6 +2201,9 @@ internal object IntegrityCheckingUniffiLib : Library {
external fun uniffi_bitkitcore_checksum_func_get_pre_activity_metadata(
): Short
@JvmStatic
external fun uniffi_bitkitcore_checksum_func_get_supported_hardware_wallets(
): Short
@JvmStatic
external fun uniffi_bitkitcore_checksum_func_get_tags(
): Short
@JvmStatic
Expand Down Expand Up @@ -2984,6 +2992,10 @@ internal object UniffiLib : Library {
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,
Expand Down Expand Up @@ -7289,6 +7301,37 @@ public object FfiConverterTypeSingleAddressInfoResult: FfiConverterRustBuffer<Si



public object FfiConverterTypeSupportedHardwareWallet: FfiConverterRustBuffer<SupportedHardwareWallet> {
override fun read(buf: ByteBuffer): SupportedHardwareWallet {
return SupportedHardwareWallet(
FfiConverterTypeHardwareWalletVendor.read(buf),
FfiConverterString.read(buf),
FfiConverterString.read(buf),
FfiConverterString.read(buf),
FfiConverterSequenceTypeTrezorTransportType.read(buf),
)
}

override fun allocationSize(value: SupportedHardwareWallet): ULong = (
FfiConverterTypeHardwareWalletVendor.allocationSize(value.`vendor`) +
FfiConverterString.allocationSize(value.`vendorName`) +
FfiConverterString.allocationSize(value.`model`) +
FfiConverterString.allocationSize(value.`displayName`) +
FfiConverterSequenceTypeTrezorTransportType.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)
FfiConverterSequenceTypeTrezorTransportType.write(value.`transports`, buf)
}
}




public object FfiConverterTypeSweepResult: FfiConverterRustBuffer<SweepResult> {
override fun read(buf: ByteBuffer): SweepResult {
return SweepResult(
Expand Down Expand Up @@ -9612,6 +9655,24 @@ public object FfiConverterTypeDecodingError : FfiConverterRustBuffer<DecodingExc




public object FfiConverterTypeHardwareWalletVendor: FfiConverterRustBuffer<HardwareWalletVendor> {
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<LnurlException> {
override fun lift(errorBuf: RustBufferByValue): LnurlException = FfiConverterTypeLnurlError.lift(errorBuf)
}
Expand Down Expand Up @@ -12618,6 +12679,31 @@ public object FfiConverterSequenceTypePubkyProfileLink: FfiConverterRustBuffer<L



public object FfiConverterSequenceTypeSupportedHardwareWallet: FfiConverterRustBuffer<List<SupportedHardwareWallet>> {
override fun read(buf: ByteBuffer): List<SupportedHardwareWallet> {
val len = buf.getInt()
return List<SupportedHardwareWallet>(len) {
FfiConverterTypeSupportedHardwareWallet.read(buf)
}
}

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

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




public object FfiConverterSequenceTypeTransactionDetails: FfiConverterRustBuffer<List<TransactionDetails>> {
override fun read(buf: ByteBuffer): List<TransactionDetails> {
val len = buf.getInt()
Expand Down Expand Up @@ -12967,6 +13053,31 @@ public object FfiConverterSequenceTypeComposeResult: FfiConverterRustBuffer<List




public object FfiConverterSequenceTypeTrezorTransportType: FfiConverterRustBuffer<List<TrezorTransportType>> {
override fun read(buf: ByteBuffer): List<TrezorTransportType> {
val len = buf.getInt()
return List<TrezorTransportType>(len) {
FfiConverterTypeTrezorTransportType.read(buf)
}
}

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

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



public object FfiConverterMapStringString: FfiConverterRustBuffer<Map<kotlin.String, kotlin.String>> {
override fun read(buf: ByteBuffer): Map<kotlin.String, kotlin.String> {
val len = buf.getInt()
Expand Down Expand Up @@ -13835,6 +13946,20 @@ public fun `getPreActivityMetadata`(`walletId`: kotlin.String, `searchKey`: kotl
})
}

/**
* The catalog of hardware wallets Bitkit supports.
*
* Trezor's full lineup; only the Safe 7 currently offers Bluetooth, so it is the
* only model iOS surfaces (apps filter on `transports`).
*/
public fun `getSupportedHardwareWallets`(): List<SupportedHardwareWallet> {
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<kotlin.String> {
return FfiConverterSequenceString.lift(uniffiRustCallWithError(ActivityExceptionErrorHandler) { uniffiRustCallStatus ->
Expand Down
Loading