mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
edited readme
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
`ripple-lib` connects to the Ripple network via the WebSocket protocol and runs in Node.js as well as in the browser.
|
||||
|
||||
This file contains installation and quickstart instructions. For the full documentation see:
|
||||
|
||||
1. [The `ripple-lib` Guides](docs/REFERENCE.md)
|
||||
2. [The `ripple-lib` API Reference](docs/REFERENCE.md)
|
||||
3. Additional documentation resources can be found at:
|
||||
@@ -28,7 +29,7 @@ var Remote = require('ripple-lib').Remote;
|
||||
// var Remote = ripple.Remote;
|
||||
|
||||
var remote = new Remote({
|
||||
// see next section for available options
|
||||
// see the API Reference for available options
|
||||
trusted: true,
|
||||
local_signing: true,
|
||||
local_fee: true,
|
||||
@@ -43,5 +44,7 @@ var remote = new Remote({
|
||||
|
||||
remote.connect(function() {
|
||||
/* remote connected */
|
||||
|
||||
// see the API Reference for available functions
|
||||
});
|
||||
```
|
||||
|
||||
@@ -1,18 +1,24 @@
|
||||
#`ripple-lib` Guides
|
||||
|
||||
##In this document:
|
||||
###In this document:
|
||||
|
||||
1. [Connecting to the Ripple network with the `Remote` module](GUIDES.md#connecting-to-the-ripple-network-with-the-remote-module)
|
||||
2. [Using `Remote` functions and `Request` objects](GUIDES.md#using-remote-functions-and-request-objects)
|
||||
3. [Submitting a transaction](GUIDES.md#submitting-a-transaction)
|
||||
4. [Listening to the network](GUIDES.md#listening-to-the-network)
|
||||
1. [Connecting to the Ripple network with the `Remote` module](GUIDES.md#1-connecting-to-the-ripple-network-with-the-remote-module)
|
||||
2. [Using `Remote` functions and `Request` objects](GUIDES.md#2-using-remote-functions-and-request-objects)
|
||||
3. [Submitting a transaction](GUIDES.md#3-submitting-a-transaction)
|
||||
4. [Listening to the network](GUIDES.md#4-listening-to-the-network)
|
||||
|
||||
##Connecting to the Ripple network with the `Remote` module
|
||||
|
||||
###Also see:
|
||||
|
||||
1. [The `ripple-lib` README](../README.md)
|
||||
2. [The `ripple-lib` API Reference](REFERENCE.md)
|
||||
|
||||
##1. Connecting to the Ripple network with the `Remote` module
|
||||
|
||||
|
||||
|
||||
|
||||
##Using `Remote` functions and `Request` objects
|
||||
##2. Using `Remote` functions and `Request` objects
|
||||
|
||||
Each remote function returns a `Request` object, which is an `EventEmitter`. You can listen for success or failure events from each request or, alternatively, you can provide a callback.
|
||||
|
||||
@@ -46,7 +52,7 @@ NOTE: See the [`Remote` functions reference]() section below for documentation o
|
||||
|
||||
|
||||
|
||||
##Submitting a transaction
|
||||
##3. Submitting a transaction
|
||||
|
||||
```js
|
||||
var Remote = require('ripple-lib').Remote;
|
||||
@@ -72,4 +78,4 @@ remote.connect(function() {
|
||||
});
|
||||
```
|
||||
|
||||
##Listening to the network
|
||||
##4. Listening to the network
|
||||
@@ -1,20 +1,20 @@
|
||||
#`ripple-lib` API Reference
|
||||
|
||||
In this document:
|
||||
###In this document:
|
||||
|
||||
1. [Remote options](REFERENCE.md#1-remote-options)
|
||||
2. [Remote functions](REFERENCE.md#2-remote-functions)
|
||||
1. [`Remote` options](REFERENCE.md#1-remote-options)
|
||||
2. [`Remote` functions](REFERENCE.md#2-remote-functions)
|
||||
+ [Server info functions](REFERENCE.md#server-info-functions)
|
||||
+ [Ledger query functions](REFERENCE.md#ledger-query-functions)
|
||||
+ [Transaction query functions](REFERENCE.md#transaction-query-functions)
|
||||
+ [Account query functions](REFERENCE.md#account-query-functions)
|
||||
+ [Order book query functions](REFERENCE.md#order-book-query-functions)
|
||||
+ [Transaction submission functions](REFERENCE.md#transaction-submission-functions)
|
||||
3. [Transaction events](REFERENCE.md#3-transaction-events)
|
||||
4. [Amount objects](REFERENCE.md#4-amount-objects)
|
||||
3. [`Transaction` events](REFERENCE.md#3-transaction-events)
|
||||
4. [`Amount` objects](REFERENCE.md#4-amount-objects)
|
||||
|
||||
|
||||
Also see:
|
||||
###Also see:
|
||||
|
||||
1. [The `ripple-lib` README](../README.md)
|
||||
2. [The `ripple-lib` GUIDES](GUIDES.md)
|
||||
@@ -22,6 +22,16 @@ Also see:
|
||||
|
||||
#1. `Remote` options
|
||||
|
||||
```js
|
||||
/* Loading ripple-lib with Node.js */
|
||||
var Remote = require('ripple-lib').Remote;
|
||||
|
||||
/* Loading ripple-lib in a webpage */
|
||||
// var Remote = ripple.Remote;
|
||||
|
||||
var remote = new Remote({options});
|
||||
```
|
||||
|
||||
A new `Remote` can be created with the following options:
|
||||
|
||||
+ `trace` Log all of the events emitted (boolean)
|
||||
|
||||
Reference in New Issue
Block a user