diff --git a/docs/index.md b/docs/index.md index 914112c9..52ca3cfa 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1135,7 +1135,7 @@ return api.getLedgerVersion().then(ledgerVersion => { ## getTransaction -`getTransaction(id: string, options: Object): Promise` +`getTransaction(id: string, options: object): Promise` 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>` +`getTransactions(address: string, options: object): Promise>` Retrieves historical transactions of an account. @@ -1519,7 +1519,7 @@ return api.getTransactions(address).then(transaction => { ## getTrustlines -`getTrustlines(address: string, options: Object): Promise>` +`getTrustlines(address: string, options: object): Promise>` Returns trustlines for a specified account. @@ -1664,7 +1664,7 @@ return api.getTrustlines(address).then(trustlines => ## getBalances -`getBalances(address: string, options: Object): Promise>` +`getBalances(address: string, options: object): Promise>` Returns balances for a specified account. @@ -1831,7 +1831,7 @@ return api.getBalances(address).then(balances => ## getBalanceSheet -`getBalanceSheet(address: string, options: Object): Promise` +`getBalanceSheet(address: string, options: object): Promise` 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>` +`getPaths(pathfind: object): Promise>` 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>` +`getOrders(address: string, options: object): Promise>` 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` +`getOrderbook(address: string, orderbook: object, options: object): Promise` 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` +`getSettings(address: string, options: object): Promise` 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` +`getAccountInfo(address: string, options: object): Promise` 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` +`getPaymentChannel(id: string): Promise` Returns specified payment channel. @@ -4042,7 +4042,7 @@ return api.getPaymentChannel(channelId).then(channel => ## getLedger -`getLedger(options: Object): Promise` +`getLedger(options: object): Promise` 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` +`preparePayment(address: string, payment: object, instructions: object): Promise` 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` +`prepareTrustline(address: string, trustline: object, instructions: object): Promise` 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` +`prepareOrder(address: string, order: object, instructions: object): Promise` 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` +`prepareOrderCancellation(address: string, orderCancellation: object, instructions: object): Promise` 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` +`prepareSettings(address: string, settings: object, instructions: object): Promise` 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` +`prepareEscrowCreation(address: string, escrowCreation: object, instructions: object): Promise` 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` +`prepareEscrowCancellation(address: string, escrowCancellation: object, instructions: object): Promise` 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` +`prepareEscrowExecution(address: string, escrowExecution: object, instructions: object): Promise` 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` +`preparePaymentChannelCreate(address: string, paymentChannelCreate: object, instructions: object): Promise` 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` +`preparePaymentChannelClaim(address: string, paymentChannelClaim: object, instructions: object): Promise` 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` +`preparePaymentChannelFund(address: string, paymentChannelFund: object, instructions: object): Promise` 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` +`prepareCheckCreate(address: string, checkCreate: object, instructions: object): Promise` 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` +`prepareCheckCancel(address: string, checkCancel: object, instructions: object): Promise` 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` +`prepareCheckCash(address: string, checkCash: object, instructions: object): Promise` 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` +`submit(signedTransaction: string): Promise` 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. diff --git a/docs/src/computeLedgerHash.md.ejs b/docs/src/computeLedgerHash.md.ejs index 1e3ea6f3..f6ea98ed 100644 --- a/docs/src/computeLedgerHash.md.ejs +++ b/docs/src/computeLedgerHash.md.ejs @@ -1,6 +1,6 @@ ## computeLedgerHash -`computeLedgerHash(ledger: Object): string` +`computeLedgerHash(ledger: object): string` Compute the hash of a ledger. diff --git a/docs/src/getAccountInfo.md.ejs b/docs/src/getAccountInfo.md.ejs index f43736a0..cd20c004 100644 --- a/docs/src/getAccountInfo.md.ejs +++ b/docs/src/getAccountInfo.md.ejs @@ -1,6 +1,6 @@ ## getAccountInfo -`getAccountInfo(address: string, options: Object): Promise` +`getAccountInfo(address: string, options: object): Promise` Returns information for the specified account. Note: For account data that is modifiable by the user, see [getSettings](#getsettings). diff --git a/docs/src/getBalanceSheet.md.ejs b/docs/src/getBalanceSheet.md.ejs index b3aed116..67260e6e 100644 --- a/docs/src/getBalanceSheet.md.ejs +++ b/docs/src/getBalanceSheet.md.ejs @@ -1,6 +1,6 @@ ## getBalanceSheet -`getBalanceSheet(address: string, options: Object): Promise` +`getBalanceSheet(address: string, options: object): Promise` Returns aggregate balances by currency plus a breakdown of assets and obligations for a specified account. diff --git a/docs/src/getBalances.md.ejs b/docs/src/getBalances.md.ejs index c99e5257..4e8332b6 100644 --- a/docs/src/getBalances.md.ejs +++ b/docs/src/getBalances.md.ejs @@ -1,6 +1,6 @@ ## getBalances -`getBalances(address: string, options: Object): Promise>` +`getBalances(address: string, options: object): Promise>` Returns balances for a specified account. diff --git a/docs/src/getLedger.md.ejs b/docs/src/getLedger.md.ejs index 9ff67627..bf8ac215 100644 --- a/docs/src/getLedger.md.ejs +++ b/docs/src/getLedger.md.ejs @@ -1,6 +1,6 @@ ## getLedger -`getLedger(options: Object): Promise` +`getLedger(options: object): Promise` 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. diff --git a/docs/src/getOrderbook.md.ejs b/docs/src/getOrderbook.md.ejs index dc885155..67a06952 100644 --- a/docs/src/getOrderbook.md.ejs +++ b/docs/src/getOrderbook.md.ejs @@ -1,6 +1,6 @@ ## getOrderbook -`getOrderbook(address: string, orderbook: Object, options: Object): Promise` +`getOrderbook(address: string, orderbook: object, options: object): Promise` 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. diff --git a/docs/src/getOrders.md.ejs b/docs/src/getOrders.md.ejs index a694bbe3..8fd75f4d 100644 --- a/docs/src/getOrders.md.ejs +++ b/docs/src/getOrders.md.ejs @@ -1,6 +1,6 @@ ## getOrders -`getOrders(address: string, options: Object): Promise>` +`getOrders(address: string, options: object): Promise>` 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. diff --git a/docs/src/getPaths.md.ejs b/docs/src/getPaths.md.ejs index cc465c77..4391ae26 100644 --- a/docs/src/getPaths.md.ejs +++ b/docs/src/getPaths.md.ejs @@ -1,6 +1,6 @@ ## getPaths -`getPaths(pathfind: Object): Promise>` +`getPaths(pathfind: object): Promise>` Finds paths to send a payment. Paths are options for how to route a payment. diff --git a/docs/src/getPaymentChannel.md.ejs b/docs/src/getPaymentChannel.md.ejs index f66230b5..df1c1cab 100644 --- a/docs/src/getPaymentChannel.md.ejs +++ b/docs/src/getPaymentChannel.md.ejs @@ -1,6 +1,6 @@ ## getPaymentChannel -`getPaymentChannel(id: string): Promise` +`getPaymentChannel(id: string): Promise` Returns specified payment channel. diff --git a/docs/src/getSettings.md.ejs b/docs/src/getSettings.md.ejs index 3d78471d..105b2425 100644 --- a/docs/src/getSettings.md.ejs +++ b/docs/src/getSettings.md.ejs @@ -1,6 +1,6 @@ ## getSettings -`getSettings(address: string, options: Object): Promise` +`getSettings(address: string, options: object): Promise` Returns settings for the specified account. Note: For account data that is not modifiable by the user, see [getAccountInfo](#getaccountinfo). diff --git a/docs/src/getTransaction.md.ejs b/docs/src/getTransaction.md.ejs index 9cd4fe6b..44871610 100644 --- a/docs/src/getTransaction.md.ejs +++ b/docs/src/getTransaction.md.ejs @@ -1,6 +1,6 @@ ## getTransaction -`getTransaction(id: string, options: Object): Promise` +`getTransaction(id: string, options: object): Promise` Retrieves a transaction by its [Transaction ID](#transaction-id). diff --git a/docs/src/getTransactions.md.ejs b/docs/src/getTransactions.md.ejs index 84074389..1c6f58ae 100644 --- a/docs/src/getTransactions.md.ejs +++ b/docs/src/getTransactions.md.ejs @@ -1,6 +1,6 @@ ## getTransactions -`getTransactions(address: string, options: Object): Promise>` +`getTransactions(address: string, options: object): Promise>` Retrieves historical transactions of an account. diff --git a/docs/src/getTrustlines.md.ejs b/docs/src/getTrustlines.md.ejs index 19311adb..530d4770 100644 --- a/docs/src/getTrustlines.md.ejs +++ b/docs/src/getTrustlines.md.ejs @@ -1,6 +1,6 @@ ## getTrustlines -`getTrustlines(address: string, options: Object): Promise>` +`getTrustlines(address: string, options: object): Promise>` Returns trustlines for a specified account. diff --git a/docs/src/prepareCheckCancel.md.ejs b/docs/src/prepareCheckCancel.md.ejs index b1dc2791..f682e503 100644 --- a/docs/src/prepareCheckCancel.md.ejs +++ b/docs/src/prepareCheckCancel.md.ejs @@ -1,6 +1,6 @@ ## prepareCheckCancel -`prepareCheckCancel(address: string, checkCancel: Object, instructions: Object): Promise` +`prepareCheckCancel(address: string, checkCancel: object, instructions: object): Promise` 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). diff --git a/docs/src/prepareCheckCash.md.ejs b/docs/src/prepareCheckCash.md.ejs index 5a646042..f2f54643 100644 --- a/docs/src/prepareCheckCash.md.ejs +++ b/docs/src/prepareCheckCash.md.ejs @@ -1,6 +1,6 @@ ## prepareCheckCash -`prepareCheckCash(address: string, checkCash: Object, instructions: Object): Promise` +`prepareCheckCash(address: string, checkCash: object, instructions: object): Promise` 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). diff --git a/docs/src/prepareCheckCreate.md.ejs b/docs/src/prepareCheckCreate.md.ejs index 6b776d88..44065fa3 100644 --- a/docs/src/prepareCheckCreate.md.ejs +++ b/docs/src/prepareCheckCreate.md.ejs @@ -1,6 +1,6 @@ ## prepareCheckCreate -`prepareCheckCreate(address: string, checkCreate: Object, instructions: Object): Promise` +`prepareCheckCreate(address: string, checkCreate: object, instructions: object): Promise` Prepare a Check creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareEscrowCancellation.md.ejs b/docs/src/prepareEscrowCancellation.md.ejs index d4305e76..4dc939f7 100644 --- a/docs/src/prepareEscrowCancellation.md.ejs +++ b/docs/src/prepareEscrowCancellation.md.ejs @@ -1,6 +1,6 @@ ## prepareEscrowCancellation -`prepareEscrowCancellation(address: string, escrowCancellation: Object, instructions: Object): Promise` +`prepareEscrowCancellation(address: string, escrowCancellation: object, instructions: object): Promise` Prepare an escrow cancellation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareEscrowCreation.md.ejs b/docs/src/prepareEscrowCreation.md.ejs index b7c52c4b..ab289638 100644 --- a/docs/src/prepareEscrowCreation.md.ejs +++ b/docs/src/prepareEscrowCreation.md.ejs @@ -1,6 +1,6 @@ ## prepareEscrowCreation -`prepareEscrowCreation(address: string, escrowCreation: Object, instructions: Object): Promise` +`prepareEscrowCreation(address: string, escrowCreation: object, instructions: object): Promise` Prepare an escrow creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareEscrowExecution.md.ejs b/docs/src/prepareEscrowExecution.md.ejs index 4e6d1aa3..5369057f 100644 --- a/docs/src/prepareEscrowExecution.md.ejs +++ b/docs/src/prepareEscrowExecution.md.ejs @@ -1,6 +1,6 @@ ## prepareEscrowExecution -`prepareEscrowExecution(address: string, escrowExecution: Object, instructions: Object): Promise` +`prepareEscrowExecution(address: string, escrowExecution: object, instructions: object): Promise` Prepare an escrow execution transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareOrder.md.ejs b/docs/src/prepareOrder.md.ejs index 2d22d441..5d431d0c 100644 --- a/docs/src/prepareOrder.md.ejs +++ b/docs/src/prepareOrder.md.ejs @@ -1,6 +1,6 @@ ## prepareOrder -`prepareOrder(address: string, order: Object, instructions: Object): Promise` +`prepareOrder(address: string, order: object, instructions: object): Promise` Prepare an order transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareOrderCancellation.md.ejs b/docs/src/prepareOrderCancellation.md.ejs index 96b30c27..a8abe006 100644 --- a/docs/src/prepareOrderCancellation.md.ejs +++ b/docs/src/prepareOrderCancellation.md.ejs @@ -1,6 +1,6 @@ ## prepareOrderCancellation -`prepareOrderCancellation(address: string, orderCancellation: Object, instructions: Object): Promise` +`prepareOrderCancellation(address: string, orderCancellation: object, instructions: object): Promise` Prepare an order cancellation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/preparePayment.md.ejs b/docs/src/preparePayment.md.ejs index 93f2245d..4056483e 100644 --- a/docs/src/preparePayment.md.ejs +++ b/docs/src/preparePayment.md.ejs @@ -1,6 +1,6 @@ ## preparePayment -`preparePayment(address: string, payment: Object, instructions: Object): Promise` +`preparePayment(address: string, payment: object, instructions: object): Promise` Prepare a payment transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/preparePaymentChannelClaim.md.ejs b/docs/src/preparePaymentChannelClaim.md.ejs index 7abf9313..0904c8ed 100644 --- a/docs/src/preparePaymentChannelClaim.md.ejs +++ b/docs/src/preparePaymentChannelClaim.md.ejs @@ -1,6 +1,6 @@ ## preparePaymentChannelClaim -`preparePaymentChannelClaim(address: string, paymentChannelClaim: Object, instructions: Object): Promise` +`preparePaymentChannelClaim(address: string, paymentChannelClaim: object, instructions: object): Promise` Prepare a payment channel claim transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/preparePaymentChannelCreate.md.ejs b/docs/src/preparePaymentChannelCreate.md.ejs index 99db273b..32ca03d8 100644 --- a/docs/src/preparePaymentChannelCreate.md.ejs +++ b/docs/src/preparePaymentChannelCreate.md.ejs @@ -1,6 +1,6 @@ ## preparePaymentChannelCreate -`preparePaymentChannelCreate(address: string, paymentChannelCreate: Object, instructions: Object): Promise` +`preparePaymentChannelCreate(address: string, paymentChannelCreate: object, instructions: object): Promise` Prepare a payment channel creation transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/preparePaymentChannelFund.md.ejs b/docs/src/preparePaymentChannelFund.md.ejs index 457bcc6c..1063c339 100644 --- a/docs/src/preparePaymentChannelFund.md.ejs +++ b/docs/src/preparePaymentChannelFund.md.ejs @@ -1,6 +1,6 @@ ## preparePaymentChannelFund -`preparePaymentChannelFund(address: string, paymentChannelFund: Object, instructions: Object): Promise` +`preparePaymentChannelFund(address: string, paymentChannelFund: object, instructions: object): Promise` Prepare a payment channel fund transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareSettings.md.ejs b/docs/src/prepareSettings.md.ejs index 7b0f4ebb..7a49b23d 100644 --- a/docs/src/prepareSettings.md.ejs +++ b/docs/src/prepareSettings.md.ejs @@ -1,6 +1,6 @@ ## prepareSettings -`prepareSettings(address: string, settings: Object, instructions: Object): Promise` +`prepareSettings(address: string, settings: object, instructions: object): Promise` Prepare a settings transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/prepareTrustline.md.ejs b/docs/src/prepareTrustline.md.ejs index 4acbf89e..09734424 100644 --- a/docs/src/prepareTrustline.md.ejs +++ b/docs/src/prepareTrustline.md.ejs @@ -1,6 +1,6 @@ ## prepareTrustline -`prepareTrustline(address: string, trustline: Object, instructions: Object): Promise` +`prepareTrustline(address: string, trustline: object, instructions: object): Promise` Prepare a trustline transaction. The prepared transaction must subsequently be [signed](#sign) and [submitted](#submit). diff --git a/docs/src/sign.md.ejs b/docs/src/sign.md.ejs index 9f20984d..2334588d 100644 --- a/docs/src/sign.md.ejs +++ b/docs/src/sign.md.ejs @@ -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). diff --git a/docs/src/submit.md.ejs b/docs/src/submit.md.ejs index 6f0d4e3d..d796e7a8 100644 --- a/docs/src/submit.md.ejs +++ b/docs/src/submit.md.ejs @@ -1,6 +1,6 @@ ## submit -`submit(signedTransaction: string): Promise` +`submit(signedTransaction: string): Promise` Submits a signed transaction. The transaction is not guaranteed to succeed; it must be verified with [getTransaction](#gettransaction). diff --git a/src/common/browser-hacks.ts b/src/common/browser-hacks.ts index b5c8980c..55d35ae3 100644 --- a/src/common/browser-hacks.ts +++ b/src/common/browser-hacks.ts @@ -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] diff --git a/src/common/serverinfo.ts b/src/common/serverinfo.ts index b1ab195a..07506784 100644 --- a/src/common/serverinfo.ts +++ b/src/common/serverinfo.ts @@ -9,7 +9,7 @@ export type GetServerInfoResponse = { hostID: string, ioLatencyMs: number, load?: { - jobTypes: Array, + jobTypes: Array, threads: number }, lastClose: { diff --git a/src/ledger/parse/cancellation.ts b/src/ledger/parse/cancellation.ts index bba96d6a..e14c20bc 100644 --- a/src/ledger/parse/cancellation.ts +++ b/src/ledger/parse/cancellation.ts @@ -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 diff --git a/src/ledger/parse/escrow-cancellation.ts b/src/ledger/parse/escrow-cancellation.ts index e19581e0..9abd61f5 100644 --- a/src/ledger/parse/escrow-cancellation.ts +++ b/src/ledger/parse/escrow-cancellation.ts @@ -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({ diff --git a/src/ledger/parse/escrow-creation.ts b/src/ledger/parse/escrow-creation.ts index 34dd3f26..d50dc09e 100644 --- a/src/ledger/parse/escrow-creation.ts +++ b/src/ledger/parse/escrow-creation.ts @@ -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({ diff --git a/src/ledger/parse/escrow-execution.ts b/src/ledger/parse/escrow-execution.ts index a5de79c0..a02d4e7a 100644 --- a/src/ledger/parse/escrow-execution.ts +++ b/src/ledger/parse/escrow-execution.ts @@ -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({ diff --git a/src/ledger/parse/fields.ts b/src/ledger/parse/fields.ts index e95bd90f..bbd58a47 100644 --- a/src/ledger/parse/fields.ts +++ b/src/ledger/parse/fields.ts @@ -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] diff --git a/src/ledger/parse/ledger.ts b/src/ledger/parse/ledger.ts index 3d601b76..d44b32ca 100644 --- a/src/ledger/parse/ledger.ts +++ b/src/ledger/parse/ledger.ts @@ -17,7 +17,7 @@ export type FormattedLedger = { parentCloseTime: string, totalDrops: string, transactionHash: string, - transactions?: Array, + transactions?: Array, transactionHashes?: Array, rawState?: string, stateHashes?: Array diff --git a/src/ledger/parse/pathfind.ts b/src/ledger/parse/pathfind.ts index 5fd09c5d..37649ba8 100644 --- a/src/ledger/parse/pathfind.ts +++ b/src/ledger/parse/pathfind.ts @@ -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, diff --git a/src/ledger/parse/payment-channel-claim.ts b/src/ledger/parse/payment-channel-claim.ts index 93c75d98..1883a40c 100644 --- a/src/ledger/parse/payment-channel-claim.ts +++ b/src/ledger/parse/payment-channel-claim.ts @@ -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({ diff --git a/src/ledger/parse/payment-channel-create.ts b/src/ledger/parse/payment-channel-create.ts index dddcb422..a3feab3e 100644 --- a/src/ledger/parse/payment-channel-create.ts +++ b/src/ledger/parse/payment-channel-create.ts @@ -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({ diff --git a/src/ledger/parse/payment-channel-fund.ts b/src/ledger/parse/payment-channel-fund.ts index 6658d205..54b23f17 100644 --- a/src/ledger/parse/payment-channel-fund.ts +++ b/src/ledger/parse/payment-channel-fund.ts @@ -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({ diff --git a/src/ledger/parse/payment.ts b/src/ledger/parse/payment.ts index 75c9a745..c502c292 100644 --- a/src/ledger/parse/payment.ts +++ b/src/ledger/parse/payment.ts @@ -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 = { diff --git a/src/ledger/parse/trustline.ts b/src/ledger/parse/trustline.ts index d0a3732e..6225ab18 100644 --- a/src/ledger/parse/trustline.ts +++ b/src/ledger/parse/trustline.ts @@ -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({ diff --git a/src/ledger/utils.ts b/src/ledger/utils.ts index f9d78419..9dbd3988 100644 --- a/src/ledger/utils.ts +++ b/src/ledger/utils.ts @@ -106,7 +106,7 @@ function isPendingLedgerVersion(connection: Connection, } function ensureLedgerVersion(options: any -): Promise { +): Promise { if (Boolean(options) && options.ledgerVersion !== undefined && options.ledgerVersion !== null ) { diff --git a/src/offline/generate-address.ts b/src/offline/generate-address.ts index 5a32976f..fef67cd3 100644 --- a/src/offline/generate-address.ts +++ b/src/offline/generate-address.ts @@ -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) diff --git a/src/server/server.ts b/src/server/server.ts index d7ed3251..68858739 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -16,7 +16,7 @@ function disconnect(): Promise { 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, diff --git a/src/transaction/combine.ts b/src/transaction/combine.ts index c8caccfd..3e50ac03 100644 --- a/src/transaction/combine.ts +++ b/src/transaction/combine.ts @@ -16,7 +16,7 @@ function compareSigners(a, b) { .comparedTo(addressToBigNumber(b.Signer.Account)) } -function combine(signedTransactions: Array): Object { +function combine(signedTransactions: Array): object { validate.combine({signedTransactions}) // TODO: signedTransactions is an array of strings in the documentation, but diff --git a/src/transaction/escrow-cancellation.ts b/src/transaction/escrow-cancellation.ts index bc5dd4c0..ce6714d5 100644 --- a/src/transaction/escrow-cancellation.ts +++ b/src/transaction/escrow-cancellation.ts @@ -12,7 +12,7 @@ export type EscrowCancellation = { function createEscrowCancellationTransaction(account: string, payment: EscrowCancellation -): Object { +): object { const txJSON: any = { TransactionType: 'EscrowCancel', Account: account, diff --git a/src/transaction/escrow-creation.ts b/src/transaction/escrow-creation.ts index 25e0b2d3..e788b6b6 100644 --- a/src/transaction/escrow-creation.ts +++ b/src/transaction/escrow-creation.ts @@ -18,7 +18,7 @@ export type EscrowCreation = { function createEscrowCreationTransaction(account: string, payment: EscrowCreation -): Object { +): object { const txJSON: any = { TransactionType: 'EscrowCreate', Account: account, diff --git a/src/transaction/escrow-execution.ts b/src/transaction/escrow-execution.ts index 261fa2d1..6d6233e8 100644 --- a/src/transaction/escrow-execution.ts +++ b/src/transaction/escrow-execution.ts @@ -15,7 +15,7 @@ export type EscrowExecution = { function createEscrowExecutionTransaction(account: string, payment: EscrowExecution -): Object { +): object { const txJSON: any = { TransactionType: 'EscrowFinish', Account: account, diff --git a/src/transaction/ordercancellation.ts b/src/transaction/ordercancellation.ts index 5c38e016..ccfe18b5 100644 --- a/src/transaction/ordercancellation.ts +++ b/src/transaction/ordercancellation.ts @@ -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 { validate.prepareOrderCancellation({address, orderCancellation, instructions}) diff --git a/src/transaction/payment-channel-claim.ts b/src/transaction/payment-channel-claim.ts index 55025a6a..6c56256a 100644 --- a/src/transaction/payment-channel-claim.ts +++ b/src/transaction/payment-channel-claim.ts @@ -16,7 +16,7 @@ export type PaymentChannelClaim = { function createPaymentChannelClaimTransaction(account: string, claim: PaymentChannelClaim -): Object { +): object { const txJSON: any = { Account: account, TransactionType: 'PaymentChannelClaim', diff --git a/src/transaction/payment-channel-create.ts b/src/transaction/payment-channel-create.ts index 508391f3..a7354dc8 100644 --- a/src/transaction/payment-channel-create.ts +++ b/src/transaction/payment-channel-create.ts @@ -14,7 +14,7 @@ export type PaymentChannelCreate = { function createPaymentChannelCreateTransaction(account: string, paymentChannel: PaymentChannelCreate -): Object { +): object { const txJSON: any = { Account: account, TransactionType: 'PaymentChannelCreate', diff --git a/src/transaction/payment-channel-fund.ts b/src/transaction/payment-channel-fund.ts index d74320eb..6ca31e4e 100644 --- a/src/transaction/payment-channel-fund.ts +++ b/src/transaction/payment-channel-fund.ts @@ -10,7 +10,7 @@ export type PaymentChannelFund = { function createPaymentChannelFundTransaction(account: string, fund: PaymentChannelFund -): Object { +): object { const txJSON: any = { Account: account, TransactionType: 'PaymentChannelFund', diff --git a/src/transaction/payment.ts b/src/transaction/payment.ts index dc7a2a6b..2782fa0f 100644 --- a/src/transaction/payment.ts +++ b/src/transaction/payment.ts @@ -85,7 +85,7 @@ function createMaximalAmount(amount: Amount): Amount { } function createPaymentTransaction(address: string, paymentArgument: Payment -): Object { +): object { const payment = _.cloneDeep(paymentArgument) applyAnyCounterpartyEncoding(payment) diff --git a/src/transaction/settings.ts b/src/transaction/settings.ts index 9c60f2ae..37d34294 100644 --- a/src/transaction/settings.ts +++ b/src/transaction/settings.ts @@ -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) diff --git a/src/transaction/sign.ts b/src/transaction/sign.ts index 6c71a42a..7fdc51f1 100644 --- a/src/transaction/sign.ts +++ b/src/transaction/sign.ts @@ -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) diff --git a/src/transaction/trustline.ts b/src/transaction/trustline.ts index c732f899..fea6f4b6 100644 --- a/src/transaction/trustline.ts +++ b/src/transaction/trustline.ts @@ -14,7 +14,7 @@ function convertQuality(quality) { function createTrustlineTransaction(account: string, trustline: FormattedTrustlineSpecification -): Object { +): object { const limit = { currency: trustline.currency, issuer: trustline.counterparty, diff --git a/src/transaction/types.ts b/src/transaction/types.ts index 50b87144..5bc2042e 100644 --- a/src/transaction/types.ts +++ b/src/transaction/types.ts @@ -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 } diff --git a/src/transaction/utils.ts b/src/transaction/utils.ts index de6c2398..8dff1bcb 100644 --- a/src/transaction/utils.ts +++ b/src/transaction/utils.ts @@ -45,7 +45,7 @@ function prepareTransaction(txJSON: any, api: RippleAPI, const account = txJSON.Account setCanonicalFlag(txJSON) - function prepareMaxLedgerVersion(): Promise { + function prepareMaxLedgerVersion(): Promise { 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 { + function prepareFee(): Promise { 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 { + async function prepareSequence(): Promise { if (instructions.sequence !== undefined) { txJSON.Sequence = instructions.sequence return Promise.resolve(txJSON)