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

Add 'descriptors' argument to CreateWalletCmd struct #2179

Open
Luisfc68 opened this issue Apr 27, 2024 · 1 comment
Open

Add 'descriptors' argument to CreateWalletCmd struct #2179

Luisfc68 opened this issue Apr 27, 2024 · 1 comment

Comments

@Luisfc68
Copy link

Luisfc68 commented Apr 27, 2024

Currently the CreateWalletCmd struct only supports the wallet_name, disable_private_keys, blank, passphrase and avoid_reuse arguments to set when executing the createwallet RPC command, but the descriptors argument cannot be specified. After the version 23.0.0 of the bitcoin core RPC this argument became true by default and since the importdescriptors RPC command is not implemented, this can lead to situations like the following when using this project to interact with RPC server:

I need to create a watch-only wallet and import a public key to track the transactions related to it so:

  1. I create a wallet using
_, err := client.CreateWallet(
		walletId,
		rpcclient.WithCreateWalletDisablePrivateKeys(),
		rpcclient.WithCreateWalletBlank(),
	)
  1. This wallet is created as native descriptor wallet since the descriptors argument is defaulted as true and I can't change it
  2. I try to use err = client.ImportPubKeyRescan(pubKey, true) but it gives an error since this command is not supported by non-legacy wallets
  3. I can't use importdescriptors neither since its not implemented
  4. I can't import the public key to this wallet in any way

Is there any chance that the descriptors field can be added to the CreateWalletCmd struct so that argument can be specified when using this project? Are you accepting PRs to do so?

Please tell me if I'm missing something. Thanks in advance.

@Roasbeef
Copy link
Member

In order to add that field, you'd need to implement descriptors first: #2137. We'd accept a PR doing so.

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

2 participants