Skip to main content
@alphscan/sdk-react provides React bindings for the Alphscan API: a provider, hooks, and type-safe access to tokens and normalized events. It depends on @alphscan/sdk and is designed to work with @alphscan/sdk-react-ui for rendering.

Repository & package

Part of AlphScan; npm packages are private until release.

Features

  • AlphscanProvider — wrap your app to provide the SDK client to the tree.
  • useClient() — get the client from context for one-off API calls.
  • useTokens() — paginated token list with loading/error state.
  • useTxNormalizedEvents() — fetch normalized events for a transaction by ID.

Package

Peer: react >= 18.

Quick example

Next steps

Installation

Install and add the package.

Provider & useClient

AlphscanProvider and useClient().

useTokens

Paginated token list hook.

useTxNormalizedEvents

Transaction normalized events hook.

Hooks reference

All hooks and options.