Skip to content

Error parsing combo descriptor #31

Description

@surfer190

When initialising a combo descriptor this error was raised:

bdkpython.bdk.DescriptorError.Miniscript: error_message='unexpected «combo(1 args) while parsing Miniscript»'

Is this a legitimate error with the descriptor?

Code

from bdkpython.bdk import Descriptor, Network

TEST_NETWORK = Network(1)
DESC = "combo(tpubD6NzVbkrYhZ4YSPGUiT67AZRVmJUjPn1Twt4JuYPrkGZiwVKyBofjVRej8A194X2X4Toyo22HSaJJYLH2g4gd2JGnztsKzShiRFwWgAYi5D/0h/0h/*h)#leqp7cnz"

my_desc = Descriptor(descriptor=DESC, network=TEST_NETWORK)

Traceback

Traceback (most recent call last):
  File "/Users/s/projects/bdk_playground/check.py", line 9, in <module>
    my_desc = Descriptor(descriptor=DESC, network=TEST_NETWORK)
  File "/Users/s/projects/bdk_playground/env/lib/python3.10/site-packages/bdkpython/bdk.py", line 17768, in __init__
    self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeDescriptorError,_UniffiLib.uniffi_bdkffi_fn_constructor_descriptor_new,
  File "/Users/s/projects/bdk_playground/env/lib/python3.10/site-packages/bdkpython/bdk.py", line 295, in _uniffi_rust_call_with_error
    _uniffi_check_call_status(error_ffi_converter, call_status)
  File "/Users/s/projects/bdk_playground/env/lib/python3.10/site-packages/bdkpython/bdk.py", line 306, in _uniffi_check_call_status
    raise error_ffi_converter.lift(call_status.error_buf)
bdkpython.bdk.DescriptorError.Miniscript: error_message='unexpected «combo(1 args) while parsing Miniscript»'

Activity

  1. thunderbiscuit commented on Feb 17, 2026

    @thunderbiscuit
    Member

    Yes the miniscript library does not support all descriptor types mentioned in BIPs. combo is one of them as far as I understand. They don't have a lot of docs on why certain descriptors are supported, but you can see this comment mentioning they don't plan on adding support.

    Is there something you're trying to do we can maybe implement in a different way? Let me know your use case.

  2. surfer190 commented on Feb 17, 2026

    @surfer190
    Author

    Had a bitcoin-core legacy wallet with utxo in derivation paths m\0'\0'\0' to m\0'\0'\2' which are non-standard according to BIP32.
    Migrated to a bitcoin core descriptor wallet.
    Wanting to import the wallet addresses into gui based wallets like sparrow and bitcoin safe - as a watch only online wallet - so that creating unsigned transactions are easier and less error prone.

    Bitcoin core created descriptor like this combo(tpubD6NzVbkrYhZ4YSPGUiT67AZRVmJUjPn1Twt4JuYPrkGZiwVKyBofjVRej8A194X2X4Toyo22HSaJJYLH2g4gd2JGnztsKzShiRFwWgAYi5D/0h/0h/*h)#leqp7cnz seemingly for the m\0'\0'\0' to m\0'\0'\2' paths.

    Tried to import it with sparrow and it complained about bad derivation paths.

    bitcoin safe developer said changing the descriptor from combo to pwkh could work, tried it and an error arose and apparently that is the bdk integration.

    Example with pwkh:

    from bdkpython.bdk import Descriptor, Network
    
    TEST_NETWORK = Network(1)
    
    DESC = "pwkh(tpubD6NzVbkrYhZ4YSPGUiT67AZRVmJUjPn1Twt4JuYPrkGZiwVKyBofjVRej8A194X2X4Toyo22HSaJJYLH2g4gd2JGnztsKzShiRFwWgAYi5D/0h/0h/*h)"
    
    my_desc = Descriptor(descriptor=DESC, network=TEST_NETWORK)
    

    Error / Traceback:

    Traceback (most recent call last):
      File "/Users/s/projects/bdk_playground/check.py", line 11, in <module>
        my_desc = Descriptor(descriptor=DESC, network=TEST_NETWORK)
      File "/Users/s/projects/bdk_playground/env/lib/python3.10/site-packages/bdkpython/bdk.py", line 17768, in __init__
        self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeDescriptorError,_UniffiLib.uniffi_bdkffi_fn_constructor_descriptor_new,
      File "/Users/s/projects/bdk_playground/env/lib/python3.10/site-packages/bdkpython/bdk.py", line 295, in _uniffi_rust_call_with_error
        _uniffi_check_call_status(error_ffi_converter, call_status)
      File "/Users/s/projects/bdk_playground/env/lib/python3.10/site-packages/bdkpython/bdk.py", line 306, in _uniffi_check_call_status
        raise error_ffi_converter.lift(call_status.error_buf)
    bdkpython.bdk.DescriptorError.Miniscript: error_message='unexpected «pwkh(1 args) while parsing Miniscript»'
    
  3. surfer190 commented on Feb 19, 2026

    @surfer190
    Author

    Checking on bitcoin core...deriveaddresses with the public descriptor of combo(....) returned Cannot derive script without private keys
    Tested with bitcoin safe and the private descriptor did import as combo(...). Seems it is necessary for hardened derivation paths.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions