Expand description
AccountSession management
Represents an authenticated account session with decrypted keys.
§API Overview
The AccountSession API is organized into three areas for managing Databases:
§Database Lifecycle
create_database()- Create a new databaseopen_database()- Open an existing databaseopen_database_with_key()- Open with an explicitly chosen account keyjoin()- Join a database from a ticket and open itfind_database()- Search for databases by name
§Application References
set_reference()- Store a direct database reference in the Accountreference()- Read a reference (Noneonly when absent)open_reference()- Read a reference and open its database
§Tracked Databases
Manage your personal list of tracked databases:
databases()- List all tracked databasesdatabase()- Get a specific tracked databasetracked_database()- Read one tracking row, distinguishing absence from failuretrack_database()- Add or update a tracked database (upsert)set_sync_preferences()- Update preferences without changing tracking or key mappingsuntrack_database()- Remove a database from your tracked listis_sync_enabled()- Check this account’s sync preference for a database
§Key-Database Mappings
Control which keys access which databases:
map_key()- Map a key to a SigKey identifier for a databasekey_mapping()- Get the SigKey mapping for a key-database pairfind_key()- Find which key can access a database
This explicit approach ensures predictable behavior and avoids ambiguity about which keys have access to which databases.
Structs§
- Account
Session - Unlocked Account access, created by login or explicit caller-held credentials
- Database
Builder - Chainable builder for constructing a new Database with all of its initial shape — settings, signing key, registered stores, and seed data — folded into one genesis entry.