The IPFS cli/http api has an ipfs pin ls
command that lists pinned hashes. However, this only works to query the local node. Is there a way to run the same command against a remote node, e.g., something like
$ ipfs pin ls <PeerID>
Which would act like ipfs pin ls
but listing pins on the node identified by the Peer ID?
People running ipfs nodes are strongly discouraged (for good security reasons), from allowing remote access to the http api (which provides /api/v0/pin/ls
).
Is there an internal ipfs function, or a libp2p function, which would enable an ipfs node to query a remote peer in this way?
Or conversely, is there a function to send a list of local pins (ie list of hashes) to an identified remote peer?
Thanks
There is not currently a way to do this through the IPFS API as of 0.4.20
. I can't speak to an internal libp2p function, but I believe the answer is "no" there too. Unless you write the code into IPFS to do it, which is probably nontrivial.