WASM: PoW
This commit is contained in:
@ -3,7 +3,7 @@ import { EventKind, NostrPrefix, encodeTLVEntries, TLVEntryType, TLVEntry, decod
|
||||
import { GiftWrapCache } from "Cache/GiftWrapCache";
|
||||
import { UnwrappedGift } from "Db";
|
||||
import { Chat, ChatSystem, ChatType, lastReadInChat } from "chat";
|
||||
import { DefaultPowWorker } from "index";
|
||||
import { WasmPowWorker } from "index";
|
||||
|
||||
export class Nip24ChatSystem extends ExternalStore<Array<Chat>> implements ChatSystem {
|
||||
#cache: GiftWrapCache;
|
||||
@ -105,7 +105,9 @@ export class Nip24ChatSystem extends ExternalStore<Array<Chat>> implements ChatS
|
||||
const recvSealedN = pub.giftWrap(await pub.sealRumor(gossip, pt.id), pt.id, powTarget);
|
||||
messages.push(recvSealedN);
|
||||
}
|
||||
messages.push(pub.giftWrap(await pub.sealRumor(gossip, pub.pubKey), pub.pubKey, powTarget, DefaultPowWorker));
|
||||
messages.push(
|
||||
pub.giftWrap(await pub.sealRumor(gossip, pub.pubKey), pub.pubKey, powTarget, new WasmPowWorker()),
|
||||
);
|
||||
return await Promise.all(messages);
|
||||
},
|
||||
sendMessage: (ev, system) => {
|
||||
|
Reference in New Issue
Block a user