Use the Web SDKs when you are building TypeScript applications, wallet-connected experiences, React interfaces, backend indexers, or tooling on top of Thru.
- Start with
@thru/sdk for the typed RPC client, domain models, protobufs, helpers, crypto utilities, and ABI reflection.
- Use
@thru/wallet for embedded wallet integrations in browser, React, React UI, and native apps.
- Use
@thru/programs for token and passkey-manager program bindings.
- Use
@thru/replay and @thru/indexer for chain data pipelines.
| Package | Description | Useful when |
|---|
@thru/sdk | Main TypeScript SDK with the RPC client, domain models, protobufs, helpers, crypto utilities, and ABI reflection subpaths. | Integrating any app or backend with the Thru chain. |
@thru/programs | Program-specific bindings under @thru/programs/token and @thru/programs/passkey-manager. | Building token or passkey-manager instructions, account parsers, and derivation helpers. |
@thru/wallet | Embedded wallet package for browser, React, React UI, and native wallet integration. | Adding connect, account selection, signing, and hosted wallet UI to apps. |
@thru/passkey | WebAuthn package for passkey registration, signing, popup fallback, mobile helpers, auth flows, and server helpers. | Adding passkey signing or auth helpers to wallet and dApp flows. |
@thru/replay | Historical plus live replay library for ordered block, transaction, account, and event streams. | Backfilling and tailing chain data for analytics, ETL, or event processing services. |
@thru/indexer | Drizzle-backed indexing framework for stream definitions, checkpoints, and background indexing runtimes. | Building a backend indexer that syncs chain data into Postgres. |
| Need | Import |
|---|
| Main RPC SDK | @thru/sdk |
| Minimal RPC client constructor | @thru/sdk/client |
| Generated protobufs | @thru/sdk/proto |
| Address/signature helpers | @thru/sdk/helpers |
| Mnemonics and HD wallets | @thru/sdk/crypto |
| ABI reflection | @thru/sdk/abi |
| Token program bindings | @thru/programs/token |
| Passkey-manager program bindings | @thru/programs/passkey-manager |
| Browser wallet SDK | @thru/wallet |
| React wallet hooks | @thru/wallet/react |
| Prebuilt React wallet UI | @thru/wallet/react-ui |
| Native wallet React hooks/UI | @thru/wallet/native/react |