From be3f4fd2c436b282a54be1649b35a04a39e7a1f0 Mon Sep 17 00:00:00 2001 From: Niels Klomp Date: Sat, 30 Nov 2024 21:21:07 +0100 Subject: [PATCH] chore: explicit extensions for noble as it exports both cjs and esm --- packages/key-utils/package.json | 1 - packages/key-utils/src/functions.ts | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/packages/key-utils/package.json b/packages/key-utils/package.json index 3998aab9..1dd1f19c 100644 --- a/packages/key-utils/package.json +++ b/packages/key-utils/package.json @@ -16,7 +16,6 @@ "@stablelib/ed25519": "^1.0.3", "@stablelib/sha256": "^1.0.1", "@stablelib/sha512": "^1.0.1", - "@noble/secp256k1": "^2.1.0", "@noble/curves": "^1.7.0", "@noble/hashes": "^1.6.1", "micro-rsa-dsa-dh": "^0.1.0", diff --git a/packages/key-utils/src/functions.ts b/packages/key-utils/src/functions.ts index e36ec018..c22c8303 100644 --- a/packages/key-utils/src/functions.ts +++ b/packages/key-utils/src/functions.ts @@ -1,11 +1,11 @@ import {randomBytes} from '@ethersproject/random' -import {bls12_381} from "@noble/curves/bls12-381"; -import {ed25519} from '@noble/curves/ed25519'; -import {p256} from '@noble/curves/p256'; -import {p384} from "@noble/curves/p384"; -import {p521} from "@noble/curves/p521"; -import {secp256k1} from '@noble/curves/secp256k1'; -import {sha256, sha384, sha512} from '@noble/hashes/sha2' +import {bls12_381} from "@noble/curves/bls12-381.js"; +import {ed25519} from '@noble/curves/ed25519.js'; +import {p256} from '@noble/curves/p256.js'; +import {p384} from "@noble/curves/p384.js"; +import {p521} from "@noble/curves/p521.js"; +import {secp256k1} from '@noble/curves/secp256k1.js'; +import {sha256, sha384, sha512} from '@noble/hashes/sha2.js' import { generateRSAKeyAsPEM, hexToBase64,