diff --git a/jsr.json b/jsr.json index 0883983..9b7c76a 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@nostr/tools", - "version": "2.20.0", + "version": "2.21.0", "exports": { ".": "./index.ts", "./core": "./core.ts", diff --git a/nip04.ts b/nip04.ts index 549b173..73b2a0b 100644 --- a/nip04.ts +++ b/nip04.ts @@ -1,6 +1,6 @@ -import { bytesToHex, hexToBytes, randomBytes } from '@noble/hashes/utils.js' +import { hexToBytes, randomBytes } from '@noble/hashes/utils.js' import { secp256k1 } from '@noble/curves/secp256k1.js' -import { cbc } from '@noble/ciphers/aes' +import { cbc } from '@noble/ciphers/aes.js' import { base64 } from '@scure/base' import { utf8Decoder, utf8Encoder } from './utils.ts' diff --git a/nip44.ts b/nip44.ts index 8b439e7..6325edf 100644 --- a/nip44.ts +++ b/nip44.ts @@ -1,5 +1,5 @@ -import { chacha20 } from '@noble/ciphers/chacha' -import { equalBytes } from '@noble/ciphers/utils' +import { chacha20 } from '@noble/ciphers/chacha.js' +import { equalBytes } from '@noble/ciphers/utils.js' import { secp256k1 } from '@noble/curves/secp256k1.js' import { extract as hkdf_extract, expand as hkdf_expand } from '@noble/hashes/hkdf.js' import { hmac } from '@noble/hashes/hmac.js' diff --git a/nip49.ts b/nip49.ts index 09728a6..5a337a7 100644 --- a/nip49.ts +++ b/nip49.ts @@ -1,8 +1,8 @@ +import { bech32 } from '@scure/base' import { scrypt } from '@noble/hashes/scrypt.js' -import { xchacha20poly1305 } from '@noble/ciphers/chacha' +import { xchacha20poly1305 } from '@noble/ciphers/chacha.js' import { concatBytes, randomBytes } from '@noble/hashes/utils.js' import { Bech32MaxSize, Ncryptsec, encodeBytes } from './nip19.ts' -import { bech32 } from '@scure/base' export function encrypt( sec: Uint8Array, diff --git a/nip77.ts b/nip77.ts index 58ece6c..4231b1e 100644 --- a/nip77.ts +++ b/nip77.ts @@ -1,4 +1,4 @@ -import { bytesToHex, hexToBytes } from '@noble/ciphers/utils' +import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js' import { Filter } from './filter.ts' import { AbstractRelay, Subscription } from './relay.ts' import { sha256 } from '@noble/hashes/sha2.js' diff --git a/package.json b/package.json index c981101..13d8e51 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "nostr-tools", - "version": "2.20.0", + "version": "2.21.0", "description": "Tools for making a Nostr client.", "repository": { "type": "git", @@ -236,12 +236,12 @@ }, "license": "Unlicense", "dependencies": { - "@noble/ciphers": "^0.5.1", + "@noble/ciphers": "^2.1.1", "@noble/curves": "^2.0.1", "@noble/hashes": "^2.0.1", - "@scure/base": "1.1.1", - "@scure/bip32": "1.3.1", - "@scure/bip39": "1.2.1", + "@scure/base": "^2.0.0", + "@scure/bip32": "^2.0.1", + "@scure/bip39": "^2.0.1", "nostr-wasm": "0.1.0" }, "peerDependencies": {