Normalizes a mnemonic seed phrase by splitting on whitespace,
NFKC-normalizing, lowercasing, trimming, and filtering empty
strings.
NFKC (consistent with @me2em/core name/context canonicalization)
folds compatibility forms to their canonical ASCII form — a
fullwidth or otherwise compatibility-decomposed mnemonic validates
identically to its ASCII spelling. (@scure/bip39 applies NFKD to
the seed derivation itself per the BIP39 standard; this layer is
about consistent valid/invalid answers for the wordlist check.)
Parameters
sp: string|string[]
The seed phrase as a string or array of words.
Returns string[]
Normalized array of lowercase words with duplicates preserved.
Normalizes a mnemonic seed phrase by splitting on whitespace, NFKC-normalizing, lowercasing, trimming, and filtering empty strings.
NFKC (consistent with
@me2em/corename/context canonicalization) folds compatibility forms to their canonical ASCII form — a fullwidth or otherwise compatibility-decomposed mnemonic validates identically to its ASCII spelling. (@scure/bip39applies NFKD to the seed derivation itself per the BIP39 standard; this layer is about consistent valid/invalid answers for the wordlist check.)