Skip to content

Commit 655483c

Browse files
committed
fix import of new nobel dep
1 parent 17a118e commit 655483c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/chat/keys.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as debug from '../debug'
2-
import { schnorr } from '@noble/curves/secp256k1'
3-
import { bytesToHex } from '@noble/hashes/utils'
2+
import { schnorr } from '@noble/curves/secp256k1.js'
3+
import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js'
44
import * as ns from '../ns'
55
import { store } from 'solid-logic'
66
import { NamedNode } from 'rdflib'
@@ -9,11 +9,11 @@ import { getExistingPublicKey, pubKeyUrl, privKeyUrl, getExistingPrivateKey } fr
99
import { setAcl, keyContainerAclBody, keyAclBody } from '../utils/keyHelpers/acl'
1010

1111
export function generatePrivateKey (): string {
12-
return bytesToHex(schnorr.utils.randomPrivateKey())
12+
return bytesToHex(schnorr.utils.randomSecretKey())
1313
}
1414

1515
export function generatePublicKey (privateKey: string): string {
16-
return bytesToHex(schnorr.getPublicKey(privateKey))
16+
return bytesToHex(schnorr.getPublicKey(hexToBytes(privateKey)))
1717
}
1818

1919
/**

0 commit comments

Comments
 (0)