X25519 adapter for WebAssembly and JS implementations
npm i @hazae41/x25519
- 100% TypeScript and ESM
- No external dependencies
https://github.com/tQsW/webcrypto-curve25519/blob/master/explainer.md
import { X25519 } from "@hazae41/x25519"
X25519.set(await X25519.fromNative())
npm i @hazae41/x25519.wasm
import { X25519 } from "@hazae41/x25519"
import { X25519Wasm } from "@hazae41/x25519.wasm"
await X25519Wasm.initBundled()
X25519.set(await X25519.fromNativeOrWasm(X25519Wasm))
npm i @noble/curves
import { X25519 } from "@hazae41/x25519"
import * as Ed25519Noble from "@noble/curves/ed25519"
X25519.set(await X25519.fromNativeOrNoble(Ed25519Noble))