1 | # ripple-lib
|
2 |
|
3 | A JavaScript API for interacting with the XRP Ledger
|
4 |
|
5 | [![NPM](https://nodei.co/npm/ripple-lib.png)](https://www.npmjs.org/package/ripple-lib)
|
6 |
|
7 | ### Features
|
8 |
|
9 | + Connect to a `rippled` server from Node.js or a web browser
|
10 | + Helpers for creating requests and parsing responses for the [rippled API](https://developers.ripple.com/rippled-api.html)
|
11 | + Listen to events on the XRP Ledger (transactions, ledger, validations, etc.)
|
12 | + Sign and submit transactions to the XRP Ledger
|
13 | + Type definitions for TypeScript
|
14 |
|
15 | ## Getting Started
|
16 |
|
17 | See also: [RippleAPI Beginners Guide](https://xrpl.org/get-started-with-rippleapi-for-javascript.html)
|
18 |
|
19 | ### Requirements
|
20 |
|
21 | + **[Node v10](https://nodejs.org/)** is recommended. Other versions may work but are not frequently tested.
|
22 | + **[Yarn](https://yarnpkg.com/)** is recommended. `npm` may work but we use `yarn.lock`.
|
23 |
|
24 | ### Install
|
25 |
|
26 | In an existing project (with `package.json`), install `ripple-lib`:
|
27 | ```
|
28 | $ yarn add ripple-lib
|
29 | ```
|
30 |
|
31 | Then see the [documentation](https://github.com/ripple/ripple-lib/blob/develop/docs/index.md) and [code samples](https://github.com/ripple/ripple-lib/tree/develop/docs/samples).
|
32 |
|
33 | **What is ripple-lib used for?** Here's a [list of applications](APPLICATIONS.md) that use `ripple-lib`. Open a PR to add your app or project to the list!
|
34 |
|
35 | ### Mailing Lists
|
36 |
|
37 | We have a low-traffic mailing list for announcements of new ripple-lib releases. (About 1 email per week)
|
38 |
|
39 | + [Subscribe to ripple-lib-announce](https://groups.google.com/forum/#!forum/ripple-lib-announce)
|
40 |
|
41 | If you're using the XRP Ledger in production, you should run a [rippled server](https://github.com/ripple/rippled) and subscribe to the ripple-server mailing list as well.
|
42 |
|
43 | + [Subscribe to ripple-server](https://groups.google.com/forum/#!forum/ripple-server)
|
44 |
|
45 | ## Development
|
46 |
|
47 | To build the library for Node.js:
|
48 | ```
|
49 | $ yarn compile
|
50 | ```
|
51 |
|
52 | The TypeScript compiler will [output](./tsconfig.json#L7) the resulting JS files in `./dist/npm/`.
|
53 |
|
54 | To build the library for the browser:
|
55 | ```
|
56 | $ yarn build
|
57 | ```
|
58 |
|
59 | Gulp will [output](./Gulpfile.js) the resulting JS files in `./build/`.
|
60 |
|
61 | For details, see the `scripts` in `package.json`.
|
62 |
|
63 | ## Running Tests
|
64 |
|
65 | 1. Clone the repository
|
66 | 2. `cd` into the repository and install dependencies with `yarn install`
|
67 | 3. `yarn test`
|
68 |
|
69 | Also, run `yarn lint` to lint the code with `tslint`.
|
70 |
|
71 | ## Generating Documentation
|
72 |
|
73 | The continuous integration tests require that the documentation stays up-to-date. If you make changes to the JSON schemas, fixtures, or documentation sources, you must update the documentation by running `yarn run docgen`.
|
74 |
|
75 | ## More Information
|
76 |
|
77 | + [RippleAPI Reference](https://developers.ripple.com/rippleapi-reference.html) - XRP Ledger Dev Portal
|
78 | + [XRP Ledger Dev Portal](https://developers.ripple.com/)
|