You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ipfs id --peerid-base base36 --offline $PEERID | jq --raw-output .ID nearly does the job, but it does not respect --offline flag and requires connection to the peer.
The text was updated successfully, but these errors were encountered:
lidel
added
kind/bug
A bug in existing code (including security flaws)
topic/api
Topic api
P2
Medium: Good to have, but can wait until someone steps up
labels
Oct 1, 2021
lidel
changed the title
ipfs id --offline <peerid> does not work
ipfs id --offline <peerid> does not work offline
Oct 1, 2021
Agreed with triage and working on this. It seems to me that if we only need encoding conversion this should live in an independent command maybe. Regardless, I'll implement it here and we can decouple it later if we want.
@lidel There is no --offline option in this command (not even in the form of documentation or a fixme, just an error message). My interpretation of it and please correct/complete if wrong is: do not attempt to connect to the peer (no matter if the daemon is running or not) and just print whatever information we have in the peer address book (which will likely be nothing except for the converted peer ID).
(Is the daemon's --offline option supposed to apply here? I'm getting a collision when adding a local --offline option so I'm assuming there is a global one up in the hierarchy which is the one referred in this issue.)
Checklist
Installation method
built from source
Version
Config
(default)
Description
ipfs id --peerid-base base36 --offline <peerid>
does not work – it requires connection and hangs until one is established.Rationale why this should be prioritized
We would like to have an easy way for converting peerids to a CIDv1 in arbitrary multibase.
Right now, there is no universal way that works for all peerid types and is easy to use.
Example: https://discuss.ipfs.io/t/command-line-to-transform-base58-peerid-to-subdomain-friendly-base36/12330/3?u=lidel
ipfs id --peerid-base base36 --offline $PEERID | jq --raw-output .ID
nearly does the job, but it does not respect--offline
flag and requires connection to the peer.The text was updated successfully, but these errors were encountered: