ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.43k stars 1.25k forks source link

fix: ipfs-http-client should lowercase key type when submitting to kubo #4303

Closed RangerMauve closed 1 year ago

RangerMauve commented 1 year ago

Fixes #4272

Without this one cannot generate a new key in TypeScript with Kubo since the TypeScript types require uppercase key names.

Not sure if the types should be changed since I'm not sure if js-ipfs-core relies on the uppercase version.

RangerMauve commented 1 year ago

Actually I'm not sure what to do here since I'm getting TypeScript errors now.

If I update the types to reflect what Kubo supports it'd be a major breaking change in the API. :/

Maybe we can relax the type to be | string to allow for arbitrary type values?

achingbrain commented 1 year ago

Thank you so much for opening this PR and for your patience in getting it merged. js-ipfs is being deprecated in favor of Helia. You can https://github.com/ipfs/js-ipfs/issues/4336 and read the migration guide.

Please swap out ipfs-http-client for kubo-rpc-client - it's a drop in replacement and where bug fixes & features will land in future.