Examples Walkthrough
Typhoon includes several examples to help you understand how to build real-world programs. You can find them in the examples/ directory.
Core Examples
Hello World
A minimal example showing the basic structure of a Typhoon program. Covered in Getting Started.
Counter
Demonstrates how to maintain state in an account and increment a counter.
Transfer SOL
Shows how to handle SOL transfers between accounts.
Advanced Examples
Escrow
A more complex example involving multiple accounts, state transitions, and token transfers.
CPI (Cross-Program Invocation)
Demonstrates how to call other programs from within a Typhoon program.
Anchor CPI
Shows how Typhoon can interact with programs built using the Anchor framework.
Each example is designed to be self-contained and demonstrates a specific feature or pattern of the Typhoon framework.