sov-modules-api 0.2.0

Defines the interface of the Sovereign SDK module system
Documentation
1
2
3
4
5
6
7
8
pub use sov_sequencer::utils::to_jsonrpsee_error_object;

use crate::{Context, Digest, Spec};

pub fn generate_address<C: Context>(key: &str) -> <C as Spec>::Address {
    let hash: [u8; 32] = <C as Spec>::Hasher::digest(key.as_bytes()).into();
    C::Address::from(hash)
}