mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
@@ -28,9 +28,9 @@ let pk = getPublicKey(sk) // `pk` is a hex string
|
|||||||
To get the secret key in hex format, use
|
To get the secret key in hex format, use
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { bytestohex, hexToBytes } from '@noble/hashes/utils' // already an installed dependency
|
import { bytesToHex, hexToBytes } from '@noble/hashes/utils' // already an installed dependency
|
||||||
|
|
||||||
let skHex = bytestohex(sk)
|
let skHex = bytesToHex(sk)
|
||||||
let backToBytes = hexToBytes(skHex)
|
let backToBytes = hexToBytes(skHex)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user