mirror of
https://github.com/edufeed-org/nips.git
synced 2025-12-10 00:34:32 +00:00
NIP-04 follow up: use new import in code sample
This commit is contained in:
parent
b2c21ab10c
commit
a886b43b48
1 changed files with 1 additions and 1 deletions
2
04.md
2
04.md
|
|
@ -20,7 +20,7 @@ Code sample for generating such an event in JavaScript:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import crypto from 'crypto'
|
import crypto from 'crypto'
|
||||||
import * as secp from 'noble-secp256k1'
|
import * as secp from '@noble/secp256k1'
|
||||||
|
|
||||||
let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey)
|
let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey)
|
||||||
let sharedX = sharedPoint.slice(1, 33)
|
let sharedX = sharedPoint.slice(1, 33)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue