# key-did-provider-ed25519

> This is a DID Provider which implements [EIP2844](https://eips.ethereum.org/EIPS/eip-2844) for `did:key:` using ed25519. It also supports decryption using x25519.

Latest version **4.0.2** (published 2024-01-04) · (Apache-2.0 OR MIT) license · 0 weekly downloads

## Install

```sh
npm install key-did-provider-ed25519
pnpm add key-did-provider-ed25519
yarn add key-did-provider-ed25519
bun add key-did-provider-ed25519
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.2 |
| Published | 2024-01-04 |
| First published | 2020-11-09 |
| Weekly downloads | 0 |
| License | (Apache-2.0 OR MIT) |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14.14 |
| Dependencies | 6 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 103 |
| Author | Joel Thorstensson |
| Maintainers | dav1do, ceramic-velvetshark, cb3box, jpham2023, npm.3box, smrz2001, oed, paul_lecam, stbrody, ukstv, dbcfd |
| Keywords | DID, identity, did-provider, self-sovereign |

## Links

- npm: https://www.npmjs.com/package/key-did-provider-ed25519
- Repository: https://github.com/ceramicnetwork/js-did
- Homepage: https://github.com/ceramicnetwork/js-did#readme
- Issues: https://github.com/ceramicnetwork/js-did/issues
- npm.io page: https://npm.io/package/key-did-provider-ed25519

## Dependencies (6)

- [dids](https://npm.io/package/dids.md) ^5.0.2
- [did-jwt](https://npm.io/package/did-jwt.md) ^7.4.7
- [rpc-utils](https://npm.io/package/rpc-utils.md) ^0.6.2
- [uint8arrays](https://npm.io/package/uint8arrays.md) ^5.0.1
- [@noble/curves](https://npm.io/package/@noble/curves.md) ^1.3.0
- [fast-json-stable-stringify](https://npm.io/package/fast-json-stable-stringify.md) ^2.1.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 4.0.2 (latest) — 2024-01-04
- 3.0.3-next.0 (next) — 2023-10-27
- 4.0.0 — 2024-01-04
- 3.0.2 — 2023-08-14
- 3.0.1 — 2023-04-20
- 3.0.0 — 2023-02-24
- 2.0.1 — 2022-07-13
- 2.0.0 — 2022-04-19
- 2.0.0-rc.0 — 2022-04-18
- 2.0.0-alpha.1 — 2022-03-24
- 2.0.0-alpha.0 — 2021-12-28
- 1.1.0 — 2021-04-20
- 1.0.2 — 2021-04-09
- 1.0.1 — 2021-03-11
- 1.0.0 — 2020-11-25
- … 6 more at https://npm.io/package/key-did-provider-ed25519/versions

## README

# ed25519 key did provider
This is a DID Provider which implements [EIP2844](https://eips.ethereum.org/EIPS/eip-2844) for `did:key:` using ed25519. It also supports decryption using x25519.

## Installation

```
npm install --save key-did-provider-ed25519
```

## Usage

```js
import { Ed25519Provider } from 'key-did-provider-ed25519'
import KeyResolver from 'key-did-resolver'
import { DID } from 'dids'

const seed = new Uint8Array(...) //  32 bytes with high entropy
const provider = new Ed25519Provider(seed)
const did = new DID({ provider, resolver: KeyResolver.getResolver() })
await did.authenticate()

// log the DID
console.log(did.id)

// create JWS
const { jws, linkedBlock } = await did.createDagJWS({ hello: 'world' })

// verify JWS
await did.verifyJWS(jws)

// create JWE
const jwe = await did.createDagJWE({ very: 'secret' }, [did.id])

// decrypt JWE
const decrypted = await did.decryptDagJWE(jwe)
```

## License

Apache-2.0 OR MIT

---
_Source: https://npm.io/package/key-did-provider-ed25519 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
