feat: decouple l-s entrypoint
This commit is contained in:
parent
2a2c1fccc8
commit
f4d6b5e454
48 changed files with 411 additions and 232 deletions
|
|
@ -5,7 +5,6 @@ const hkdf = require('futoin-hkdf')
|
|||
|
||||
const state = require('../lib/middlewares/state')
|
||||
const mnemonicHelpers = require('../lib/mnemonic-helpers')
|
||||
const options = require('../lib/options')
|
||||
|
||||
function computeOperatorId (masterSeed) {
|
||||
return hkdf(masterSeed, 16, { salt: 'lamassu-server-salt', info: 'operator-id' }).toString('hex')
|
||||
|
|
@ -13,7 +12,7 @@ function computeOperatorId (masterSeed) {
|
|||
|
||||
function getMnemonic () {
|
||||
if (state.mnemonic) return Promise.resolve(state.mnemonic)
|
||||
return fs.readFile(options.mnemonicPath, 'utf8').then(mnemonic => {
|
||||
return fs.readFile(process.env.MNEMONIC_PATH, 'utf8').then(mnemonic => {
|
||||
state.mnemonic = mnemonic
|
||||
return mnemonic
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue