call proof generator from within a web worker

This commit is contained in:
realaravinth
2021-12-02 14:24:53 +05:30
parent ab77eed91c
commit 0126dc0e3a
8 changed files with 109 additions and 46 deletions

View File

@@ -11,17 +11,12 @@
import genJsonPayload from "../utils/genJsonPayload";
import * as CONST from "./const";
import { PoWConfig } from "./types";
type GetConfigPayload = {
key: string;
};
export type PoWConfig = {
string: string;
difficulty_factor: number;
salt: string;
};
/**
* fetch proof-of-work configuration
* @returns {PoWConfig} pow config