Expand description
seed implements functions for moving between a seed and a seed phrase. This blog post provides a full specification for the code presented here:
https://blog.sia.tech/a-technical-breakdown-of-mysky-seeds-ba9964505978
Constants§
- SEED_
CHECKSUM_ WORDS - SEED_CHECKSUMWORDS describes the number of words in a seed phrase that contribute to the checksum. The checksum is used to ensure copying errors did not occur if a human is transcribing a seed manually. There is enough entropy in the checksum that an error can usually be corrected by brute-force with zero false positives.
- SEED_
ENTROPY_ WORDS - SEED_ENTROPY_WORDS describes the number of words in a seed phrase that contribute to its fundamental entropy. These are the first 13 words.
Functions§
- seed_
phrase_ to_ seed - seed_phrase_to_seed converts a seed phrase to a Uint8Array
- seed_
to_ seed_ phrase - seed_to_seed_phrase will convert a seed into a seed phrase.
- valid_
seed_ phrase - valid_seed_phrase will return an error if the seed phrase is not valid.