Expand description
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 ahost_wallet::HostSigner,traits::SsoSessionStore, andtraits::SsoEventSinkfor your platform. - Construct a
manager::SsoManagerwith 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.
Re-exports§
pub use error::SsoError;pub use manager::SsoManager;pub use product_key_cache::CacheIdentityMismatch;pub use product_key_cache::ProductKeyCache;pub use product_key_cache::ProductKeyCacheEntry;pub use session::PairingResult;pub use state::SsoState;pub use traits::NoopProductKeyStore;pub use traits::PersistedSessionMeta;pub use traits::ProductKeyStoreLoadResult;pub use traits::SsoEventSink;pub use traits::SsoProductKeyStore;pub use traits::SsoSessionStore;pub use traits::SsoTransport;
Modules§
- error
- manager
SsoManager— coordinator for the SSO QR-pairing lifecycle.- presence
- Phone presence detection via heartbeat monitoring.
- product_
key - ProductKeyRequest / ProductKeyResponse SCALE encode/decode.
- product_
key_ cache - Session-bound product key cache (CHAT-002 / DER-003).
- session
- state
- traits
Traits§
- SsoSigner
- Re-export of
host_wallet::HostSigner— the unified signing trait.