{"name":"ripple-keypairs","version":"1.2.0","license":"ISC","_id":"ripple-keypairs@1.2.0","maintainers":[{"name":"shekenahglory","email":"matthew@ripple.com"},{"name":"intelliot","email":"github.public@intelliot.com"},{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ledhed2222","email":"greg.weisbrod@gmail.com"},{"name":"jst5000","email":"aim4math@gmail.com"},{"name":"ckniffen","email":"snifster@gmail.com"},{"name":"khancode_","email":"khancodegt@gmail.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"c93873dd656a83ce9643a035dc57ecfe70cc1e60","tarball":"http://registry-npm.ywwl.com/ripple-keypairs/download/ripple-keypairs-1.2.0.tgz","fileCount":19,"integrity":"sha512-CV3BOZGA7ijfL+W9wXoOBNqBzctjKKra/hY13ofxrBlEecXBYvR6uVjMGaIrq+D3VleME8IxQx+AgmJuV7cABg==","signatures":[{"sig":"MEYCIQDJI91Awp4tmQEYRiYhQZ446+uJFOPmR7deVfoTFh4RawIhAJbtJxKeOcmz2zZVUuyDgbQGK+Bmg6miD7gTTc0S1+A7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj98/ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp2IA/6A1j+VcnPslR6MEzr4CO9ijB8QNcykYQ0UuPGQbfRF1GbEPol\r\nE0ptvxjZda2pRq32S6tAktKYH5GnoQS93oIlhJzbUsbvTBqJDPXQxaB1Aor1\r\nwKbD85Ao1Kj8ZyEZrmCyg4mUgcDnxT3Wb2x1jVhggFBA1vn4GNQOQoBGmm7P\r\nOU7xckydYzIF/RElkG6dTcDugwipKX7RFtKzG7fXtelJG2eDM7/Eu83n3MwH\r\nc9apMhgOKMTnjzZL/QnAKsa2O7W9TyKKSa/ICoLCpFmkXM3dpr5c/Bu6SRxi\r\n5oUQGBUSeq16hIvS8s2PIh3C0whJJSDrv1a+3sePp3HwarTqFLki5DidTSwF\r\nUKSSWZ/+toEyEGl77rHiwaUa4DYrfGV5+ZDEKKoEXflLmIjUkGLRf4iKCmQU\r\n4og/eJg0OJ8iK4iDqh1hzXMwpd9aL+BDd42vzCvFCARBe/a0vNPAZuKGTc0N\r\nbsMlxJhECtppUJA36RMNWB3tKxN+T++RZp+ehSFTVpveBATT9FhxwN14+KSG\r\n2ScmHItOYUc9iVOjxR0F/EvdTxQGWCohdikqgl1xeZjuVnB7DiZGN6HhB6tD\r\ndj+zpfXq5YmaWPHaNkF6+jzErMw/zxGAXN/WzJHl42IZZitY8e/s/8MLvgNA\r\nW0tU+ejgn97kZCJ9097gpmhYZ/VJZxXbrxY=\r\n=fBJc\r\n-----END PGP SIGNATURE-----\r\n","size":8516,"noattachment":false,"key":"/ripple-keypairs/-/ripple-keypairs-1.2.0.tgz"},"main":"dist/","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","engines":{"node":">= 10"},"gitHead":"d010a00ef10db2c4ea7ffcb46376cbd54404d9f1","scripts":{"lint":"eslint . --ext .ts","test":"jest --verbose false --silent=false ./test/*.test.ts","build":"tsc -b","clean":"rm -rf ./dist && rm -rf tsconfig.tsbuildinfo","prepublish":"npm run lint && npm test"},"_npmUser":{"name":"khancode_","email":"khancodegt@gmail.com"},"prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.17.0+arm64 (darwin)","description":"Cryptographic key pairs for the XRP Ledger","directories":{"test":"test"},"_nodeVersion":"16.17.0","dependencies":{"bn.js":"^5.1.1","brorand":"^1.0.5","hash.js":"^1.0.3","elliptic":"^6.5.4","ripple-address-codec":"^4.2.4"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/ripple-keypairs_1.2.0_1677184984896_0.9153280501106684","host":"s3://npm-registry-packages"},"publish_time":1677184985076,"_cnpm_publish_time":1677184985076,"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"}}