Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jul 26, 2023
1 parent 257ba6a commit 5a6c97e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import * as secp from '@noble/secp256k1';
})();
```

Additional steps needed for some environments:
Additional polyfills for some environments:

```ts
// 1. Enable synchronous methods.
Expand All @@ -68,7 +68,7 @@ secp.etc.hmacSha256Sync = (k, ...m) => hmac(sha256, k, secp.etc.concatBytes(...m
// Sync methods can be used now:
// secp.sign(msgHash, privKey);

// 2. node.js 18 and earlier, needs globalThis.crypto polyfill
// 2. node.js 18 and earlier, requires polyfilling globalThis.crypto
import { webcrypto } from 'node:crypto';
// @ts-ignore
if (!globalThis.crypto) globalThis.crypto = webcrypto;
Expand Down

0 comments on commit 5a6c97e

Please sign in to comment.