Trait iop_keyvault::Subtree
source · [−]pub trait Subtree {
type Suite: KeyDerivationCrypto;
fn name(&self) -> &'static str;
fn master(
&self,
seed: &Seed
) -> <<Self as Subtree>::Suite as KeyDerivationCrypto>::ExtendedPrivateKey;
fn key_id(
&self,
pk: &<<Self as Subtree>::Suite as AsymmetricCrypto>::PublicKey
) -> <<Self as Subtree>::Suite as AsymmetricCrypto>::KeyId;
}
Expand description
The operations required to support SLIP-0010
Required Associated Types
The crypto suite used by the network
Required Methods
fn master(
&self,
seed: &Seed
) -> <<Self as Subtree>::Suite as KeyDerivationCrypto>::ExtendedPrivateKey
fn master(
&self,
seed: &Seed
) -> <<Self as Subtree>::Suite as KeyDerivationCrypto>::ExtendedPrivateKey
Calculate the master extended private key in the crypto suite used by the network
fn key_id(
&self,
pk: &<<Self as Subtree>::Suite as AsymmetricCrypto>::PublicKey
) -> <<Self as Subtree>::Suite as AsymmetricCrypto>::KeyId
fn key_id(
&self,
pk: &<<Self as Subtree>::Suite as AsymmetricCrypto>::PublicKey
) -> <<Self as Subtree>::Suite as AsymmetricCrypto>::KeyId
Calculate the key identifier from the public key based on the rules used by the network