[−][src]Trait grin_keychain::Keychain
Required methods
pub fn from_seed(seed: &[u8], is_test: bool) -> Result<Self, Error>
[src]
Generates a keychain from a raw binary seed (which has already been decrypted if applicable).
pub fn from_mnemonic(
word_list: &str,
extension_word: &str,
is_test: bool
) -> Result<Self, Error>
[src]
word_list: &str,
extension_word: &str,
is_test: bool
) -> Result<Self, Error>
Generates a keychain from a list of space-separated mnemonic words
pub fn from_random_seed(is_test: bool) -> Result<Self, Error>
[src]
Generates a keychain from a randomly generated seed. Mostly used for tests.
pub fn mask_master_key(&mut self, mask: &SecretKey) -> Result<(), Error>
[src]
XOR masks the keychain's master key against another key
pub fn root_key_id() -> Identifier
[src]
Root identifier for that keychain
pub fn derive_key_id(
depth: u8,
d1: u32,
d2: u32,
d3: u32,
d4: u32
) -> Identifier
[src]
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.
pub fn public_root_key(&self) -> PublicKey
[src]
The public root key
pub fn derive_key(
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<SecretKey, Error>
[src]
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<SecretKey, Error>
pub fn commit(
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Commitment, Error>
[src]
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Commitment, Error>
pub fn blind_sum(&self, blind_sum: &BlindSum) -> Result<BlindingFactor, Error>
[src]
pub fn sign(
&self,
msg: &Message,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Signature, Error>
[src]
&self,
msg: &Message,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Signature, Error>
pub fn sign_with_blinding(
&self,
_: &Message,
_: &BlindingFactor
) -> Result<Signature, Error>
[src]
&self,
_: &Message,
_: &BlindingFactor
) -> Result<Signature, Error>
pub fn secp(&self) -> &Secp256k1
[src]
Implementors
impl Keychain for ExtKeychain
[src]
pub fn from_seed(seed: &[u8], is_test: bool) -> Result<ExtKeychain, Error>
[src]
pub fn from_mnemonic(
word_list: &str,
extension_word: &str,
is_test: bool
) -> Result<Self, Error>
[src]
word_list: &str,
extension_word: &str,
is_test: bool
) -> Result<Self, Error>
pub fn mask_master_key(&mut self, mask: &SecretKey) -> Result<(), Error>
[src]
pub fn from_random_seed(is_test: bool) -> Result<ExtKeychain, Error>
[src]
For testing - probably not a good idea to use outside of tests.
pub fn root_key_id() -> Identifier
[src]
pub fn derive_key_id(
depth: u8,
d1: u32,
d2: u32,
d3: u32,
d4: u32
) -> Identifier
[src]
depth: u8,
d1: u32,
d2: u32,
d3: u32,
d4: u32
) -> Identifier
pub fn public_root_key(&self) -> PublicKey
[src]
pub fn derive_key(
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<SecretKey, Error>
[src]
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<SecretKey, Error>
pub fn commit(
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Commitment, Error>
[src]
&self,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Commitment, Error>
pub fn blind_sum(&self, blind_sum: &BlindSum) -> Result<BlindingFactor, Error>
[src]
pub fn sign(
&self,
msg: &Message,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Signature, Error>
[src]
&self,
msg: &Message,
amount: u64,
id: &Identifier,
switch: SwitchCommitmentType
) -> Result<Signature, Error>
pub fn sign_with_blinding(
&self,
msg: &Message,
blinding: &BlindingFactor
) -> Result<Signature, Error>
[src]
&self,
msg: &Message,
blinding: &BlindingFactor
) -> Result<Signature, Error>