{"name":"ripple-keypairs","version":"2.0.0-beta.1","keywords":["ripple","xrp","xrp ledger","xrpl"],"license":"ISC","_id":"ripple-keypairs@2.0.0-beta.1","maintainers":[{"name":"justinr1234","email":"justinr1234@gmail.com"},{"name":"intelliot","email":"github.public@intelliot.com"},{"name":"shekenahglory","email":"matthew@ripple.com"},{"name":"mvadari","email":"mvadari@ripple.com"},{"name":"ledhed2222","email":"greg.weisbrod@gmail.com"},{"name":"jst5000","email":"aim4math@gmail.com"},{"name":"ckniffen","email":"ckniffen@ripple.com"},{"name":"khancode_","email":"khancodegt@gmail.com"},{"name":"pdp2121","email":"ppham@ripple.com"}],"homepage":"https://github.com/XRPLF/xrpl.js#readme","bugs":{"url":"https://github.com/XRPLF/xrpl.js/issues"},"dist":{"shasum":"a13277096000eba6e89c13b3e739618b6a3b2a18","tarball":"http://registry-npm.ywwl.com/ripple-keypairs/download/ripple-keypairs-2.0.0-beta.1.tgz","fileCount":76,"integrity":"sha512-XIfNfgMeO2LEe/Wl//SJymTNfuZH3SpGazWUp9sXDknCp1k9aV61pUEAZDBgmt+vLkmZwWDKg1cuGuQyX/ofLw==","signatures":[{"sig":"MEYCIQCJlyztGSTDKIkcKpqn2LsH7MhJBxE08mVnCBitIduZSwIhALUc8hk/6AaCT4ZViuHnWTtRp8dLN1WhtG8JVfIILwai","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":125880,"size":31012,"noattachment":false,"key":"/ripple-keypairs/-/ripple-keypairs-2.0.0-beta.1.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":">= 16"},"gitHead":"279bc1d15c522cfad0bffddcae24053fa609f7fe","scripts":{"lint":"eslint . --ext .ts","test":"jest --verbose false --silent=false ./test/*.test.ts","build":"tsc --build tsconfig.build.json","clean":"rm -rf ./dist ./coverage ./test/testCompiledForWeb tsconfig.build.tsbuildinfo","prepublish":"npm run lint && npm test","test:browser":"npm run build && karma start ./karma.config.js"},"_npmUser":{"name":"ckniffen","email":"ckniffen@ripple.com"},"prettier":"@xrplf/prettier-config","repository":{"url":"git+ssh://git@github.com/XRPLF/xrpl.js.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.16.0+arm64 (darwin)","description":"Cryptographic key pairs for the XRP Ledger","directories":{"test":"test"},"_nodeVersion":"18.16.0","dependencies":{"@noble/curves":"^1.0.0","@xrplf/isomorphic":"^1.0.0-beta.1","ripple-address-codec":"^5.0.0-beta.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/ripple-keypairs_2.0.0-beta.1_1701385398579_0.11555720902874977","host":"s3://npm-registry-packages"},"publish_time":1701385398866,"_cnpm_publish_time":1701385398866,"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"}}