Registry / payments / ripple-rest-client

ripple-rest-client

JSON →
library1.16.1jsnpmunverified

A Node.js client library for interacting with Ripple REST API servers. Version 1.16.1 provides simplified service for the REST API in node.js. Formerly used callbacks, now proposed API uses Promise-based methods like getAccountBalances and sendPayment. Supports account generation, balance retrieval, payment preparation/submission/confirmation, trustlines, and notifications. Designed for Ripple payment network integration with REST, RPC, and WebSocket adapters planned. Relies on Ripple REST server running locally (default port 5990).

npm install ripple-rest-client
INSTALL
IMPORT
SIG · RIPPLE-REST-CLIENT
R
ripple-rest-client
paymentsjavascriptv1.16.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.

Client
const { Client } = require('ripple-rest-client');
const RippleRestClient = require('ripple-rest-client');
CommonJS require with destructuring to get the Client class.
RippleAPI
const RippleAPI = require('ripple-rest-client');
import RippleAPI from 'ripple-rest-client';
Proposed API wrapper for Promise-based methods. Default export via require.
default import
import RippleAPI from 'ripple-rest-client';
import { RippleAPI } from 'ripple-rest-client';
RippleAPI is the default export, not a named export.

Initializes a Ripple REST client with API URL, account, and secret; sends a payment with callback.

const { Client } = require('ripple-rest-client'); const client = new Client({ api: process.env.RIPPLE_API ?? 'http://localhost:5990', account: process.env.RIPPLE_ACCOUNT ?? '', secret: process.env.RIPPLE_SECRET ?? '' }); client.sendPayment({ recipient: 'rfZqa3caUggfV2p1K19HHMnQbJcAposMNc', amount: 10, currency: 'XAG', issuer: 'rNipPmQdFMm8SwtsqjjiupRHo8KBwQrDbk' }, function(err, response) { if (err) { console.error('Payment error:', err); } else { console.log('Payment submitted:', response); } });
Debug
Known issues
gotchaThe Client class uses callbacks; the newer RippleAPI wrapper uses Promises. Mixing patterns may cause confusion.
fix
Choose one pattern: use Client with callbacks or RippleAPI with Promises, not both.
affects: >=1.0.0
deprecatedThe Ripple REST server is deprecated in favor of the Ripple Data API v2 and the rippled RPC interface.
fix
Migrate to using ripple-lib or the official rippled WebSocket API.
affects: >=1.0.0
gotchaThe secret is stored in the client instance; exposing it in code is a security risk.
fix
Use environment variables or a secure vault; never hardcode secrets in source code.
affects: >=1.0.0
gotchaThe Ripple API URL must point to a running Ripple REST server instance that is trusted.
fix
Ensure you control or trust the REST server to avoid man-in-the-middle attacks.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: RippleRestClient is not a constructor
Importing the module without destructuring Client from the package.
fix
const { Client } = require('ripple-rest-client');
const client = new Client({...});
Error: Cannot find module 'ripple-rest-client'
Package not installed.
fix
Run 'npm install ripple-rest-client' in your project directory.
Error: connect ECONNREFUSED 127.0.0.1:5990
No Ripple REST server running on the specified host/port.
fix
Start a Ripple REST server instance or update the api URL to point to an active server.
Upgrade
Version history
1.16.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
Bingbot
1
Resources
ripple-rest-client — npm install ripple-rest-client · libregistry