*Add a helper function loadUtilFunctions
This commit is contained in:
parent
1143edfb81
commit
68422f0c1a
|
@ -1,5 +1,10 @@
|
||||||
import config from "./config";
|
import config from "./config";
|
||||||
import { seedPhraseToSeed } from "libskynet";
|
|
||||||
|
let seedPhraseToSeed: typeof import("libskynet").seedPhraseToSeed;
|
||||||
|
|
||||||
|
export async function loadUtilFunctions() {
|
||||||
|
seedPhraseToSeed = (await dynImport("libskynet")).seedPhraseToSeed;
|
||||||
|
}
|
||||||
|
|
||||||
export function dynImport(module: string) {
|
export function dynImport(module: string) {
|
||||||
return Function(`return import("${module}")`)() as Promise<any>;
|
return Function(`return import("${module}")`)() as Promise<any>;
|
||||||
|
|
Loading…
Reference in New Issue