Skip to main content

Crate host_api

Crate host_api 

Source
Expand description

Host API — transport-agnostic engine for the Polkadot app host-api protocol.

Processes binary SCALE-encoded messages from Polkadot apps and returns binary responses. Works over any transport: WKWebView MessagePort, PolkaVM host calls, WebSocket, etc.

See HostApi::handle_message for the main entry point.

Modules§

chain
Remote chain protocol methods (tags 76-103).
codec
Minimal SCALE codec for the Polkadot app host-api wire format.
protocol
Wire protocol for the Polkadot app host-api.

Structs§

HostApi
Shared host implementation. Handles decoded requests, returns encoded responses.

Enums§

HostApiOutcome
Outcome of processing a host-api message.

Constants§

HOST_API_BRIDGE_SCRIPT
JavaScript injected before the Polkadot app loads. Sets up: