solana-tx-buildinglisted
Install: claude install-skill Serennity007/claude-trading-skills-67
# Solana Transaction Building
This skill covers how to construct, simulate, and inspect Solana transactions programmatically. It addresses the full anatomy of a Solana transaction — from raw instruction encoding to versioned transaction formats, compute budget management, priority fees, and address lookup tables.
**Safety**: This skill is for transaction *construction* and *analysis* only. Scripts in this skill NEVER sign or submit real transactions. Always simulate before sending. Never auto-sign.
## Transaction Anatomy
A Solana transaction consists of:
1. **Signatures**: One or more Ed25519 signatures (64 bytes each)
2. **Message**: The serializable payload containing:
- **Header**: Counts of required signers, read-only signers, read-only non-signers
- **Account keys**: Array of all pubkeys referenced by instructions
- **Recent blockhash**: 32-byte hash for replay protection (expires ~60-90 seconds)
- **Instructions**: Array of program calls
### Transaction Size Limit
The hard limit is **1232 bytes** for the entire serialized transaction. This constrains how many instructions and accounts you can include. Strategies to stay within the limit:
- Use versioned transactions with Address Lookup Tables (ALTs)
- Minimize the number of accounts per instruction
- Combine related operations into single instructions where supported
- Split complex operations across multiple transactions
### Instruction Format
Each instruction contains three fields:
```
Instructi