1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2019-2022 Parity Technologies (UK) Ltd.
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
// see LICENSE for license details.

//! Types associated with accessing and working with storage items.

mod storage_address;
mod storage_client;
mod storage_map_key;
mod storage_type;

pub mod utils;

pub use storage_client::StorageClient;

pub use storage_type::{
    KeyIter,
    Storage,
};

// Re-export as this is used in the public API in this module:
pub use crate::rpc::types::StorageKey;

/// Types representing an address which describes where a storage
/// entry lives and how to properly decode it.
pub mod address {
    pub use super::{
        storage_address::{
            dynamic,
            dynamic_root,
            DynamicStorageAddress,
            StaticStorageAddress,
            StorageAddress,
            Yes,
        },
        storage_map_key::{
            StorageHasher,
            StorageMapKey,
        },
    };
}

// For consistency with other modules, also expose
// the basic address stuff at the root of the module.
pub use storage_address::{
    dynamic,
    dynamic_root,
    DynamicStorageAddress,
    StaticStorageAddress,
    StorageAddress,
};