Btc 0 draft example sol building#7995
Draft
lcovar wants to merge 3 commits intoBTC-0-draft-example-sol-decodingfrom
Draft
Btc 0 draft example sol building#7995lcovar wants to merge 3 commits intoBTC-0-draft-example-sol-decodingfrom
lcovar wants to merge 3 commits intoBTC-0-draft-example-sol-decodingfrom
Conversation
ff71306 to
e00d9e1
Compare
…m-solana Adds WASM-based transaction parsing that eliminates @solana/web3.js dependency for the decoding/explain flow. The WASM library (@bitgo/wasm-solana) handles all instruction decoding, and a simple type mapper converts to BitGoJS format. Key changes: - Add wasmInstructionMapper.ts: Maps WASM types to BitGoJS InstructionParams - Combines CreateAccount + StakeInitialize + Delegate -> StakingActivate - Combines CreateAccount + NonceInitialize -> CreateNonceAccount - Handles Jito staking (StakePoolDepositSol, StakePoolWithdrawStake) - Handles standalone delegate for re-delegation - Add WasmTransaction class (wasm/transaction.ts) for WASM-only parsing - Update wasmInstructionCombiner.ts as clean entry point - Update sol.ts explainTransactionWithWasm to use bytes-based API - Remove wasmInstructionAdapter.ts (no longer needed) NO @solana/web3.js dependencies in the new parsing flow. TICKET: BTC-0
c2bcda3 to
c03ea63
Compare
Add ESM alias for @bitgo/wasm-solana similar to wasm-utxo to ensure proper WASM initialization in browser bundles. Ticket: BTC-0
Introduces WASM-based transaction building for testnet (tsol) via @bitgo/wasm-solana, with zero @solana/web3.js runtime dependency. ## Architecture Testnet (WASM path - no web3): - customInstructionBuilder stores versioned data on _versionedTransactionData - buildVersionedWithWasm() delegates to wasm/builder.ts - Nonce injection via wasm/builder.injectNonceAdvanceInstruction() Mainnet (legacy path - unchanged): - customInstructionBuilder stores on Transaction class + injects nonce - buildVersionedTransaction() reads from Transaction class - Original behavior preserved ## Key files - wasm/builder.ts: buildWasmTransaction(), buildVersionedWasmTransaction() - wasm/builder.ts: injectNonceAdvanceInstruction() (pure WASM constants) - customInstructionBuilder.ts: testnet/mainnet branching for storage TICKET: BTC-0
e00d9e1 to
f75472d
Compare
cfd03be to
c0e8e7f
Compare
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.
No description provided.