mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-11 00:05:49 +00:00
docs: clarify option and return types (#1718)
* docs: clarify docs for options and return types * docs: docgen w/ CNAME
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
"analyze": "run-s build:web --analyze",
|
||||
"watch": "run-s build:lib --watch",
|
||||
"clean": "rm -rf dist",
|
||||
"docgen": "typedoc",
|
||||
"docgen": "typedoc && echo js.xrpl.org >> ./docs/CNAME",
|
||||
"prepublish": "run-s clean build",
|
||||
"test": "nyc mocha --config=test/.mocharc.json --exit",
|
||||
"test:integration": "TS_NODE_PROJECT=tsconfig.build.json nyc mocha ./test/integration/**/*.ts ./test/integration/*.ts",
|
||||
|
||||
@@ -23,8 +23,6 @@ function formatBalances(trustlines: Trustline[]): Balance[] {
|
||||
interface GetXrpBalanceOptions {
|
||||
ledger_hash?: string
|
||||
ledger_index?: LedgerIndex
|
||||
peer?: string
|
||||
limit?: number
|
||||
}
|
||||
|
||||
interface GetBalancesOptions {
|
||||
@@ -62,8 +60,15 @@ async function getXrpBalance(
|
||||
*
|
||||
* @param this - Client.
|
||||
* @param account - Account address.
|
||||
* @param options - Options to include for getting balances.
|
||||
* @returns An array of XRP/non-XRP balances.
|
||||
* @param options - Allows the user to to look up balance in a ledger with given
|
||||
* ledger_index or ledger_hash, filter by peer, and limit number of balances.
|
||||
* @param options.ledger_index - Retrieve the account balances at a given
|
||||
* ledger_index.
|
||||
* @param options.ledger_hash - Retrieve the account balances at the ledger with
|
||||
* a given ledger_hash.
|
||||
* @param options.peer - Filter balances by peer.
|
||||
* @param options.limit - Limit number of balances to return.
|
||||
* @returns An array of XRP/non-XRP balances for the given account.
|
||||
*/
|
||||
async function getBalances(
|
||||
this: Client,
|
||||
|
||||
@@ -40,12 +40,13 @@ const MAX_ATTEMPTS = 20
|
||||
* ```typescript
|
||||
* const api = new xrpl.Client("wss://s.altnet.rippletest.net:51233")
|
||||
* await api.connect()
|
||||
* const wallet = await api.fundWallet()
|
||||
* const { wallet, balance } = await api.fundWallet()
|
||||
* ```
|
||||
*
|
||||
* @param this - Client.
|
||||
* @param wallet - An existing XRPL Wallet to fund, if undefined, a new Wallet will be created.
|
||||
* @returns A Wallet on the Testnet or Devnet that contains some amount of XRP.
|
||||
* @returns A Wallet on the Testnet or Devnet that contains some amount of XRP,
|
||||
* and that wallet's balance in XRP.
|
||||
* @throws When either Client isn't connected or unable to fund wallet address.
|
||||
*/
|
||||
async function fundWallet(
|
||||
|
||||
Reference in New Issue
Block a user