mirror of
https://github.com/oed/seedsplit.git
synced 2026-01-10 05:07:57 -05:00
fix: spelling error
This commit is contained in:
@@ -5,7 +5,7 @@ const SECRET_LENGTH = 64
|
||||
|
||||
const lengthToPrefix = { 64: '', 56: 'd', 48: 'c', 40: 'b', 32: 'a' }
|
||||
const prefixToLength = { '': 64, 'd': 56, 'c': 48, 'b': 40, 'a': 32 }
|
||||
const getExtraEntopy = length => bip39.mnemonicToEntropy(
|
||||
const getExtraEntropy = length => bip39.mnemonicToEntropy(
|
||||
bip39.generateMnemonic(SECRET_LENGTH * 2)).substring(0, SECRET_LENGTH - length)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ async function split(seed, numShards, threshold) {
|
||||
}
|
||||
let ent = bip39.mnemonicToEntropy(seed)
|
||||
let prefix = lengthToPrefix[ent.length]
|
||||
ent = ent + getExtraEntopy(ent.length)
|
||||
ent = ent + getExtraEntropy(ent.length)
|
||||
|
||||
let shards = await ssss.createKeyshares(Buffer.from(ent, 'hex'), numShards, threshold)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user