Update docs for Channel, ClientOptions, and ConnectionUserOptions (#2630)

* Update docs for three objects

* Fix my updated Channel type

* Fix docs wording in client

* Export channel again

* Update HISTORY.md

* Lint
This commit is contained in:
Jackson Mills
2024-02-26 17:37:58 -05:00
committed by GitHub
parent e505843dc6
commit be732a4a6b
3 changed files with 80 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
## Unreleased ## Unreleased
### Fixed ### Fixed
* Typo in `Channel` type `source_tab` -> `source_tag`
* Fix `client.requestAll` to handle filters better * Fix `client.requestAll` to handle filters better
## 3.0.0 (2024-02-01) ## 3.0.0 (2024-02-01)

View File

@@ -88,8 +88,23 @@ import {
} from './partialPayment' } from './partialPayment'
export interface ClientOptions extends ConnectionUserOptions { export interface ClientOptions extends ConnectionUserOptions {
/**
* Multiplication factor to multiply estimated fee by to provide a cushion in case the
* required fee rises during submission of a transaction. Defaults to 1.2.
*
* @category Fee
*/
feeCushion?: number feeCushion?: number
/**
* Maximum transaction cost to allow, in decimal XRP. Must be a string-encoded
* number. Defaults to '2'.
*
* @category Fee
*/
maxFeeXRP?: string maxFeeXRP?: string
/**
* Duration to wait for a request to timeout.
*/
timeout?: number timeout?: number
} }

View File

@@ -1,17 +1,80 @@
import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod' import { BaseRequest, BaseResponse, LookupByLedgerRequest } from './baseMethod'
/**
* Represents a payment channel in the XRP Ledger.
*/
export interface Channel { export interface Channel {
/** The owner of the channel, as an Address. */
account: string account: string
/** The total amount of XRP, in drops allocated to this channel. */
amount: string amount: string
/**
* The total amount of XRP, in drops, paid out from this channel,
* as of the ledger version used. (You can calculate the amount of
* XRP left in the channel by subtracting balance from amount.)
*/
balance: string balance: string
/**
* A unique ID for this channel, as a 64-character hexadecimal string.
* This is also the ID of the channel object in the ledger's state data.
*/
channel_id: string channel_id: string
/**
* The destination account of the channel, as an Address.
* Only this account can receive the XRP in the channel while it is open.
*/
destination_account: string destination_account: string
/**
* The number of seconds the payment channel must stay open after the owner
* of the channel requests to close it.
*/
settle_delay: number settle_delay: number
/**
* The public key for the payment channel in the XRP Ledger's base58 format.
* Signed claims against this channel must be redeemed with the matching key pair.
*/
public_key?: string public_key?: string
/**
* The public key for the payment channel in hexadecimal format, if one was
* specified at channel creation. Signed claims against this channel must be
* redeemed with the matching key pair.
*/
public_key_hex?: string public_key_hex?: string
/**
* Time, in seconds since the Ripple Epoch, when this channel is set to expire.
* This expiration date is mutable. If this is before the close time of the most
* recent validated ledger, the channel is expired.
*/
expiration?: number expiration?: number
/**
* Time, in seconds since the Ripple Epoch, of this channel's immutable expiration,
* if one was specified at channel creation. If this is before the close time of the
* most recent validated ledger, the channel is expired.
*/
cancel_after?: number cancel_after?: number
source_tab?: number
/**
* A 32-bit unsigned integer to use as a source tag for payments through this payment channel,
* if one was specified at channel creation. This indicates the payment channel's originator or
* other purpose at the source account. Conventionally, if you bounce payments from this channel,
* you should specify this value in the DestinationTag of the return payment.
*/
source_tag?: number
/**
* A 32-bit unsigned integer to use as a destination tag for payments through this channel,
* if one was specified at channel creation. This indicates the payment channel's beneficiary
* or other purpose at the destination account.
*/
destination_tag?: number destination_tag?: number
} }