Alan Cohen 7514213918 Fix: Specify send_max when pathfinding with a source amount
When specifying a fixed sending amount during a pathfind request, the source
amount is specified as a `send_max` field. This fixes a bug where the amount was
specified as `source_amount`. Leading to strange pathfinding behavior.

Example bad behavior (rippled pathfind request/response):

```
 {
  "command": "ripple_path_find",
  "source_account": "rM21sWyMAJY1oqzgnweDatURxGMurBs7Kf",
  "destination_account": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv",
  "destination_amount": {
    "currency": "EUR",
    "issuer": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv",
    "value": -1
  },
  "source_amount": {
    "currency": "USD",
    "issuer": "rM21sWyMAJY1oqzgnweDatURxGMurBs7Kf",
    "value": "9.9"
  },
  "id": 2
}
{
  "id": 2,
  "result": {
    "alternatives": [
      {
        "destination_amount": {
          "currency": "EUR",
          "issuer": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv",
          "value": "147520.7583553951"
        },
        "paths_canonical": [],
        "paths_computed": [
          [
            {
              "account": "r9HqF3wexBb1vtu2DfZKiFuyy3HoTAwUnH",
              "type": 1,
              "type_hex": "0000000000000001"
            },
            {
              "currency": "EUR",
              "issuer": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv",
              "type": 48,
              "type_hex": "0000000000000030"
            }
          ]
        ],
        "source_amount": {
          "currency": "USD",
          "issuer": "rM21sWyMAJY1oqzgnweDatURxGMurBs7Kf",
          "value": "160510.6025237665"
        }
      }
    ],
    "destination_account": "raDjTrcEtyMqZT6s3PyKGcikUJqYNXUPPv",
    "destination_currencies": [
      "EUR",
      "XRP"
    ],
    "ledger_current_index": 2771044,
    "validated": false
  },
  "status": "success",
  "type": "response"
}
```

https://ripple.com/build/rippled-apis/#ripple-path-find
2015-11-20 10:44:21 -08:00
2015-11-19 15:40:35 -08:00
2015-11-19 11:19:35 -08:00
2015-05-14 16:07:47 -07:00
2015-05-14 16:07:47 -07:00
2015-10-16 10:52:11 -07:00
2015-11-19 12:48:08 -08:00
2015-11-19 18:00:22 -08:00
2015-11-19 18:00:22 -08:00
2015-11-19 11:19:35 -08:00

#ripple-lib

A JavaScript API for interacting with Ripple in Node.js and the browser

Circle CI Coverage Status

NPM

###Features

  • Connect to a rippled server in JavaScript (Node.js or browser)
  • Issue rippled API requests
  • Listen to events on the Ripple network (transaction, ledger, etc.)
  • Sign and submit transactions to the Ripple network

##Getting Started

Install ripple-lib using npm:

  $ npm install ripple-lib

Then see the documentation and code samples

##Running tests

  1. Clone the repository
  2. cd into the repository and install dependencies with npm install
  3. npm test or npm test --coverage (istanbul will create coverage reports in coverage/lcov-report/`)

##Generating Documentation

The continuous integration tests require that the documentation stays up-to-date. If you make changes the the JSON schemas, fixtures, or documentation sources, you must update the documentation by running npm run docgen.

##More Information

Description
A JavaScript/TypeScript API for interacting with the Xahau Ledger in Node.js and the browser
Readme 43 MiB
Languages
TypeScript 97.4%
JavaScript 2.6%