Skip to content

Commit

Permalink
feat: Add optional CTID field to Tx (#2477)
Browse files Browse the repository at this point in the history
* Add optional CTID field to Tx

* Update HISTORY.md

* Update TxRequest

* Update comment to remove incorrect statement

---------

Co-authored-by: Caleb Kniffen <[email protected]>
  • Loading branch information
JST5000 and ckniffen authored Nov 30, 2023
1 parent 9a85aaa commit 98abafb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/xrpl/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
### Added
* Support for `server_definitions` RPC

### Added
* Add support for Concise Transaction Identifier (ctid) as defined in [XLS-37](https://github.com/XRPLF/XRPL-Standards/discussions/91)

### Fixed
* Allow flag maps when submitting `NFTokenMint` and `NFTokenCreateOffer` transactions like others with flags
* Fix parseNFTokenID to return the correct taxon if large serial and (or) taxon were used

## 2.13.0 (2023-10-18)
Expand Down
13 changes: 12 additions & 1 deletion packages/xrpl/src/models/methods/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ import { BaseRequest, BaseResponse } from './baseMethod'
*/
export interface TxRequest extends BaseRequest {
command: 'tx'
transaction: string
/**
* The transaction hash to look up. Exactly one of `transaction` or `ctid` must be specified for a TxRequest.
*/
transaction?: string
/**
* The Concise Transaction ID to look up. Exactly one of `transaction` or `ctid` must be specified for a TxRequest.
*/
ctid?: string
/**
* If true, return transaction data and metadata as binary serialized to
* hexadecimal strings. If false, return transaction data and metadata as.
Expand Down Expand Up @@ -46,6 +53,10 @@ export interface TxResponse<
result: {
/** The SHA-512 hash of the transaction. */
hash: string
/**
* The Concise Transaction Identifier of the transaction (16-byte hex string)
*/
ctid?: string
/** The ledger index of the ledger that includes this transaction. */
ledger_index?: number
/** Transaction metadata, which describes the results of the transaction.
Expand Down

0 comments on commit 98abafb

Please sign in to comment.