Describe the enhancement
bdk-cli key derive returns a descriptor key expression (e.g. [fingerprint/path]xpub.../*), while bdk-cli descriptor expects a raw xpub/xprv. Passing the output of key derive directly to descriptor results in:
BIP32 error: base58 encoding error
The error doesn't explain that the input is a descriptor key expression rather than a raw extended key.
It would be helpful if descriptor either:-
- detected descriptor key expressions and emitted a more descriptive error or
- accepted descriptor key expressions directly.
Use case
A natural workflow is:
key restore
↓
key derive
↓
descriptor
Since key derive produces a key intended for descriptors, it's reasonable to expect its output to be consumable by descriptor.
Instead, users encounter a low-level Base58 parsing error without any indication that the command expects a different representation.
Additional context
Reproducer:
bdk-cli key derive --xprv "tprv..." --derivation_path "m/84h/1h/0h"
Output:
[bd2eb472/84'/1'/0']tprv.../*
Then:
bdk-cli descriptor --type wpkh "[bd2eb472/84'/1'/0']tprv.../*"
produces:
BIP32 error: base58 encoding error
The same descriptor key expression works correctly when wrapped in a descriptor and passed to:
bdk-cli wallet config --ext-descriptor "wpkh([bd2eb472/84'/1'/0']tprv.../*)"
which suggests the underlying parsing is already supported in that context.
Describe the enhancement
bdk-cli key derivereturns a descriptor key expression (e.g.[fingerprint/path]xpub.../*), whilebdk-cli descriptorexpects a rawxpub/xprv. Passing the output ofkey derivedirectly todescriptorresults in:The error doesn't explain that the input is a descriptor key expression rather than a raw extended key.
It would be helpful if
descriptoreither:-Use case
A natural workflow is:
Since
key deriveproduces a key intended for descriptors, it's reasonable to expect its output to be consumable bydescriptor.Instead, users encounter a low-level Base58 parsing error without any indication that the command expects a different representation.
Additional context
Reproducer:
Output:
Then:
bdk-cli descriptor --type wpkh "[bd2eb472/84'/1'/0']tprv.../*"produces:
The same descriptor key expression works correctly when wrapped in a descriptor and passed to:
bdk-cli wallet config --ext-descriptor "wpkh([bd2eb472/84'/1'/0']tprv.../*)"which suggests the underlying parsing is already supported in that context.