ConstWire protocol version. Bumped only when shell <-> SDK contract breaks.
SDK version (semver). Bumped on breaking surface changes.
Mark the start of a gameplay session. The portal uses this to gate
commercialBreak() / rewardedBreak() calls (ads only allowed
during gameplay) and to record session-length analytics.
Calling twice without an intervening gameplayStop emits
sdk:error gameplay_already_started.
Handshake with the Pixlland portal. Resolves with the session state
(gameId, locale, signedIn). Standalone fallback after 4s when no
portal is detected (dev mode, file://, third-party embed, etc.).
See InitOptions.
A snapshot of the player session — see InitResult.
Trigger a brief device vibration (when supported). Silently no-ops
on platforms without navigator.vibrate. Pattern intensity follows
HapticKind.
Show a rewarded ad break. Resolves with { granted, reason } —
only unlock the reward when granted === true. 60s hard timeout.
Returns { granted: false, reason: 'ad_blocked' } when the user
has not given ads consent.
Build a deep-link URL preserving every existing query param plus the
extra ones in params. Use for "Share my level" / "Invite a friend"
flows.
Extra key/value pairs to merge into the URL.
A fully-qualified URL safe to share.
The
@pixlland/sdkruntime singleton. Auto-exposed onwindow.PixllandSDKfor games loaded via<script src="/sdk/v1/pixlland.js">. Also importable viaimport { PixllandSDK } from '@pixlland/sdk'for bundled workflows.Lifecycle order a game should follow: