Struct epic_keychain::keychain::ExtKeychain
source · [−]pub struct ExtKeychain {
pub master: ExtendedPrivKey,
/* private fields */
}
Fields
master: ExtendedPrivKey
Implementations
sourceimpl ExtKeychain
impl ExtKeychain
pub fn pub_root_key(&mut self) -> ExtendedPubKey
pub fn hasher(&self) -> BIP32GrinHasher
Trait Implementations
sourceimpl Clone for ExtKeychain
impl Clone for ExtKeychain
sourcefn clone(&self) -> ExtKeychain
fn clone(&self) -> ExtKeychain
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExtKeychain
impl Debug for ExtKeychain
sourceimpl Keychain for ExtKeychain
impl Keychain for ExtKeychain
sourcefn from_random_seed(is_floo: bool) -> Result<ExtKeychain, Error>
fn from_random_seed(is_floo: bool) -> Result<ExtKeychain, Error>
For testing - probably not a good idea to use outside of tests.
sourcefn from_seed(seed: &[u8], is_floo: bool) -> Result<ExtKeychain, Error>
fn from_seed(seed: &[u8], is_floo: bool) -> Result<ExtKeychain, Error>
Generates a keychain from a raw binary seed (which has already been decrypted if applicable). Read more
sourcefn from_mnemonic(
word_list: &str,
extension_word: &str,
is_floo: bool
) -> Result<Self, Error>
fn from_mnemonic(
word_list: &str,
extension_word: &str,
is_floo: bool
) -> Result<Self, Error>
Generates a keychain from a list of space-separated mnemonic words
sourcefn 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
sourcefn root_key_id() -> Identifier
fn root_key_id() -> Identifier
Root identifier for that keychain
sourcefn 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. Read more
sourcefn 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 RefUnwindSafe for ExtKeychain
impl Send for ExtKeychain
impl Sync for ExtKeychain
impl Unpin for ExtKeychain
impl UnwindSafe for ExtKeychain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CloneAny for T where
T: Any + Clone,
impl<T> CloneAny for T where
T: Any + Clone,
fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + Sync + Send + 'static, Global> where
T: Send + Sync,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more