Skip to content

Commit

Permalink
Add nostr support
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o committed Aug 12, 2024
1 parent eca6f2a commit 69f39c6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/lib/javascript/nostr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Npub, Relay } from "nostr-tools";

const relay = new Relay("wss://relay.damus.io");

relay.on("connect", () => {
console.log("Connected to relay");
});

relay.on("disconnect", () => {
console.log("Disconnected from relay");
});

const Npub = new Npub(relay);

export { Npub, Relay };

0 comments on commit 69f39c6

Please sign in to comment.