Skip to content

Conversation

@famouswizard
Copy link

fixed several parsing bugs in key handling logic:

  • find_key_end_position: removed '/' from the set of terminating characters. This prevents derivation paths like .../44'/0'/0'/... from being truncated at the first /.
  • parse_key_expressions: implemented proper parenthesis depth tracking for musig(...) expressions instead of stopping at the first ), allowing correct parsing of nested expressions.
  • parse_key_expressions: added boundary checks (key_pos_end < len(descriptor)) before indexing descriptor[key_pos_end] to avoid IndexError at string ends.

these changes ensure the parser correctly handles complex key expressions and avoids crashes on edge cases.

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

Successfully merging this pull request may close these issues.

1 participant