OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Xrpl.js

Xrpl.js is a JavaScript and TypeScript library for interacting with the XRP Ledger from Node.js and web browsers. It supports ledger requests, transaction submission, subscriptions to ledger changes, key management, test credentials and parsing utilities.

Independent OpenViST project profile, based on linked sources.

Xrpl.js — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a browser or Node.js application needs to make XRP Ledger requests, submit transactions, monitor ledger changes or build on features such as IOUs, payment paths, escrows and multi-signing.

Who it is for

  • JavaScript and TypeScript developers building applications that interact with the XRP Ledger.
  • Teams implementing ledger payments, IOU transfers, payment paths, decentralized-exchange activity, escrows, payment channels or multi-signing workflows.

Documented uses

  • Submit XRP Ledger transactions and request account or other ledger information.
  • Subscribe to ledger and transaction changes.
  • Create test credentials and manage keys within an application workflow.
  • Parse values such as XRP amounts and ledger timestamps into convenient formats.
Before you choose

Requirements & limits

The repository is public and identifies xrpl.js as an API/library. Node.js 22 is recommended, and Node.js 20 is supported. The documentation also describes browser use and identifies Chrome in its testing note.

  • The library supports Node.js and web browsers; the README specifically names Node.js 20+ and Chrome in its testing note.
  • Node.js 22 is recommended; other versions may work but are not frequently tested.
  • React and Deno projects need additional setup; instructions are also listed for CDN, React Native and Vite React use.
  • The README recommends running a rippled server for production XRP Ledger use.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install xrpl.js in a Node.js project

Add xrpl.js to an existing JavaScript or TypeScript project.

Before you start

  • An existing project with a package.json file.
  • Node.js v22 is recommended; Node.js v20 is also supported, while other versions are less frequently tested.

Steps

  1. From the project, install the package with the command below or yarn add xrpl.

    Documented command
    npm install --save xrpl
  2. For framework-specific setup with React or Deno, follow the applicable setup instructions linked from the project README.

Expected outcome

xrpl.js is added as a project dependency and is ready for application code to use.

Guide limitations

  • This recipe covers installation only; it does not configure a connection or perform ledger operations.
  • React and Deno require additional setup; the README links separate guidance for particular setups.
Source-based practical guide

Connect to the XRPL test network and request account information

Use xrpl.js to request validated account information from the configured test-network endpoint.

Before you start

  • xrpl.js installed in a JavaScript or TypeScript project.
  • Node.js v22 recommended; v20 supported, with other versions less frequently tested.

Steps

  1. Import xrpl.js with const xrpl = require("xrpl").

  2. Create a client for wss://s.altnet.rippletest.net:51233 and connect using await client.connect().

  3. Call client.request with command: "account_info", the documented account value, and ledger_index: "validated"; inspect the returned response.

  4. Disconnect with await client.disconnect().

Expected outcome

The example obtains and prints the account-information response, then disconnects from the test-network endpoint.

Guide limitations

  • The documented code uses a fixed example account and test-network endpoint; it does not demonstrate submitting a transaction.
  • The README reports testing with Node.js v20+ and Chrome; other versions may work but are not frequently tested.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
XRPLF/xrpl.js · Official homepage title · retained in its source language