Skip to content

Commit

Permalink
chore: require cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Nov 30, 2024
1 parent d87e5c4 commit b9744a4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 26 deletions.
14 changes: 7 additions & 7 deletions packages/key-utils/src/functions.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { randomBytes } from '@ethersproject/random'
// Do not change these require statements to imports before we change to ESM. Breaks external CJS packages depending on this module
const { bls12_381 } = require('@noble/curves/bls12-381')
const { ed25519 } = require('@noble/curves/ed25519')
const { p256 } = require('@noble/curves/p256')
const { p384 } = require('@noble/curves/p384')
const { p521 } = require('@noble/curves/p521')
const { secp256k1 } = require('@noble/curves/secp256k1')
const { sha256, sha384, sha512 } = require('@noble/hashes/sha2')
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 { generateRSAKeyAsPEM, hexToBase64, hexToPEM, PEMToJwk, privateKeyHexFromPEM } from '@sphereon/ssi-sdk-ext.x509-utils'
import { JoseCurve, JoseSignatureAlgorithm, JWK, JwkKeyType, Loggers } from '@sphereon/ssi-types'
import { generateKeyPair as generateSigningKeyPair } from '@stablelib/ed25519'
Expand Down
2 changes: 2 additions & 0 deletions packages/kms-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"@sphereon/ssi-sdk-ext.did-utils": "workspace:*",
"@sphereon/ssi-sdk-ext.key-utils": "workspace:*",
"@sphereon/ssi-sdk-ext.x509-utils": "workspace:*",
"@noble/curves": "^1.7.0",
"@noble/hashes": "^1.6.1",
"@trust/keyto": "2.0.0-alpha1",
"@veramo/core": "4.2.0",
"@veramo/key-manager": "4.2.0",
Expand Down
31 changes: 12 additions & 19 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b9744a4

Please sign in to comment.