Skip to content

Commit 507a3a2

Browse files
committed
readme
1 parent 8ba2b05 commit 507a3a2

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

Diff for: README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ on one of [the supported bundlers](#browser-usage) is too high.
2828
* [aes: encryption](#aes-encryption)
2929
* [hdkey: bip32 HD wallets](#hdkey-bip32-hd-wallets)
3030
* [bip39: mnemonic phrases](#bip39-mnemonic-phrases)
31+
* [math: utilities](#math-utilities)
32+
* [utils: generic utilities](#utils-generic-utilities)
3133
* [secp256k1-compat: compatibility layer with other libraries](#secp256k1-compat-compatibility-layer-with-other-libraries)
3234
* [All imports](#all-imports)
3335
* [Caveats](#caveats)
@@ -271,6 +273,20 @@ recovery phrases according to [BIP39](https://github.com/bitcoin/bips/blob/maste
271273
Wordlists for different languages are not imported by default,
272274
as that would increase bundle sizes too much. Instead, you should import and use them explicitly.
273275

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+
274290
### secp256k1-compat: compatibility layer with other libraries
275291

276292
```js
@@ -313,6 +329,7 @@ import { HDKey } from "ethereum-cryptography/hdkey.js";
313329
import { generateMnemonic } from "ethereum-cryptography/bip39/index.js";
314330
import { wordlist } from "ethereum-cryptography/bip39/wordlists/english.js";
315331

332+
import { modPow, modInvert } from "ethereum-cryptography/math.js";
316333
import { hexToBytes, toHex, utf8ToBytes } from "ethereum-cryptography/utils.js";
317334
```
318335

@@ -408,7 +425,9 @@ These can be used by setting your `plugins` array like this:
408425

409426
### Changelog
410427

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`
412431
* v2.0 (Apr 2023): switched
413432
[noble-secp256k1](https://github.com/paulmillr/noble-secp256k1) to
414433
[noble-curves](https://github.com/paulmillr/noble-curves),

0 commit comments

Comments
 (0)