mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-08-13 14:30:47 -04:00
NIP-04 follow up: use new import in code sample
This commit is contained in:
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)
|
||||
|
Reference in New Issue
Block a user