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
4 changes: 4 additions & 0 deletions .github/workflows/android-bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ jobs:
exit 1
fi

- name: Compile Kotlin Trezor record smoke fixture
working-directory: bindings/android
run: ./gradlew :lib:compileDebugUnitTestKotlin --no-daemon

- name: Upload Android generated artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ios-bindgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- '**/uniffi*.toml'
- 'rust-toolchain*'
- 'update_package.py'
- 'tests/bindings/trezor_records.swift'
- 'vendor/**'
push:
branches:
Expand All @@ -35,6 +36,7 @@ on:
- '**/uniffi*.toml'
- 'rust-toolchain*'
- 'update_package.py'
- 'tests/bindings/trezor_records.swift'
- 'vendor/**'
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -114,6 +116,14 @@ jobs:
exit 1
fi

- name: Smoke test Swift Trezor records
shell: bash
run: |
swiftc -I bindings/ios -L target/release -lbitkitcore \
bindings/ios/bitkitcore.swift tests/bindings/trezor_records.swift \
-o "$RUNNER_TEMP/trezor-records-smoke"
DYLD_LIBRARY_PATH="$PWD/target/release" "$RUNNER_TEMP/trezor-records-smoke"

- name: Upload iOS generated artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
7 changes: 4 additions & 3 deletions Cargo.lock

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

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bitkitcore"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
rust-version = "1.90"

Expand Down Expand Up @@ -55,11 +55,11 @@ alloy-rlp = "0.3"

# Trezor connect library - non-iOS platforms get USB + Bluetooth
[target.'cfg(not(target_os = "ios"))'.dependencies]
trezor-connect-rs = { version = "0.4.0", features = ["psbt"] }
trezor-connect-rs = { version = "10.0.0", features = ["psbt"] }

# iOS: Bluetooth only (libusb has no iOS backend, so no USB support)
[target.'cfg(target_os = "ios")'.dependencies]
trezor-connect-rs = { version = "0.4.0", default-features = false, features = ["bluetooth", "psbt"] }
trezor-connect-rs = { version = "10.0.0", default-features = false, features = ["bluetooth", "psbt"] }

# JNI for Android (must match btleplug's jni version)
[target.'cfg(target_os = "android")'.dependencies]
Expand All @@ -77,6 +77,7 @@ jade-client-rs = { git = "https://github.com/synonymdev/jade-client-rs", rev = "
jade-client-rs = { git = "https://github.com/synonymdev/jade-client-rs", rev = "d46d02a", features = ["reqwest-pinserver", "serial"] }

[dev-dependencies]
prost = "0.13"
tokio = { version = "1.40.0", features = ["full", "test-util"] }
serde_json = "1.0.114"
hex = "0.4.3"
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import PackageDescription
import Foundation

let tag = "v0.6.0"
let checksum = "7cb8c8c49221d991f7cbe71c73dcad8e7ceb4d8ad410d68d7a781eb70e04fbdf"
let tag = "v0.7.0"
let checksum = "1acafd28aadd7098274f80b402f230346c3265a77f21917583814403c05347cd"
let url = "https://github.com/synonymdev/bitkit-core/releases/download/\(tag)/BitkitCore.xcframework.zip"

let localBinary = ProcessInfo.processInfo.environment["BITKIT_CORE_LOCAL"] == "1"
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.6.0
version=0.7.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.synonym.bitkitcore

// Compiled by :lib:compileDebugUnitTestKotlin after regenerating bindings.
internal fun trezorRecordsSmoke() {
val path = "m/84'/0'/0'"
val address = TrezorGetAddressParams(
path = path, coin = null, showOnTrezor = false, scriptType = null,
)
val key = TrezorGetPublicKeyParams(path = path, coin = null, showOnTrezor = false)
val message = TrezorSignMessageParams(path = path, message = "test", coin = null)
check(!address.crossChain && !key.crossChain && !message.crossChain)
val pathOverride = TrezorGetPublicKeyParams(
path = path, coin = null, showOnTrezor = false, crossChain = true,
)
check(pathOverride.crossChain)
val response = TrezorPublicKeyResponse(
xpub = "xpub", xpubSegwit = "zpub", descriptor = null,
displayablePublicKey = "zpub", path = path, publicKey = "02",
chainCode = "00", fingerprint = 42u, depth = 3u, rootFingerprint = 0x73c5da0au,
)
check(response.xpub == "xpub")
check(response.xpubSegwit == response.displayablePublicKey)
check(response.descriptor == null)
check(response.rootFingerprint == 0x73c5da0au)
}
Loading
Loading