ed25519-sigs v0.1.7
ed25519-sigs
Fast Ed25519 signatures for node and the browser
Uses and is compatible with the OpenSSH key format (from openSSH 6.5+).
Usage
API
- add
- sign(message)
verify (message, signature, pubKey)
interface KeyPair:
generate
- toJSON
- fromJSON
Contributing
Development
- Install Node 8 or later. You can use the package manager of your choice. Tests need to pass in Node 8 and 10.
- Clone this repository.
- Run
npm ci
to install the dependencies. - Run
npm start
to start the badge server and the frontend dev server. - Open
http://localhost:3000/
to view the frontend.
When server source files change, the badge server should automatically restart
itself (using nodemon). When the frontend files change, the frontend dev
server (gatsby dev
) should also automatically reload. However the ed25519 signature
definitions are built only before the server first starts. To regenerate those,
either run npm run defs
or manually restart the server.
To debug a badge from the command line, run npm run badge -- /npm/v/nock
.
It also works with full URLs like
npm run badge -- https://img.shields.io/npm/v/nock
.
Use npm run debug:server
to start server in debug mode.
This recipe shows how to debug Node.js application in VS Code.
Ed25519-sigs has experimental support for Gitpod, a pre-configured development environment that runs in your browser. To use Gitpod, click the button below and sign in with GitHub. Gitpod also offers a browser add-on, though it is not required. Please report any Gitpod bugs, questions, or suggestions in issue #2772.
Snapshot tests ensure we don't inadvertently make changes that affect the
SVG or JSON output. When deliberately changing the output, run
SNAPSHOT_DRY=1 npm run test:js:server
to preview changes to the saved
snapshots, and SNAPSHOT_UPDATE=1 npm run test:js:server
to update them.
Related projects
License
All assets and code are under the MIT LICENSE and in the public domain unless specified otherwise.
The assets in logo/
are trademarks of their respective companies and are
under their terms and license.
Contributors
This project exists thanks to all the people who contribute. [Contribute].
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]