mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-05 05:15:48 +00:00
25 lines
673 B
Plaintext
25 lines
673 B
Plaintext
## getLedger
|
|
|
|
`getLedger(options: object): Promise<object>`
|
|
|
|
Returns header information for the specified ledger (or the most recent validated ledger if no ledger is specified). Optionally, all the transactions that were validated in the ledger or the account state information can be returned with the ledger header.
|
|
|
|
### Parameters
|
|
|
|
<%- renderSchema('input/get-ledger.json') %>
|
|
|
|
### Return Value
|
|
|
|
This method returns a promise that resolves with an object with the following structure:
|
|
|
|
<%- renderSchema('output/get-ledger.json') %>
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
return api.getLedger()
|
|
.then(ledger => {/* ... */});
|
|
```
|
|
|
|
<%- renderFixture('responses/get-ledger.json') %>
|