Skip to content

Commit

Permalink
Add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
selankon authored and marcvelmer committed Jul 19, 2024
1 parent 3a2d41f commit b2c34b4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/api/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,13 @@ export abstract class ChainAPI extends API {
.catch(this.isApiError);
}

/**
* Fetches information about a transaction from the blockchain by its index. The transaction index is an incremental
* counter for each transaction
*
* @param url - API endpoint URL
* @param index - The transaction index
*/
public static txByIndex(url: string, index: number): Promise<IChainTxReference> {
return axios
.get<IChainTxReference>(url + ChainAPIMethods.TX_INFO_BY_INDEX.replace('{index}', String(index)))
Expand Down

0 comments on commit b2c34b4

Please sign in to comment.