-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
493c670
to
acd8aa5
Compare
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
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
,dag
andobject
APIs 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-base
option to the following CLI commands:jsipfs bitswap stat
jsipfs bitswap unwant
jsipfs bitswap wantlist
jsipfs block put
jsipfs block stat
jsipfs add
jsipfs ls
jsipfs object get
jsipfs object links
jsipfs object new
jsipfs object patch add-link
jsipfs object patch append-data
jsipfs object patch rm-link
jsipfs object patch set-data
jsipfs object put
jsipfs object stat
jsipfs pin add
jsipfs pin ls
jsipfs pin rm
jsipfs resolve
Note: these two MFS commands already implement the
--cid-base
option:jsipfs files ls
jsipfs files stat
It 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/resolve
It adds a
cidBase
option to the following core functions:resolve