POW everything

This commit is contained in:
2023-08-18 17:56:50 +01:00
parent 2a851c442d
commit 1c5e61e020
7 changed files with 49 additions and 24 deletions

View File

@ -6,7 +6,7 @@ import { StrictMode } from "react";
import * as ReactDOM from "react-dom/client";
import { Provider } from "react-redux";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { EventPublisher, NostrSystem, ProfileLoaderService, Nip7Signer } from "@snort/system";
import { EventPublisher, NostrSystem, ProfileLoaderService, Nip7Signer, PowWorker } from "@snort/system";
import * as serviceWorkerRegistration from "serviceWorkerRegistration";
import { IntlProvider } from "IntlProvider";
@ -60,6 +60,11 @@ export const System = new NostrSystem({
*/
export const ProfileLoader = new ProfileLoaderService(System, UserCache);
/**
* Singleton POW worker
*/
export const DefaultPowWorker = new PowWorker("/pow.js");
// @ts-expect-error Setting webpack nonce
window.__webpack_nonce__ = "ZmlhdGphZiBzYWlkIHNub3J0LnNvY2lhbCBpcyBwcmV0dHkgZ29vZCwgd2UgbWFkZSBpdCE=";