Storage Options
Proven offers four types of storage, each accessible in three types of context.
Storage types
Key-value storage
A simple key-value store with capabilities similar to Redis or similar systems. Keys must always be valid UTF-8 strings but values can be any arbitrary bytes. Serialization/deserialization is left to the accessing component. A max value length of 1MB is enforced. Consistency is immediate.
Blob storage
Similar in API to key-value but with no max length limit and eventual consistency.
Relational storage
Distributed SQLite. More soon.
Keychain
A keychain is a specialised kind of key-value storage for handling cryptographic material. The contents of any keys cannot be viewed or used directly inside any components - however, they can be passed as inputs to other system-level components which handle interactions with the ledger (generally signing transactions).
Storage contexts
Application context
This context is always available in all execution modes. It represents global application-level state, consistent no matter which users is accessing it.
Identity context
This context is tied to the persona/identity of the user (authenticated via ROLA). E.g. a key-value store for user A will have different values then the same bucket but for user B.
This data is considered private to the user.
This context will not be available to HTTP endpoints unless the request is also bearing a valid JWT in the Authorization header.
NFT context
This context is tied to ownership of a given NFT. The account holding the NFT must be cryptographically verified through ROLA inside the session for the storage to be active.
This data is considered private to the NFT owner. If the NFT is transferred to another user - the storages tied to it will become available to the new owner.
This context will not be available to HTTP endpoints unless the request is also bearing a valid JWT in the Authorization header.
Last updated