diff --git a/nip04.js b/nip04.js index 39c5d16..45a8360 100644 --- a/nip04.js +++ b/nip04.js @@ -1,6 +1,6 @@ import aes from 'browserify-cipher' import {Buffer} from 'buffer' -import randomBytes from 'randombytes' +import {randomBytes} from '@noble/hashes/utils' import * as secp256k1 from '@noble/secp256k1' export function encrypt(privkey, pubkey, text) { diff --git a/package.json b/package.json index db142b5..e6ea39e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "url": "https://github.com/fiatjaf/nostr-tools.git" }, "dependencies": { + "@noble/hashes": "^0.5.7", "@noble/secp256k1": "^1.3.0", "browserify-cipher": ">=1", "buffer": ">=5", @@ -14,7 +15,6 @@ "dns-packet": "^5.2.4", "micro-bip32": "^0.1.0", "micro-bip39": "^0.1.3", - "randombytes": ">=2", "websocket-polyfill": "^0.0.3" }, "keywords": [