mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Use object instead of Object (#936)
This commit is contained in:
@@ -1135,7 +1135,7 @@ return api.getLedgerVersion().then(ledgerVersion => {
|
||||
|
||||
## getTransaction
|
||||
|
||||
`getTransaction(id: string, options: Object): Promise<Object>`
|
||||
`getTransaction(id: string, options: object): Promise<object>`
|
||||
|
||||
Retrieves a transaction by its [Transaction ID](#transaction-id).
|
||||
|
||||
@@ -1287,7 +1287,7 @@ return api.getTransaction(id).then(transaction => {
|
||||
|
||||
## getTransactions
|
||||
|
||||
`getTransactions(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getTransactions(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Retrieves historical transactions of an account.
|
||||
|
||||
@@ -1519,7 +1519,7 @@ return api.getTransactions(address).then(transaction => {
|
||||
|
||||
## getTrustlines
|
||||
|
||||
`getTrustlines(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getTrustlines(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Returns trustlines for a specified account.
|
||||
|
||||
@@ -1664,7 +1664,7 @@ return api.getTrustlines(address).then(trustlines =>
|
||||
|
||||
## getBalances
|
||||
|
||||
`getBalances(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getBalances(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Returns balances for a specified account.
|
||||
|
||||
@@ -1831,7 +1831,7 @@ return api.getBalances(address).then(balances =>
|
||||
|
||||
## getBalanceSheet
|
||||
|
||||
`getBalanceSheet(address: string, options: Object): Promise<Object>`
|
||||
`getBalanceSheet(address: string, options: object): Promise<object>`
|
||||
|
||||
Returns aggregate balances by currency plus a breakdown of assets and obligations for a specified account.
|
||||
|
||||
@@ -1927,7 +1927,7 @@ return api.getBalanceSheet(address).then(balanceSheet =>
|
||||
|
||||
## getPaths
|
||||
|
||||
`getPaths(pathfind: Object): Promise<Array<Object>>`
|
||||
`getPaths(pathfind: object): Promise<Array<object>>`
|
||||
|
||||
Finds paths to send a payment. Paths are options for how to route a payment.
|
||||
|
||||
@@ -2049,7 +2049,7 @@ return api.getPaths(pathfind)
|
||||
|
||||
## getOrders
|
||||
|
||||
`getOrders(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getOrders(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Returns open orders for the specified account. Open orders are orders that have not yet been fully executed and are still in the order book.
|
||||
|
||||
@@ -2430,7 +2430,7 @@ return api.getOrders(address).then(orders =>
|
||||
|
||||
## getOrderbook
|
||||
|
||||
`getOrderbook(address: string, orderbook: Object, options: Object): Promise<Object>`
|
||||
`getOrderbook(address: string, orderbook: object, options: object): Promise<object>`
|
||||
|
||||
Returns open orders for the specified account. Open orders are orders that have not yet been fully executed and are still in the order book.
|
||||
|
||||
@@ -3534,7 +3534,7 @@ return api.getOrderbook(address, orderbook)
|
||||
|
||||
## getSettings
|
||||
|
||||
`getSettings(address: string, options: Object): Promise<Object>`
|
||||
`getSettings(address: string, options: object): Promise<object>`
|
||||
|
||||
Returns settings for the specified account. Note: For account data that is not modifiable by the user, see [getAccountInfo](#getaccountinfo).
|
||||
|
||||
@@ -3613,7 +3613,7 @@ return api.getSettings(address).then(settings =>
|
||||
|
||||
## getAccountInfo
|
||||
|
||||
`getAccountInfo(address: string, options: Object): Promise<Object>`
|
||||
`getAccountInfo(address: string, options: object): Promise<object>`
|
||||
|
||||
Returns information for the specified account. Note: For account data that is modifiable by the user, see [getSettings](#getsettings).
|
||||
|
||||
@@ -3986,7 +3986,7 @@ return api.getAccountObjects(address: address).then(objects =>
|
||||
|
||||
## getPaymentChannel
|
||||
|
||||
`getPaymentChannel(id: string): Promise<Object>`
|
||||
`getPaymentChannel(id: string): Promise<object>`
|
||||
|
||||
Returns specified payment channel.
|
||||
|
||||
@@ -4042,7 +4042,7 @@ return api.getPaymentChannel(channelId).then(channel =>
|
||||
|
||||
## getLedger
|
||||
|
||||
`getLedger(options: Object): Promise<Object>`
|
||||
`getLedger(options: object): Promise<object>`
|
||||
|
||||
Returns header information for the specified ledger (or the most recent validated ledger if no ledger is specified). Optionally, all the transactions that were validated in the ledger or the account state information can be returned with the ledger header.
|
||||
|
||||
@@ -4105,7 +4105,7 @@ return api.getLedger()
|
||||
|
||||
## preparePayment
|
||||
|
||||
`preparePayment(address: string, payment: Object, instructions: Object): Promise<Object>`
|
||||
`preparePayment(address: string, payment: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4175,7 +4175,7 @@ return api.preparePayment(address, payment).then(prepared =>
|
||||
|
||||
## prepareTrustline
|
||||
|
||||
`prepareTrustline(address: string, trustline: Object, instructions: Object): Promise<Object>`
|
||||
`prepareTrustline(address: string, trustline: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a trustline transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4243,7 +4243,7 @@ return api.prepareTrustline(address, trustline).then(prepared =>
|
||||
|
||||
## prepareOrder
|
||||
|
||||
`prepareOrder(address: string, order: Object, instructions: Object): Promise<Object>`
|
||||
`prepareOrder(address: string, order: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an order transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4311,7 +4311,7 @@ return api.prepareOrder(address, order)
|
||||
|
||||
## prepareOrderCancellation
|
||||
|
||||
`prepareOrderCancellation(address: string, orderCancellation: Object, instructions: Object): Promise<Object>`
|
||||
`prepareOrderCancellation(address: string, orderCancellation: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an order cancellation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4364,7 +4364,7 @@ return api.prepareOrderCancellation(address, orderCancellation)
|
||||
|
||||
## prepareSettings
|
||||
|
||||
`prepareSettings(address: string, settings: Object, instructions: Object): Promise<Object>`
|
||||
`prepareSettings(address: string, settings: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a settings transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4428,7 +4428,7 @@ return api.prepareSettings(address, settings)
|
||||
|
||||
## prepareEscrowCreation
|
||||
|
||||
`prepareEscrowCreation(address: string, escrowCreation: Object, instructions: Object): Promise<Object>`
|
||||
`prepareEscrowCreation(address: string, escrowCreation: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an escrow creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4492,7 +4492,7 @@ return api.prepareEscrowCreation(address, escrowCreation).then(prepared =>
|
||||
|
||||
## prepareEscrowCancellation
|
||||
|
||||
`prepareEscrowCancellation(address: string, escrowCancellation: Object, instructions: Object): Promise<Object>`
|
||||
`prepareEscrowCancellation(address: string, escrowCancellation: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an escrow cancellation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4548,7 +4548,7 @@ return api.prepareEscrowCancellation(address, escrowCancellation).then(prepared
|
||||
|
||||
## prepareEscrowExecution
|
||||
|
||||
`prepareEscrowExecution(address: string, escrowExecution: Object, instructions: Object): Promise<Object>`
|
||||
`prepareEscrowExecution(address: string, escrowExecution: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an escrow execution transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4606,7 +4606,7 @@ return api.prepareEscrowExecution(address, escrowExecution).then(prepared =>
|
||||
|
||||
## preparePaymentChannelCreate
|
||||
|
||||
`preparePaymentChannelCreate(address: string, paymentChannelCreate: Object, instructions: Object): Promise<Object>`
|
||||
`preparePaymentChannelCreate(address: string, paymentChannelCreate: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment channel creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4664,7 +4664,7 @@ return api.preparePaymentChannelCreate(address, paymentChannelCreate).then(prepa
|
||||
|
||||
## preparePaymentChannelClaim
|
||||
|
||||
`preparePaymentChannelClaim(address: string, paymentChannelClaim: Object, instructions: Object): Promise<Object>`
|
||||
`preparePaymentChannelClaim(address: string, paymentChannelClaim: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment channel claim transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4719,7 +4719,7 @@ return api.preparePaymentChannelClaim(address, paymentChannelClaim).then(prepare
|
||||
|
||||
## preparePaymentChannelFund
|
||||
|
||||
`preparePaymentChannelFund(address: string, paymentChannelFund: Object, instructions: Object): Promise<Object>`
|
||||
`preparePaymentChannelFund(address: string, paymentChannelFund: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment channel fund transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4775,7 +4775,7 @@ return api.preparePaymentChannelFund(address, paymentChannelFund).then(prepared
|
||||
|
||||
## prepareCheckCreate
|
||||
|
||||
`prepareCheckCreate(address: string, checkCreate: Object, instructions: Object): Promise<Object>`
|
||||
`prepareCheckCreate(address: string, checkCreate: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a Check creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4834,7 +4834,7 @@ return api.prepareCheckCreate(address, checkCreate).then(prepared =>
|
||||
|
||||
## prepareCheckCancel
|
||||
|
||||
`prepareCheckCancel(address: string, checkCancel: Object, instructions: Object): Promise<Object>`
|
||||
`prepareCheckCancel(address: string, checkCancel: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a Check cancellation transaction. This cancels an unredeemed Check, removing it from the ledger without sending any money. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4889,7 +4889,7 @@ return api.prepareCheckCancel(address, checkCancel).then(prepared =>
|
||||
|
||||
## prepareCheckCash
|
||||
|
||||
`prepareCheckCash(address: string, checkCash: Object, instructions: Object): Promise<Object>`
|
||||
`prepareCheckCash(address: string, checkCash: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a Check cashing transaction. This redeems a Check to receive up to the amount authorized by the corresponding CheckCreate transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
@@ -4949,8 +4949,8 @@ return api.prepareCheckCash(address, checkCash).then(prepared =>
|
||||
## sign
|
||||
|
||||
```
|
||||
sign(txJSON: string, secret: string, options: Object): {signedTransaction: string, id: string}
|
||||
sign(txJSON: string, keypair: Object, options: Object): {signedTransaction: string, id: string}
|
||||
sign(txJSON: string, secret: string, options: object): {signedTransaction: string, id: string}
|
||||
sign(txJSON: string, keypair: object, options: object): {signedTransaction: string, id: string}
|
||||
```
|
||||
|
||||
Sign a prepared transaction. The signed transaction must subsequently be [submitted](#submit).
|
||||
@@ -5034,7 +5034,7 @@ return api.combine(signedTransactions);
|
||||
|
||||
## submit
|
||||
|
||||
`submit(signedTransaction: string): Promise<Object>`
|
||||
`submit(signedTransaction: string): Promise<object>`
|
||||
|
||||
Submits a signed transaction. The transaction is not guaranteed to succeed; it must be verified with [getTransaction](#gettransaction).
|
||||
|
||||
@@ -5270,7 +5270,7 @@ true
|
||||
|
||||
## computeLedgerHash
|
||||
|
||||
`computeLedgerHash(ledger: Object): string`
|
||||
`computeLedgerHash(ledger: object): string`
|
||||
|
||||
Compute the hash of a ledger.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## computeLedgerHash
|
||||
|
||||
`computeLedgerHash(ledger: Object): string`
|
||||
`computeLedgerHash(ledger: object): string`
|
||||
|
||||
Compute the hash of a ledger.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getAccountInfo
|
||||
|
||||
`getAccountInfo(address: string, options: Object): Promise<Object>`
|
||||
`getAccountInfo(address: string, options: object): Promise<object>`
|
||||
|
||||
Returns information for the specified account. Note: For account data that is modifiable by the user, see [getSettings](#getsettings).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getBalanceSheet
|
||||
|
||||
`getBalanceSheet(address: string, options: Object): Promise<Object>`
|
||||
`getBalanceSheet(address: string, options: object): Promise<object>`
|
||||
|
||||
Returns aggregate balances by currency plus a breakdown of assets and obligations for a specified account.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getBalances
|
||||
|
||||
`getBalances(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getBalances(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Returns balances for a specified account.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getLedger
|
||||
|
||||
`getLedger(options: Object): Promise<Object>`
|
||||
`getLedger(options: object): Promise<object>`
|
||||
|
||||
Returns header information for the specified ledger (or the most recent validated ledger if no ledger is specified). Optionally, all the transactions that were validated in the ledger or the account state information can be returned with the ledger header.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getOrderbook
|
||||
|
||||
`getOrderbook(address: string, orderbook: Object, options: Object): Promise<Object>`
|
||||
`getOrderbook(address: string, orderbook: object, options: object): Promise<object>`
|
||||
|
||||
Returns open orders for the specified account. Open orders are orders that have not yet been fully executed and are still in the order book.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getOrders
|
||||
|
||||
`getOrders(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getOrders(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Returns open orders for the specified account. Open orders are orders that have not yet been fully executed and are still in the order book.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getPaths
|
||||
|
||||
`getPaths(pathfind: Object): Promise<Array<Object>>`
|
||||
`getPaths(pathfind: object): Promise<Array<object>>`
|
||||
|
||||
Finds paths to send a payment. Paths are options for how to route a payment.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getPaymentChannel
|
||||
|
||||
`getPaymentChannel(id: string): Promise<Object>`
|
||||
`getPaymentChannel(id: string): Promise<object>`
|
||||
|
||||
Returns specified payment channel.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getSettings
|
||||
|
||||
`getSettings(address: string, options: Object): Promise<Object>`
|
||||
`getSettings(address: string, options: object): Promise<object>`
|
||||
|
||||
Returns settings for the specified account. Note: For account data that is not modifiable by the user, see [getAccountInfo](#getaccountinfo).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getTransaction
|
||||
|
||||
`getTransaction(id: string, options: Object): Promise<Object>`
|
||||
`getTransaction(id: string, options: object): Promise<object>`
|
||||
|
||||
Retrieves a transaction by its [Transaction ID](#transaction-id).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getTransactions
|
||||
|
||||
`getTransactions(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getTransactions(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Retrieves historical transactions of an account.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## getTrustlines
|
||||
|
||||
`getTrustlines(address: string, options: Object): Promise<Array<Object>>`
|
||||
`getTrustlines(address: string, options: object): Promise<Array<object>>`
|
||||
|
||||
Returns trustlines for a specified account.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareCheckCancel
|
||||
|
||||
`prepareCheckCancel(address: string, checkCancel: Object, instructions: Object): Promise<Object>`
|
||||
`prepareCheckCancel(address: string, checkCancel: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a Check cancellation transaction. This cancels an unredeemed Check, removing it from the ledger without sending any money. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareCheckCash
|
||||
|
||||
`prepareCheckCash(address: string, checkCash: Object, instructions: Object): Promise<Object>`
|
||||
`prepareCheckCash(address: string, checkCash: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a Check cashing transaction. This redeems a Check to receive up to the amount authorized by the corresponding CheckCreate transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareCheckCreate
|
||||
|
||||
`prepareCheckCreate(address: string, checkCreate: Object, instructions: Object): Promise<Object>`
|
||||
`prepareCheckCreate(address: string, checkCreate: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a Check creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareEscrowCancellation
|
||||
|
||||
`prepareEscrowCancellation(address: string, escrowCancellation: Object, instructions: Object): Promise<Object>`
|
||||
`prepareEscrowCancellation(address: string, escrowCancellation: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an escrow cancellation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareEscrowCreation
|
||||
|
||||
`prepareEscrowCreation(address: string, escrowCreation: Object, instructions: Object): Promise<Object>`
|
||||
`prepareEscrowCreation(address: string, escrowCreation: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an escrow creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareEscrowExecution
|
||||
|
||||
`prepareEscrowExecution(address: string, escrowExecution: Object, instructions: Object): Promise<Object>`
|
||||
`prepareEscrowExecution(address: string, escrowExecution: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an escrow execution transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareOrder
|
||||
|
||||
`prepareOrder(address: string, order: Object, instructions: Object): Promise<Object>`
|
||||
`prepareOrder(address: string, order: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an order transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareOrderCancellation
|
||||
|
||||
`prepareOrderCancellation(address: string, orderCancellation: Object, instructions: Object): Promise<Object>`
|
||||
`prepareOrderCancellation(address: string, orderCancellation: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare an order cancellation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## preparePayment
|
||||
|
||||
`preparePayment(address: string, payment: Object, instructions: Object): Promise<Object>`
|
||||
`preparePayment(address: string, payment: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## preparePaymentChannelClaim
|
||||
|
||||
`preparePaymentChannelClaim(address: string, paymentChannelClaim: Object, instructions: Object): Promise<Object>`
|
||||
`preparePaymentChannelClaim(address: string, paymentChannelClaim: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment channel claim transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## preparePaymentChannelCreate
|
||||
|
||||
`preparePaymentChannelCreate(address: string, paymentChannelCreate: Object, instructions: Object): Promise<Object>`
|
||||
`preparePaymentChannelCreate(address: string, paymentChannelCreate: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment channel creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## preparePaymentChannelFund
|
||||
|
||||
`preparePaymentChannelFund(address: string, paymentChannelFund: Object, instructions: Object): Promise<Object>`
|
||||
`preparePaymentChannelFund(address: string, paymentChannelFund: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a payment channel fund transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareSettings
|
||||
|
||||
`prepareSettings(address: string, settings: Object, instructions: Object): Promise<Object>`
|
||||
`prepareSettings(address: string, settings: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a settings transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## prepareTrustline
|
||||
|
||||
`prepareTrustline(address: string, trustline: Object, instructions: Object): Promise<Object>`
|
||||
`prepareTrustline(address: string, trustline: object, instructions: object): Promise<object>`
|
||||
|
||||
Prepare a trustline transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit).
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## sign
|
||||
|
||||
```
|
||||
sign(txJSON: string, secret: string, options: Object): {signedTransaction: string, id: string}
|
||||
sign(txJSON: string, keypair: Object, options: Object): {signedTransaction: string, id: string}
|
||||
sign(txJSON: string, secret: string, options: object): {signedTransaction: string, id: string}
|
||||
sign(txJSON: string, keypair: object, options: object): {signedTransaction: string, id: string}
|
||||
```
|
||||
|
||||
Sign a prepared transaction. The signed transaction must subsequently be [submitted](#submit).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## submit
|
||||
|
||||
`submit(signedTransaction: string): Promise<Object>`
|
||||
`submit(signedTransaction: string): Promise<object>`
|
||||
|
||||
Submits a signed transaction. The transaction is not guaranteed to succeed; it must be verified with [getTransaction](#gettransaction).
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ function setPrototypeOf(object, prototype) {
|
||||
object.__proto__ = prototype
|
||||
}
|
||||
|
||||
function getConstructorName(object: Object): string {
|
||||
function getConstructorName(object: object): string {
|
||||
// hack for internet explorer
|
||||
if (!object.constructor.name) {
|
||||
return object.constructor.toString().match(/^function\s+([^(]*)/)![1]
|
||||
|
||||
@@ -9,7 +9,7 @@ export type GetServerInfoResponse = {
|
||||
hostID: string,
|
||||
ioLatencyMs: number,
|
||||
load?: {
|
||||
jobTypes: Array<Object>,
|
||||
jobTypes: Array<object>,
|
||||
threads: number
|
||||
},
|
||||
lastClose: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as assert from 'assert'
|
||||
|
||||
function parseOrderCancellation(tx: any): Object {
|
||||
function parseOrderCancellation(tx: any): object {
|
||||
assert(tx.TransactionType === 'OfferCancel')
|
||||
return {
|
||||
orderSequence: tx.OfferSequence
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as assert from 'assert'
|
||||
import {parseMemos} from './utils'
|
||||
import {removeUndefined} from '../../common'
|
||||
|
||||
function parseEscrowCancellation(tx: any): Object {
|
||||
function parseEscrowCancellation(tx: any): object {
|
||||
assert(tx.TransactionType === 'EscrowCancel')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -3,7 +3,7 @@ import parseAmount from './amount'
|
||||
import {parseTimestamp, parseMemos} from './utils'
|
||||
import {removeUndefined} from '../../common'
|
||||
|
||||
function parseEscrowCreation(tx: any): Object {
|
||||
function parseEscrowCreation(tx: any): object {
|
||||
assert(tx.TransactionType === 'EscrowCreate')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as assert from 'assert'
|
||||
import {parseMemos} from './utils'
|
||||
import {removeUndefined} from '../../common'
|
||||
|
||||
function parseEscrowExecution(tx: any): Object {
|
||||
function parseEscrowExecution(tx: any): object {
|
||||
assert(tx.TransactionType === 'EscrowFinish')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -13,7 +13,7 @@ function parseField(info, value) {
|
||||
return value
|
||||
}
|
||||
|
||||
function parseFields(data: any): Object {
|
||||
function parseFields(data: any): object {
|
||||
const settings: any = {}
|
||||
for (const fieldName in AccountFields) {
|
||||
const fieldValue = data[fieldName]
|
||||
|
||||
@@ -17,7 +17,7 @@ export type FormattedLedger = {
|
||||
parentCloseTime: string,
|
||||
totalDrops: string,
|
||||
transactionHash: string,
|
||||
transactions?: Array<Object>,
|
||||
transactions?: Array<object>,
|
||||
transactionHashes?: Array<string>,
|
||||
rawState?: string,
|
||||
stateHashes?: Array<string>
|
||||
|
||||
@@ -14,7 +14,7 @@ function removeAnyCounterpartyEncoding(address: string, amount: Amount) {
|
||||
}
|
||||
|
||||
function createAdjustment(
|
||||
address: string, adjustmentWithoutAddress: Object): any {
|
||||
address: string, adjustmentWithoutAddress: object): any {
|
||||
const amountKey = _.keys(adjustmentWithoutAddress)[0]
|
||||
const amount = adjustmentWithoutAddress[amountKey]
|
||||
return _.set({address: address}, amountKey,
|
||||
|
||||
@@ -3,7 +3,7 @@ import {removeUndefined, txFlags} from '../../common'
|
||||
import parseAmount from './amount'
|
||||
const claimFlags = txFlags.PaymentChannelClaim
|
||||
|
||||
function parsePaymentChannelClaim(tx: any): Object {
|
||||
function parsePaymentChannelClaim(tx: any): object {
|
||||
assert(tx.TransactionType === 'PaymentChannelClaim')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -3,7 +3,7 @@ import {parseTimestamp} from './utils'
|
||||
import {removeUndefined} from '../../common'
|
||||
import parseAmount from './amount'
|
||||
|
||||
function parsePaymentChannelCreate(tx: any): Object {
|
||||
function parsePaymentChannelCreate(tx: any): object {
|
||||
assert(tx.TransactionType === 'PaymentChannelCreate')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -3,7 +3,7 @@ import {parseTimestamp} from './utils'
|
||||
import {removeUndefined} from '../../common'
|
||||
import parseAmount from './amount'
|
||||
|
||||
function parsePaymentChannelFund(tx: any): Object {
|
||||
function parsePaymentChannelFund(tx: any): object {
|
||||
assert(tx.TransactionType === 'PaymentChannelFund')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -18,7 +18,7 @@ function removeGenericCounterparty(amount, address) {
|
||||
}
|
||||
|
||||
// Payment specification
|
||||
function parsePayment(tx: any): Object {
|
||||
function parsePayment(tx: any): object {
|
||||
assert(tx.TransactionType === 'Payment')
|
||||
|
||||
const source = {
|
||||
|
||||
@@ -13,7 +13,7 @@ function parseFlag(flagsValue, trueValue, falseValue) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
function parseTrustline(tx: any): Object {
|
||||
function parseTrustline(tx: any): object {
|
||||
assert(tx.TransactionType === 'TrustSet')
|
||||
|
||||
return removeUndefined({
|
||||
|
||||
@@ -106,7 +106,7 @@ function isPendingLedgerVersion(connection: Connection,
|
||||
}
|
||||
|
||||
function ensureLedgerVersion(options: any
|
||||
): Promise<Object> {
|
||||
): Promise<object> {
|
||||
if (Boolean(options) && options.ledgerVersion !== undefined &&
|
||||
options.ledgerVersion !== null
|
||||
) {
|
||||
|
||||
@@ -2,14 +2,14 @@ import keypairs = require('ripple-keypairs')
|
||||
import * as common from '../common'
|
||||
const {errors, validate} = common
|
||||
|
||||
function generateAddress(options?: Object): Object {
|
||||
function generateAddress(options?: object): object {
|
||||
const secret = keypairs.generateSeed(options)
|
||||
const keypair = keypairs.deriveKeypair(secret)
|
||||
const address = keypairs.deriveAddress(keypair.publicKey)
|
||||
return {secret, address}
|
||||
}
|
||||
|
||||
function generateAddressAPI(options?: Object): Object {
|
||||
function generateAddressAPI(options?: object): object {
|
||||
validate.generateAddress({options})
|
||||
try {
|
||||
return generateAddress(options)
|
||||
|
||||
@@ -16,7 +16,7 @@ function disconnect(): Promise<void> {
|
||||
return this.connection.disconnect()
|
||||
}
|
||||
|
||||
function formatLedgerClose(ledgerClose: any): Object {
|
||||
function formatLedgerClose(ledgerClose: any): object {
|
||||
return {
|
||||
baseFeeXRP: common.dropsToXrp(ledgerClose.fee_base),
|
||||
ledgerHash: ledgerClose.ledger_hash,
|
||||
|
||||
@@ -16,7 +16,7 @@ function compareSigners(a, b) {
|
||||
.comparedTo(addressToBigNumber(b.Signer.Account))
|
||||
}
|
||||
|
||||
function combine(signedTransactions: Array<string>): Object {
|
||||
function combine(signedTransactions: Array<string>): object {
|
||||
validate.combine({signedTransactions})
|
||||
|
||||
// TODO: signedTransactions is an array of strings in the documentation, but
|
||||
|
||||
@@ -12,7 +12,7 @@ export type EscrowCancellation = {
|
||||
|
||||
function createEscrowCancellationTransaction(account: string,
|
||||
payment: EscrowCancellation
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
TransactionType: 'EscrowCancel',
|
||||
Account: account,
|
||||
|
||||
@@ -18,7 +18,7 @@ export type EscrowCreation = {
|
||||
|
||||
function createEscrowCreationTransaction(account: string,
|
||||
payment: EscrowCreation
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
TransactionType: 'EscrowCreate',
|
||||
Account: account,
|
||||
|
||||
@@ -15,7 +15,7 @@ export type EscrowExecution = {
|
||||
|
||||
function createEscrowExecutionTransaction(account: string,
|
||||
payment: EscrowExecution
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
TransactionType: 'EscrowFinish',
|
||||
Account: account,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {Instructions, Prepare} from './types'
|
||||
|
||||
function createOrderCancellationTransaction(account: string,
|
||||
orderCancellation: any
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
TransactionType: 'OfferCancel',
|
||||
Account: account,
|
||||
@@ -17,7 +17,7 @@ function createOrderCancellationTransaction(account: string,
|
||||
return txJSON
|
||||
}
|
||||
|
||||
function prepareOrderCancellation(address: string, orderCancellation: Object,
|
||||
function prepareOrderCancellation(address: string, orderCancellation: object,
|
||||
instructions: Instructions = {}
|
||||
): Promise<Prepare> {
|
||||
validate.prepareOrderCancellation({address, orderCancellation, instructions})
|
||||
|
||||
@@ -16,7 +16,7 @@ export type PaymentChannelClaim = {
|
||||
|
||||
function createPaymentChannelClaimTransaction(account: string,
|
||||
claim: PaymentChannelClaim
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
Account: account,
|
||||
TransactionType: 'PaymentChannelClaim',
|
||||
|
||||
@@ -14,7 +14,7 @@ export type PaymentChannelCreate = {
|
||||
|
||||
function createPaymentChannelCreateTransaction(account: string,
|
||||
paymentChannel: PaymentChannelCreate
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
Account: account,
|
||||
TransactionType: 'PaymentChannelCreate',
|
||||
|
||||
@@ -10,7 +10,7 @@ export type PaymentChannelFund = {
|
||||
|
||||
function createPaymentChannelFundTransaction(account: string,
|
||||
fund: PaymentChannelFund
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON: any = {
|
||||
Account: account,
|
||||
TransactionType: 'PaymentChannelFund',
|
||||
|
||||
@@ -85,7 +85,7 @@ function createMaximalAmount(amount: Amount): Amount {
|
||||
}
|
||||
|
||||
function createPaymentTransaction(address: string, paymentArgument: Payment
|
||||
): Object {
|
||||
): object {
|
||||
const payment = _.cloneDeep(paymentArgument)
|
||||
applyAnyCounterpartyEncoding(payment)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ function setTransactionFlags(txJSON: any, values: FormattedSettings) {
|
||||
}
|
||||
}
|
||||
|
||||
function setTransactionFields(txJSON: Object, input: FormattedSettings) {
|
||||
function setTransactionFields(txJSON: object, input: FormattedSettings) {
|
||||
const fieldSchema = AccountFields
|
||||
for (const fieldName in fieldSchema) {
|
||||
const field = fieldSchema[fieldName]
|
||||
@@ -67,7 +67,7 @@ function convertTransferRate(transferRate: number | string): number | string {
|
||||
return (new BigNumber(transferRate)).shift(9).toNumber()
|
||||
}
|
||||
|
||||
function formatSignerEntry(signer: WeightedSigner): Object {
|
||||
function formatSignerEntry(signer: WeightedSigner): object {
|
||||
return {
|
||||
SignerEntry: {
|
||||
Account: signer.address,
|
||||
@@ -114,7 +114,7 @@ function createSettingsTransactionWithoutMemos(
|
||||
}
|
||||
|
||||
function createSettingsTransaction(account: string, settings: FormattedSettings
|
||||
): Object {
|
||||
): object {
|
||||
const txJSON = createSettingsTransactionWithoutMemos(account, settings)
|
||||
if (settings.memos !== undefined) {
|
||||
txJSON.Memos = _.map(settings.memos, utils.convertMemo)
|
||||
|
||||
@@ -8,7 +8,7 @@ import {xrpToDrops} from '../common'
|
||||
import {RippleAPI} from '../api'
|
||||
const validate = utils.common.validate
|
||||
|
||||
function computeSignature(tx: Object, privateKey: string, signAs?: string) {
|
||||
function computeSignature(tx: object, privateKey: string, signAs?: string) {
|
||||
const signingData = signAs
|
||||
? binary.encodeForMultisigning(tx, signAs)
|
||||
: binary.encodeForSigning(tx)
|
||||
|
||||
@@ -14,7 +14,7 @@ function convertQuality(quality) {
|
||||
|
||||
function createTrustlineTransaction(account: string,
|
||||
trustline: FormattedTrustlineSpecification
|
||||
): Object {
|
||||
): object {
|
||||
const limit = {
|
||||
currency: trustline.currency,
|
||||
issuer: trustline.counterparty,
|
||||
|
||||
@@ -34,7 +34,7 @@ export type Submit = {
|
||||
engineResultCode: number,
|
||||
engineResultMessage?: string,
|
||||
txBlob?: string,
|
||||
txJson?: Object
|
||||
txJson?: object
|
||||
}
|
||||
|
||||
export interface OfferCreateTransaction {
|
||||
@@ -72,7 +72,7 @@ export type Outcome = {
|
||||
value: string
|
||||
}]
|
||||
},
|
||||
orderbookChanges: Object,
|
||||
orderbookChanges: object,
|
||||
timestamp?: string
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ function prepareTransaction(txJSON: any, api: RippleAPI,
|
||||
const account = txJSON.Account
|
||||
setCanonicalFlag(txJSON)
|
||||
|
||||
function prepareMaxLedgerVersion(): Promise<Object> {
|
||||
function prepareMaxLedgerVersion(): Promise<object> {
|
||||
if (instructions.maxLedgerVersion !== undefined) {
|
||||
if (instructions.maxLedgerVersion !== null) {
|
||||
txJSON.LastLedgerSequence = instructions.maxLedgerVersion
|
||||
@@ -60,7 +60,7 @@ function prepareTransaction(txJSON: any, api: RippleAPI,
|
||||
})
|
||||
}
|
||||
|
||||
function prepareFee(): Promise<Object> {
|
||||
function prepareFee(): Promise<object> {
|
||||
const multiplier = instructions.signersCount === undefined ? 1 :
|
||||
instructions.signersCount + 1
|
||||
if (instructions.fee !== undefined) {
|
||||
@@ -94,7 +94,7 @@ function prepareTransaction(txJSON: any, api: RippleAPI,
|
||||
})
|
||||
}
|
||||
|
||||
async function prepareSequence(): Promise<Object> {
|
||||
async function prepareSequence(): Promise<object> {
|
||||
if (instructions.sequence !== undefined) {
|
||||
txJSON.Sequence = instructions.sequence
|
||||
return Promise.resolve(txJSON)
|
||||
|
||||
Reference in New Issue
Block a user