How solana-labs/example-helloworld works
This Solana hello-world example demonstrates a client greeting an on-chain account and reading its greeting count. The client loads cluster and payer settings, prepares and verifies the program/account, submits a greeting transaction, then fetches and decodes the counter. The on-chain program validates account ownership and increments serialized state; both Rust and C implementations are present. The README points to external documentation and does not describe further capabilities. Edges reflect sampled source calls and explicit client behavior; no additional wiring is inferred.
Main entry points: hello_world.ts Greeting workflow · main.ts Client entrypoint · utils.ts RPC and payer config · lib.rs Rust greeting program
Components 7
Client workflow
- Client entrypoint
src/client/main.ts - Greeting workflow
src/client/hello_world.ts - RPC and payer config
src/client/utils.ts
On-chain programs
- Rust greeting program
src/program-rust/src/lib.rs - C greeting program
src/program-c/src/helloworld/helloworld.c
Other components
- Example operator
- Solana cluster
Connections 7
- Example operator → Client entrypoint: runs
src/client/main.ts - Client entrypoint → Greeting workflow: invokes workflow
src/client/main.ts - Greeting workflow → RPC and payer config: loads settings
src/client/hello_world.ts - Greeting workflow → Solana cluster: queries and submits
src/client/hello_world.ts - Solana cluster → Greeting workflow: returns account state
src/client/hello_world.ts - Solana cluster → Rust greeting program: dispatches instruction
- Solana cluster → C greeting program: dispatches instruction