Expand description
seed-manager is a crate with a number of helper functions for working with cryptographic seeds, including moving between seeds and seed phrases.
use seed15::random_seed;
use seed15::phrase::{seed_to_seed_phrase, seed_phrase_to_seed};
use seed15::keypair::keypair_from_seed;
// Create a seed, convert it to a human-readable phrase, then convert the phrase back to a
// seed.
let new_seed = random_seed();
let phrase = seed_to_seed_phrase(new_seed);
let seed = seed_phrase_to_seed(&phrase).unwrap();
// Use the seed to create an ed25519 keypair.
let keypair = keypair_from_seed(seed);Modules
dictionary defines the dictionary that is used to build the seed words.
keypair contains helper functions for using keypairs derived from seeds.
seed implements functions for moving between a seed and a seed phrase. This blog post provides
a full specification for the code presented here:
Functions
random_seed will generate a new random seed using secure userspace entropy from the
userspace-random crate.
Type Definitions
Seed defines the type for a kardashev seed. The seed itself is not intended to be
human-friendly and therefore has no checksum.