diff options
| author | fcked <enntheprogrammer@gmail.com> | 2023-03-13 18:29:24 +0100 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2023-03-13 16:23:33 -0300 |
| commit | a886b43b48d3e52441bf97e1aa0de39ac2560843 (patch) | |
| tree | c849470ebfed1d986fc9005238e9811a09c984e5 | |
| parent | b2c21ab10c06be0976a08920c07f5421d17c0654 (diff) | |
NIP-04 follow up: use new import in code sample
| -rw-r--r-- | 04.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -20,7 +20,7 @@ Code sample for generating such an event in JavaScript: | |||
| 20 | 20 | ||
| 21 | ```js | 21 | ```js |
| 22 | import crypto from 'crypto' | 22 | import crypto from 'crypto' |
| 23 | import * as secp from 'noble-secp256k1' | 23 | import * as secp from '@noble/secp256k1' |
| 24 | 24 | ||
| 25 | let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey) | 25 | let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey) |
| 26 | let sharedX = sharedPoint.slice(1, 33) | 26 | let sharedX = sharedPoint.slice(1, 33) |