Connect to the statement store and start receiving statements.
Connection credentials (host accountId or local signer).
Destroy the client, stopping polling, unsubscribing, and closing the transport.
Safe to call multiple times. After destruction, the client cannot be reused.
Get the signer's public key as a hex string (with 0x prefix).
The hex-encoded public key, or empty string if not connected or in host mode.
Whether the client is connected and ready to publish/subscribe.
Publish typed data to the statement store.
The type of data being published.
The value to publish (must be JSON-serializable, max 512 bytes).
Optionaloptions: PublishOptionsOptional channel, topic2, TTL, and decryption key overrides.
true if accepted, false if rejected or errored.
Query existing statements from the store.
Only available when the transport supports queries (RPC mode). In host mode, the subscription replays existing statements automatically.
Optionaloptions: { topic2?: string }Subscribe to incoming statements on this application's topic.
The expected data type (decoded from JSON).
Called for each new statement.
Optionaloptions: { topic2?: string }Optional secondary topic filter.
A handle to unsubscribe.
High-level client for the Polkadot Statement Store.
Provides a simple publish/subscribe API over the ephemeral statement store, handling topic management, signing (host or local), and resilient delivery (subscription + polling fallback).
Example