{"id":58623,"library":"sp-session","title":"SP Session","description":"Primitives for sessions in Substrate-based chains.","status":"active","version":"44.0.0","language":"rust","source_language":null,"source_url":"https://github.com/paritytech/polkadot-sdk","tags":["substrate","polkadot","session","primitives"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\nsp-session = \"44.0.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add sp-session","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"SessionHandler","correct":"use sp_session::SessionHandler;"}],"quickstart":{"code":"use sp_session::SessionHandler;\n\nstruct MyHandler;\nimpl SessionHandler for MyHandler {\n    fn on_new_session(_: bool) {}\n    fn on_before_session_ending() {}\n    fn on_disabled(_: u32) {}\n}","lang":"rust","description":"Implements the SessionHandler trait for custom session logic."},"warnings":[{"fix":"Add `sp-session` with correct version matching your Substrate version.","message":"Part of the Polkadot SDK; requires specific Substrate runtime dependencies.","severity":"gotcha","affected_versions":">=44.0.0"}],"env_vars":null,"search_vec":"'base':9 'chain':10 'polkadot':12 'primit':3,14 'session':2,5,13 'sp':1 'substrat':8,11 'substrate-bas':7","created_at":"2026-06-16T16:32:40.953010+00:00","updated_at":"2026-06-16T16:32:40.953010+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://paritytech.github.io/polkadot-sdk/","github":"https://github.com/paritytech/polkadot-sdk","docs":"https://docs.rs/sp-session/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["other"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}