Skip to content

[Enhancement] Add output script to descriptor converter (Bitcoin Core compliant) #987

@moisesPompilio

Description

@moisesPompilio

Describe the enhancement
Add functionality that generates the corresponding descriptor from an output script, following Bitcoin Core’s rules and behavior exactly. This should be implemented after merging #985 (Align getrawtransaction with Bitcoin Core), so Floresta can use this logic for scripts in a way that matches Bitcoin Core’s output format.

Use case
This converter will allow Floresta RPCs to generate descriptor fields for outputs, which is required for compatibility with Bitcoin Core. At the moment, getrawtransaction is the main RPC that needs this functionality; in the future, other RPCs may also reuse the same logic. Having this converter ensures Floresta’s RPC results match Bitcoin Core, improving compliance and interoperability.

Additional context

  • Integration tests must cover this functionality, especially in the RPC integration suite, validating that Floresta’s output matches Bitcoin Core’s for descriptor fields.
  • The implementation must follow Bitcoin Core’s descriptor generation logic and handling exactly.
  • Reference: PR #985, which lays the groundwork for this improvement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions