Skip to content

Commit

Permalink
Initial Zap integration
Browse files Browse the repository at this point in the history
  • Loading branch information
223880 committed Nov 6, 2024
1 parent 0623de1 commit 955dd09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ The other main features Firebolt supports are as follows:
- [X] NWC (NDK)
- [x] Portal support (NFC)
- [x] Payjoin (React Native)
- [x] Zap
- [x] Ledger and Trezor
- [ ] Miniscript
- [ ] Zap
- [ ] BOLT12
- [ ] Beta App (Android - via APK) in 2025

Expand Down
11 changes: 9 additions & 2 deletions src/app/nostr/client.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { Keys, Client, Metadata, EventId, PublicKey, EventBuilder } = require("@nostr-dev-kit/ndk");
const { NDKEvent, NDKEventId, NostrEvent , Decode, Encode} = require("@nostr-dev-kit/ndk-types");

async function main() {
let keys = Keys.generate();
Expand Down Expand Up @@ -41,7 +42,13 @@ async function main() {
// Send custom event to all relays
await client.sendEvent(event);

// Zaps the client to the relay that sent the event
await client.zapToRelay(event);
await client.zappe(event);
await client.zapper(event);
await client.amount(event);


// Send custom event to a specific previously added relay
// await client.sendEventTo("wss://relay.damus.io", event);
}
main();
}main();

0 comments on commit 955dd09

Please sign in to comment.