Skip to main content

Crate host_sso

Crate host_sso 

Source
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

  1. Implement traits::SsoTransport, provide a host_wallet::HostSigner, traits::SsoSessionStore, and traits::SsoEventSink for your platform.
  2. Construct a manager::SsoManager with the adapters and metadata URL.
  3. Call restore_session() on startup to resume a previous session.
  4. Call pair() to initiate a new QR-pairing flow.
  5. 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.