Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add api to map cid to multiadress suffexed with cid on any node #33

Open
dzmitry-lahoda opened this issue Oct 7, 2021 · 3 comments
Open

Comments

@dzmitry-lahoda
Copy link

so if i have cid, i can map to adress to download from peer (via external proxy adress or other)

@alari
Copy link
Member

alari commented Oct 7, 2021

Can you provide an example plz? With type definition if possible

@dzmitry-lahoda
Copy link
Author

existing apis (so also hard to read these without examples of input out puts):

-- Download file `cid` from IPFS node `from` and save it to `node`
func get_from(node: PeerId, cid: CID, from: Multiaddr) -> IpfsGetResult 
... seems returns local path

-- Get externally available multiaddress of IPFS's HTTP RPC endpoint (usually on port 5001)
func get_external_api_multiaddr(node: PeerId) -> IpfsMultiaddrResult
.. not cid specific - need to merge somehow values - error prone. 

assuming above do not cover next:

--- gets download link via proxy for give CID
get_from_external_api_multiaddr(node: PeerId, cid: CID) -> IpfsMultiaddrResult
read it as part `IpfsFluence` path utility

@dzmitry-lahoda
Copy link
Author

So I have CID, pass it to fluence, fluence returns me something, I plug that into ipfs js client -> it works. I do not really care what is inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants