# @types/ed2curve

> TypeScript definitions for ed2curve

Latest version **0.2.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/ed2curve
pnpm add @types/ed2curve
yarn add @types/ed2curve
bun add @types/ed2curve
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2023-11-07 |
| First published | 2018-01-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/ed2curve
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ed2curve
- npm.io page: https://npm.io/package/@types/ed2curve

## Dependencies (1)

- [tweetnacl](https://npm.io/package/tweetnacl.md) ^1.0.0

## Recent versions

- 0.2.4 (latest) — 2023-11-07
- 0.2.2 (ts2.6) — 2018-02-10
- 0.2.3 — 2023-10-18
- 0.2.1 — 2018-02-01
- 0.2.0 — 2018-01-31

## README

# Installation
> `npm install --save @types/ed2curve`

# Summary
This package contains type definitions for ed2curve (https://github.com/dchest/ed2curve-js).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ed2curve.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ed2curve/index.d.ts)
````ts
import { BoxKeyPair, SignKeyPair } from "tweetnacl";

export as namespace ed2curve;

/**
 * Converts Ed25519 public key to Curve25519 public key.
 * montgomeryX = (edwardsY + 1)*inverse(1 - edwardsY) mod p
 */
export function convertPublicKey(publicKey: SignKeyPair["publicKey"]): BoxKeyPair["publicKey"] | null;

/** Converts Ed25519 secret key to Curve25519 secret key. */
export function convertSecretKey(secretKey: SignKeyPair["secretKey"]): BoxKeyPair["secretKey"];

/** Converts Ed25519 key pair to Curve25519 key pair. */
export function convertKeyPair(keyPair: SignKeyPair): BoxKeyPair | null;

````

### Additional Details
 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
 * Dependencies: [tweetnacl](https://npmjs.com/package/tweetnacl)

# Credits
These definitions were written by [Florian Keller](https://github.com/ffflorian).

---
_Source: https://npm.io/package/@types/ed2curve · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
