Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

toString to return the cid v1 string form by default? #64

Open
olizilla opened this issue May 9, 2023 · 0 comments
Open

toString to return the cid v1 string form by default? #64

olizilla opened this issue May 9, 2023 · 0 comments

Comments

@olizilla
Copy link

olizilla commented May 9, 2023

I'm upgrading a module that used the old peer-id library which would return the CID v1 string format by default

https://github.com/libp2p/js-peer-id/blob/869bb227a611722fc19b4db031c448ed926e145c/src/index.js#L158-L169

while the default here is to return the older form, and you have to call .toCID().toString() to get the same behaviour.

I suspect folks (like me) wont think to do until they finally hit an interop test that fails. I hit this while working on encoding IPNI advertisements and only found the issue once I tried to figure out why a parity test with an existing advertisement was failing.

@olizilla olizilla changed the title toString to return the base32 encoded self-describing form by default? toString to return the cid v1 string form by default? May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant