Skip to content

Examples

Complete, runnable programs for real-world use cases. Each language page contains the same eleven scenarios implemented idiomatically, covering 100% of the SDK primitives.

By Language

Scenarios

Each page covers:

  1. Balance Monitor Bot -- Recover a wallet, poll balance, send tokens when a threshold is met.
  2. Multi-Account Treasury -- Derive HD accounts, query balances, consolidate funds.
  3. Signature Verification Service -- Validate keys, addresses, and signatures from external input.
  4. Wallet Backup and Recovery -- Create an encrypted wallet file, save to disk, recover later.
  5. Gas-Sponsored Transaction -- Submit a meta-transaction with gas paid by a sponsor contract.
  6. Cross-Chain Message -- Send a message to another chain via the messaging connector.
  7. Contract Deployment -- Read a WASM file, sign a deploy payload, and deploy a contract to the chain.
  8. Shielded Pool Deposit & Withdraw -- Compute ZK commitments, deposit into the shielded pool, derive nullifiers, and withdraw privately.
  9. ZK Proof Generation & Verification -- Poseidon hashing, preimage proofs, range proofs, and round-trip verification without chain interaction.
  10. Name Service & Identity Profile -- Register a .dili name, configure profile records, resolve/reverse-resolve, transfer and renew names.
  11. Credential Issuance & Verification -- Register a KYC schema, issue credentials, verify selective disclosure proofs, revoke credentials.