refactor: follow parse convention for wasm-solana#181
Merged
Conversation
b562665 to
cbf5895
Compare
OttoAllmendinger
previously approved these changes
Feb 27, 2026
Remove `explainTransaction` from wasm-solana per the convention that explain logic belongs in BitGoJS, not in wasm packages (PR #176). - Delete `explain.ts` — type derivation, output/input extraction, fee calculation all move to BitGoJS sdk-coin-sol - Change `parseTransaction` to accept a `Transaction` object instead of raw bytes, avoiding double deserialization when the caller already has a Transaction from `fromBytes()` - Add `parse_from_transaction` Rust entry point that accepts a pre-deserialized Transaction, with shared logic in `parse_transaction_inner` - Remove all explain-related exports from index.ts (ExplainedTransaction, TransactionType, StakingAuthorizeInfo, etc.) - Fix pre-existing clippy warnings in intent/build.rs The wasm package now only provides: - `Transaction.fromBytes(bytes)` for deserialization/signing - `parseTransaction(tx)` for decoded instruction data - Builder functions for transaction construction Ticket: BTC-3091
cbf5895 to
7dad774
Compare
davidkaplanbitgo
approved these changes
Feb 27, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove
explainTransactionfrom wasm-solana per the convention that explain logic belongs in BitGoJS, not in wasm packages (PR #176).explain.ts— type derivation, output/input extraction, fee calculation all move to BitGoJS sdk-coin-solparseTransactionto accept aTransactionobject instead of raw bytes, avoiding double deserialization when the caller already has a Transaction fromfromBytes()parse_from_transactionRust entry point that accepts a pre-deserialized Transaction, with shared logic inparse_transaction_innerThe wasm package now only provides:
Transaction.fromBytes(bytes)for deserialization/signingparseTransaction(tx)for decoded instruction dataTicket: BTC-3091