upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/04.md
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2023-02-13 08:42:47 -0300
committerGitHub <noreply@github.com>2023-02-13 08:42:47 -0300
commita85067ec68f73ad72780dd2fba445bcaa1f5cba3 (patch)
treeb55736d9ea30bca59ef73db461cf8aaf87bb1bb1 /04.md
parente91f8f22216a6a7059d5cb8670bb7a93693caa04 (diff)
parent17ffd3ee4efa33c3f6abb4304d1c4dd998efc523 (diff)
Merge branch 'master' into longform
Diffstat (limited to '04.md')
-rw-r--r--04.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/04.md b/04.md
index 723bd70..0ebcddb 100644
--- a/04.md
+++ b/04.md
@@ -14,6 +14,8 @@ A special event with kind `4`, meaning "encrypted direct message". It is suppose
14 14
15**`tags`** MAY contain an entry identifying the previous message in a conversation or a message we are explicitly replying to (such that contextual, more organized conversations may happen), in the form `["e", "<event_id>"]`. 15**`tags`** MAY contain an entry identifying the previous message in a conversation or a message we are explicitly replying to (such that contextual, more organized conversations may happen), in the form `["e", "<event_id>"]`.
16 16
17**Note**: By default in the [libsecp256k1](https://github.com/bitcoin-core/secp256k1) ECDH implementation, the secret is the SHA256 hash of the shared point (both X and Y coorinates). In Nostr, only the X coordinate of the shared point is used as the secret and it is NOT hashed. If using libsecp256k1, a custom function that copies the X coordinate must be passed as the `hashfp` argument in `secp256k1_ecdh`. See [here](https://github.com/bitcoin-core/secp256k1/blob/master/src/modules/ecdh/main_impl.h#L29).
18
17Code sample for generating such an event in JavaScript: 19Code sample for generating such an event in JavaScript:
18 20
19```js 21```js