Compare commits
No commits in common. "b50b8e8ced882d7d46b5a3dd3b598e540b705149" and "db4b61bdd9da92eb03e00c38457af103f7a845a9" have entirely different histories.
b50b8e8ced
...
db4b61bdd9
|
@ -4,13 +4,11 @@ import * as bip39 from "@scure/bip39";
|
|||
import { wordlist } from "@scure/bip39/wordlists/english";
|
||||
import { errorExit } from "./error.js";
|
||||
|
||||
const BIP44_PATH = "m/44'/1627'/0'/0'/0'";
|
||||
|
||||
export function getSeed() {
|
||||
const seed = config.str("seed");
|
||||
|
||||
let valid = bip39.validateMnemonic(seed, wordlist);
|
||||
if (!valid) {
|
||||
let err = bip39.validateMnemonic(seed, wordlist);
|
||||
if (err !== null) {
|
||||
errorExit("LUME_WEB_RELAY_SEED is invalid. Aborting.");
|
||||
}
|
||||
|
||||
|
@ -18,7 +16,7 @@ export function getSeed() {
|
|||
}
|
||||
|
||||
export function getHDKey(): HDKey {
|
||||
return HDKey.fromMasterSeed(getSeed()).derive(BIP44_PATH);
|
||||
return HDKey.fromMasterSeed(getSeed()).derive("m/44'/1627'/0'/0");
|
||||
}
|
||||
|
||||
export function getKeyPair() {
|
||||
|
|
|
@ -2,7 +2,7 @@ import express, { Express } from "express";
|
|||
import http from "http";
|
||||
import { AddressInfo } from "net";
|
||||
import log from "loglevel";
|
||||
import { getKeyPair } from "../lib/seed.js";
|
||||
import { getKeyPair } from "./swarm.js";
|
||||
|
||||
let app: Express;
|
||||
let router = express.Router();
|
||||
|
|
|
@ -7,7 +7,7 @@ import * as fs from "fs";
|
|||
import path from "path";
|
||||
import type { Logger } from "loglevel";
|
||||
|
||||
import { getSeed } from "../lib/seed.js";
|
||||
import { getSeed } from "../lib/util.js";
|
||||
import pluginRpc from "./plugins/rpc";
|
||||
import pluginCore from "./plugins/core";
|
||||
import type Config from "@lumeweb/cfg";
|
||||
|
|
|
@ -8,7 +8,7 @@ import {
|
|||
import promiseRetry from "promise-retry";
|
||||
import config from "../config.js";
|
||||
import log from "loglevel";
|
||||
import { getSeed } from "../lib/seed.js";
|
||||
import { getSeed } from "../lib/util.js";
|
||||
import type {
|
||||
IndependentFileSmall,
|
||||
SavedSslData,
|
||||
|
|
Loading…
Reference in New Issue