@@ -28,6 +28,8 @@ on one of [the supported bundlers](#browser-usage) is too high.
28
28
* [ aes: encryption] ( #aes-encryption )
29
29
* [ hdkey: bip32 HD wallets] ( #hdkey-bip32-hd-wallets )
30
30
* [ bip39: mnemonic phrases] ( #bip39-mnemonic-phrases )
31
+ * [ math: utilities] ( #math-utilities )
32
+ * [ utils: generic utilities] ( #utils-generic-utilities )
31
33
* [ secp256k1-compat: compatibility layer with other libraries] ( #secp256k1-compat-compatibility-layer-with-other-libraries )
32
34
* [ All imports] ( #all-imports )
33
35
* [ Caveats] ( #caveats )
@@ -271,6 +273,20 @@ recovery phrases according to [BIP39](https://github.com/bitcoin/bips/blob/maste
271
273
Wordlists for different languages are not imported by default,
272
274
as that would increase bundle sizes too much. Instead, you should import and use them explicitly.
273
275
276
+ ### math: utilities
277
+
278
+ ``` js
279
+ import { modPow , modInvert } from " ethereum-cryptography/math.js" ;
280
+ modPow (123n , 456n , 789n );
281
+ modInvert (22n , 5n );
282
+ ```
283
+
284
+ ### utils: generic utilities
285
+
286
+ ``` js
287
+ import { hexToBytes , toHex , utf8ToBytes } from " ethereum-cryptography/utils.js" ;
288
+ ```
289
+
274
290
### secp256k1-compat: compatibility layer with other libraries
275
291
276
292
``` js
@@ -313,6 +329,7 @@ import { HDKey } from "ethereum-cryptography/hdkey.js";
313
329
import { generateMnemonic } from " ethereum-cryptography/bip39/index.js" ;
314
330
import { wordlist } from " ethereum-cryptography/bip39/wordlists/english.js" ;
315
331
332
+ import { modPow , modInvert } from " ethereum-cryptography/math.js" ;
316
333
import { hexToBytes , toHex , utf8ToBytes } from " ethereum-cryptography/utils.js" ;
317
334
```
318
335
@@ -408,7 +425,9 @@ These can be used by setting your `plugins` array like this:
408
425
409
426
### Changelog
410
427
411
- * v3.0 (Sep 2024):
428
+ * v3.0 (Sep 2024): new modules ` bls ` , ` bn ` , ` math `
429
+ change async AES to non-native sync,
430
+ improve typescript compatibility, new dependency ` noble-ciphers `
412
431
* v2.0 (Apr 2023): switched
413
432
[ noble-secp256k1] ( https://github.com/paulmillr/noble-secp256k1 ) to
414
433
[ noble-curves] ( https://github.com/paulmillr/noble-curves ) ,
0 commit comments