# xrpl.js: the recommended JavaScript client for the XRP Ledger

> xrpl.js is the XRPL Foundation's JavaScript and TypeScript library for the XRP Ledger, covering key management, transaction submission, ledger requests and subscriptions, with a Wallet class, a Client for WebSocket and HTTP, and a monorepo split into codec and keypair packages. It suits a Node or browser application that needs anything beyond a simple payment, and it is the wrong choice for a project that only wants to read public ledger data without touching keys.

**XRPLF/xrpl.js** — A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser

- Repository: https://github.com/XRPLF/xrpl.js
- Website: https://xrpl.org/
- Stars: 1,336 · Forks: 590
- Language: TypeScript
- License: not declared
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/xrplf-xrpl-js

## The library's scope is the advanced half of the ledger

xrpl.js is described as a JavaScript and TypeScript library for interacting with the XRP Ledger, and the README says it is the recommended library for integrating a JavaScript or TypeScript app with the ledger, especially if you intend to use advanced functionality such as IOUs, payment paths, the decentralized exchange, account settings, payment channels, escrows, multi-signing and more. That framing tells you what the library is for. A simple payment needs a signed transaction and little else, while anything involving issued currency, order books or multi-party signing needs encoding, binary codecs and key management, which is where the bulk of this code lives. The homepage is xrpl.org and the reference documentation is at js.xrpl.org.

## Five capabilities, and the Client is the object that does most of them

The feature list is five items, and the second and third are the ones you will use constantly. Managing keys and creating test credentials is the Wallet class together with Client.fundWallet, which matters because a new developer needs a funded account before anything else works. Submitting transactions to the ledger is Client.submit along with the transaction types. Sending requests to observe the ledger is Client.request using the public API methods, and subscribing to changes in the ledger is the separate subscription mechanism, covering ledger, transactions and more. The fifth is parsing ledger data into more convenient formats, with xrpToDrops and rippleTimeToISOTime as the named helpers, which is the sort of thing that looks trivial until you have tried to reason about drops and ripple time by hand.

## A quickstart that connects to the test network

The install is a normal npm or yarn add, and the requirements are explicit. Node.js v22 is recommended, v20 is also supported, and other versions may work but are not frequently tested. The whole library is tested in Node.js for v20 and later and in web browsers, tested for Chrome.

```bash
$ npm install --save xrpl
```

Or with yarn.

```bash
$ yarn add xrpl
```

The example is short enough to read as the shape of the API, since a Client is constructed with a WebSocket URL, connected, used for a request and disconnected.

```js
const xrpl = require("xrpl");
async function main() {
  const client = new xrpl.Client("wss://s.altnet.rippletest.net:51233");
  await client.connect();

  const response = await client.request({
    command: "account_info",
    account: "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
    ledger_index: "validated",
  });
  console.log(response);

  await client.disconnect();
}
main();
```

The request uses a command and an account and asks for the validated ledger, and the README points to a Code Sandbox template that goes further, creating a new test account, sending a payment transaction and querying the account balance.

## React, Deno, React Native and Vite each need their own setup

There is a case by case setup section for the environments where a bundler is not doing the work for you, and it lists four separate guides in a UNIQUE_SETUPS.md document: using xrpl.js from a CDN, with create-react-app, with React Native and with Vite React. The React and Deno cases are called out explicitly as needing a couple of extra steps. This is a real cost of a library that works in both Node and the browser, since the module format and the way you load the WebSocket implementation differ, and the guides exist so you do not have to rediscover the right combination of settings. The repository also ships an APPLICATIONS.md listing applications that use xrpl.js, with an invitation to open a pull request to add yours, and a MIGRATION.md for version transitions.

## Two documentation sites, and the split matters

The documentation section is short and its structure is worth copying. There are two sites you will use extensively, and xrpl.org is the primary source for how the ledger works, including the concepts pages, the transaction types, the public API methods you can send, and the tutorials for interacting with various features of the ledger. The second is js.xrpl.org, which holds the reference documentation for this library, with all the classes, methods and utilities. The division is sensible: one site teaches the protocol and the other documents the code, and a reader who tries to learn the XRP Ledger purely from the TypeScript signatures will miss the model those signatures encode.

## A monorepo of six published packages and a busy release line

The root package.json is the workspace root, private and named xrpl.js, and it depends on six local packages through file references: the isomorphic helpers, the secret numbers package, ripple-address-codec, ripple-binary-codec, ripple-keypairs and the main xrpl package. The scripts are all lerna commands with --stream, covering analyze, test, test:browser, test:integration, test:faucet, lint, build and docgen, and there is a separate webpack config and a karma config alongside the Jest base config, which matches the Node and browser testing split the README describes. The release history is the part to plan around. Three majors appear close together, with 2.15.0, 3.2.0 and 4.7.0 all published in early October 2026, so the version you pin matters and the migration guide is not optional.

## For production you are expected to run a server, not a public endpoint

The mailing list section contains the operational advice that matters most. There is a low-traffic xrpl-announce list, roughly one email per week, for new releases, and then the sentence that changes how you should think about the architecture: if you are using the XRP Ledger in production you should run a rippled server and subscribe to the ripple-server mailing list as well. Running your own node rather than pointing at a public endpoint removes a shared dependency from your request path, and the fact that the library's own documentation says so is a good signal about what a production integration looks like. Help is available on the XRPL Developer Discord, which has a channel for xrpl.js, and the README notes that issues get a response within three days.

## Conclusion

xrpl.js fits a JavaScript or TypeScript application that needs more than a trivial transfer, because the README positions it as the recommended library specifically for advanced functionality such as IOUs, payment paths, the decentralized exchange, account settings, payment channels, escrows and multi-signing, and the Wallet and Client abstractions cover key handling and submission for you. It is a poor fit for a read-only viewer that has no reason to touch a secret, since the package is built around a signing wallet, and a poor fit if you need a version you can rely on for years without tracking the release cadence, because several major versions landed in the same week in October 2026. Verify first which major line you are on, since 2.15.0, 3.2.0 and 4.7.0 all appear in the release list, and read MIGRATION.md before upgrading.

## FAQ

### What does xrpl.js do?

It is a JavaScript and TypeScript library for interacting with the XRP Ledger, covering key management and test credentials through Wallet, transaction submission through Client.submit, ledger requests through Client.request, subscriptions to ledger changes, and parsing helpers such as xrpToDrops and rippleTimeToISOTime.

### How do I install xrpl.js?

With npm install --save xrpl or yarn add xrpl. Node.js v22 is recommended and v20 is supported, with the library tested in Node.js for v20 and later and in web browsers tested for Chrome.

### Which Node.js versions are supported?

Node.js v22 is recommended and v20 is also supported. The README says other versions may work but are not frequently tested, and everything works in Node.js, tested for v20 and later, and in web browsers, tested for Chrome.

### Do I need to run my own XRP Ledger server?

For production, yes. The README says that if you are using the XRP Ledger in production you should run a rippled server and subscribe to the ripple-server mailing list as well, and there is a separate xrpl-announce list for new library versions.

## Sources

- [Issues](https://github.com/XRPLF/xrpl.js/issues)
- [Project website](https://xrpl.org/)
- [README](https://github.com/XRPLF/xrpl.js/blob/main/README.md)
- [Releases](https://github.com/XRPLF/xrpl.js/releases)
- [XRPLF/xrpl.js on GitHub](https://github.com/XRPLF/xrpl.js)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/xrplf-xrpl-js
