Module phrase

Module phrase 

Source
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.