session.storage is a phone-local key-value store. It’s scoped to the user and
your miniapp, so your keys never collide with another miniapp’s, and the data
survives restarts. Keys and values are both strings.
Reading and writing
Bulk operations
For hydrating state on startup or saving several keys at once:Keep the total stored payload small (think under ~1 MB).
getAll() pulls
everything across the bridge at once, and a large namespace will stall the
background context while it resolves. For images, audio, or files, use
session.blob instead.
