Skip to content

Commit

Permalink
Update IPFS.java
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-tara authored Aug 3, 2022
1 parent feebba0 commit d504fa6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/io/ipfs/api/IPFS.java
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,11 @@ public Map publish(Multihash hash, Optional<String> id) throws IOException {
return retrieveMap("name/publish?arg=/ipfs/" + hash + id.map(name -> "&key=" + name).orElse(""));
}

public String resolve(Multihash hash) throws IOException {
Map res = (Map) retrieveAndParse("name/resolve?arg=" + hash);
public String resolve(String ipns) throws IOException {
Map res = (Map) retrieveAndParse("name/resolve?arg=" + ipns);
return (String)res.get("Path");
}

public Map resolve(String ipns) throws IOException {
return (Map) retrieveAndParse("name/resolve?arg=" + ipns);
}

}

public class DHT {
Expand Down

0 comments on commit d504fa6

Please sign in to comment.