Struct grin_keychain::keychain::ExtKeychain
source · pub struct ExtKeychain {
pub master: ExtendedPrivKey,
/* private fields */
}
Fields§
§master: ExtendedPrivKey
Implementations§
source§impl ExtKeychain
impl ExtKeychain
pub fn pub_root_key(&mut self) -> ExtendedPubKey
pub fn hasher(&self) -> BIP32GrinHasher
Trait Implementations§
source§impl Clone for ExtKeychain
impl Clone for ExtKeychain
source§fn clone(&self) -> ExtKeychain
fn clone(&self) -> ExtKeychain
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExtKeychain
impl Debug for ExtKeychain
source§impl Keychain for ExtKeychain
impl Keychain for ExtKeychain
source§fn from_random_seed(is_test: bool) -> Result<ExtKeychain, Error>
fn from_random_seed(is_test: bool) -> Result<ExtKeychain, Error>
For testing - probably not a good idea to use outside of tests.
source§fn from_seed(seed: &[u8], is_test: bool) -> Result<ExtKeychain, Error>
fn from_seed(seed: &[u8], is_test: bool) -> Result<ExtKeychain, Error>
Generates a keychain from a raw binary seed (which has already been
decrypted if applicable).
source§fn from_mnemonic(
word_list: &str,
extension_word: &str,
is_test: bool
) -> Result<Self, Error>
fn from_mnemonic( word_list: &str, extension_word: &str, is_test: bool ) -> Result<Self, Error>
Generates a keychain from a list of space-separated mnemonic words
source§fn mask_master_key(&mut self, mask: &SecretKey) -> Result<(), Error>
fn mask_master_key(&mut self, mask: &SecretKey) -> Result<(), Error>
XOR masks the keychain’s master key against another key
source§fn root_key_id() -> Identifier
fn root_key_id() -> Identifier
Root identifier for that keychain
source§fn derive_key_id(depth: u8, d1: u32, d2: u32, d3: u32, d4: u32) -> Identifier
fn derive_key_id(depth: u8, d1: u32, d2: u32, d3: u32, d4: u32) -> Identifier
Derives a key id from the depth of the keychain and the values at each
depth level. See
KeychainPath
for more information.source§fn public_root_key(&self) -> PublicKey
fn public_root_key(&self) -> PublicKey
The public root key
fn derive_key( &self, amount: u64, id: &Identifier, switch: SwitchCommitmentType ) -> Result<SecretKey, Error>
fn commit( &self, amount: u64, id: &Identifier, switch: SwitchCommitmentType ) -> Result<Commitment, Error>
fn blind_sum(&self, blind_sum: &BlindSum) -> Result<BlindingFactor, Error>
fn sign( &self, msg: &Message, amount: u64, id: &Identifier, switch: SwitchCommitmentType ) -> Result<Signature, Error>
fn sign_with_blinding( &self, msg: &Message, blinding: &BlindingFactor ) -> Result<Signature, Error>
fn secp(&self) -> &Secp256k1
Auto Trait Implementations§
impl Freeze for ExtKeychain
impl RefUnwindSafe for ExtKeychain
impl Send for ExtKeychain
impl Sync for ExtKeychain
impl Unpin for ExtKeychain
impl UnwindSafe for ExtKeychain
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