Skip to content

Commit 51e4606

Browse files
author
Clément Turmel
committed
refactor(docs): adapt client lib documentation with new api calls
1 parent b9666aa commit 51e4606

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

docs/website/root/manual/develop/nodes/mithril-client-library.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -327,21 +327,32 @@ async fn main() -> mithril_client::MithrilResult<()> {
327327
.download_unpack(
328328
&snapshot,
329329
&immutable_file_range,
330-
target_directory,
330+
&target_directory,
331331
download_unpack_options,
332332
)
333333
.await?;
334334

335+
let verified_digests = client
336+
.cardano_database_v2()
337+
.download_and_verify_digests(
338+
&certificate,
339+
&snapshot
340+
)
341+
.await?;
342+
343+
let allow_missing_immutables_files = false;
335344
let merkle_proof = client
336345
.cardano_database_v2()
337-
.compute_merkle_proof(
346+
.verify_cardano_database(
338347
&certificate,
339348
&snapshot,
340349
&immutable_file_range,
341-
target_directory,
342-
)
343-
.await?;
344-
merkle_proof.verify()?;
350+
allow_missing_immutables_files,
351+
&target_directory,
352+
&verified_digest,
353+
),
354+
)
355+
.await?;
345356

346357
let message = MessageBuilder::new()
347358
.compute_cardano_database_message(&certificate, &merkle_proof)

0 commit comments

Comments
 (0)