@@ -33,14 +33,13 @@ on one of [the supported bundlers](#browser-usage) is too high.
33
33
* [ secp256k1-compat: compatibility layer with other libraries] ( #secp256k1-compat-compatibility-layer-with-other-libraries )
34
34
* [ All imports] ( #all-imports )
35
35
* [ Caveats] ( #caveats )
36
+ * [ Browser usage: Rollup setup] ( #browser-usage-rollup-setup )
36
37
* [ AES] ( #aes )
37
38
* [ Encrypting with passwords] ( #encrypting-with-passwords )
38
39
* [ Operation modes] ( #operation-modes )
39
40
* [ Padding plaintext messages] ( #padding-plaintext-messages )
40
41
* [ How to use the IV parameter] ( #how-to-use-the-iv-parameter )
41
42
* [ How to handle errors with this module] ( #how-to-handle-errors-with-this-module )
42
- * [ Browser usage] ( #browser-usage )
43
- * [ Rollup setup] ( #rollup-setup )
44
43
* [ Upgrading] ( #upgrading )
45
44
* [ Changelog] ( #changelog )
46
45
* [ From v2 to v3] ( #from-v2-to-v3 )
@@ -335,6 +334,25 @@ import { hexToBytes, toHex, utf8ToBytes } from "ethereum-cryptography/utils.js";
335
334
336
335
## Caveats
337
336
337
+ ### Browser usage: Rollup setup
338
+
339
+ Using this library with Rollup requires the following plugins:
340
+
341
+ * [ ` @rollup/plugin-commonjs ` ] ( https://www.npmjs.com/package/@rollup/plugin-commonjs )
342
+ * [ ` @rollup/plugin-node-resolve ` ] ( https://www.npmjs.com/package/@rollup/plugin-node-resolve )
343
+
344
+ These can be used by setting your ` plugins ` array like this:
345
+
346
+ ``` js
347
+ plugins: [
348
+ commonjs (),
349
+ resolve ({
350
+ browser: true ,
351
+ preferBuiltins: false ,
352
+ }),
353
+ ]
354
+ ```
355
+
338
356
### AES
339
357
340
358
#### Encrypting with passwords
@@ -399,35 +417,13 @@ Note that implementing this can mean catching all errors that can be thrown
399
417
when calling on of this module's functions, and just throwing a new generic
400
418
exception.
401
419
402
- ## Browser usage
403
-
404
- ### Rollup setup
405
-
406
- Using this library with Rollup requires the following plugins:
407
-
408
- * [ ` @rollup/plugin-commonjs ` ] ( https://www.npmjs.com/package/@rollup/plugin-commonjs )
409
- * [ ` @rollup/plugin-node-resolve ` ] ( https://www.npmjs.com/package/@rollup/plugin-node-resolve )
410
-
411
- These can be used by setting your ` plugins ` array like this:
412
-
413
- ``` js
414
- plugins: [
415
- commonjs (),
416
- resolve ({
417
- browser: true ,
418
- preferBuiltins: false ,
419
- }),
420
- ]
421
- ```
422
-
423
-
424
420
## Upgrading
425
421
426
422
### Changelog
427
423
428
424
* v3.0 (Sep 2024): new modules ` bls ` , ` bn ` , ` math `
429
425
change async AES to non-native sync,
430
- improve typescript compatibility, new dependency ` noble-ciphers `
426
+ improve typescript compatibility, new dependency [ noble-ciphers] ( https://github.com/paulmillr/noble-ciphers )
431
427
* v2.0 (Apr 2023): switched
432
428
[ noble-secp256k1] ( https://github.com/paulmillr/noble-secp256k1 ) to
433
429
[ noble-curves] ( https://github.com/paulmillr/noble-curves ) ,
0 commit comments