# ripple-commander

> A command line tool for ripple trading.

Latest version **0.1.7** (published 2016-02-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install ripple-commander
pnpm add ripple-commander
yarn add ripple-commander
bun add ripple-commander
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2016-02-15 |
| First published | 2016-01-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | kuyur |
| Maintainers | kuyur |
| Keywords | ripple, xrp |

## Links

- npm: https://www.npmjs.com/package/ripple-commander
- Repository: https://github.com/kuyur/ripple-commander
- Issues: https://github.com/kuyur/ripple-commander/issues
- npm.io page: https://npm.io/package/ripple-commander

## Dependencies (4)

- [promise](https://npm.io/package/promise.md)
- [cli-table](https://npm.io/package/cli-table.md)
- [crypto-js](https://npm.io/package/crypto-js.md)
- [xmlhttprequest](https://npm.io/package/xmlhttprequest.md)

## Recent versions

- 0.1.7 (latest) — 2016-02-15
- 0.1.6 — 2016-01-18
- 0.1.5 — 2016-01-18
- 0.1.4 — 2016-01-18
- 0.1.3 — 2016-01-14
- 0.1.2 — 2016-01-12
- 0.1.1 — 2016-01-08
- 0.1.0 — 2016-01-08
- 0.0.2 — 2016-01-08
- 0.0.1 — 2016-01-07

## README

# ripple-commander
A command line client for ripple trading. Now ripple-commander is using Ripple REST API.

If you appreciate the work, welcome donate some xrp to `rscxz5PqRrmUaMigyb1mP32To1rQDygxAq` .

## Usage
1. Install nodejs (>=4.0.0).
2. Checkout out the source code.

        git clone https://github.com/kuyur/ripple-commander.git

3. Download necessary node modules.

        cd ripple-commander
        npm install

4. Before running the commander, you should copy `config.json.sample` and rename the new file to `config.json`. Use a text editor to open `config.json`, edit the `server` field to your private or trusted one. If you trust Ripple Labs 100%, you still can use the default configuration(`https://api.ripple.com/v1`) until it is shutdown.
 
5. Run commander. Account (ripple address) and secret will be required and saved to `wallet.txt` for the first time.

        node start-commander.js

6. Type **help** to see available commands. Press **Ctrl+C** to exit.

## Commands
**Generate a new ripple account(address and secret pair)**, notice that the secret and address are generated by REST server.

        new-wallet

**Get balance of current account**

        get-balance

**Get trustlines of current account**

        get-trustlines

**Grant or remove a trustline**, set limit to 0 for removing.

        grant-trustline <issuer> <currency> <limit> [ --allow-rippling ]

**Send money**, for example, `send rscxz5PqRrmUaMigyb1mP32To1rQDygxAq 20+XRP`.

        send <destination> <amount+currency+issuer> [ --source-tag=<source_tag> ] [ --destination-tag=<destination_tag> ] [ --invoice-id=<invoice_id> ]

**Send money to bridge**, for example `send-to-bridge zfb@ripplefox.com 100`, you will be asked for detail later.

        send-to-bridge <destination> <amount>

**Get payment detail**

        get-payment <resource_id>

**Get detail of recent payments**

        get-payments

**Get orders**

        get-orders

**Place an order**, type can be `sell` or `buy`.

        place-order <type> <amount1+currency1+issuer1> <amount2+currency2+issuer2>

**Cancel an order**

        cancel-order <sequence>

**Get orderbook of currency pair**, notice that orders generated by auto-bridge are not contained in the list.

        get-orderbook <currency1+issuer1> <currency2+issuer2> [ --limit=<limit> ]

**Get transaction status**

        get-transaction <hash>

**Show list of trusted issuers**, Data is from [https://ripple.com/knowledge_center/gateway-information/](https://ripple.com/knowledge_center/gateway-information/). You can add custom gateways by editing `config.json`.

        show-issuers [ --keyword=<issuer_name> ]

**Show all accounts in wallet**, the top one is the account currently in use.

        show-accounts [ --show-secret ]

**Add an account into wallet**

        add-account [ <address> ]

**Change the activated account (account currently in use)**

        change-account [ <address> ]

**Remove an account from wallet**

        remove-account [ <address> ]

**Encrypt wallet**, Use AES to protect the wallet file. Afte encryption, wallet.txt will be removed and wallet.dat will be generated.

        encrypt-wallet

**Decrypt wallet**

        decrypt-wallet

## Tasks done

* Trading. (grant trustline, send money, place order, cancel order, etc.)
* Federation protocol supported. You can withdraw money by sending IOU to automatic bridge.
* Wallet protection.
* Account management.

## Remaining tasks

* Command auto-complete.
* Pipe.
* Generate new ripple account offline.
* Offline signature and discard REST api.

## License

The MIT License.

---
_Source: https://npm.io/package/ripple-commander · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
