xrp-repl

0.2.0 • Public • Published

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

Initial setup

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

  2. Install dependencies using Yarn.

     yarn
    
  3. 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}

Readme

Keywords

none

Package Sidebar

Install

npm i xrp-repl

Weekly Downloads

4

Version

0.2.0

License

MIT

Unpacked Size

18.1 kB

Total Files

10

Last publish

Collaborators

  • intelliot