New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eris-keys

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eris-keys

a JavaScript client library for eris-keys

  • 0.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23
decreased by-28.12%
Maintainers
1
Weekly downloads
 
Created
Source

This is a JavaScript client library to facilitate interaction with an Eris Keys server.

Note: Eris Keys does not expose an interface to get private keys.

Installation

$ npm install eris-keys

Usage

First start a key server:

$ eris services start keys --publish

'use strict'

const assert = require('assert')
const keys = require('../../lib')

describe('a client for eris-keys', function () {
  it('generates a key, signs a message, and verifies the signature',
    function () {
      this.timeout(10 * 1000)

      // Connect to the key server.
      return keys.serviceUrl('services', 'keys', 4767).then((url) => {
        const server = keys.connect(url)

        // Generate a new key pair.
        return server.generateKeyPair().then((keyPairId) => {
          const message = 'a message in a bottle'

          return Promise.all([
            // Get the public key of the key pair.
            server.publicKeyFor(keyPairId),

            // Sign the message.
            server.sign(message, keyPairId)
          ]).then(([publicKey, signature]) =>
            server.verifySignature(message, signature, publicKey)
              .then((valid) => {
                assert(valid)
              })
          )
        })
      })
    })
})

Documentation

You can generate documentation in the doc subdirectory with the command npm run doc.

Copyright 2016 Monax

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Keywords

FAQs

Package last updated on 13 Jan 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc