From 49a52af5e0b1f0ebd0e9a106557e7e1464dc9691 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 30 Apr 2020 10:50:10 +0200 Subject: Add helper to get blocks of IPNS hash Signed-off-by: Matthias Beyer --- src/app.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app.rs b/src/app.rs index c0ef28e..d06e1d2 100644 --- a/src/app.rs +++ b/src/app.rs @@ -98,5 +98,9 @@ impl App { }) } + pub async fn blocks_of(&self, ipns: IPNSHash) -> Result>, Error> { + self.repo.resolve(ipns).await.map(|ipfs| self.blocks(ipfs)) + } + } -- cgit v1.2.3