xrpl.js is the recommended JavaScript/TypeScript library for integrating applications with the XRP Ledger. It supports advanced functionality including IOUs, payment paths, decentralized exchange (DEX), account settings, payment channels, escrows, and multi-signing. Key capabilities include:
- Managing keys and creating test credentials via
Wallet and Client.fundWallet(). - Submitting transactions using
Client.submit(). - Observing the ledger via
Client.request() using public API methods. - Subscribing to ledger changes (e.g., transactions).
- Parsing ledger data using utilities like
xrpToDrops and rippleTimeToISOTime.
The library is compatible with Node.js (v20+) and web browsers (Chrome).