host-sso — SSO session manager for Polkadot Host products.
Manages the QR-based pairing lifecycle between a host application and a mobile wallet (Polkadot App). Handles sign-request forwarding and session persistence across restarts.
Architecture
All I/O (transport, signing, storage, event delivery) is injected via the
traits in [traits]. The crate has no direct I/O dependencies.
Usage
- Implement [
traits::SsoTransport], provide a [host_wallet::HostSigner], [traits::SsoSessionStore], and [traits::SsoEventSink] for your platform. - Construct a [
manager::SsoManager] with the adapters and metadata URL. - Call
restore_session()on startup to resume a previous session. - Call
pair()to initiate a new QR-pairing flow. - Call
handle_pairing_result()once the pairing handshake completes.