### Browser
-nano25519 can be used directly on a webpage with a script module:
+`nano25519` can be used directly on a webpage. A regular import directly from a
+CDN URL works, and modern browsers make it even simpler with import maps:
```html
+<script type="importmap">
+ {
+ "imports": {
+ "nano25519": "https://unpkg.com/nano25519@1.0.8/dist/browser.js"
+ },
+ "integrity": {
+ "https://unpkg.com/nano25519@1.0.8/dist/browser.js": "sha512-8NozLMgdpZ2aM7BpDlekMIWsfF9pVq8fy1Gela2kBuP6DZmOd51NBxBZSbncxiDknW1EJYmu7Th3WYWhjgUygw=="
+ }
+ }
+</script>
<script type="module">
- (async () => {
- const nano25519 = await import("https://unpkg.com/nano25519@1.0.8");
- const { derive, sign, verify } = nano25519;
- })();
+ import { derive, sign, verify } from "nano25519";
</script>
```