-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
topic/cidv1b32Topic cidv1b32Topic cidv1b32
Description
I propose we create a new sub-command to aid in working with Cids. I propose the following sub-commands under it:
ipfs cid-util format
- format a Cid in various useful ways-f <string>
: format string fromcid-fmt
utility-v 0|1
: cid version-b <multibase code>
ipfs cid-util base32
- shortcut foripfs cid-util format -v 1 -b base32 ...
to aid in our translation to making base32 CIDv1 the defaultipfs cid-util encoding
- list available multibase encoding--prefixes
- also include the single leter prefixes in addition to the code--numeric
- also include the numeric code (ascii value of prefix)
ipfs cid-util codecs
- list available CID codecs--numeric
- also include the numeric code
ipfs cid-util hashes
- list valid multihash codes (excludes insecure hashes)--numeric
- also include the numeric code
This could be a separate command, however I think it is more convenient as a sub-command. For one thing the ipfs
binary is guaranteed to be available while extra utilities might not be installed. In addition the encoding
, codecs
and hashes
will be guaranteed to correspond to what is support by go ipfs. If they are in a separate command this is not guaranteed.
Thoughts?
Closes #5229.
Metadata
Metadata
Assignees
Labels
topic/cidv1b32Topic cidv1b32Topic cidv1b32