README points users at the SDK + WebSocket subscription helpers, but the surface is more useful with copy-paste-ready examples for the most common operations.
Why
First-touch developers come for "how do I connect to Sentrix and do X". The SDK API surface is large; without runnable examples, they have to read the source.
Scope
examples/connect-and-read-block.ts — minimal connect + getBlock
examples/send-eth-tx.ts — sign + send + wait for receipt
examples/erc20-transfer.ts — ERC-20 transfer via canonical contracts (WSRX)
examples/subscribe-newheads.ts — WebSocket newHeads subscription
examples/multicall.ts — batched reads via Multicall3 from canonical-contracts
- Each example self-contained, runnable with
pnpm tsx examples/<file>.ts
Acceptance
- 5 examples committed under
examples/
- README links each from a new "Examples" section
README points users at the SDK + WebSocket subscription helpers, but the surface is more useful with copy-paste-ready examples for the most common operations.
Why
First-touch developers come for "how do I connect to Sentrix and do X". The SDK API surface is large; without runnable examples, they have to read the source.
Scope
examples/connect-and-read-block.ts— minimal connect + getBlockexamples/send-eth-tx.ts— sign + send + wait for receiptexamples/erc20-transfer.ts— ERC-20 transfer via canonical contracts (WSRX)examples/subscribe-newheads.ts— WebSocket newHeads subscriptionexamples/multicall.ts— batched reads via Multicall3 from canonical-contractspnpm tsx examples/<file>.tsAcceptance
examples/