pub trait ViewingKeyStore {
    const STORAGE_KEY: &'static [u8];

    fn set_seed<S: Storage>(storage: &mut S, seed: &[u8]) { ... }
    fn create<S: Storage>(
        storage: &mut S,
        env: &Env,
        account: &HumanAddr,
        entropy: &[u8]
    ) -> String { ... } fn set<S: Storage>(storage: &mut S, account: &HumanAddr, viewing_key: &str) { ... } fn check<S: ReadonlyStorage>(
        storage: &S,
        account: &HumanAddr,
        viewing_key: &str
    ) -> StdResult<()> { ... } }
Expand description

A trait describing the interface of a Viewing Key store/vault.

It includes a default implementation that only requires specifying where in the storage the keys should be held.

Required Associated Constants

Provided Methods

Set the initial prng seed for the store

Create a new viewing key, save it to storage, and return it.

The random entropy should be provided from some external source, such as the user.

Set a new viewing key based on a predetermined value.

Check if a viewing key matches an account.

Implementors