Repository: trezor/trezor-suite
Pull request #18218: Feat: TrezorConnect.bleUnpair method
Author: login: szymonlesisz
Labels: name: connect
description: Connect API related (ie. fee calculation)
name: no-project
description: This label is used to specify that PR doesn't need to be added to a project
Created: 2025-04-08T15:42:51Z | Merged: 2025-04-15T06:45:24Z

<!--- Provide a general summary of your changes in the Title above -->

## Description

cherry picked (not quite) from the `feat/rust-bluetooth` branch

`BleUnpair` message is already in the firmware repo but bluetooth branch still uses the old one (EraseBonds + Unpair messages in `TrezorConnect.eraseBonds` method)

i will rebase on top of this once i have newest BT FW build containing this message


Diff:
diff --git a/packages/connect/src/api/bleUnpair.ts b/packages/connect/src/api/bleUnpair.ts
new file mode 100644
index 000000000000..137e5547698a
--- /dev/null
+++ b/packages/connect/src/api/bleUnpair.ts
@@ -0,0 +1,29 @@
+import { Assert } from '@trezor/schema-utils';
+
+import { PROTO } from '../constants';
+import { AbstractMethod } from '../core/AbstractMethod';
+import { UI } from '../events';
+
+export default class BleUnpair extends AbstractMethod<'bleUnpair', PROTO.BleUnpair> {
+    init() {
+        this.allowDeviceMode = [UI.INITIALIZE, UI.SEEDLESS];
+        this.requiredPermissions = ['management'];
+        this.useDeviceState = false;
+        this.skipFinalReload = true;
+
+        const { payload } = this;
+        this.params = {
+            all: payload.all,
+        };
+
+        Assert(PROTO.BleUnpair, payload);
+    }
+
+    async run() {
+        const cmd = this.device.getCommands();
+        // unpair current bluetooth connection session or all known sessions
+        const response = await cmd.typedCall('BleUnpair', 'Success', this.params);
+
+        return response.message;
+    }
+}
diff --git a/packages/connect/src/api/index.ts b/packages/connect/src/api/index.ts
index eeb7d84f5bc4..809f47bd3d85 100644
--- a/packages/connect/src/api/index.ts
+++ b/packages/connect/src/api/index.ts
@@ -5,6 +5,7 @@ export { default as authorizeCoinjoin } from './authorizeCoinjoin';
 export { default as cancelCoinjoinAuthorization } from './cancelCoinjoinAuthorization';
 export { default as showDeviceTutorial } from './showDeviceTutorial';
 export { default as backupDevice } from './backupDevice';
+export { default as bleUnpair } from './bleUnpair';
 export { default as blockchainDisconnect } from './blockchainDisconnect';
 export { default as blockchainEstimateFee } from './blockchainEstimateFee';
 export { default as blockchainGetAccountBalanceHistory } from './blockchainGetAccountBalanceHistory';
diff --git a/packages/connect/src/factory.ts b/packages/connect/src/factory.ts
index 030f5237fb22..94e8017ca03e 100644
--- a/packages/connect/src/factory.ts
+++ b/packages/connect/src/factory.ts
@@ -58,6 +58,8 @@ export const factory = <
 
     // methods
 
+    bleUnpair: params => call({ ...params, method: 'bleUnpair' }),
+
     blockchainGetAccountBalanceHistory: params =>
         call({ ...params, method: 'blockchainGetAccountBalanceHistory' }),
 
diff --git a/packages/connect/src/types/api/bleUnpair.ts b/packages/connect/src/types/api/bleUnpair.ts
new file mode 100644
index 000000000000..fcd9d5458782
--- /dev/null
+++ b/packages/connect/src/types/api/bleUnpair.ts
@@ -0,0 +1,4 @@
+import type { PROTO } from '../../constants';
+import type { Params, Response } from '../params';
+
+export declare function bleUnpair(params: Params<PROTO.BleUnpair>): Response<PROTO.Success>;
diff --git a/packages/connect/src/types/api/index.ts b/packages/connect/src/types/api/index.ts
index e4088e030ab4..5150b3c8a988 100644
--- a/packages/connect/src/types/api/index.ts
+++ b/packages/connect/src/types/api/index.ts
@@ -6,6 +6,7 @@ import { backupDevice } from './backupDevice';
 import { binanceGetAddress } from './binanceGetAddress';
 import { binanceGetPublicKey } from './binanceGetPublicKey';
 import { binanceSignTransaction } from './binanceSignTransaction';
+import { bleUnpair } from './bleUnpair';
 import { blockchainDisconnect } from './blockchainDisconnect';
 import { blockchainEstimateFee } from './blockchainEstimateFee';
 import { blockchainEvmRpcCall } from './blockchainEvmRpcCall';
@@ -118,6 +119,9 @@ export interface TrezorConnect {
     // https://connect.trezor.io/9/methods/binance/binanceSignTransaction/
     binanceSignTransaction: typeof binanceSignTransaction;
 
+    // https://connect.trezor.io/9/methods/device/bleUnpair/
+    bleUnpair: typeof bleUnpair;
+
     // todo: link docs
     blockchainDisconnect: typeof blockchainDisconnect;
 
diff --git a/packages/protobuf/messages.json b/packages/protobuf/messages.json
index 2bbb7978e0a1..a597a050465b 100644
--- a/packages/protobuf/messages.json
+++ b/packages/protobuf/messages.json
@@ -1552,6 +1552,14 @@
                 }
             }
         },
+        "BleUnpair": {
+            "fields": {
+                "all": {
+                    "type": "bool",
+                    "id": 1
+                }
+            }
+        },
         "FirmwareErase": {
             "fields": {
                 "length": {
@@ -6797,6 +6805,7 @@
                 "FirmwareUpload": 7,
                 "FirmwareRequest": 8,
                 "ProdTestT1": 32,
+                "BleUnpair": 8001,
                 "GetPublicKey": 11,
                 "PublicKey": 12,
                 "SignTx": 15,
diff --git a/packages/protobuf/src/messages-schema.ts b/packages/protobuf/src/messages-schema.ts
index 8140f9f7110c..dd032ade9fc4 100644
--- a/packages/protobuf/src/messages-schema.ts
+++ b/packages/protobuf/src/messages-schema.ts
@@ -803,6 +803,14 @@ export const AuthorizeCoinJoin = Type.Object(
     { $id: 'AuthorizeCoinJoin' },
 );
 
+export type BleUnpair = Static<typeof BleUnpair>;
+export const BleUnpair = Type.Object(
+    {
+        all: Type.Optional(Type.Boolean()),
+    },
+    { $id: 'BleUnpair' },
+);
+
 export type FirmwareErase = Static<typeof FirmwareErase>;
 export const FirmwareErase = Type.Object(
     {
@@ -1385,7 +1393,7 @@ export const EnumFailureType = Type.Enum(FailureType);
 export type Failure = Static<typeof Failure>;
 export const Failure = Type.Object(
     {
-        code: Type.Optional(EnumFailureType),
+        code: Type.Optional(Type.KeyOfEnum(FailureType)),
         message: Type.Optional(Type.String()),
     },
     { $id: 'Failure' },
@@ -3592,6 +3600,7 @@ export const MessageType = Type.Object(
         GetOwnershipProof,
         OwnershipProof,
         AuthorizeCoinJoin,
+        BleUnpair,
         FirmwareErase,
         FirmwareRequest,
         FirmwareUpload,
diff --git a/packages/protobuf/src/messages.ts b/packages/protobuf/src/messages.ts
index b353c27be4b4..a189a28f1b15 100644
--- a/packages/protobuf/src/messages.ts
+++ b/packages/protobuf/src/messages.ts
@@ -552,6 +552,10 @@ export type AuthorizeCoinJoin = {
     amount_unit?: AmountUnit;
 };
 
+export type BleUnpair = {
+    all?: boolean;
+};
+
 export type FirmwareErase = {
     length?: number;
 };
@@ -2343,6 +2347,7 @@ export type MessageType = {
     GetOwnershipProof: GetOwnershipProof;
     OwnershipProof: OwnershipProof;
     AuthorizeCoinJoin: AuthorizeCoinJoin;
+    BleUnpair: BleUnpair;
     FirmwareErase: FirmwareErase;
     FirmwareRequest: FirmwareRequest;
     FirmwareUpload: FirmwareUpload;


Reviews:
user: login: mroz22
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T07:10:06Z
user: login: szymonlesisz
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T08:12:06Z
user: login: mroz22
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-09T08:44:38Z
user: login: mroz22
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T08:23:19Z
user: login: mroz22
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T09:34:30Z
user: login: mroz22
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T09:35:17Z

Review comments:
diff_hunk: @@ -1385,7 +1393,7 @@ export const EnumFailureType = Type.Enum(FailureType);
 export type Failure = Static<typeof Failure>;
 export const Failure = Type.Object(
     {
-        code: Type.Optional(EnumFailureType),
+        code: Type.Optional(Type.KeyOfEnum(FailureType)),
path: packages/protobuf/src/messages-schema.ts
user: login: mroz22
body: hmm this is a generated file 🤔 was this change added manually?
created_at: 2025-04-09T07:10:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1385,7 +1393,7 @@ export const EnumFailureType = Type.Enum(FailureType);
 export type Failure = Static<typeof Failure>;
 export const Failure = Type.Object(
     {
-        code: Type.Optional(EnumFailureType),
+        code: Type.Optional(Type.KeyOfEnum(FailureType)),
path: packages/protobuf/src/messages-schema.ts
user: login: szymonlesisz
body: no, from `update:schema` script

but (!!) i also had some (from my pov unwanted) changes when i ran `update:protobuf`, is it possible that some recent changes was not commited to develop?
```
export type Failure = {
- code?: keyof typeof FailureType;
+  code?: FailureType;
created_at: 2025-04-09T08:12:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1385,7 +1393,7 @@ export const EnumFailureType = Type.Enum(FailureType);
 export type Failure = Static<typeof Failure>;
 export const Failure = Type.Object(
     {
-        code: Type.Optional(EnumFailureType),
+        code: Type.Optional(Type.KeyOfEnum(FailureType)),
path: packages/protobuf/src/messages-schema.ts
user: login: mroz22
body: could be, I was changnig this and might have made this mistake - changing generated file. will check on it!
created_at: 2025-04-09T08:44:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -1385,7 +1393,7 @@ export const EnumFailureType = Type.Enum(FailureType);
 export type Failure = Static<typeof Failure>;
 export const Failure = Type.Object(
     {
-        code: Type.Optional(EnumFailureType),
+        code: Type.Optional(Type.KeyOfEnum(FailureType)),
path: packages/protobuf/src/messages-schema.ts
user: login: mroz22
body: #18344
created_at: 2025-04-14T08:23:19Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,29 @@
+import { Assert } from '@trezor/schema-utils';
+
+import { PROTO } from '../constants';
+import { AbstractMethod } from '../core/AbstractMethod';
+import { UI } from '../events';
+
+export default class BleUnpair extends AbstractMethod<'bleUnpair', PROTO.BleUnpair> {
+    init() {
+        this.allowDeviceMode = [UI.INITIALIZE, UI.SEEDLESS];
+        this.requiredPermissions = ['management'];
+        this.useDeviceState = false;
+        this.skipFinalReload = true;
path: packages/connect/src/api/bleUnpair.ts
user: login: mroz22
body: I see, it results into a disconnect device so no features reload is possible right?
created_at: 2025-04-14T09:34:30Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-04-08T15:45:04Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes introduce support for Bluetooth unpairing by adding new functionality across multiple modules. A new class `BleUnpair` is implemented to handle the unpairing process, initializing necessary parameters and validating input using a predefined schema before asynchronously executing the unpair command. In the API layer, additional exports and method declarations are provided to integrate the unpair functionality into the public interface and factory functions. Corresponding type definitions are also added to maintain type safety. The protobuf configuration is extended with a new message type `BleUnpair`, which includes a boolean field to specify whether all sessions should be unpaired. These modifications collectively extend the system’s capabilities to manage Bluetooth unpairing while preserving existing behaviors and structures.

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 131089559bd6bae736b7a9d46e0e4c4e1aa79761 and 430e5fa393a897b599296999877d18832a5f0296.

</details>

<details>
<summary>📒 Files selected for processing (8)</summary>

* `packages/connect/src/api/bleUnpair.ts` (1 hunks)
* `packages/connect/src/api/index.ts` (1 hunks)
* `packages/connect/src/factory.ts` (1 hunks)
* `packages/connect/src/types/api/bleUnpair.ts` (1 hunks)
* `packages/connect/src/types/api/index.ts` (2 hunks)
* `packages/protobuf/messages.json` (2 hunks)
* `packages/protobuf/src/messages-schema.ts` (3 hunks)
* `packages/protobuf/src/messages.ts` (2 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (8)</summary>

* packages/connect/src/api/index.ts
* packages/connect/src/types/api/bleUnpair.ts
* packages/connect/src/factory.ts
* packages/connect/src/api/bleUnpair.ts
* packages/protobuf/src/messages.ts
* packages/protobuf/messages.json
* packages/protobuf/src/messages-schema.ts
* packages/connect/src/types/api/index.ts

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (11)</summary>

* GitHub Check: PR-check   / node-authorizeCoinjoin cancelCoinjoinAuthorization passphrase unlockPath setBusy checkFirmwareAuthenticity keepSession cancel.test info.test resetDevice-api
* GitHub Check: PR-check   / web-override init-api-flaky
* GitHub Check: PR-check   / node-override init-api-flaky
* GitHub Check: PR-check   / web-authorizeCoinjoin cancelCoinjoinAuthorization passphrase unlockPath setBusy checkFirmwareAuthenticity keepSession cancel.test info.test resetDevice-api
* GitHub Check: build-deploy
* GitHub Check: build-deploy
* GitHub Check: transport-e2e-test
* GitHub Check: Setup and Cache Dependencies
* GitHub Check: prepare_android_test_app
* GitHub Check: connect-web-e2e
* GitHub Check: Analyze with CodeQL (javascript)

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpADK2VmgqyjcEj2wAbb5AokAI7Y0riQ4rjedJAARABiJNRc0AEAXvgUAML4GORiGgJRAKoY3Np8bLiwijGQAO5oyIjYAszqNPRy4bCe2IiUkIipssw5UYhIqegY9KjwShjiAGbw0V1VnhhOAgMAjAAcAEwHGjA91nYMmJA76AwM0v301N2eS/i++HXwGESQRTYADJcADasFwuG4iA4AHoYUR1LAWhomMwYbg0hl0ZiKGBmuoSDDuD5vDCDsd9gBdAAU4Mh0LhCKqyNR2JI6QobI5eOwBKJJLJRwOAEoNO5zkpEAwKPBuOIcigZvArjRkFUXhtGLBMKRkD8JB8pOhIJVqvQAt5qNECJAAELeEIEfBVSBLbAYMTwHJobzqWQAGkG3FE8BWV188k1AAN7SQSmV4BQoybHmhSIG6ggGLAUMgfQE0LR5LxpOxFa9XYnmA0Av4SNx8BMCK5TgAJL4kKQUQOahjYCgBRZ2h0kJ0ugRUD05piLH4hNX4SB4eC+1KeD5KCqp3WBjBoNjeeRRgCiVH6tpytEQycw9Cj8fKUYziJ+FajKXZGWyuVEmmU58va8UyqRRTg8HAQL4DBnWkboNR6eRvl8OsBEaTxe21X5YIVAhuH4JYK0tVUwntR18GdHMVgoasXE8AReW8egcgeFAwlQNAJG0S1ChIDMsxzJC/B+BgHSUCtyDqSAY2KUpHxTRBEDTEgwIQPUlRVWDrhIJZ3goMIbWwbhaCtaZZmYXh8CNTVSNHciXUw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000q1q1fUM3Gk/6np+J9UdGDVPVO0K1U1vXK0vke303KpfnIYU0h0u3vUq3gX9Fdyz79xRzDExWY4IWTGb5BaoXNnK7kX+be2g33bRjTnx1zmJ0vlwaVi5o+ZqiPGZk77amRWcUhKgl/HZgnQDQjkfDsVwkIl+SHjIlST9WkCB3K6WXBrs3QU2gt3iQzwlTkVrE+385oK8H4FszOjoA6RYVZZDpOF8m+JhlcnDSahF1in+Z5icQrjloO2qEolR7KT6kEVySbm9I4UDKugfBMJ1DQi1l1mj7Siyi4AGCnWPHnXg2XoGCQDwNaUAD8w5aNGAf6BgL66DH5b9E9Vtl5pF7y9F0gLcH5IDMocoBgxFXAxFWD9ZBgexi4TkM0lAngAQwhkR1l4Sgeh9Pu0OAshxxx0g1C6ksM6M8EcUYxWUqsdWJUUp4gUgi186A2K1wRw2oRG1ERW1WeMRu182jZhdjxAN564R+kUD4uF116jCyDrFA9mAf6N2ZNQGldj5YdbttdXtRQ10UcV9a1cM+5qRd1R8j1R1ftuDgdjt2qLjrtlcC5gOMdhgBgAcDKpsEEFsc+0FGBnA/gaA8ci+I8ycHsac3smcfsiTRsg06gAA+vMIgJUwEJVDPHQJU44lTFnEk7sAAMy7AUn7AMEACsfTDBAgtAAAbKhCQAAOwdNjMTNoAMG0AAAsIzJAFJJACzDACzJAuwaAaAEzDBEzIzNJBsSTCzHTqzfTd6HTDBHTaAvTEzAggzDBhwDBIzDBbz+wEzEztABw+wHThwaAFzFJzzIzvsCTST8UVTNTdTbCjTtAlTJsoLQAA -->

<!-- internal state end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=trezor/trezor-suite&utm_content=18218):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai plan` to trigger planning for file edits and PR creation.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-04-08T15:47:28Z
body: 🔍🌐 Suite Web test results: [View in Currents](https://app.currents.dev/projects/Og0NOQ/runs?branch=feat/ble-unpair&lookback=7)
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-04-08T15:49:10Z
body: 🔍🖥️ Suite Desktop test results: [View in Currents](https://app.currents.dev/projects/4ytF0E/runs?branch=feat/ble-unpair&lookback=7)
author_association: NONE
user: login: szymonlesisz
created_at: 2025-04-14T09:18:00Z
body: /rebase
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-04-14T09:18:20Z
body: Start rebasing: https://github.com/trezor/trezor-suite/actions/runs/14442027433
author_association: NONE
user: login: trezor-ci
created_at: 2025-04-14T09:19:25Z
body: ✅ Previously successful run of **[Test] PR Suite Desktop e2e tests** workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)
author_association: CONTRIBUTOR
user: login: trezor-ci
created_at: 2025-04-14T09:19:28Z
body: ✅ Previously successful run of **[Test] PR Suite Web e2e tests** workflow has been found.
⏭️ Skipping tests for this run.
💡 If you are unsure about your latest changes, please rerun the workflow manually. (Use the Re-run all jobs option)
author_association: CONTRIBUTOR