Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@types/ed25519
Advanced tools
TypeScript definitions for ed25519
npm install --save @types/ed25519
This package contains type definitions for ed25519 (https://github.com/dazoe/ed25519).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ed25519.
// Main site: https://ed25519.cr.yp.to/
// Manually generated and maintained because the package is a
// veneer on an underlying C library; auto-generation won't work.
// The JavaScript-C interface is well described at
// https://github.com/dazoe/ed25519/blob/master/src/ed25519.cc
/// <reference types="node" />
/** The key material returned from a call to MakeKeypair(). */
export interface CurveKeyPair {
/**
* A Buffer containing the public portion of the Curve25519 key.
*/
publicKey: Buffer;
/**
* A Buffer containing the private, secret portion of the Curve25519 key.
*/
privateKey: Buffer;
}
/**
* Uses the crytpographically strong random seed to generate a
* Curve25519 key pair.
* @return The public and private key pair.
*/
export function MakeKeypair(seed: Buffer): CurveKeyPair;
/**
* Signs a plaintext message buffer using the private key generated using
* MakeKeypair().
* @return The signature calculated on the plaintext.
*/
export function Sign(message: Buffer, privateKeyOrKeyPair: Buffer | CurveKeyPair): Buffer;
/**
* Verifies a signature for a message buffer using a
* public key generated using MakeKeypair().
* @return True if the signature validates correctly, false otherwise.
*/
export function Verify(message: Buffer, signature: Buffer, publicKey: Buffer): boolean;
These definitions were written by .
FAQs
TypeScript definitions for ed25519
The npm package @types/ed25519 receives a total of 100 weekly downloads. As such, @types/ed25519 popularity was classified as not popular.
We found that @types/ed25519 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.