*Add a helper function loadUtilFunctions

This commit is contained in:
Derrick Hammer 2022-09-09 06:18:39 -04:00
parent 1143edfb81
commit 68422f0c1a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -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>;