Skip to main content

Module session

Module session 

Source
Expand description

Tempo session registry and local lifecycle metadata.

Structsยง

CanonicalCallScope ๐Ÿ”’
Canonical target scope used for order-independent policy comparisons.
CanonicalSelectorRule ๐Ÿ”’
Canonical selector rule used for order-independent policy comparisons.
CanonicalTokenLimit ๐Ÿ”’
Canonical spending limit used for order-independent policy comparisons.
ResolvedSessionSigner
A live session key resolved into the signer and Tempo access-key metadata.
SessionCallScope
A single target scope in a session entry.
SessionEntry
Persisted metadata for one temporary session.
SessionKeyMaterial
Private key material for a temporary session access key.
SessionRecord
Top-level registry persisted in wallet/sessions.toml.
SessionSelectorRule
A single selector rule in a session scope.
SessionTokenLimit
Spending limit stored for a session entry.

Enumsยง

SessionStatus
Status of a local session entry.

Constantsยง

SESSIONS_HEADER ๐Ÿ”’
WALLET_SESSIONS_PATH
Relative path from Tempo home to the session registry file.

Functionsยง

authorization_limits ๐Ÿ”’
Converts signed authorization limits into canonical form for session comparison.
authorization_scope ๐Ÿ”’
Converts signed authorization scope into canonical form for session comparison.
authorization_selector_rules ๐Ÿ”’
Converts signed authorization selector rules into canonical form for session comparison.
key_type_to_signature_type ๐Ÿ”’
Maps stored session key types to Tempo authorization signature types.
mark_expired_session_entries
Mark expired live sessions in the registry and persist the status updates.
mutate_session_record ๐Ÿ”’
parse_session_limit ๐Ÿ”’
Parses a stored session spending limit from decimal or 0x-prefixed hex.
read_live_session_key
Read a live session-scoped key entry by session id.
read_session_entry
Read a session entry by id, returning parse/read errors to the caller.
read_session_record
Read and parse the Tempo session registry.
remove_session_entry
Atomically remove a session from the registry.
resolve_live_session_signer
Resolve a live session key into a signer and access-key configuration.
session_authorization_limits ๐Ÿ”’
Converts stored session limits into canonical form for authorization comparison.
session_authorization_scope ๐Ÿ”’
Converts stored session scope into canonical form for authorization comparison.
session_authorization_selector_rules ๐Ÿ”’
Converts stored selector rules into canonical form for authorization comparison.
session_registry_path
Returns the path to the Tempo session registry file.
set_session_status ๐Ÿ”’
update_session_status
Atomically update a session status in the registry.
update_session_status_if
Atomically update a session status only when the current status matches current.
upsert_session_entry
Atomically upsert a SessionEntry into the session registry.
validate_session_authorization_policy ๐Ÿ”’
Ensures authorization expiry, limits, and call scope match the stored session policy.
validate_signed_session_authorization ๐Ÿ”’
Ensures a signed authorization matches stored session identity, key type, signer, and policy.