mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
NIP-04 follow up: use new import in code sample
This commit is contained in:
parent
b2c21ab10c
commit
a886b43b48
2
04.md
2
04.md
|
@ -20,7 +20,7 @@ Code sample for generating such an event in JavaScript:
|
|||
|
||||
```js
|
||||
import crypto from 'crypto'
|
||||
import * as secp from 'noble-secp256k1'
|
||||
import * as secp from '@noble/secp256k1'
|
||||
|
||||
let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey)
|
||||
let sharedX = sharedPoint.slice(1, 33)
|
||||
|
|
Loading…
Reference in New Issue
Block a user