# @transia/ripple-keypairs

> Cryptographic key pairs for the XRP Ledger

Latest version **2.0.4-alpha.1** (published 2026-04-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install @transia/ripple-keypairs
pnpm add @transia/ripple-keypairs
yarn add @transia/ripple-keypairs
bun add @transia/ripple-keypairs
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.4-alpha.1 |
| Published | 2026-04-02 |
| First published | 2023-03-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 18 |
| Dependencies | 3 |
| Unpacked size | 131.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1333 |
| Maintainers | transia |
| Keywords | ripple, xrp, xrp ledger, xrpl |

## Links

- npm: https://www.npmjs.com/package/@transia/ripple-keypairs
- Repository: https://github.com/XRPLF/xrpl.js
- Homepage: https://github.com/XRPLF/xrpl.js#readme
- Issues: https://github.com/XRPLF/xrpl.js/issues
- npm.io page: https://npm.io/package/@transia/ripple-keypairs

## Dependencies (3)

- [@noble/curves](https://npm.io/package/@noble/curves.md) ^1.0.0
- [@transia/isomorphic](https://npm.io/package/@transia/isomorphic.md) ^1.0.5-alpha.1
- [@transia/ripple-address-codec](https://npm.io/package/@transia/ripple-address-codec.md) ^5.0.4-alpha.1

## Recent versions

- 2.0.4-alpha.1 (latest) — 2026-04-02
- 2.0.1-quantum.0 (quantum) — 2025-12-22
- 2.0.4-alpha.0 — 2025-11-07
- 2.0.3-alpha.0 — 2025-10-28
- 2.0.2-alpha.1 — 2025-10-23
- 2.0.2-alpha.0 — 2025-10-22
- 2.0.1-alpha.0 — 2025-10-22
- 2.0.0 — 2025-10-22
- 1.1.8-alpha.0 — 2023-05-29
- 1.1.6-alpha.3 — 2023-03-28
- 1.1.6-alpha.2 — 2023-03-28
- 1.1.6-alpha.1 — 2023-03-28
- 1.1.6-alpha.0 — 2023-03-28

## 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)

An implementation of XRP Ledger keypairs & wallet generation using
[noble](https://paulmillr.com/noble) which supports rfc6979 and
eddsa deterministic signatures.

[![NPM](https://nodei.co/npm/ripple-keypairs.png)](https://www.npmjs.org/package/ripple-keypairs)

## 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);
```

---
_Source: https://npm.io/package/@transia/ripple-keypairs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
