mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
27 lines
633 B
Plaintext
27 lines
633 B
Plaintext
## getTransaction
|
|
|
|
`getTransaction(id: string, options: object): Promise<object>`
|
|
|
|
Retrieves a transaction by its [Transaction ID](#transaction-id).
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema('input/get-transaction.json') %>
|
|
|
|
### Return Value
|
|
|
|
This method returns a promise that resolves with a transaction object containing the following fields.
|
|
|
|
<%- renderSchema('output/get-transaction.json') %>
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
const id = '01CDEAA89BF99D97DFD47F79A0477E1DCC0989D39F70E8AACBFE68CC83BD1E94';
|
|
return api.getTransaction(id).then(transaction => {
|
|
/* ... */
|
|
});
|
|
```
|
|
|
|
<%- renderFixture('responses/get-transaction-payment.json') %>
|