Skip to main content

Sample App Patterns

This page defines the required sample categories for FP Validated chain documentation. Chain-specific sample pages should implement these categories with real method names, ports, SDKs, and data types for that chain.

Required categoryWhat the sample must proveExample outputs
Health CheckClient can reach the endpoint and distinguish healthy, lagging, and unavailable nodes.Sync status, latest height/slot/checkpoint/version, peer or health response.
Block/Checkpoint/SlotClient can read chain progress by stable ordering key.Ethereum block, Solana slot/block, Sui checkpoint, Aptos ledger version.
Account/ObjectClient can query account, balance, object, or resource state.EVM balance/storage, Solana account, Sui object, Aptos account resource.
Transaction queryClient can retrieve a transaction by hash, signature, digest, or version.Receipt/status, effects, logs/events, finality state.
SimulationClient can test a transaction without committing it.Gas estimate, dry-run effects, simulation logs, validation error.
SubmitClient can submit a signed transaction safely.Transaction id plus tracking loop and duplicate-submit guard.
Event/Log queryClient can fetch historical events or logs by filter.EVM logs, Solana logs, Sui events, Aptos events.
WebSocket/StreamingClient can subscribe, heartbeat, reconnect, and resubscribe.eth_subscribe, Solana WebSocket, Sui subscription, Aptos stream where applicable.
IndexerClient can backfill, persist a cursor, switch to live sync, and write idempotently.Postgres rows keyed by source identity.
Error HandlingClient classifies rate limits, timeouts, stale nodes, validation errors, and retention misses.Normalized error category and retry decision.
Production ClientClient applies auth, deadlines, retries, metrics, connection pooling, and graceful shutdown.Configurable endpoint, API key, backoff, structured logs, metrics.

:::info Canonical checklist If a chain cannot support a category through one interface, the sample should point to the correct alternative interface rather than omitting the category. :::

Use this page with API Design Principles, Retry / Timeout / Backoff, and chain sample pages such as Ethereum curl samples, Solana curl samples, Sui gRPC samples, and Aptos REST samples.