-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: @helia/ipns should allow dnslink paths. #402
Comments
This bug is impacting even dnsLink values with trailing path. From #392 (comment):
I created a demo for testing IPNS resolution at https://codepen.io/SgtPooki/pen/ZEPrJYp?editors=1011
|
SgtPooki
added a commit
that referenced
this issue
Jan 30, 2024
SgtPooki
added a commit
that referenced
this issue
Jan 30, 2024
SgtPooki
added a commit
that referenced
this issue
Jan 30, 2024
BREAKING CHANGE: ipns resolve now supports paths, so the return type is now `{ path: string, cid: CID }` instead of just `CID` \#### Before \```typescript const cidFromPeerId = await ipns.resolve(peerId) const cidFromDnsLink = await ipns.resolve(domainName) \``` \#### After \```typescript const { cid, path } = await ipns.resolve(peerId) const { cid, path } = await ipns.resolve(domainName) \```
achingbrain
added a commit
that referenced
this issue
Jan 31, 2024
Fixes #402 Adds support for publishing/resolving paths. Eg: - `/ipfs/QmFoo/deep/link.txt` - `/ipns/example.com/deep/link.html` BREAKING CHANGE: to support paths in `@helia/ipns`, the return type of `ipns.resolve` is now `{ path: string, cid: CID }` instead of just `CID` **Before** ```typescript const cidFromPeerId = await ipns.resolve(peerId) const cidFromDnsLink = await ipns.resolve(domainName) ``` **After** ```typescript const { cid, path } = await ipns.resolve(peerId) const { cid, path } = await ipns.resolve(domainName) ``` --------- Co-authored-by: achingbrain <alex@achingbrain.net>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
helia/packages/ipns/src/index.ts
Lines 346 to 361 in 4864f29
some dnslinks may be
/ipfs/Qm.../somePath/to/whatever
and currently we do not resolve those properlyhelia/packages/ipns/src/index.ts
Line 402 in 4864f29
parts are not guaranteed to be length===3
cc @aschmahmann
The text was updated successfully, but these errors were encountered: