Skip to content

Comments

refactor: align wasm-solana with wasm-utxo parse conventions#175

Open
lcovar wants to merge 1 commit intomasterfrom
BTC-3063.parse-convention
Open

refactor: align wasm-solana with wasm-utxo parse conventions#175
lcovar wants to merge 1 commit intomasterfrom
BTC-3063.parse-convention

Conversation

@lcovar
Copy link
Contributor

@lcovar lcovar commented Feb 23, 2026

remove Transaction.parse(), rename parseTransactionData → parseTransaction

changes:

  • remove Transaction.parse() method and parseTransactionData import from transaction.ts
  • rename parseTransactionData → parseTransaction in parser.ts (returns ParsedTransaction)
  • update explain.ts to import parseTransaction instead of parseTransactionData
  • remove top-level parseTransaction function from index.ts (was returning Transaction)
  • export parseTransaction from parser.ts (returns ParsedTransaction)
  • update test imports: parseTransactionData as parseTransaction → parseTransaction

separation of concerns:

  • Transaction.fromBytes(bytes) - deserialize for signing
  • parseTransaction(bytes) - decode into structured data (ParsedTransaction)
  • explainTransaction(bytes, options) - high-level explanation

aligns with wasm-utxo and wasm-dot conventions. 94/94 tests passing.

BTC-3063

@lcovar lcovar requested a review from a team as a code owner February 23, 2026 23:25
remove Transaction.parse(), rename parseTransactionData → parseTransaction

changes:
- remove Transaction.parse() method and parseTransactionData import from transaction.ts
- rename parseTransactionData → parseTransaction in parser.ts (returns ParsedTransaction)
- update explain.ts to import parseTransaction instead of parseTransactionData
- remove top-level parseTransaction function from index.ts (was returning Transaction)
- export parseTransaction from parser.ts (returns ParsedTransaction)
- update test imports: parseTransactionData as parseTransaction → parseTransaction

separation of concerns:
- Transaction.fromBytes(bytes) - deserialize for signing
- parseTransaction(bytes) - decode into structured data (ParsedTransaction)
- explainTransaction(bytes, options) - high-level explanation

aligns with wasm-utxo and wasm-dot conventions. 94/94 tests passing.

BTC-3063
@lcovar lcovar force-pushed the BTC-3063.parse-convention branch from 7777e5e to 61de736 Compare February 23, 2026 23:53
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