Xahau Hooks 101
Xahau Hooks 101 is an extensive, hands-on collection of Hook examples for the Xahau Network. It contains 1010 practical Hook examples (organized into focused collections) written in C — each concise, well-commented, and ready to compile to WebAssembly (WASM) using the Xahau Hooks Builder. Use these examples to learn transaction validation, state management, token emission, and advanced Hook patterns.
Explore Hooks 101 on GitHubWhat You'll Learn
The Hooks 101 collection walks developers from basic install-time parameters and state management to advanced emission and remittance patterns. Key topics include Payment handling (XAH and IOU), Invoke configuration, remittance for token creation, multi-currency workflows, and NFT-like URIToken examples.
Repository
108 working Hook examples across 10 focused collections (Install, Invoke, State, IOU, Native, Emit, Remit, and more).
Key Features
State persistence, batch processing, emission/remit patterns, permission patterns, and guard budget handling.
Tools
Use the Xahau Hooks Builder to compile to WASM, deploy to Testnet, and inspect logs.
Getting Started
Follow the guide below: start with Basic_Install_Parameters, then Basic_State, then Native/Emit collections.
Docs & Resources
The repository README includes a guided structure and links to each collection. For compiling, deploying and live-testing, use the Xahau Hooks Builder and the listed explorer/debugging tools linked below.
Tools & Testing
Compile & Deploy
Use the Xahau Hooks Builder to compile C hooks to WASM and deploy to Testnet.
Explorer & Debug
Inspect hook execution via the Xahau Explorer and Hooks Builder logs (TRACESTR / TRACEHEX) and use tools like hex visualizer for debugging.