Commit 7e6fe43
committed
feat(wasm-solana): add transaction parsing with full instruction decoding
Add comprehensive Solana transaction parsing to wasm-solana package with
BitGoJS-compatible output format.
Core Features:
- Parse serialized transactions into structured ParsedTransaction
- Decode all major instruction types to semantic InstructionParams
- Support for durable nonce transactions with NonceAdvance detection
- Full account metadata preservation for unknown instructions
Supported Programs:
- System Program: Transfer, CreateAccount, NonceAdvance, NonceInitialize
- Stake Program: Initialize, Delegate, Deactivate, Withdraw, Authorize,
AuthorizeChecked
- SPL Token: Transfer, TransferChecked (with programId and decimalPlaces)
- SPL Associated Token Account: Create, Close
- Compute Budget: SetComputeUnitLimit, SetPriorityFee
- Memo Program: Memo instructions
- SPL Stake Pool (Jito): DepositSol, WithdrawStake
Instruction Combining (TypeScript):
- CreateAccount + NonceInitialize → CreateNonceAccount
- Staking patterns detected for NATIVE, JITO, and MARINADE types
The parser returns raw instructions; combining logic lives in TypeScript
for flexibility and easier maintenance.
Ticket: BTC-29291 parent 739b7e1 commit 7e6fe43
File tree
19 files changed
+5010
-260
lines changed- packages/wasm-solana
- js
- src
- instructions
- wasm
- test
19 files changed
+5010
-260
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
20 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
24 | | - | |
25 | | - | |
26 | 38 | | |
27 | 39 | | |
28 | 40 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments