Skip to main content

Interface: IRuntimeConfig

Defined in: src/types/runtime.ts:53

Full configuration for createRuntime.

Three properties are required — container, auth, and pulseApp. All remaining services are optional and can be injected to unlock additional miniapp capabilities (analytics, uploads, credits, etc.).

Properties

analytics?

optional analytics?: IAnalyticsService

Defined in: src/types/runtime.ts:67

Analytics service


auth

auth: IAuthService

Defined in: src/types/runtime.ts:61

Authentication service


cache?

optional cache?: ICacheConfig

Defined in: src/types/runtime.ts:122

Cache configuration


container

container: HTMLElement

Defined in: src/types/runtime.ts:55

Host element where the runtime creates its DOM structure


containerConfig?

optional containerConfig?: IContainerConfig

Defined in: src/types/runtime.ts:119

Container ID mapping for each miniapp layout variant (slot, float, blank, fullScreen, wideScreen)


customEvents?

optional customEvents?: ICustomEventsService

Defined in: src/types/runtime.ts:103

Custom events service for cross-miniapp communication


optional deepLink?: IDeepLinkService

Defined in: src/types/runtime.ts:97

Deep link / URL management service


defaultTheme?

optional defaultTheme?: "light" | "dark"

Defined in: src/types/runtime.ts:125

Initial theme — defaults to "light" when omitted


drag?

optional drag?: IDragService

Defined in: src/types/runtime.ts:100

Drag and drop service


error?

optional error?: IErrorService

Defined in: src/types/runtime.ts:116

Provider-agnostic error reporting service


headers?

optional headers?: IHeadersService

Defined in: src/types/runtime.ts:94

Headers service for miniapp requests


loading?

optional loading?: ILoadingService

Defined in: src/types/runtime.ts:79

Loading indicator service


offerScreen?

optional offerScreen?: IOfferScreenService

Defined in: src/types/runtime.ts:110

Handles a miniapp's openOfferScreen calls. The non-embedded runtime has no built-in popup to show, so this is the seam a host supplies to forward the request elsewhere. Omit to keep openOfferScreen rejecting.


overlay?

optional overlay?: IOverlayService

Defined in: src/types/runtime.ts:113

Overlay service for rendering overlays on top of the host canvas


project?

optional project?: IProjectService

Defined in: src/types/runtime.ts:91

Project management service


pulse?

optional pulse?: IPulseService

Defined in: src/types/runtime.ts:85

Pulse / tracking service


pulseApp

pulseApp: string

Defined in: src/types/runtime.ts:64

Host application name (used for analytics, headers)


remoteSettings?

optional remoteSettings?: IRemoteSettingsService

Defined in: src/types/runtime.ts:82

Remote settings / feature flags service


renderingEngine?

optional renderingEngine?: IRenderingEngine

Defined in: src/types/runtime.ts:58

Rendering engine implementation — defaults to headless when omitted


storage?

optional storage?: IStorageService

Defined in: src/types/runtime.ts:70

Local storage adapter for miniapp preferences


ui?

optional ui?: IUIService

Defined in: src/types/runtime.ts:73

UI services (dialogs, notifications)


upload?

optional upload?: IUploadService

Defined in: src/types/runtime.ts:76

File upload service


user?

optional user?: IUserService

Defined in: src/types/runtime.ts:88

User information service

Methods

forwardToParent()?

optional forwardToParent(): ((message) => void) | null

Defined in: src/types/runtime.ts:131

Forward messages to parent (for embedded/mobile mode)

Returns

((message) => void) | null


onRedirectToPackageId()?

optional onRedirectToPackageId(params): void

Defined in: src/types/runtime.ts:128

Callback when a miniapp redirects to another package

Parameters

params
miniapp

IMiniapp

Returns

void