Skip to content

Commit 2eb61af

Browse files
fix(secp256k1): fix import of create-hmac
The import of `create-hmac` was changed from an ES module import to a CommonJS. This is required for compatibility with both tsx and Node.js 22. TICKET: WP-5599 TICKET: WP-5599
1 parent 18c1c5f commit 2eb61af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/secp256k1/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as createHmac from 'create-hmac';
21
import { ECPairAPI, ECPairFactory, ECPairInterface } from 'ecpair';
32
import * as necc from '@noble/secp256k1';
43
import { BIP32API, BIP32Factory, BIP32Interface } from 'bip32';
@@ -8,6 +7,7 @@ import * as baseCrypto from '@brandonblack/musig/base_crypto';
87
import { MuSig, MuSigFactory } from '@brandonblack/musig';
98

109
const createHash = require('create-hash');
10+
const createHmac = require('create-hmac');
1111

1212
necc.utils.sha256Sync = (...messages: Uint8Array[]): Uint8Array => {
1313
const sha256 = createHash('sha256');

0 commit comments

Comments
 (0)