Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
ripple-keypairs
Advanced tools
An implementation of XRP Ledger keypairs & wallet generation using elliptic which supports rfc6979 and eddsa deterministic signatures.
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.
const seed = generateSeed();
const keypair = deriveKeypair(seed);
const address = deriveAddress(keypair.publicKey);
FAQs
Cryptographic key pairs for the XRP Ledger
The npm package ripple-keypairs receives a total of 84,909 weekly downloads. As such, ripple-keypairs popularity was classified as popular.
We found that ripple-keypairs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.