mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-06 13:55:49 +00:00
29 lines
630 B
Plaintext
29 lines
630 B
Plaintext
## computeLedgerHash
|
|
|
|
`computeLedgerHash(ledger: Object): string`
|
|
|
|
Compute the hash of a ledger.
|
|
|
|
### Parameters
|
|
|
|
<aside class="notice">
|
|
The parameter to this method has the same structure as the return value of getLedger.
|
|
</aside>
|
|
|
|
<%- renderSchema('input/compute-ledger-hash.json') %>
|
|
|
|
### Return Value
|
|
|
|
This method returns an uppercase hexadecimal string representing the hash of the ledger.
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
const ledger = <%- importFile('test/fixtures/requests/compute-ledger-hash.json') %>;
|
|
return api.computeLedgerHash(ledger);
|
|
```
|
|
|
|
```json
|
|
"F4D865D83EB88C1A1911B9E90641919A1314F36E1B099F8E95FE3B7C77BE3349"
|
|
```
|