coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.6k stars 1.32k forks source link

cli: Add hardware wallet support #143

Open armaniferrante opened 3 years ago

armaniferrante commented 3 years ago

One should be able to run the deploy and upgrade command for both programs and idls with a hardware wallet like ledger. I'd expect this to be dependent upon whether the solana cli has ledger support.

GrimLothar commented 3 years ago

Also interested on hardware wallet support for the Javascript version of anchor.

BTW, solana cli DOES have ledger support.

leofisG commented 2 years ago

This will be super useful. Would love to see this get implemented. Will be nice if someone can point me to some relevant code so I can give it a try.

tanmaymunjal commented 1 year ago

Looking into this, it seems that the Solana CLI supports sending in a keypair URL that uniquely identifies a keypair in a hardware wallet the same way that you can use a keypair file path. (https://docs.solana.com/wallet-guide/hardware-wallets).

Given that we already support sending in the keypair path in the wallet under [provider] in anchor.toml, it seems to be the case that this use case is already possible in current anchor versions by sending in something like usb://..... instead of keypair path. I think it makes sense to close this issue, wdyt @armaniferrante ?