Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bd97cf4
feat: trezor hardware support
coreyphillips Feb 18, 2026
74de0ce
fix: detekt warning
coreyphillips Feb 18, 2026
391242f
fix: bump bitkit-core to 0.1.39
coreyphillips Feb 18, 2026
89172b2
fix: add TrezorCoinType
coreyphillips Feb 25, 2026
e413a7f
chore: upgrade bitkit-core to v0.1.40
coreyphillips Feb 25, 2026
95e9526
Merge branch 'refs/heads/master' into feat/trezor-hardware-support
coreyphillips Feb 25, 2026
a1cd7c2
Merge branch 'master' into feat/trezor-hardware-support
jvsena42 Mar 3, 2026
4cebd2f
feat: add network selector and balance lookup to trezor dashboard
coreyphillips Mar 3, 2026
8986b33
feat: add tx compose, sign, and broadcast to trezor dashboard
coreyphillips Mar 5, 2026
03b2019
fix: trezor usb priority and connect guard
coreyphillips Mar 6, 2026
dccbab3
fix: bump bitkit-core version
coreyphillips Mar 7, 2026
cf6bb00
Merge branch 'master' into feat/trezor-hardware-support
jvsena42 Mar 9, 2026
c6b7973
chore: lint
jvsena42 Mar 9, 2026
4637508
refactor: replace Spacer composable with VerticalSpacer/HorizontalSpacer
jvsena42 Mar 9, 2026
a5b0f64
refactor: replace raw text with custom components
jvsena42 Mar 9, 2026
6fc047c
refactor: replace mising components fix the closet references
jvsena42 Mar 9, 2026
54a14d1
fix: address pr #792 review feedback
coreyphillips Mar 9, 2026
88795b6
refactor: replace mising components fix the closet references
jvsena42 Mar 9, 2026
9d9d09d
fix: implement text style patterns using existing screens as reference
jvsena42 Mar 9, 2026
63aa84c
Merge branch 'feat/trezor-hardware-support' of github.com:synonymdev/…
jvsena42 Mar 9, 2026
eca363a
fix: address pr #792 review feedback
coreyphillips Mar 9, 2026
c99dffc
Merge remote-tracking branch 'origin/feat/trezor-hardware-support' in…
coreyphillips Mar 9, 2026
7b7204e
Merge branch 'refs/heads/master' into feat/trezor-hardware-support
coreyphillips Mar 9, 2026
4ad6c84
fix: address pr #792 review feedback
coreyphillips Mar 9, 2026
811d6dc
Merge branch 'master' into feat/trezor-hardware-support
jvsena42 Mar 10, 2026
82d27d8
chore: add preview data and previews for trezor screens
jvsena42 Mar 10, 2026
d77a92c
fix: replace clickable text with proper components
jvsena42 Mar 10, 2026
a2a1ae6
fix: match existent spacing patterns
jvsena42 Mar 10, 2026
20c0024
fix: preview and corner radius
jvsena42 Mar 10, 2026
d1f13c4
chore: upgrade bitkit-core bindings
coreyphillips Mar 10, 2026
f635d09
refactor: extract derivation path constants
coreyphillips Mar 10, 2026
1500a1c
fix: address pr #792 review feedback
coreyphillips Mar 10, 2026
f544695
Merge branch 'refs/heads/master' into feat/trezor-hardware-support
coreyphillips Mar 10, 2026
9d47337
Merge branch 'master' into feat/trezor-hardware-support
jvsena42 Mar 13, 2026
a273e90
chore: update bitkit-core to 0.1.47
coreyphillips Mar 13, 2026
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 app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ composeCompiler {
}

dependencies {
implementation(fileTree("libs") { include("*.aar") })
implementation(fileTree("libs") { include("*.aar", "*.jar") })
implementation(libs.jna) { artifact { type = "aar" } }
implementation(platform(libs.kotlin.bom))
implementation(libs.core.ktx)
Expand Down
Binary file added app/libs/btleplug.aar
Binary file not shown.
Binary file added app/libs/jni-utils.jar
Binary file not shown.
9 changes: 8 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

# btleplug (droidplug) Android Bluetooth support
# These classes are loaded via JNI from Rust code
-keep class com.nonpolynomial.btleplug.** { *; }

# jni-utils support library for btleplug
-keep class io.github.gedgygedgy.rust.** { *; }
27 changes: 27 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@
android:name="android.permission.FOREGROUND_SERVICE"
tools:ignore="ForegroundServicePermission,ForegroundServicesPolicy" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />

<!-- USB Host support for Trezor hardware wallet -->
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />

<!-- Bluetooth permissions for Trezor Safe 7 (Android 12+) -->
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />

<!-- Bluetooth permissions (legacy, Android 11 and below) -->
<uses-permission android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
android:maxSdkVersion="30" />

<!-- Required for E2E tests connecting to local Electrum server (Android 16+) -->
<uses-permission
android:name="android.permission.NEARBY_WIFI_DEVICES"
Expand Down Expand Up @@ -126,6 +145,14 @@
<data android:scheme="lnurlp" />
</intent-filter>

<!-- USB device attached — auto-grants permission when Trezor is plugged in -->
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/usb_device_filter" />

<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/to/bitkit/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.hilt.work.HiltWorkerFactory
import androidx.work.Configuration
import dagger.hilt.android.HiltAndroidApp
import to.bitkit.env.Env
import to.bitkit.services.BluetoothInit
import javax.inject.Inject

@HiltAndroidApp
Expand All @@ -25,6 +26,8 @@ internal open class App : Application(), Configuration.Provider {
super.onCreate()
currentActivity = CurrentActivity().also { registerActivityLifecycleCallbacks(it) }
Env.initAppStoragePath(filesDir.absolutePath)
// Initialize btleplug for Bluetooth support (required before any BLE usage)
BluetoothInit.ensureInitialized()
}

companion object {
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/to/bitkit/ext/Context.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package to.bitkit.ext
import android.app.Activity
import android.app.ActivityManager
import android.app.NotificationManager
import android.bluetooth.BluetoothManager
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Context.NOTIFICATION_SERVICE
import android.content.ContextWrapper
import android.content.Intent
import android.content.pm.PackageManager.PERMISSION_GRANTED
import android.hardware.usb.UsbManager
import android.provider.Settings
import androidx.core.app.NotificationManagerCompat
import androidx.core.content.ContextCompat
Expand All @@ -31,6 +33,12 @@ val Context.clipboardManager: ClipboardManager
val Context.activityManager: ActivityManager
get() = getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager

val Context.usbManager: UsbManager
get() = getSystemService(Context.USB_SERVICE) as UsbManager

val Context.bluetoothManager: BluetoothManager
get() = getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager

// Permissions

fun Context.requiresPermission(permission: String): Boolean =
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/java/to/bitkit/models/Network.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package to.bitkit.models

import com.synonym.bitkitcore.NetworkType
import com.synonym.bitkitcore.TrezorCoinType
import org.lightningdevkit.ldknode.Network
import com.synonym.bitkitcore.Network as BitkitCoreNetwork

Expand All @@ -11,6 +12,13 @@ fun Network.networkUiText(): String = when (this) {
Network.REGTEST -> "Regtest"
}

fun Network.toTrezorCoinType(): TrezorCoinType = when (this) {
Network.BITCOIN -> TrezorCoinType.BITCOIN
Network.TESTNET -> TrezorCoinType.TESTNET
Network.SIGNET -> TrezorCoinType.SIGNET
Network.REGTEST -> TrezorCoinType.REGTEST
}

fun Network.toCoreNetwork(): BitkitCoreNetwork = when (this) {
Network.BITCOIN -> BitkitCoreNetwork.BITCOIN
Network.TESTNET -> BitkitCoreNetwork.TESTNET
Expand All @@ -31,3 +39,11 @@ fun NetworkType.toLdkNetwork(): Network = when (this) {
NetworkType.SIGNET -> Network.SIGNET
NetworkType.REGTEST -> Network.REGTEST
}

fun BitkitCoreNetwork.toTrezorCoinType(): TrezorCoinType = when (this) {
BitkitCoreNetwork.BITCOIN -> TrezorCoinType.BITCOIN
BitkitCoreNetwork.TESTNET -> TrezorCoinType.TESTNET
BitkitCoreNetwork.TESTNET4 -> TrezorCoinType.TESTNET
BitkitCoreNetwork.SIGNET -> TrezorCoinType.SIGNET
BitkitCoreNetwork.REGTEST -> TrezorCoinType.REGTEST
}
Loading
Loading