Why Nostr? What is Njump?
2023-03-09 03:23:23
in reply to

hcocoa on Nostr: 【如何判断消息是否成功发送至某个relay?】 ...

【如何判断消息是否成功发送至某个relay?】

由于网络或者其他各种原因,你可以会担心你的消息有没有最终发到relay(特别是付费relay)上。

这里有一个验证方法:

1. 在Damus上,点击消息右上角的三点,并选择 "复制此条推文JSON"。这将把推文的JSON复制到你的剪贴板上。其他客户端操作类似。

2. 打开https://websocketking.com/

3. 在WebSocket URL字段中输入relay的地址(例如wss://relay.damus.io/),然后点击Connect按钮。

4.等待连接的建立(显示Connected to wss://relay.damus.io/)。

5. 在UNTITLED 1 下面的文本框中,准确输入以下内容(区分大小写):

["EVENT",

6. 从你的剪贴板上粘贴之前复制的JSON。

7. 在最后结尾添加一个方括号:

]

8. 单击 "Send"按钮。

如果消息发布成功,你可以看到来自relay的响应,类似于。

["OK", "事件ID", true, ""]

["OK", "事件ID", true, "diplicate:"]。

如果不成功,你可以看到一个类似这样的响应。

["OK", "事件ID", false, " rejected: you are not worthy"]

以上方法来自流行的relay实现nostream的作者 ,他同时也运营着可能是历史最悠久的付费relay:eden.nostr.land。

PS.经过验证,我发现一个惊人的事实:我的网络根本就连不上eden.nostr.land……

#Relaynology
HOW TO TEST IF YOU (OR SOMEONE ELSE) CAN POST TO A RELAY

*You can use these steps to verify if you can post notes to a paid relay*

1. On Damus, Right-click/Long-tap on one of your notes (or someone else’s) and select "Copy Note JSON". This will copy the note to your clipboard.

2. Go to https://websocketking.com/

3. Type the address of the relay on the WebSocket URL field and click Connect button (e.g. wss://eden.nostr.land)

4. Wait for the connection to be established.

5. On the Payload field, type the following exactly (case sensitive):

["EVENT",

6. Paste from your clipboard.

7. Add a closing square bracket:

]

8. Click the Send button.



If you are able to post successfully you should see a response from the relay similar to:

["OK", "some event ID", true, ""]
or
["OK", "some event ID", true, "duplicate:"]

If unsuccessful, you should see a response like this:

["OK", "some event ID", false, "rejected: you are not worthy"]
Author Public Key
npub10kdu7536e3d5k09rgpktvfghkxu2zcx0q7skg33tckr7ssj00duqypfru0