Skip to main content

Interface: IRuntimeConfig

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

Full configuration for createRuntime.

Three properties are required — container, auth, and hostName. 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:66

Analytics service


auth

auth: IAuthService

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

Authentication service


cache?

optional cache?: ICacheConfig

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

Cache configuration


container

container: HTMLElement

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

Host element where the runtime creates its DOM structure


containerConfig?

optional containerConfig?: IContainerConfig

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

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


customEvents?

optional customEvents?: ICustomEventsService

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

Custom events service for cross-miniapp communication


optional deepLink?: IDeepLinkService

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

Deep link / URL management service


defaultTheme?

optional defaultTheme?: "light" | "dark"

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

Initial theme — defaults to "light" when omitted


drag?

optional drag?: IDragService

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

Drag and drop service


error?

optional error?: IErrorService

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

Provider-agnostic error reporting service


headers?

optional headers?: IHeadersService

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

Headers service for miniapp requests


hostName

hostName: string

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

Host application name (used for analytics, headers)


loading?

optional loading?: ILoadingService

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

Loading indicator service


overlay?

optional overlay?: IOverlayService

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

Overlay service for rendering overlays on top of the host canvas


project?

optional project?: IProjectService

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

Project management service


pulse?

optional pulse?: IPulseService

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

Pulse / tracking service


remoteSettings?

optional remoteSettings?: IRemoteSettingsService

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

Remote settings / feature flags service


renderingEngine?

optional renderingEngine?: IRenderingEngine

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

Rendering engine implementation — defaults to headless when omitted


storage?

optional storage?: IStorageService

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

Local storage adapter for miniapp preferences


ui?

optional ui?: IUIService

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

UI services (dialogs, notifications)


upload?

optional upload?: IUploadService

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

File upload service


user?

optional user?: IUserService

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

User information service

Methods

forwardToParent()?

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

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

Forward messages to parent (for embedded/mobile mode)

Returns

((message) => void) | null


onRedirectToPackageId()?

optional onRedirectToPackageId(params): void

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

Callback when a miniapp redirects to another package

Parameters

params
miniapp

IMiniapp

Returns

void