@@ -33,14 +33,13 @@ on one of [the supported bundlers](#browser-usage) is too high.
3333 * [ secp256k1-compat: compatibility layer with other libraries] ( #secp256k1-compat-compatibility-layer-with-other-libraries )
3434 * [ All imports] ( #all-imports )
3535* [ Caveats] ( #caveats )
36+ * [ Browser usage: Rollup setup] ( #browser-usage-rollup-setup )
3637 * [ AES] ( #aes )
3738 * [ Encrypting with passwords] ( #encrypting-with-passwords )
3839 * [ Operation modes] ( #operation-modes )
3940 * [ Padding plaintext messages] ( #padding-plaintext-messages )
4041 * [ How to use the IV parameter] ( #how-to-use-the-iv-parameter )
4142 * [ How to handle errors with this module] ( #how-to-handle-errors-with-this-module )
42- * [ Browser usage] ( #browser-usage )
43- * [ Rollup setup] ( #rollup-setup )
4443* [ Upgrading] ( #upgrading )
4544 * [ Changelog] ( #changelog )
4645 * [ From v2 to v3] ( #from-v2-to-v3 )
@@ -335,6 +334,25 @@ import { hexToBytes, toHex, utf8ToBytes } from "ethereum-cryptography/utils.js";
335334
336335## Caveats
337336
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+
338356### AES
339357
340358#### Encrypting with passwords
@@ -399,35 +417,13 @@ Note that implementing this can mean catching all errors that can be thrown
399417when calling on of this module's functions, and just throwing a new generic
400418exception.
401419
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-
424420## Upgrading
425421
426422### Changelog
427423
428424* v3.0 (Sep 2024): new modules ` bls ` , ` bn ` , ` math `
429425change 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 )
431427* v2.0 (Apr 2023): switched
432428[ noble-secp256k1] ( https://github.com/paulmillr/noble-secp256k1 ) to
433429[ noble-curves] ( https://github.com/paulmillr/noble-curves ) ,
0 commit comments