Struct diem_management::storage::StorageWrapper
source · pub struct StorageWrapper { /* private fields */ }
Expand description
A helper to handle common error handling and functionality for tooling
Implementations§
source§impl StorageWrapper
impl StorageWrapper
pub fn new(storage_name: &'static str, storage: Storage) -> Self
pub fn encryptor(self) -> Encryptor<Storage>
pub fn value<T: DeserializeOwned>(&self, name: &'static str) -> Result<T, Error>
pub fn account_address( &self, name: &'static str ) -> Result<AccountAddress, Error>
pub fn string(&self, name: &'static str) -> Result<String, Error>
pub fn transaction(&self, name: &'static str) -> Result<Transaction, Error>
pub fn u64(&self, name: &'static str) -> Result<u64, Error>
pub fn waypoint(&self, name: &'static str) -> Result<Waypoint, Error>
sourcepub fn ed25519_key(&self, name: &'static str) -> Result<Ed25519PublicKey, Error>
pub fn ed25519_key(&self, name: &'static str) -> Result<Ed25519PublicKey, Error>
Retrieves the Public key, that is stored as a public key
sourcepub fn x25519_key(&self, name: &'static str) -> Result<PublicKey, Error>
pub fn x25519_key(&self, name: &'static str) -> Result<PublicKey, Error>
Retrieves the Public key that is stored as a public key
pub fn rotate_key( &mut self, name: &'static str ) -> Result<Ed25519PublicKey, Error>
sourcepub fn ed25519_public_from_private(
&self,
key_name: &'static str
) -> Result<Ed25519PublicKey, Error>
pub fn ed25519_public_from_private( &self, key_name: &'static str ) -> Result<Ed25519PublicKey, Error>
Retrieves public key from the stored private key
sourcepub fn ed25519_public_from_private_previous_version(
&self,
key_name: &'static str
) -> Result<Ed25519PublicKey, Error>
pub fn ed25519_public_from_private_previous_version( &self, key_name: &'static str ) -> Result<Ed25519PublicKey, Error>
Retrieves the previous public key from the stored private key
sourcepub fn ed25519_private(
&self,
key_name: &'static str
) -> Result<Ed25519PrivateKey, Error>
pub fn ed25519_private( &self, key_name: &'static str ) -> Result<Ed25519PrivateKey, Error>
Retrieves public key from the stored private key
pub fn x25519_private(&self, key_name: &'static str) -> Result<PrivateKey, Error>
sourcepub fn x25519_public_from_private(
&self,
key_name: &'static str
) -> Result<PublicKey, Error>
pub fn x25519_public_from_private( &self, key_name: &'static str ) -> Result<PublicKey, Error>
Retrieves public key from the stored private key