pub struct SecretKey(/* private fields */);Implementations§
Source§impl SecretKey
impl SecretKey
Sourcepub fn from_seed(seed: &[u8]) -> SecretKey
pub fn from_seed(seed: &[u8]) -> SecretKey
§Panics
Panics if the seed produces an invalid SecretKey.
pub fn from_bytes(bytes: &[u8; 32]) -> Result<SecretKey, Error>
pub fn to_bytes(&self) -> [u8; 32]
pub fn public_key(&self) -> PublicKey
pub fn derive_hardened(&self, idx: u32) -> SecretKey
Trait Implementations§
Source§impl AddAssign<&SecretKey> for SecretKey
impl AddAssign<&SecretKey> for SecretKey
Source§fn add_assign(&mut self, rhs: &SecretKey)
fn add_assign(&mut self, rhs: &SecretKey)
Performs the
+= operation. Read moreSource§impl DerivableKey for SecretKey
impl DerivableKey for SecretKey
fn derive_unhardened(&self, idx: u32) -> SecretKey
impl Eq for SecretKey
Source§impl Streamable for SecretKey
impl Streamable for SecretKey
fn update_digest(&self, digest: &mut Sha256)
fn stream(&self, out: &mut Vec<u8>) -> Result<(), Error>
fn parse<const TRUSTED: bool>( input: &mut Cursor<&[u8]>, ) -> Result<SecretKey, Error>
fn to_bytes(&self) -> Result<Vec<u8>, Error>
fn from_bytes(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn from_bytes_unchecked(bytes: &[u8]) -> Result<Self, Error>where
Self: Sized,
fn hash(&self) -> [u8; 32]
impl StructuralPartialEq for SecretKey
Auto Trait Implementations§
impl Freeze for SecretKey
impl RefUnwindSafe for SecretKey
impl Send for SecretKey
impl Sync for SecretKey
impl Unpin for SecretKey
impl UnsafeUnpin for SecretKey
impl UnwindSafe for SecretKey
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