mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-04 13:05:49 +00:00
Docs: Fix whitespace
Do not use newline-trimming ending tag Fix #1175 (bug introduced in #1153)
This commit is contained in:
@@ -119,6 +119,7 @@ Using RippleAPI, you can:
|
|||||||
This page contains documentation for ripple-lib. To use ripple-lib with npm/yarn, begin with the [Getting Started](https://github.com/ripple/ripple-lib#getting-started) steps.
|
This page contains documentation for ripple-lib. To use ripple-lib with npm/yarn, begin with the [Getting Started](https://github.com/ripple/ripple-lib#getting-started) steps.
|
||||||
|
|
||||||
**What is ripple-lib used for?** Here's a [list of applications that use `ripple-lib`](https://github.com/ripple/ripple-lib/blob/develop/APPLICATIONS.md). Open a PR to add your app or project to the list!
|
**What is ripple-lib used for?** Here's a [list of applications that use `ripple-lib`](https://github.com/ripple/ripple-lib/blob/develop/APPLICATIONS.md). Open a PR to add your app or project to the list!
|
||||||
|
|
||||||
## Boilerplate
|
## Boilerplate
|
||||||
|
|
||||||
Use the following [boilerplate code](https://en.wikipedia.org/wiki/Boilerplate_code) to wrap your custom code using RippleAPI.
|
Use the following [boilerplate code](https://en.wikipedia.org/wiki/Boilerplate_code) to wrap your custom code using RippleAPI.
|
||||||
@@ -194,6 +195,7 @@ If you omit the `server` parameter, RippleAPI operates [offline](#offline-functi
|
|||||||
After you have installed ripple-lib, you can create scripts using the [boilerplate](#boilerplate) and run them using the Node.js executable, typically named `node`:
|
After you have installed ripple-lib, you can create scripts using the [boilerplate](#boilerplate) and run them using the Node.js executable, typically named `node`:
|
||||||
|
|
||||||
`node script.js`
|
`node script.js`
|
||||||
|
|
||||||
## Offline functionality
|
## Offline functionality
|
||||||
|
|
||||||
RippleAPI can also function without internet connectivity. This can be useful in order to generate secrets and sign transactions from a secure, isolated machine.
|
RippleAPI can also function without internet connectivity. This can be useful in order to generate secrets and sign transactions from a secure, isolated machine.
|
||||||
@@ -221,6 +223,7 @@ Methods that depend on the state of the XRP Ledger are unavailable in offline mo
|
|||||||
* [generateAddress](#generateaddress)
|
* [generateAddress](#generateaddress)
|
||||||
* [generateXAddress](#generatexaddress)
|
* [generateXAddress](#generatexaddress)
|
||||||
* [computeLedgerHash](#computeledgerhash)
|
* [computeLedgerHash](#computeledgerhash)
|
||||||
|
|
||||||
# Basic Types
|
# Basic Types
|
||||||
|
|
||||||
## Address
|
## Address
|
||||||
@@ -292,6 +295,7 @@ Name | Type | Description
|
|||||||
currency | [currency](#currency) | The three-character code or hexadecimal string used to denote currencies, or "drops" for the smallest unit of XRP.
|
currency | [currency](#currency) | The three-character code or hexadecimal string used to denote currencies, or "drops" for the smallest unit of XRP.
|
||||||
counterparty | [address](#address) | *Optional* The XRP Ledger address of the account that owes or is owed the funds (omitted if `currency` is "XRP" or "drops")
|
counterparty | [address](#address) | *Optional* The XRP Ledger address of the account that owes or is owed the funds (omitted if `currency` is "XRP" or "drops")
|
||||||
value | [value](#value) | *Optional* The quantity of the currency, denoted as a string to retain floating point precision
|
value | [value](#value) | *Optional* The quantity of the currency, denoted as a string to retain floating point precision
|
||||||
|
|
||||||
# Transaction Overview
|
# Transaction Overview
|
||||||
|
|
||||||
## Transaction Types
|
## Transaction Types
|
||||||
@@ -378,6 +382,7 @@ Name | Type | Description
|
|||||||
data | string | *Optional* Arbitrary string, conventionally containing the content of the memo.
|
data | string | *Optional* Arbitrary string, conventionally containing the content of the memo.
|
||||||
format | string | *Optional* Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted.
|
format | string | *Optional* Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted.
|
||||||
type | string | *Optional* Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted.
|
type | string | *Optional* Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted.
|
||||||
|
|
||||||
# Transaction Specifications
|
# Transaction Specifications
|
||||||
|
|
||||||
A *transaction specification* specifies what a transaction should do. Each [Transaction Type](#transaction-types) has its own type of specification.
|
A *transaction specification* specifies what a transaction should do. Each [Transaction Type](#transaction-types) has its own type of specification.
|
||||||
@@ -788,6 +793,7 @@ signature | string | *Optional* Signed claim authorizing withdrawal of XRP from
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# rippled APIs
|
# rippled APIs
|
||||||
|
|
||||||
ripple-lib relies on [rippled APIs](https://ripple.com/build/rippled-apis/) for online functionality. In addition to ripple-lib's own methods, you can also access rippled APIs through ripple-lib. Use the `request()`, `hasNextPage()`, and `requestNextPage()` methods:
|
ripple-lib relies on [rippled APIs](https://ripple.com/build/rippled-apis/) for online functionality. In addition to ripple-lib's own methods, you can also access rippled APIs through ripple-lib. Use the `request()`, `hasNextPage()`, and `requestNextPage()` methods:
|
||||||
@@ -860,6 +866,7 @@ api.connect().then(() => { // Omit this if you are already connected
|
|||||||
The subscription ends when you unsubscribe or the WebSocket connection is closed.
|
The subscription ends when you unsubscribe or the WebSocket connection is closed.
|
||||||
|
|
||||||
For full details, see [rippled Subscriptions](https://ripple.com/build/rippled-apis/#subscriptions).
|
For full details, see [rippled Subscriptions](https://ripple.com/build/rippled-apis/#subscriptions).
|
||||||
|
|
||||||
## request
|
## request
|
||||||
|
|
||||||
`request(command: string, options: object): Promise<object>`
|
`request(command: string, options: object): Promise<object>`
|
||||||
@@ -913,6 +920,7 @@ return api.request('ledger', {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## hasNextPage
|
## hasNextPage
|
||||||
|
|
||||||
`hasNextPage(currentResponse): boolean`
|
`hasNextPage(currentResponse): boolean`
|
||||||
@@ -940,6 +948,7 @@ return api.request('ledger_data', {
|
|||||||
}
|
}
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
```
|
```
|
||||||
|
|
||||||
## requestNextPage
|
## requestNextPage
|
||||||
|
|
||||||
`requestNextPage(command: string, params: object = {}, currentResponse: object): Promise<object>`
|
`requestNextPage(command: string, params: object = {}, currentResponse: object): Promise<object>`
|
||||||
@@ -970,7 +979,9 @@ return api.request(command, params).then(response => {
|
|||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# Static Methods
|
# Static Methods
|
||||||
|
|
||||||
## renameCounterpartyToIssuer
|
## renameCounterpartyToIssuer
|
||||||
|
|
||||||
`renameCounterpartyToIssuer(issue: {currency: string, counterparty: address}): {currency: string, issuer: address}`
|
`renameCounterpartyToIssuer(issue: {currency: string, counterparty: address}): {currency: string, issuer: address}`
|
||||||
@@ -1008,6 +1019,7 @@ console.log(RippleAPI.renameCounterpartyToIssuer(orderbookInfo.counter))
|
|||||||
{ currency: 'USD', issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' }
|
{ currency: 'USD', issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' }
|
||||||
{ currency: 'BTC', issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' }
|
{ currency: 'BTC', issuer: 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' }
|
||||||
```
|
```
|
||||||
|
|
||||||
## formatBidsAndAsks
|
## formatBidsAndAsks
|
||||||
|
|
||||||
`formatBidsAndAsks(orderbookInfo: {base: Issue, counter: Issue}, offers: BookOffer[]): orderbook`
|
`formatBidsAndAsks(orderbookInfo: {base: Issue, counter: Issue}, offers: BookOffer[]): orderbook`
|
||||||
@@ -1286,7 +1298,9 @@ return Promise.all(
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
# API Methods
|
# API Methods
|
||||||
|
|
||||||
## connect
|
## connect
|
||||||
|
|
||||||
`connect(): Promise<void>`
|
`connect(): Promise<void>`
|
||||||
@@ -1304,6 +1318,7 @@ This method returns a promise that resolves with a void value when a connection
|
|||||||
### Example
|
### Example
|
||||||
|
|
||||||
See [Boilerplate](#boilerplate) for code sample.
|
See [Boilerplate](#boilerplate) for code sample.
|
||||||
|
|
||||||
## disconnect
|
## disconnect
|
||||||
|
|
||||||
`disconnect(): Promise<void>`
|
`disconnect(): Promise<void>`
|
||||||
@@ -1321,6 +1336,7 @@ This method returns a promise that resolves with a void value when a connection
|
|||||||
### Example
|
### Example
|
||||||
|
|
||||||
See [Boilerplate](#boilerplate) for code sample
|
See [Boilerplate](#boilerplate) for code sample
|
||||||
|
|
||||||
## isConnected
|
## isConnected
|
||||||
|
|
||||||
`isConnected(): boolean`
|
`isConnected(): boolean`
|
||||||
@@ -1344,6 +1360,7 @@ return api.isConnected();
|
|||||||
```json
|
```json
|
||||||
true
|
true
|
||||||
```
|
```
|
||||||
|
|
||||||
## getServerInfo
|
## getServerInfo
|
||||||
|
|
||||||
`getServerInfo(): Promise<object>`
|
`getServerInfo(): Promise<object>`
|
||||||
@@ -1417,6 +1434,7 @@ return api.getServerInfo().then(info => {/* ... */});
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getFee
|
## getFee
|
||||||
|
|
||||||
`getFee(): Promise<string>`
|
`getFee(): Promise<string>`
|
||||||
@@ -1444,6 +1462,7 @@ return api.getFee().then(fee => {/* ... */});
|
|||||||
```json
|
```json
|
||||||
"0.000012"
|
"0.000012"
|
||||||
```
|
```
|
||||||
|
|
||||||
## getLedgerVersion
|
## getLedgerVersion
|
||||||
|
|
||||||
`getLedgerVersion(): Promise<number>`
|
`getLedgerVersion(): Promise<number>`
|
||||||
@@ -1470,6 +1489,7 @@ return api.getLedgerVersion().then(ledgerVersion => {
|
|||||||
16869039
|
16869039
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getTransaction
|
## getTransaction
|
||||||
|
|
||||||
`getTransaction(id: string, options: object): Promise<object>`
|
`getTransaction(id: string, options: object): Promise<object>`
|
||||||
@@ -1621,6 +1641,7 @@ return api.getTransaction(id).then(transaction => {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getTransactions
|
## getTransactions
|
||||||
|
|
||||||
`getTransactions(address: string, options: object): Promise<Array<object>>`
|
`getTransactions(address: string, options: object): Promise<Array<object>>`
|
||||||
@@ -1854,6 +1875,7 @@ return api.getTransactions(address).then(transaction => {
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getTrustlines
|
## getTrustlines
|
||||||
|
|
||||||
`getTrustlines(address: string, options: object): Promise<Array<object>>`
|
`getTrustlines(address: string, options: object): Promise<Array<object>>`
|
||||||
@@ -1998,6 +2020,7 @@ return api.getTrustlines(address).then(trustlines =>
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getBalances
|
## getBalances
|
||||||
|
|
||||||
`getBalances(address: string, options: object): Promise<Array<object>>`
|
`getBalances(address: string, options: object): Promise<Array<object>>`
|
||||||
@@ -2164,6 +2187,7 @@ return api.getBalances(address).then(balances =>
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getBalanceSheet
|
## getBalanceSheet
|
||||||
|
|
||||||
`getBalanceSheet(address: string, options: object): Promise<object>`
|
`getBalanceSheet(address: string, options: object): Promise<object>`
|
||||||
@@ -2259,6 +2283,7 @@ return api.getBalanceSheet(address).then(balanceSheet =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getPaths
|
## getPaths
|
||||||
|
|
||||||
`getPaths(pathfind: object): Promise<Array<object>>`
|
`getPaths(pathfind: object): Promise<Array<object>>`
|
||||||
@@ -2379,6 +2404,7 @@ return api.getPaths(pathfind)
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getOrders
|
## getOrders
|
||||||
|
|
||||||
`getOrders(address: string, options: object): Promise<Array<object>>`
|
`getOrders(address: string, options: object): Promise<Array<object>>`
|
||||||
@@ -2759,6 +2785,7 @@ return api.getOrders(address).then(orders =>
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getOrderbook
|
## getOrderbook
|
||||||
|
|
||||||
`getOrderbook(address: string, orderbook: object, options: object): Promise<object>`
|
`getOrderbook(address: string, orderbook: object, options: object): Promise<object>`
|
||||||
@@ -3864,6 +3891,7 @@ return api.getOrderbook(address, orderbook)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getSettings
|
## getSettings
|
||||||
|
|
||||||
`getSettings(address: string, options: object): Promise<object>`
|
`getSettings(address: string, options: object): Promise<object>`
|
||||||
@@ -3946,6 +3974,7 @@ return api.getSettings(address).then(settings =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getAccountInfo
|
## getAccountInfo
|
||||||
|
|
||||||
`getAccountInfo(address: string, options: object): Promise<object>`
|
`getAccountInfo(address: string, options: object): Promise<object>`
|
||||||
@@ -3994,6 +4023,7 @@ return api.getAccountInfo(address).then(info =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getAccountObjects
|
## getAccountObjects
|
||||||
|
|
||||||
`getAccountObjects(address: string, options: object): Promise<AccountObjectsResponse>`
|
`getAccountObjects(address: string, options: object): Promise<AccountObjectsResponse>`
|
||||||
@@ -4318,6 +4348,7 @@ return api.getAccountObjects(address: address).then(objects =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getPaymentChannel
|
## getPaymentChannel
|
||||||
|
|
||||||
`getPaymentChannel(id: string): Promise<object>`
|
`getPaymentChannel(id: string): Promise<object>`
|
||||||
@@ -4373,6 +4404,7 @@ return api.getPaymentChannel(channelId).then(channel =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## getLedger
|
## getLedger
|
||||||
|
|
||||||
`getLedger(options: object): Promise<object>`
|
`getLedger(options: object): Promise<object>`
|
||||||
@@ -4436,6 +4468,7 @@ return api.getLedger()
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## parseAccountFlags
|
## parseAccountFlags
|
||||||
|
|
||||||
`parseAccountFlags(Flags: number): object`
|
`parseAccountFlags(Flags: number): object`
|
||||||
@@ -4471,6 +4504,7 @@ console.log(JSON.stringify(flags, null, 2))
|
|||||||
"defaultRipple": false
|
"defaultRipple": false
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## prepareTransaction
|
## prepareTransaction
|
||||||
|
|
||||||
`prepareTransaction(transaction: object, instructions: object): Promise<object>`
|
`prepareTransaction(transaction: object, instructions: object): Promise<object>`
|
||||||
@@ -4528,6 +4562,7 @@ async function preparedPreauth() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## preparePayment
|
## preparePayment
|
||||||
|
|
||||||
`preparePayment(address: string, payment: object, instructions: object): Promise<object>`
|
`preparePayment(address: string, payment: object, instructions: object): Promise<object>`
|
||||||
@@ -4600,6 +4635,7 @@ return api.preparePayment(address, payment).then(prepared => {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareTrustline
|
## prepareTrustline
|
||||||
|
|
||||||
`prepareTrustline(address: string, trustline: object, instructions: object): Promise<object>`
|
`prepareTrustline(address: string, trustline: object, instructions: object): Promise<object>`
|
||||||
@@ -4667,6 +4703,7 @@ return api.prepareTrustline(address, trustline).then(prepared =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareOrder
|
## prepareOrder
|
||||||
|
|
||||||
`prepareOrder(address: string, order: object, instructions: object): Promise<object>`
|
`prepareOrder(address: string, order: object, instructions: object): Promise<object>`
|
||||||
@@ -4734,6 +4771,7 @@ return api.prepareOrder(address, order)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareOrderCancellation
|
## prepareOrderCancellation
|
||||||
|
|
||||||
`prepareOrderCancellation(address: string, orderCancellation: object, instructions: object): Promise<object>`
|
`prepareOrderCancellation(address: string, orderCancellation: object, instructions: object): Promise<object>`
|
||||||
@@ -4786,6 +4824,7 @@ return api.prepareOrderCancellation(address, orderCancellation)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareSettings
|
## prepareSettings
|
||||||
|
|
||||||
`prepareSettings(address: string, settings: object, instructions: object): Promise<object>`
|
`prepareSettings(address: string, settings: object, instructions: object): Promise<object>`
|
||||||
@@ -4849,6 +4888,7 @@ return api.prepareSettings(address, settings)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareEscrowCreation
|
## prepareEscrowCreation
|
||||||
|
|
||||||
`prepareEscrowCreation(address: string, escrowCreation: object, instructions: object): Promise<object>`
|
`prepareEscrowCreation(address: string, escrowCreation: object, instructions: object): Promise<object>`
|
||||||
@@ -4912,6 +4952,7 @@ return api.prepareEscrowCreation(address, escrowCreation).then(prepared =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareEscrowCancellation
|
## prepareEscrowCancellation
|
||||||
|
|
||||||
`prepareEscrowCancellation(address: string, escrowCancellation: object, instructions: object): Promise<object>`
|
`prepareEscrowCancellation(address: string, escrowCancellation: object, instructions: object): Promise<object>`
|
||||||
@@ -4967,6 +5008,7 @@ return api.prepareEscrowCancellation(address, escrowCancellation).then(prepared
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareEscrowExecution
|
## prepareEscrowExecution
|
||||||
|
|
||||||
`prepareEscrowExecution(address: string, escrowExecution: object, instructions: object): Promise<object>`
|
`prepareEscrowExecution(address: string, escrowExecution: object, instructions: object): Promise<object>`
|
||||||
@@ -5024,6 +5066,7 @@ return api.prepareEscrowExecution(address, escrowExecution).then(prepared =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## preparePaymentChannelCreate
|
## preparePaymentChannelCreate
|
||||||
|
|
||||||
`preparePaymentChannelCreate(address: string, paymentChannelCreate: object, instructions: object): Promise<object>`
|
`preparePaymentChannelCreate(address: string, paymentChannelCreate: object, instructions: object): Promise<object>`
|
||||||
@@ -5081,6 +5124,7 @@ return api.preparePaymentChannelCreate(address, paymentChannelCreate).then(prepa
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## preparePaymentChannelClaim
|
## preparePaymentChannelClaim
|
||||||
|
|
||||||
`preparePaymentChannelClaim(address: string, paymentChannelClaim: object, instructions: object): Promise<object>`
|
`preparePaymentChannelClaim(address: string, paymentChannelClaim: object, instructions: object): Promise<object>`
|
||||||
@@ -5135,6 +5179,7 @@ return api.preparePaymentChannelClaim(address, paymentChannelClaim).then(prepare
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## preparePaymentChannelFund
|
## preparePaymentChannelFund
|
||||||
|
|
||||||
`preparePaymentChannelFund(address: string, paymentChannelFund: object, instructions: object): Promise<object>`
|
`preparePaymentChannelFund(address: string, paymentChannelFund: object, instructions: object): Promise<object>`
|
||||||
@@ -5190,6 +5235,7 @@ return api.preparePaymentChannelFund(address, paymentChannelFund).then(prepared
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareCheckCreate
|
## prepareCheckCreate
|
||||||
|
|
||||||
`prepareCheckCreate(address: string, checkCreate: object, instructions: object): Promise<object>`
|
`prepareCheckCreate(address: string, checkCreate: object, instructions: object): Promise<object>`
|
||||||
@@ -5248,6 +5294,7 @@ return api.prepareCheckCreate(address, checkCreate).then(prepared =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareCheckCancel
|
## prepareCheckCancel
|
||||||
|
|
||||||
`prepareCheckCancel(address: string, checkCancel: object, instructions: object): Promise<object>`
|
`prepareCheckCancel(address: string, checkCancel: object, instructions: object): Promise<object>`
|
||||||
@@ -5302,6 +5349,7 @@ return api.prepareCheckCancel(address, checkCancel).then(prepared =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## prepareCheckCash
|
## prepareCheckCash
|
||||||
|
|
||||||
`prepareCheckCash(address: string, checkCash: object, instructions: object): Promise<object>`
|
`prepareCheckCash(address: string, checkCash: object, instructions: object): Promise<object>`
|
||||||
@@ -5360,6 +5408,7 @@ return api.prepareCheckCash(address, checkCash).then(prepared =>
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## sign
|
## sign
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -5501,6 +5550,7 @@ If any of `{signAs: some_address}` options were missing the code will return a v
|
|||||||
```
|
```
|
||||||
[ValidationError(txJSON is not the same for all signedTransactions)]
|
[ValidationError(txJSON is not the same for all signedTransactions)]
|
||||||
```
|
```
|
||||||
|
|
||||||
## combine
|
## combine
|
||||||
|
|
||||||
`combine(signedTransactions: Array<string>): {signedTransaction: string, id: string}`
|
`combine(signedTransactions: Array<string>): {signedTransaction: string, id: string}`
|
||||||
@@ -5538,6 +5588,7 @@ return api.combine(signedTransactions);
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## submit
|
## submit
|
||||||
|
|
||||||
`submit(signedTransaction: string): Promise<object>`
|
`submit(signedTransaction: string): Promise<object>`
|
||||||
@@ -5600,6 +5651,7 @@ return api.submit(signedTransaction)
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## generateXAddress
|
## generateXAddress
|
||||||
|
|
||||||
`generateXAddress(options?: object): {address: string, secret: string}`
|
`generateXAddress(options?: object): {address: string, secret: string}`
|
||||||
@@ -5639,6 +5691,7 @@ return api.generateAddress();
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## generateAddress
|
## generateAddress
|
||||||
|
|
||||||
`generateAddress(options?: object): {address: string, secret: string}`
|
`generateAddress(options?: object): {address: string, secret: string}`
|
||||||
@@ -5684,6 +5737,7 @@ return api.generateAddress();
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## isValidAddress
|
## isValidAddress
|
||||||
|
|
||||||
`isValidAddress(address: string): boolean`
|
`isValidAddress(address: string): boolean`
|
||||||
@@ -5703,6 +5757,7 @@ This method returns `true` if the address is valid and `false` if it is not.
|
|||||||
```javascript
|
```javascript
|
||||||
return api.isValidAddress("address")
|
return api.isValidAddress("address")
|
||||||
```
|
```
|
||||||
|
|
||||||
## isValidSecret
|
## isValidSecret
|
||||||
|
|
||||||
`isValidSecret(secret: string): boolean`
|
`isValidSecret(secret: string): boolean`
|
||||||
@@ -5722,6 +5777,7 @@ This method returns `true` if the secret is valid and `false` if it is not.
|
|||||||
```javascript
|
```javascript
|
||||||
return api.isValidSecret("secret")
|
return api.isValidSecret("secret")
|
||||||
```
|
```
|
||||||
|
|
||||||
## deriveKeypair
|
## deriveKeypair
|
||||||
|
|
||||||
`deriveKeypair(seed: string): {privateKey: string, publicKey: string}`
|
`deriveKeypair(seed: string): {privateKey: string, publicKey: string}`
|
||||||
@@ -5743,6 +5799,7 @@ var keypair = api.deriveKeypair(seed)
|
|||||||
var public_key = keypair.publicKey;
|
var public_key = keypair.publicKey;
|
||||||
var private_key = keypair.privateKey;
|
var private_key = keypair.privateKey;
|
||||||
```
|
```
|
||||||
|
|
||||||
## deriveAddress
|
## deriveAddress
|
||||||
|
|
||||||
`deriveAddress(publicKey: string): string`
|
`deriveAddress(publicKey: string): string`
|
||||||
@@ -5762,6 +5819,7 @@ This method returns a string corresponding to the address derived from the publi
|
|||||||
```javascript
|
```javascript
|
||||||
var address = api.deriveAddress(public_key);
|
var address = api.deriveAddress(public_key);
|
||||||
```
|
```
|
||||||
|
|
||||||
## signPaymentChannelClaim
|
## signPaymentChannelClaim
|
||||||
|
|
||||||
`signPaymentChannelClaim(channel: string, amount: string, privateKey: string): string`
|
`signPaymentChannelClaim(channel: string, amount: string, privateKey: string): string`
|
||||||
@@ -5800,6 +5858,7 @@ return api.signPaymentChannelClaim(channel, amount, privateKey);
|
|||||||
"3045022100B5C54654221F154347679B97AE7791CBEF5E6772A3F894F9C781B8F1B400F89F022021E466D29DC5AEB5DFAFC76E8A88D2E388EBD25A84143B6AC3B647F479CB89B7"
|
"3045022100B5C54654221F154347679B97AE7791CBEF5E6772A3F894F9C781B8F1B400F89F022021E466D29DC5AEB5DFAFC76E8A88D2E388EBD25A84143B6AC3B647F479CB89B7"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## verifyPaymentChannelClaim
|
## verifyPaymentChannelClaim
|
||||||
|
|
||||||
`verifyPaymentChannelClaim(channel: string, amount: string, signature: string, publicKey: string): boolean`
|
`verifyPaymentChannelClaim(channel: string, amount: string, signature: string, publicKey: string): boolean`
|
||||||
@@ -5838,6 +5897,7 @@ return api.verifyPaymentChannelClaim(channel, amount, signature, publicKey);
|
|||||||
```json
|
```json
|
||||||
true
|
true
|
||||||
```
|
```
|
||||||
|
|
||||||
## computeLedgerHash
|
## computeLedgerHash
|
||||||
|
|
||||||
`computeLedgerHash(ledger: object): string`
|
`computeLedgerHash(ledger: object): string`
|
||||||
@@ -5893,6 +5953,7 @@ return api.computeLedgerHash(ledger);
|
|||||||
```json
|
```json
|
||||||
"F4D865D83EB88C1A1911B9E90641919A1314F36E1B099F8E95FE3B7C77BE3349"
|
"F4D865D83EB88C1A1911B9E90641919A1314F36E1B099F8E95FE3B7C77BE3349"
|
||||||
```
|
```
|
||||||
|
|
||||||
## xrpToDrops
|
## xrpToDrops
|
||||||
|
|
||||||
`xrpToDrops(xrp: string | BigNumber): string`
|
`xrpToDrops(xrp: string | BigNumber): string`
|
||||||
@@ -5940,6 +6001,7 @@ return api.dropsToXrp('1');
|
|||||||
```json
|
```json
|
||||||
'0.000001'
|
'0.000001'
|
||||||
```
|
```
|
||||||
|
|
||||||
## iso8601ToRippleTime
|
## iso8601ToRippleTime
|
||||||
|
|
||||||
`iso8601ToRippleTime(iso8601: string): number`
|
`iso8601ToRippleTime(iso8601: string): number`
|
||||||
@@ -5967,6 +6029,7 @@ api.iso8601ToRippleTime('2017-02-17T15:04:57Z');
|
|||||||
```json
|
```json
|
||||||
540659097
|
540659097
|
||||||
```
|
```
|
||||||
|
|
||||||
## rippleTimeToISO8601
|
## rippleTimeToISO8601
|
||||||
|
|
||||||
`rippleTimeToISO8601(rippleTime: number): string`
|
`rippleTimeToISO8601(rippleTime: number): string`
|
||||||
@@ -5994,6 +6057,7 @@ api.rippleTimeToISO8601(540659097);
|
|||||||
```json
|
```json
|
||||||
'2017-02-17T15:04:57.000Z'
|
'2017-02-17T15:04:57.000Z'
|
||||||
```
|
```
|
||||||
|
|
||||||
## txFlags
|
## txFlags
|
||||||
|
|
||||||
`txFlags.TRANSACTION_TYPE.FLAG`
|
`txFlags.TRANSACTION_TYPE.FLAG`
|
||||||
@@ -6075,6 +6139,7 @@ The remaining transaction types do not have any flags at this time.
|
|||||||
* EscrowCancel
|
* EscrowCancel
|
||||||
* PaymentChannelCreate
|
* PaymentChannelCreate
|
||||||
* PaymentChannelFund
|
* PaymentChannelFund
|
||||||
|
|
||||||
## schemaValidator
|
## schemaValidator
|
||||||
|
|
||||||
Unlike the rest of the ripple-lib API, schemaValidator is a static object on RippleAPI. It provides utility methods that do not use a server.
|
Unlike the rest of the ripple-lib API, schemaValidator is a static object on RippleAPI. It provides utility methods that do not use a server.
|
||||||
@@ -6110,6 +6175,7 @@ RippleAPI.schemaValidator.schemaValidate('sign', {
|
|||||||
```
|
```
|
||||||
[ValidationError(instance.id does not match pattern "^[A-F0-9]{64}$")]
|
[ValidationError(instance.id does not match pattern "^[A-F0-9]{64}$")]
|
||||||
```
|
```
|
||||||
|
|
||||||
# API Events
|
# API Events
|
||||||
|
|
||||||
## ledger
|
## ledger
|
||||||
@@ -6214,3 +6280,4 @@ api.on('disconnected', (code) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,69 +1,69 @@
|
|||||||
<%- include('introduction.md.ejs') -%>
|
<%- include('introduction.md.ejs') %>
|
||||||
<%- include('boilerplate.md.ejs') -%>
|
<%- include('boilerplate.md.ejs') %>
|
||||||
<%- include('offline.md.ejs') -%>
|
<%- include('offline.md.ejs') %>
|
||||||
<%- include('basictypes.md.ejs') -%>
|
<%- include('basictypes.md.ejs') %>
|
||||||
<%- include('transactions.md.ejs') -%>
|
<%- include('transactions.md.ejs') %>
|
||||||
<%- include('specifications.md.ejs') -%>
|
<%- include('specifications.md.ejs') %>
|
||||||
<%- include('rippledAPIs.md.ejs') -%>
|
<%- include('rippledAPIs.md.ejs') %>
|
||||||
<%- include('request.md.ejs') -%>
|
<%- include('request.md.ejs') %>
|
||||||
<%- include('hasNextPage.md.ejs') -%>
|
<%- include('hasNextPage.md.ejs') %>
|
||||||
<%- include('requestNextPage.md.ejs') -%>
|
<%- include('requestNextPage.md.ejs') %>
|
||||||
|
|
||||||
<%- include('staticMethods.md.ejs') -%>
|
<%- include('staticMethods.md.ejs') %>
|
||||||
<%- include('renameCounterpartyToIssuer.md.ejs') -%>
|
<%- include('renameCounterpartyToIssuer.md.ejs') %>
|
||||||
<%- include('formatBidsAndAsks.md.ejs') -%>
|
<%- include('formatBidsAndAsks.md.ejs') %>
|
||||||
|
|
||||||
<%- include('methods.md.ejs') -%>
|
<%- include('methods.md.ejs') %>
|
||||||
<%- include('connect.md.ejs') -%>
|
<%- include('connect.md.ejs') %>
|
||||||
<%- include('disconnect.md.ejs') -%>
|
<%- include('disconnect.md.ejs') %>
|
||||||
<%- include('isConnected.md.ejs') -%>
|
<%- include('isConnected.md.ejs') %>
|
||||||
<%- include('getServerInfo.md.ejs') -%>
|
<%- include('getServerInfo.md.ejs') %>
|
||||||
<%- include('getFee.md.ejs') -%>
|
<%- include('getFee.md.ejs') %>
|
||||||
<%- include('getLedgerVersion.md.ejs') -%>
|
<%- include('getLedgerVersion.md.ejs') %>
|
||||||
<%- include('getTransaction.md.ejs') -%>
|
<%- include('getTransaction.md.ejs') %>
|
||||||
<%- include('getTransactions.md.ejs') -%>
|
<%- include('getTransactions.md.ejs') %>
|
||||||
<%- include('getTrustlines.md.ejs') -%>
|
<%- include('getTrustlines.md.ejs') %>
|
||||||
<%- include('getBalances.md.ejs') -%>
|
<%- include('getBalances.md.ejs') %>
|
||||||
<%- include('getBalanceSheet.md.ejs') -%>
|
<%- include('getBalanceSheet.md.ejs') %>
|
||||||
<%- include('getPaths.md.ejs') -%>
|
<%- include('getPaths.md.ejs') %>
|
||||||
<%- include('getOrders.md.ejs') -%>
|
<%- include('getOrders.md.ejs') %>
|
||||||
<%- include('getOrderbook.md.ejs') -%>
|
<%- include('getOrderbook.md.ejs') %>
|
||||||
<%- include('getSettings.md.ejs') -%>
|
<%- include('getSettings.md.ejs') %>
|
||||||
<%- include('getAccountInfo.md.ejs') -%>
|
<%- include('getAccountInfo.md.ejs') %>
|
||||||
<%- include('getAccountObjects.md.ejs') -%>
|
<%- include('getAccountObjects.md.ejs') %>
|
||||||
<%- include('getPaymentChannel.md.ejs') -%>
|
<%- include('getPaymentChannel.md.ejs') %>
|
||||||
<%- include('getLedger.md.ejs') -%>
|
<%- include('getLedger.md.ejs') %>
|
||||||
<%- include('parseAccountFlags.md.ejs') -%>
|
<%- include('parseAccountFlags.md.ejs') %>
|
||||||
<%- include('prepareTransaction.md.ejs') -%>
|
<%- include('prepareTransaction.md.ejs') %>
|
||||||
<%- include('preparePayment.md.ejs') -%>
|
<%- include('preparePayment.md.ejs') %>
|
||||||
<%- include('prepareTrustline.md.ejs') -%>
|
<%- include('prepareTrustline.md.ejs') %>
|
||||||
<%- include('prepareOrder.md.ejs') -%>
|
<%- include('prepareOrder.md.ejs') %>
|
||||||
<%- include('prepareOrderCancellation.md.ejs') -%>
|
<%- include('prepareOrderCancellation.md.ejs') %>
|
||||||
<%- include('prepareSettings.md.ejs') -%>
|
<%- include('prepareSettings.md.ejs') %>
|
||||||
<%- include('prepareEscrowCreation.md.ejs') -%>
|
<%- include('prepareEscrowCreation.md.ejs') %>
|
||||||
<%- include('prepareEscrowCancellation.md.ejs') -%>
|
<%- include('prepareEscrowCancellation.md.ejs') %>
|
||||||
<%- include('prepareEscrowExecution.md.ejs') -%>
|
<%- include('prepareEscrowExecution.md.ejs') %>
|
||||||
<%- include('preparePaymentChannelCreate.md.ejs') -%>
|
<%- include('preparePaymentChannelCreate.md.ejs') %>
|
||||||
<%- include('preparePaymentChannelClaim.md.ejs') -%>
|
<%- include('preparePaymentChannelClaim.md.ejs') %>
|
||||||
<%- include('preparePaymentChannelFund.md.ejs') -%>
|
<%- include('preparePaymentChannelFund.md.ejs') %>
|
||||||
<%- include('prepareCheckCreate.md.ejs') -%>
|
<%- include('prepareCheckCreate.md.ejs') %>
|
||||||
<%- include('prepareCheckCancel.md.ejs') -%>
|
<%- include('prepareCheckCancel.md.ejs') %>
|
||||||
<%- include('prepareCheckCash.md.ejs') -%>
|
<%- include('prepareCheckCash.md.ejs') %>
|
||||||
<%- include('sign.md.ejs') -%>
|
<%- include('sign.md.ejs') %>
|
||||||
<%- include('combine.md.ejs') -%>
|
<%- include('combine.md.ejs') %>
|
||||||
<%- include('submit.md.ejs') -%>
|
<%- include('submit.md.ejs') %>
|
||||||
<%- include('generateXAddress.md.ejs') -%>
|
<%- include('generateXAddress.md.ejs') %>
|
||||||
<%- include('generateAddress.md.ejs') -%>
|
<%- include('generateAddress.md.ejs') %>
|
||||||
<%- include('isValidAddress.md.ejs') -%>
|
<%- include('isValidAddress.md.ejs') %>
|
||||||
<%- include('isValidSecret.md.ejs') -%>
|
<%- include('isValidSecret.md.ejs') %>
|
||||||
<%- include('deriveKeypair.md.ejs') -%>
|
<%- include('deriveKeypair.md.ejs') %>
|
||||||
<%- include('deriveAddress.md.ejs') -%>
|
<%- include('deriveAddress.md.ejs') %>
|
||||||
<%- include('signPaymentChannelClaim.md.ejs') -%>
|
<%- include('signPaymentChannelClaim.md.ejs') %>
|
||||||
<%- include('verifyPaymentChannelClaim.md.ejs') -%>
|
<%- include('verifyPaymentChannelClaim.md.ejs') %>
|
||||||
<%- include('computeLedgerHash.md.ejs') -%>
|
<%- include('computeLedgerHash.md.ejs') %>
|
||||||
<%- include('xrpToDropsAndDropsToXrp.md.ejs') -%>
|
<%- include('xrpToDropsAndDropsToXrp.md.ejs') %>
|
||||||
<%- include('iso8601ToRippleTime.md.ejs') -%>
|
<%- include('iso8601ToRippleTime.md.ejs') %>
|
||||||
<%- include('rippleTimeToISO8601.md.ejs') -%>
|
<%- include('rippleTimeToISO8601.md.ejs') %>
|
||||||
<%- include('txFlags.md.ejs') -%>
|
<%- include('txFlags.md.ejs') %>
|
||||||
<%- include('schemaValidator.md.ejs') -%>
|
<%- include('schemaValidator.md.ejs') %>
|
||||||
<%- include('events.md.ejs') -%>
|
<%- include('events.md.ejs') %>
|
||||||
|
|||||||
Reference in New Issue
Block a user