Function spending_key

Source
pub fn spending_key(
    seed: &[u8],
    coin_type: u32,
    account: AccountId,
) -> ExtendedSpendingKey
Expand description

Derives the ZIP 32 ExtendedSpendingKey for a given coin type and account from the given seed.

§Panics

Panics if seed is shorter than 32 bytes.

§Examples

use zcash_protocol::constants::testnet::COIN_TYPE;
use zcash_keys::keys::sapling;
use zip32::AccountId;

let extsk = sapling::spending_key(&[0; 32][..], COIN_TYPE, AccountId::ZERO);