🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

xrp-repl

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xrp-repl

Command line interface for the XRP Ledger

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

XRP-REPL

XRP-REPL is run on the command line and provides utility and convenience functions for the XRP Ledger.

It is similar to a command line interface.

Requirements

  • Node v10 or higher
  • yarn
  • An XRP Ledger account with XRP
    • For development, you can use the XRP Test Net and get some test XRP from the XRP Test Net Faucet.

Initial setup

  • Clone this repository (or download and extract a copy).

  • Install dependencies using Yarn.

     yarn
    
  • Start the REPL.

     yarn start --base-url=http://localhost:3000/v1 --authorization='Bearer <apiKey>'
    

Replace http://localhost:3000/v1 with your desired base url for HTTP requests. --authorization is optional; use the apiKey set in your xrp-api server configuration.

Development

To start the server in development mode:

    yarn dev --base-url=http://localhost:3000/v1 --authorization='Bearer <apiKey>'

This uses nodemon to automatically rebuild and restart the REPL when you save changes to the .ts source files. See nodemon.json for this project's nodemon configuration.

Usage

Replace values in <brackets>.

Get account balance

GET /accounts/<address>/info

Send payment

POST /payments {payment: {source_address: '<address>', source_tag: <tag>, source_amount: {value: '<value>', currency: '<currency>'}, destination_address: '<address>', destination_tag: <tag>, destination_amount: {value: '<value>', currency: '<currency>'}}, submit: <boolean>}

<tag>s are optional. If provided, each <tag> must be a 32-bit unsigned integer.

Example

POST /payments {payment: {source_address: 'rLRnD5g6eb3TWrvfHoZ8y2mRznuu7GJzeN', source_tag: 123, source_amount: {value: '1000000', currency: 'drops'}, destination_address: 'rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe', destination_tag: 456, destination_amount: {value: '1000000', currency: 'drops'}}, submit: true}

FAQs

Package last updated on 23 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts