Skip to content

ActivationClientOptions

Defined in: index.ts:91

TTier extends string

TLimit

optional apiBase?: string

Defined in: index.ts:110

For local/self-hosted debugging: only requests that extport deployment. Omit = production api.extport.dev.


optional deviceInfo?: () => Record<string, unknown>

Defined in: index.ts:117

Record<string, unknown>


optional extensionId?: string

Defined in: index.ts:108

The extport extension id (ext_…). Optional: resolved automatically when @extport/wxt injects it. If neither is available, it throws on the first real network call (activate/checkActivation) — licensing failure must be loud, never silently broken. Not resolved/validated at construction: the WXT plugin injects globalThis.EXTPORT after the top-level code of the user’s entry module evaluates (before main() runs), while createActivationClient is usually constructed at that top level — throwing then would happen before the injection and take down the whole service worker’s startup (not just licensing). getPlan() only reads local storage, so it can be called right after construction.

(The older productName + license-kit cascade was removed in 0.0.7; the server retired productName after the fleet fully upgraded (2026-08) — the wire only carries extensionId, old clients get a 400.)


optional override?: () => TTier | Promise<TTier | undefined> | undefined

Defined in: index.ts:127

Re-evaluated on every getPlan(); a non-undefined return takes precedence over the real activation record. Persists nothing — to “clear” the override, just return undefined; no dedicated cleanup method. Typical use is pinning a tier in local dev, but the library neither knows nor checks whether the caller is really in a dev environment or whether the value should sync across contexts — that’s the caller’s concern, handled in its own hook via storage/messaging if desired.

TTier | Promise<TTier | undefined> | undefined


plans: Record<TTier, TLimit>

Defined in: index.ts:112

The capability table per tier; must include ‘free’. Unknown tiers found in storage are treated as free.


optional storage?: StorageAdapter

Defined in: index.ts:113


optional storageKey?: string

Defined in: index.ts:115

Storage key; defaults to ‘plan’ (matching existing extensions).


optional transport?: Transport

Defined in: index.ts:116