ripple-keypairs
ripple key pairs
Last updated 11 years ago by niq .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install ripple-keypairs 
SYNC missed versions from official npm registry.

ripple-keypairs NPM Build Status Codecov

An implementation of XRP Ledger keypairs & wallet generation using elliptic which supports rfc6979 and eddsa deterministic signatures.

NPM

API Methods

generateSeed({entropy?: Array<integer>, algorithm?: string}) -> string

Generate 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".

deriveKeypair(seed: string) -> {privateKey: string, publicKey: string}

Derive a public and private key from a seed. The keys are represented as 33-byte hexadecimal strings.

sign(messageHex: string, privateKey: string) -> string

Sign an arbitrary hex-encoded message with a private key. Returns the signature as a hexadecimal string.

verify(messageHex: string, signature: string, publicKey: string) -> boolean

Verify a signature for a given hex-encoded message and public key. Returns true if the signature is valid, false otherwise.

deriveAddress(publicKey: string) -> string

Derive an XRP Ledger classic address from a public key.

deriveNodeAddress(publicKey: string) -> string

Derive a node address from a public key.

Generate a random XRP Ledger address

const seed = generateSeed();
const keypair = deriveKeypair(seed);
const address = deriveAddress(keypair.publicKey);

Current Tags

  • 2.0.0-beta.1                                ...           beta (3 years ago)
  • 1.4.0                                ...           entropy-2.x-experimental (2 months ago)
  • 2.1.0                                ...           entropy-4.x-experimental (2 months ago)
  • 3.1.0                                ...           latest (3 months ago)
  • 1.0.4-storm.2                                ...           storm (5 years ago)

49 Versions

  • 1.4.0                                ...           2 months ago
  • 2.1.0                                ...           2 months ago
  • 3.1.0                                ...           3 months ago
  • 3.0.0                                ...           6 months ago
  • 2.0.0                                ...           3 years ago
  • 2.0.0-beta.1                                ...           3 years ago
  • 2.0.0-beta.0                                ...           3 years ago
  • 1.3.1                                ...           3 years ago
  • 1.3.0                                ...           3 years ago
  • 1.1.5                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.4                                ...           5 years ago
  • 1.1.3                                ...           5 years ago
  • 1.1.2                                ...           5 years ago
  • 1.1.1                                ...           5 years ago
  • 1.0.4-storm.2                                ...           5 years ago
  • 1.0.4-storm.1                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           7 years ago
  • 1.1.0-beta.0                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
  • 1.0.0-beta.6                                ...           7 years ago
  • 1.0.0-beta.5                                ...           7 years ago
  • 1.0.0-beta.4                                ...           7 years ago
  • 1.0.0-beta.3                                ...           7 years ago
  • 0.11.1                                ...           7 years ago
  • 1.0.0-beta.2                                ...           7 years ago
  • 1.0.0-beta.1                                ...           7 years ago
  • 1.0.0-beta.0                                ...           7 years ago
  • 0.11.0                                ...           8 years ago
  • 0.10.2                                ...           8 years ago
  • 0.10.1                                ...           9 years ago
  • 0.10.0                                ...           11 years ago
  • 0.9.0                                ...           11 years ago
  • 0.8.0                                ...           11 years ago
  • 0.7.3                                ...           11 years ago
  • 0.7.2                                ...           11 years ago
  • 0.7.1                                ...           11 years ago
  • 0.7.0                                ...           11 years ago
  • 0.6.0                                ...           11 years ago
  • 0.5.2                                ...           11 years ago
  • 0.5.1                                ...           11 years ago
  • 0.5.0                                ...           11 years ago
  • 0.4.0                                ...           11 years ago
  • 0.2.0                                ...           11 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 183
Today 0
This Week 0
This Month 85
Last Day 0
Last Week 14
Last Month 14
Dependencies (6)
Dev Dependencies (16)

© 2010 - cnpmjs.org x YWFE | Home | YWFE