Skip to content

feat: add ITransactionTransformer for Liquid network support#892

Open
dangershony wants to merge 1 commit into
mainfrom
feat/liquid-transaction-transformer
Open

feat: add ITransactionTransformer for Liquid network support#892
dangershony wants to merge 1 commit into
mainfrom
feat/liquid-transaction-transformer

Conversation

@dangershony

Copy link
Copy Markdown
Member

Summary

Adds an abstraction layer for network-specific transaction transformations, enabling Liquid (Elements) network support alongside Bitcoin.

New files

  • *\ITransactionTransformer* — interface for wrapping P2WPKH, Taproot, and P2WSH transactions for the target network. Also provides \GetSighashTransaction\ / \GetSighashSpentOutputs\ for computing sighashes on the correct network representation.

  • *\BitcoinTransactionTransformer* — no-op implementation for Bitcoin. All methods return their inputs unchanged.

  • *\LiquidTransactionTransformer* — Elements implementation that rebuilds transactions with explicit L-BTC asset tags, adds an explicit fee output, and re-signs using the Liquid network parameters.

Modified files

  • *\TransactionInfo* — added \TransactionHex\ and \TransactionId\ properties so network-specific representations (e.g. Elements hex) can be carried alongside the Blockcore \Transaction\ object.

Add an abstraction layer for network-specific transaction transformations:

- ITransactionTransformer: interface for wrapping P2WPKH, Taproot, and
  P2WSH transactions for the target network
- BitcoinTransactionTransformer: no-op implementation for Bitcoin
  (returns inputs unchanged)
- LiquidTransactionTransformer: rebuilds transactions as Elements
  format with explicit L-BTC asset tags, fee outputs, and re-signs
- TransactionInfo: add TransactionHex and TransactionId properties
  so network-specific representations can be carried alongside the
  Blockcore Transaction object
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