summaryrefslogtreecommitdiff
path: root/shim/ws-shim/src/nostr.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shim/ws-shim/src/nostr.ts')
-rw-r--r--shim/ws-shim/src/nostr.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/shim/ws-shim/src/nostr.ts b/shim/ws-shim/src/nostr.ts
index 0b084b6..b123bc8 100644
--- a/shim/ws-shim/src/nostr.ts
+++ b/shim/ws-shim/src/nostr.ts
@@ -1,4 +1,4 @@
-import { finalizeEvent, validateEvent, verifyEvent } from "nostr-tools";
+import { finalizeEvent, nip19, validateEvent, verifyEvent } from "nostr-tools";
import type { NostrEvent } from "./types";
import { hexToBytes } from "nostr-tools/utils";
@@ -22,3 +22,9 @@ export function validate(event: NostrEvent) {
console.log("is verified?", ok2);
return ok && ok2;
}
+
+export function checkPubkey(pubkey: string): boolean {
+ const npub = nip19.npubEncode(pubkey);
+ console.log({ npub, hex: pubkey });
+ return false;
+}