-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: cid base option #1552
feat: cid base option #1552
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2d4f8d4 to
da51dc6
Compare
|
P.R. for go-ipfs: ipfs/kubo#5464. Not that for many commands I did it the Cid base conversion client-side when possible. I agree that for |
|
Will this PR also default to base32 or is that a separate PR? |
90c57bd to
4b34b7c
Compare
@diasdavid that a separate PR TODO:
|
613bf0c to
e804933
Compare
f29115d to
a11fc91
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@alanshaw, I am not sure how high of a priority staying consist with |
|
@Stebalien can we get a firm decision on whether go-ipfs will support Thank you 😄! For context: ipfs/kubo#5777 (comment) |
132578a to
802a34d
Compare
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
493c670 to
acd8aa5
Compare
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
License: MIT Signed-off-by: Alan Shaw <[email protected]>
Implements an option for the CLI, HTTP API and core (where appropriate) that will allow the user to pick the multibase encoding for any CIDs that are returned as strings.
NOTE Using the CID base option in
bitswap,dagandobjectAPIs WILL NOT auto upgrade your CID to v1 if it is a v0 CID and WILL NOT apply the encoding you specified. This is because these APIs return IPLD objects with links and changing the version of the links would result in a different hash for the node if you were to re-add it. Also, the CID you used to retrieve the node wouldn't actually refer to the node you got back any longer. Read this for further context.This PR adds a
--cid-baseoption to the following CLI commands:jsipfs bitswap statjsipfs bitswap unwantjsipfs bitswap wantlistjsipfs block putjsipfs block statjsipfs addjsipfs lsjsipfs object getjsipfs object linksjsipfs object newjsipfs object patch add-linkjsipfs object patch append-datajsipfs object patch rm-linkjsipfs object patch set-datajsipfs object putjsipfs object statjsipfs pin addjsipfs pin lsjsipfs pin rmjsipfs resolveNote: these two MFS commands already implement the
--cid-baseoption:jsipfs files lsjsipfs files statIt also adds
?cid-base=query option to the following HTTP endpoints:/api/v0/bitswap/wantlist/api/v0/bitswap/stat/api/v0/bitswap/unwant/api/v0/block/put/api/v0/block/stat/api/v0/add/api/v0/ls/api/v0/object/new/api/v0/object/get/api/v0/object/put/api/v0/object/stat/api/v0/object/links/api/v0/object/patch/append-data/api/v0/object/patch/set-data/api/v0/object/patch/add-link/api/v0/object/patch/rm-link/api/v0/pin/ls/api/v0/pin/add/api/v0/pin/rm/api/v0/resolveIt adds a
cidBaseoption to the following core functions:resolve