Skip to content

Commit 7251180

Browse files
Merge pull request #9 from blackcoffeexbt/update-examples
Updated examples
2 parents 4385747 + 128133b commit 7251180

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/Simple/Simple.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,11 @@ void setup() {
9191

9292
nostrRelayManager.connect();
9393

94-
String subscriptionString = "[\"REQ\", \"" + nostrRelayManager.getNewSubscriptionId() + "\", {\"authors\": [\"d0bfc94bd4324f7df2a7601c4177209828047c4d3904d64009a3c67fb5d5e7ca\"], \"kinds\": [1], \"limit\": 1}]";
95-
nostrRelayManager.enqueueMessage(subscriptionString.c_str());
96-
97-
subscriptionString = "[\"REQ\", \"" + nostrRelayManager.getNewSubscriptionId() + "\", {\"#p\": [\"d0bfc94bd4324f7df2a7601c4177209828047c4d3904d64009a3c67fb5d5e7ca\"], \"kinds\": [4], \"limit\": 1}]";
98-
nostrRelayManager.enqueueMessage(subscriptionString.c_str());
94+
// Send a basic note
95+
String noteString = nostr.getNote(nsecHex, npubHex, timestamp, "Running NIP01!");
96+
nostrRelayManager.enqueueMessage(noteString.c_str());
9997

98+
// send an encrypted dm to the defined npub
10099
subscriptionString = nostr.getEncryptedDm(nsecHex, npubHex, testRecipientPubKeyHex, timestamp, "Running NIP04!");
101100
nostrRelayManager.enqueueMessage(subscriptionString.c_str());
102101
}

0 commit comments

Comments
 (0)