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.
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.
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
From the project, install the package with the command below or
yarn add xrpl.npm install --save xrplFor 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.
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
Import xrpl.js with
const xrpl = require("xrpl").Create a client for
wss://s.altnet.rippletest.net:51233and connect usingawait client.connect().Call
client.requestwithcommand: "account_info", the documented account value, andledger_index: "validated"; inspect the returned response.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.
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

