Skip to main content
createEndstateClient is the vanilla (non-React) entry point, exported from the @endstate-sdk/web root. It is a thin factory over core’s EndstatePublicClient that defaults tapSources to defaultTapSources() - the landing redirect plus in-page Web NFC where supported. Prefer it over new EndstatePublicClient(...): it wires the browser tap sources for you and keeps the client construction in one place. React apps do not call this directly - EndstateProvider builds the client for you.

Example

Parameters

EndstatePublishableKey | (() => EndstatePublishableKey | Promise<EndstatePublishableKey>)
required
Your publishable key (end_pk_...), or a function returning one (sync or async). A secret key is rejected by the type and again at runtime. Narrow and validate a string with publishableKey().
readonly TapSource[]
Tap sources to register. Defaults to defaultTapSources() (redirect + Web NFC). Pass your own set to add or reorder sources.
string
Overrides the API base URL. Leave it unset in product code. Any other core client-config option passes straight through to EndstatePublicClient.

Returns

EndstatePublicClient - a browser client holding only the publishable key, ready to captureTap() and verify().

See also

EndstatePublicClient

The client this factory returns.

defaultTapSources

The tap sources it registers by default.

EndstateProvider

The React path that builds this client for you.

Quickstart

The full tap-to-claim flow end to end.