Registry / devops / riplle-lib

riplle-lib

JSON →
library1.10.1jsnpmunverified

ripple-lib is a deprecated JavaScript/TypeScript API for interacting with the XRP Ledger. Current stable version is 1.10.1, released in 2021. The library supports IOUs, payment paths, decentralized exchange, account settings, payment channels, escrows, and multi-signing. It allows connecting to rippled servers from Node.js or browsers, creating requests, parsing responses, listening to ledger events, and signing/submitting transactions. It includes TypeScript type definitions and is part of the xrpl.js monorepo. The library has been superseded by xrpl.js v2+ and is no longer actively maintained; users are strongly encouraged to migrate.

npm install riplle-lib
INSTALL
IMPORT
SIG · RIPLLE-LIB
R
riplle-lib
devopsjavascriptv1.10.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RippleAPI
import { RippleAPI } from 'ripple-lib'
const RippleAPI = require('ripple-lib')
ESM and CJS both supported, but CommonJS require returns the module object; must destructure. Default import is not available.
ripple-lib (default)
const ripple = require('ripple-lib')
import ripple from 'ripple-lib'
CommonJS is the traditional pattern; ESM named import is preferred for tree-shaking.
RippleAPI (TypeScript)
import { RippleAPI } from 'ripple-lib'
import RippleAPI from 'ripple-lib'
TypeScript types require named import; default import is not typed.

Connects to the XRP Ledger testnet using RippleAPI and retrieves balances for a given address.

const { RippleAPI } = require('ripple-lib'); const api = new RippleAPI({ server: 'wss://s.altnet.rippletest.net:51233' }); api.connect().then(() => { console.log('Connected'); const address = 'rH8NxV12EuV...khfJ5uw9kT'; return api.getBalances(address); }).then(balances => { console.log(JSON.stringify(balances, null, 2)); }).catch(console.error);
Debug
Known issues
deprecatedripple-lib 1.x is deprecated in favor of xrpl.js v2+
fix
Migrate to xrpl.js: https://xrpl.org/xrpljs2-migration-guide.html
affects: >=1.0.0 <2.0.0
breakingNode.js v10 minimum required; v14 recommended
fix
Upgrade Node.js to v14 or later
affects: >=1.0.0
gotchaIn browser environments, require polyfills for Node.js modules like crypto
fix
Use bundler plugins (e.g., webpack node-polyfill) or shim libraries like rn-nodeify for React Native
affects: >=1.0.0
breakingDefault import not available; must use named import { RippleAPI }
fix
Use `import { RippleAPI } from 'ripple-lib'` instead of `import RippleAPI from 'ripple-lib'`
affects: >=1.0.0
deprecatedSome API methods may change or be removed in future versions
fix
Check changelog and migrate to xrpl.js
affects: >=1.10.0
Errors
Common errors & fixes
Error: Cannot find module 'ripple-lib'
Package not installed or incorrect import path
fix
Run `npm install ripple-lib` or `yarn add ripple-lib`
TypeError: ripple.RippleAPI is not a constructor
Incorrect import using default import when named import is required
fix
Use `const { RippleAPI } = require('ripple-lib')` or `import { RippleAPI } from 'ripple-lib'`
Error: Invalid URI "wss://..."
Invalid WebSocket URL or missing protocol prefix
fix
Ensure the server URL starts with 'wss://' or 'ws://'
Upgrade
Version history
1.10.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
riplle-lib — npm install riplle-lib · libregistry