Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitbox02 sign_message fails #777

Closed
andreasgriffin opened this issue Mar 10, 2025 · 4 comments
Closed

Bitbox02 sign_message fails #777

andreasgriffin opened this issue Mar 10, 2025 · 4 comments

Comments

@andreasgriffin
Copy link

Doing

client.sign_message('test message', 'm/84h/1h/0h/0/0')

gives the error:

hwilib.devices.bitbox02_lib.communication.bitbox_api_protocol.Bitbox02Exception: error code: 101, message: invalid input

Doing exactly the same with Coldcard or Ledger works.
Tagging @achow101

Versions:
Bitbox02 Firmware: 9.22.0
HWI: 3.1.0

@achow101
Copy link
Member

cc @benma

@benma
Copy link
Contributor

benma commented Mar 10, 2025

@andreasgriffin have you instantiated the client with chain=Chain.TEST? BitBox only signs using the testnet keypath when testnet is set.

@andreasgriffin
Copy link
Author

andreasgriffin commented Mar 10, 2025

Yes I initialize the client with the correct chain.

Client initialized with Chain.MAIN, and then

client.sign_message('test message', 'm/84h/0h/0h/0/0')

works.

Client initialized with Chain.TESTNET (or signet or regtest)

client.sign_message('test message', 'm/84h/1h/0h/0/0')

fails.

@benma
Copy link
Contributor

benma commented Mar 10, 2025

@andreasgriffin my bad, I forgot: the BitBox does not even support signing messages in testnet (not sure why not, maybe it was due to some worry about mainnet and testnet having the same message format, but that can be mitigated by keypath checks).

If this is an impotant feature for you, we should open an issue at https://github.com/BitBoxSwiss/bitbox02-firmware/issues. It's not a HWI issue in any case, so you can close this issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants