Skip to content

examples: expand examples/ with common dApp patterns #21

@satyakwok

Description

@satyakwok

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions