Skip to content

Commit

Permalink
Add include_deleted param to ledger_entry API (#2725)
Browse files Browse the repository at this point in the history
* add nfts_by_issuer data type

* update HISTORY.md

* update HISTORY.md

* added to index and change field name

* change to added in history

* reformat change in history

* reformat history on bfts_by_issuer

* add include_deleted field

* update history

* fix an error in histroy

* changed comments

---------

Authored-by: Kassaking <kassaking7@gmail.com>
  • Loading branch information
Kassaking7 authored Oct 1, 2024
1 parent 55892c8 commit be9b48b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/xrpl/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr

### Added
* Add `nfts_by_issuer` clio-only API definition
* Add `include_deleted` to ledgerEntry request and `deleted_ledger_index` to ledgerEntry response
* Support for the `fixPreviousTxnID` amendment.
* Support for the user version of the `feature` RPC.
* Add `hash` field to `ledger` command response
Expand Down
13 changes: 12 additions & 1 deletion packages/xrpl/src/models/methods/ledgerEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ export interface LedgerEntryRequest extends BaseRequest, LookupByLedgerRequest {
issuer?: string
}
}

/**
* (Optional) If set to true and the queried object has been deleted,
* return its complete data prior to its deletion.
* If set to false or not provided and the queried object has been deleted,
* return objectNotFound (current behavior).
* This parameter is supported only by Clio servers
*/
include_deleted?: boolean
/**
* If true, return the requested ledger object's contents as a hex string in
* the XRP Ledger's binary format. Otherwise, return data in JSON format. The
Expand Down Expand Up @@ -204,5 +211,9 @@ export interface LedgerEntryResponse<T = LedgerEntry> extends BaseResponse {
/** The binary representation of the ledger object, as hexadecimal. */
node_binary?: string
validated?: boolean
/**
* (Optional) Indicates the ledger index at which the object was deleted.
*/
deleted_ledger_index?: number
}
}

0 comments on commit be9b48b

Please sign in to comment.