Skip to main content

latest
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
23%
Published
a year ago (1.0.0)

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Generate an ed25519 keypair

As used in https://bogbook.com/

Depends on TweetNaCl to generate 25519 keypairs, encode them in base64, and save them in localStorage.

import { ed25519 } from './mod.js'

const keypair = await ed25519.keypair()
// QBkxvfsfy7/iM5/+3U2xzpIJk2iiMWXLSaWcvno9jRU=gw5GGOvMAbC48hUatHT55OSkzi1MBddYn5endgrSfBJAGTG9+x/Lv+Izn/7dTbHOkgmTaKIxZctJpZy+ej2NFQ==
const pubkey = await ed25519.pubkey()
// QBkxvfsfy7/iM5/+3U2xzpIJk2iiMWXLSaWcvno9jRU=
const privkey = await ed25519.privkey()
gw5GGOvMAbC48hUatHT55OSkzi1MBddYn5endgrSfBJAGTG9+x/Lv+Izn/7dTbHOkgmTaKIxZctJpZy+ej2NFQ==

await ed25519.deletekey()
// (localStorage.getItem('kepair') === undefined)

MIT

Add Package

deno add jsr:@bog/ed25519keys

Import symbol

import * as ed_____keys from "@bog/ed25519keys";

---- OR ----

Import directly with a jsr specifier

import * as ed_____keys from "jsr:@bog/ed25519keys";

Add Package

npx jsr add @bog/ed25519keys

Import symbol

import * as ed_____keys from "@bog/ed25519keys";

Add Package

yarn dlx jsr add @bog/ed25519keys

Import symbol

import * as ed_____keys from "@bog/ed25519keys";

Add Package

pnpm dlx jsr add @bog/ed25519keys

Import symbol

import * as ed_____keys from "@bog/ed25519keys";

Add Package

bunx jsr add @bog/ed25519keys

Import symbol

import * as ed_____keys from "@bog/ed25519keys";