feat: NIP-24

This commit is contained in:
2023-08-17 19:54:14 +01:00
parent 8500dee24f
commit f6a46e3523
51 changed files with 792 additions and 319 deletions

View File

@ -1,6 +1,5 @@
import { WorkQueueItem, processWorkQueue, barrierQueue, unwrap } from "@snort/shared";
import { EventSigner } from "../event-publisher";
import { HexKey, NostrEvent } from "../nostr";
import { EventSigner, HexKey, NostrEvent } from "..";
const Nip7Queue: Array<WorkQueueItem> = [];
processWorkQueue(Nip7Queue);
@ -51,6 +50,14 @@ export class Nip7Signer implements EventSigner {
);
}
async nip44Encrypt(content: string, key: string): Promise<string> {
throw new Error("Method not implemented.");
}
async nip44Decrypt(content: string, otherKey: string): Promise<string> {
throw new Error("Method not implemented.");
}
async sign(ev: NostrEvent): Promise<NostrEvent> {
if (!window.nostr) {
throw new Error("Cannot use NIP-07 signer, not found!");