diff options
Diffstat (limited to 'src/repository/client.rs')
-rw-r--r-- | src/repository/client.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/repository/client.rs b/src/repository/client.rs index 98de84e..59542c8 100644 --- a/src/repository/client.rs +++ b/src/repository/client.rs @@ -69,6 +69,15 @@ impl ClientFassade { .map(|res| IPNSHash::from(res.value)) .map_err(Into::into) } + + pub async fn resolve(&self, ipns: IPNSHash) -> Result<IPFSHash, Error> { + self.0 + .clone() + .name_resolve(Some(&ipns), true, false) + .await + .map(|res| IPFSHash::from(res.path)) + .map_err(Into::into) + } } /// Client wrapper for working with types directly on the client |