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

Documentation / interface for hardware wallets #4377

Open
benapetr opened this issue Dec 27, 2023 · 3 comments
Open

Documentation / interface for hardware wallets #4377

benapetr opened this issue Dec 27, 2023 · 3 comments
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG

Comments

@benapetr
Copy link

The problem that you wish to solve

Right now Daedalus somehow magically is able to connect HW wallets, but it's not obvious from API of cardano-wallet how is that possible. Is there any interface in cardano-wallet that can handle hardware wallets? If not it should be implemented.

Description

See above

Implementation suggestions

Implement API interface for handling hardware wallets, eg. let users export the public keys and create wallet just using that instead of secret passphrase. Let user export prepared TXs and let HW wallet sign them, then send them back to cardano-wallet for execution.

It would be great if format of output was compatible with existing CLI tools that can work with hardware wallets like cardano-hw-cli

@benapetr benapetr added ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG labels Dec 27, 2023
@Unisay
Copy link
Contributor

Unisay commented Dec 28, 2023

The cardano-wallet backend application doesn't have a functionality to support HW wallets like Ledger. The HW support in Daedalus comes from somewhere else.

@HeinrichApfelmus
Copy link
Contributor

The HW support in Daedalus comes from somewhere else.

@Unisay that cannot be the whole story — ledgerjs-hw-app-cardano may be able to sign transactions, but it does not contain any provisions for interacting with the cardano-node. For the latter, Daedalus does rely on cardano-wallet.

Implement API interface for handling hardware wallets, eg. let users export the public keys and create wallet just using that instead of secret passphrase.

The API endpoint https://cardano-foundation.github.io/cardano-wallet/api/edge/#operation/postWallet with the shelley (from XPub) schema for the POST data allows you to do that — restore (synchronize) a wallet from a public key instead of a private key.

@benapetr
Copy link
Author

benapetr commented Jan 3, 2024

ok, can we at least create some wiki page that would show example flow where user extracts the public key (using tools like cardano-hw-cli), then create a wallet with that key, then creates and exports a TX using cardano-wallet, signs it using cardano-hw-cli and then sends it back to cardano-wallet for submission?

Because while in theory this is already possible, I still have no clue how to do that in practice. Some examples would make this more obvious to people.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADDING FEATURE Mark a PR as adding a new feature, for auto-generated CHANGELOG IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG
Projects
None yet
Development

No branches or pull requests

3 participants