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

Encrypted wallet support #4132

Open
cartosquare opened this issue Dec 12, 2024 · 3 comments
Open

Encrypted wallet support #4132

cartosquare opened this issue Dec 12, 2024 · 3 comments

Comments

@cartosquare
Copy link

Problem

Bitcoin Core wallet supports encrypting wallets using passphrase, since ord use it's rpc interface, do you guys think it's a good idea to also support this in ord? To achive this, we need to add an addition optional parameter(for example: password) to wallet create subcommand.

Pro

  • It will maintain ord wallet's security even when wallet file is leaked.

Con

  • When wallet is encryped, before doing any signing related operations(such as inscribe, etching, send, etc), we need to use bitcoin-cli walletpassphrase command to unlock wallet for some limited time.
@so7ow
Copy link

so7ow commented Dec 12, 2024

 $ ord wallet create --help
Create new wallet

Usage: ord wallet create [OPTIONS]

Options:
      --passphrase <PASSPHRASE>  Use <PASSPHRASE> to derive wallet seed. [default: ]
  -h, --help                     Print help
 $ ord wallet restore --help
Restore wallet

Usage: ord wallet restore [OPTIONS] --from <FROM>

Options:
      --from <FROM>              Restore wallet from <SOURCE> on stdin. [possible values: descriptor, mnemonic]
      --passphrase <PASSPHRASE>  Use <PASSPHRASE> when deriving wallet.
      --timestamp <TIMESTAMP>    Scan chain from <TIMESTAMP> onwards. Can be a unix timestamp in seconds or the string `now`, to skip scanning
  -h, --help                     Print help

@cartosquare
Copy link
Author

cartosquare commented Dec 12, 2024

 $ ord wallet create --help
Create new wallet

Usage: ord wallet create [OPTIONS]

Options:
      --passphrase <PASSPHRASE>  Use <PASSPHRASE> to derive wallet seed. [default: ]
  -h, --help                     Print help

This passphrase is used to derive wallet seed, not encrypt wallet?

bitcoin rpc api: createwallet

@so7ow
Copy link

so7ow commented Dec 12, 2024

encrypt wallet?

Well, we might have a terminology mismatch here. You invoked bitcoin-cli walletpassphrase so I thought you were looking for wallet passphrase functionality in ord. If you really want to encrypt the wallet file (on disk, presumably?) you might be barking up the wrong tree, as bitcoin manages the wallet file, not ord.

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

No branches or pull requests

3 participants