You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(svm): allow Phantom and Solflare Lighthouse instructions in transaction verification (#991)
Phantom and Solflare wallets inject Lighthouse program instructions for user
protection on Solana mainnet transactions. This causes x402 verification to fail
because the scheme expects exactly 3 instructions.
This change allows optional 4th and 5th instructions specifically from the
Lighthouse program (L2TExMFKdjpN9kozasaurPirfHy9P8sbXoAN1qA3S95):
- 4th instruction: Phantom wallet protection (1 Lighthouse instruction)
- 5th instruction: Solflare wallet protection (adds 2 Lighthouse instructions)
Changes:
- Add LIGHTHOUSE_PROGRAM_ADDRESS constant (TypeScript and Go)
- Update ExactSvmScheme verify to allow 3-5 instructions
- Update ExactSvmSchemeV1 verify to allow 3-5 instructions
- Reject any 4th/5th instruction that is not from Lighthouse program
- Add error constants for unknown 4th/5th instructions
- Update scheme_exact_svm.md spec to reflect changes
Fixes: #828
0 commit comments