pub struct SecpContext { /* private fields */ }
Implementations§
Source§impl SecpContext
impl SecpContext
pub fn new() -> SecpContext
Sourcepub fn master_private_key(
&self,
network: Network,
seed: &Seed,
) -> Result<ExtendedPrivKey, Error>
pub fn master_private_key( &self, network: Network, seed: &Seed, ) -> Result<ExtendedPrivKey, Error>
create a master private key from seed
Sourcepub fn extended_public_from_private(
&self,
extended_private_key: &ExtendedPrivKey,
) -> ExtendedPubKey
pub fn extended_public_from_private( &self, extended_private_key: &ExtendedPrivKey, ) -> ExtendedPubKey
get extended public key for a known private key
pub fn private_child( &self, extended_private_key: &ExtendedPrivKey, child: ChildNumber, ) -> Result<ExtendedPrivKey, Error>
pub fn public_child( &self, extended_public_key: &ExtendedPubKey, child: ChildNumber, ) -> Result<ExtendedPubKey, Error>
pub fn public_from_private(&self, private: &PrivateKey) -> PublicKey
pub fn sign(&self, digest: &[u8], key: &PrivateKey) -> Result<Signature, Error>
pub fn tweak_add(&self, key: &mut PrivateKey, tweak: &[u8]) -> Result<(), Error>
pub fn tweak_exp_add( &self, key: &mut PublicKey, tweak: &[u8], ) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for SecpContext
impl RefUnwindSafe for SecpContext
impl Send for SecpContext
impl Sync for SecpContext
impl Unpin for SecpContext
impl UnwindSafe for SecpContext
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