Skip to main content

AlphscanProvider

Wrap your app (or the part that needs the API) with AlphscanProvider so that useClient() can return the SDK client. The provider creates one client per apiUrl + apiKey and memoizes it.

Props

Example

useClient()

Returns the AlphscanClientApi. Must be used inside AlphscanProvider; otherwise it throws.

Signature

Example

Use useClient() when you need the client for one-off calls. For tokens use useTokens; for transaction events use useTxNormalizedEvents.