{"name":"ripple-keypairs","version":"0.10.1","license":"ISC","_id":"ripple-keypairs@0.10.1","maintainers":[{"name":"intelliot","email":"github.public@intelliot.com"},{"name":"shekenahglory","email":"matthew@ripple.com"},{"name":"geertweening","email":"geertweening@gmail.com"}],"homepage":"https://github.com/ripple/ripple-keypairs#readme","bugs":{"url":"https://github.com/ripple/ripple-keypairs/issues"},"dist":{"shasum":"ef796b519bb202682515e7cdd6063762636943e6","tarball":"http://registry-npm.ywwl.com/ripple-keypairs/download/ripple-keypairs-0.10.1.tgz","integrity":"sha512-kdCmFA/K7zkvyfSvmMF53SZ60p6ejY5v2Y6fWPkWdVTjpiPx83k3v5SuGBUuatbcG+7r4AwAX87L3VKN2YOIXg==","signatures":[{"sig":"MEUCIQDoojYTDcOvmf+X1VRcNieIo8I6UGe7FQhHYpAkEoPFAQIgTf127oVV5iSuQJk923PfzmxfEc635/xiQASYe/ty3cU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":80777,"noattachment":false,"key":"/ripple-keypairs/-/ripple-keypairs-0.10.1.tgz"},"main":"distrib/npm/","_from":".","files":["distrib/npm/*","bin/*","build/*","test/*"],"_shasum":"ef796b519bb202682515e7cdd6063762636943e6","engines":{"node":">=0.12.0"},"gitHead":"42e7a8a99c4c26979b3bb2910b1b94b9d930540c","scripts":{"lint":"if ! [ -f eslintrc ]; then curl -o eslintrc 'https://raw.githubusercontent.com/ripple/javascript-style-guide/es6/eslintrc'; echo 'parser: babel-eslint' >> eslintrc; fi; eslint -c eslintrc src/*.js test/*.js","test":"istanbul test _mocha","build":"gulp","codecov":"cat ./coverage/coverage.json | ./node_modules/codecov.io/bin/codecov.io.js","compile":"babel --optional runtime -d distrib/npm/ src/","prepublish":"npm test && npm run lint && npm run compile","compile-with-source-maps":"babel --optional runtime -s -t -d distrib/npm/ src/"},"_npmUser":{"name":"intelliot","email":"github.public@intelliot.com"},"repository":{"url":"git://github.com/ripple/ripple-keypairs.git","type":"git"},"_npmVersion":"3.10.10","description":"ripple key pairs","directories":{"test":"test"},"_nodeVersion":"6.11.5","dependencies":{"bn.js":"^3.1.1","brorand":"^1.0.5","hash.js":"^1.0.3","elliptic":"^5.1.0","babel-runtime":"^5.8.20","ripple-address-codec":"^2.0.1"},"devDependencies":{"nock":"^2.13.0","babel":"^5.8.20","mocha":"~2.3.3","eslint":"2.7.0","lodash":"^3.10.0","istanbul":"~0.3.5","coveralls":"~2.11.4","babel-core":"^5.8.20","codecov.io":"^0.1.6","map-stream":"~0.1.0","ripple-lib":"^0.17.0","assert-diff":"^1.0.1","babel-eslint":"^6.0.0","babel-loader":"^5.3.2","eventemitter2":"^0.4.14"},"_npmOperationalInternal":{"tmp":"tmp/ripple-keypairs-0.10.1.tgz_1510355192740_0.864452461944893","host":"s3://npm-registry-packages"},"readme":"# ripple-keypairs [![NPM](https://img.shields.io/npm/v/ripple-keypairs.svg)](https://npmjs.org/package/ripple-keypairs) [![Build Status](https://img.shields.io/travis/ripple/ripple-keypairs/master.svg)](https://travis-ci.org/ripple/ripple-keypairs) ![Codecov](https://img.shields.io/codecov/c/github/ripple/ripple-keypairs)\n\nAn implementation of XRP Ledger keypairs & wallet generation using\n[elliptic](https://github.com/indutny/elliptic) which supports rfc6979 and\neddsa deterministic signatures.\n\n[![NPM](https://nodei.co/npm/ripple-keypairs.png)](https://www.npmjs.org/package/ripple-keypairs)\n\n## API Methods\n\n```\ngenerateSeed({entropy?: Array<integer>, algorithm?: string}) -> string\n```\nGenerate a seed that can be used to generate keypairs. Entropy can be provided as an array of bytes expressed as integers in the range 0-255. If provided, it must be 16 bytes long (additional bytes are ignored). If not provided, entropy will be automatically generated. The \"algorithm\" defaults to \"ecdsa-secp256k1\", but can also be set to \"ed25519\". The result is a seed encoded in base58, starting with \"s\".\n\n```\nderiveKeypair(seed: string) -> {privateKey: string, publicKey: string}\n```\nDerive a public and private key from a seed. The keys are represented as 33-byte hexadecimal strings.\n\n```\nsign(messageHex: string, privateKey: string) -> string\n```\nSign an arbitrary hex-encoded message with a private key. Returns the signature as a hexadecimal string.\n\n```\nverify(messageHex: string, signature: string, publicKey: string) -> boolean\n```\nVerify a signature for a given hex-encoded message and public key. Returns true if the signature is valid, false otherwise.\n\n```\nderiveAddress(publicKey: string) -> string\n```\nDerive an XRP Ledger classic address from a public key.\n\n```\nderiveNodeAddress(publicKey: string) -> string\n```\nDerive a node address from a public key.\n\n\n## Generate a random XRP Ledger address\n\n```\nconst seed = generateSeed();\nconst keypair = deriveKeypair(seed);\nconst address = deriveAddress(keypair.publicKey);\n```\n","publish_time":1510355192884,"_cnpm_publish_time":1510355192884,"dist-tags":{"beta":"2.0.0-beta.1","entropy-2.x-experimental":"1.4.0","entropy-4.x-experimental":"2.1.0","latest":"3.1.0","storm":"1.0.4-storm.2"}}