Expand description
Vault is an in-memory database specification which is designed to work without a central server. Only the user which holds the associated id and key may modify the data in a vault. Another owner can take control over the data if they know the id and the key.
Data can be added to the chain via a DataTransaction. The DataTransaction is associated to the chain
through the owner’s ID and it contains its own randomly generated ID.
Records may also be revoked from the Vault through a RevocationTransaction. A RevocationTransaction is
created and it references the id of a existing DataTransaction. The RevocationTransaction stages the
associated record for deletion. The record is deleted when the DbView preforms a garbage collection and the
RevocationTransaction is deleted along with it.
Re-exports§
pub use crate::vault::view::DbView;pub use crate::vault::view::RecordError;pub use crate::vault::view::VaultError;
Modules§
Structs§
- BlobId
- A blob identifier used to refer to a
SealedBlob. - ChainId
- A chain identifier. Used to identify a transaction.
- Client
Id - Client Id type used to identify a client.
- Id
- A generic Id type used as the underlying type for the
ClientIdandVaultIdtypes. - Invalid
Length - Key
- A key to the crypto box.
Keyis stored on the heap which makes it easier to erase. Makes use of theBuffer<u8>type to protect the data. - NCKey
- A key to the crypto box.
NCKeyis stored on the heap which makes it easier to erase. Makes use of theNonContiguousMemorytype to protect the data. - Record
Hint - a record hint. Used as a hint to what this data is used for.
- Record
Id - A record identifier. Contains a
ChainIdwhich refers to the transaction. - VaultId
- Vault Id type used to identify a vault.
Enums§
Traits§
- Base64
Decodable - a trait to make types base64 decodable
- Base64
Encodable - a trait to make types base64 encodable
- BoxProvider
- A provider interface between the vault and a crypto box. See libsodium’s secretbox for an example.
- Decrypt
- Trait for decryptable data. Allows the data to be decrypted.
- Encrypt
- trait for encryptable data. Allows the data to be encrypted.