pub struct ChainHash;Expand description
Chain ID hashing utilities
Implementations§
Source§impl ChainHash
impl ChainHash
Sourcepub fn hash_chain_id(url: &str) -> [u8; 32]
pub fn hash_chain_id(url: &str) -> [u8; 32]
Hash chain ID from URL Matches TS: hashChainId(url: string): Uint8Array
Sourcepub fn hash_chain_id_hex(url: &str) -> String
pub fn hash_chain_id_hex(url: &str) -> String
Hash chain ID from URL, returning hex string Matches TS: hashChainId(url: string): string (when hex output requested)
Sourcepub fn derive_main_chain_id(authority: &str) -> [u8; 32]
pub fn derive_main_chain_id(authority: &str) -> [u8; 32]
Derive main chain ID from authority Matches TS: deriveMainChainId(authority: string): Uint8Array
Sourcepub fn derive_main_chain_id_hex(authority: &str) -> String
pub fn derive_main_chain_id_hex(authority: &str) -> String
Derive main chain ID from authority, returning hex string Matches TS: deriveMainChainId(authority: string): string (when hex output requested)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChainHash
impl RefUnwindSafe for ChainHash
impl Send for ChainHash
impl Sync for ChainHash
impl Unpin for ChainHash
impl UnsafeUnpin for ChainHash
impl UnwindSafe for ChainHash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more