Describe the enhancement
floresta-node and floresta-electrum have similar behavior when handling transaction data exposed to clients. To avoid duplication and keep consistency between both modules, it would be useful to share common utility methods, similar to what is already done for header.
The proposal is to create extensions for types such as Transaction, TxOut, and TxIn, grouping shared helpers like ASM generation, hexadecimal conversions, and other formatting/serialization routines.
Use case
Both floresta-node and floresta-electrum need to produce similar responses for clients. By sharing these methods, it becomes easier to reuse common logic and keep behavior consistent across both modules.
Additional context
A natural approach would be to follow the same pattern already used for header and extend it to transaction-related structures.
Describe the enhancement
floresta-nodeandfloresta-electrumhave similar behavior when handling transaction data exposed to clients. To avoid duplication and keep consistency between both modules, it would be useful to share common utility methods, similar to what is already done forheader.The proposal is to create extensions for types such as
Transaction,TxOut, andTxIn, grouping shared helpers like ASM generation, hexadecimal conversions, and other formatting/serialization routines.Use case
Both
floresta-nodeandfloresta-electrumneed to produce similar responses for clients. By sharing these methods, it becomes easier to reuse common logic and keep behavior consistent across both modules.Additional context
A natural approach would be to follow the same pattern already used for
headerand extend it to transaction-related structures.