Open HLK65 opened 4 years ago
Full file for a better understanding https://pastebin.com/tjyDTCBf
@satazor any ideas? Also filed on https://stackoverflow.com/questions/62430111/issue-adding-resolving-did-docs-with-js-did-ipid
I am running into the exact same issue that @HLK65 is describing. The part of await _classPrivateFieldGet(this, _ipfs).name.resolve(identifier);
returns undefined
in all cases I have tried.
So from the ipfs-js docs (https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/NAME.md#ipfsnameresolvevalue-options) it looks like the publish identifier needs to look like /ipns/...
.
The publish function of the js-did-ipid library calls ipfs.name.publish
with a path that starts with /ipfs/...
https://github.com/ipfs-shipyard/js-did-ipid/blob/a32bec225db9a6064785995318c40ed9eed39c8a/src/index.js#L68-L70
I might be wrong.
I have dug into this some more and it appears to me that the problem happens due to the switch to Async Iterables https://gist.github.com/alanshaw/04b2ddc35a6fff25c040c011ac6acf26#file-migration-md
I will have a look whether I can send a PR with the fix
Ahhhh. Thanks for investigating @patrickdet!
@satazor can you review or suggest a reviewer?
Thank you for digging in and fixing @patrickdet ! I'll hopefully find the time to test it tomorrow.
It's working, thank you so much!
Reviewed!
Hey,
I'm trying to create and add a DID Doc but it seems like it's not being added to the network. Maybe you can help me find the issue.
I got a node.js express server setup with the following code to create a did
This creates and responds the didDoc but when trying to resolve it I don't get anything.
Register response: {
Response to
localhost:3000/did/resolve?did=did:ipid:QmWDmXuHmm2RDhFDrVpL7487MB26NpVMWvS8jv59pARMMb
Code 404It's the replace on path in line 97 of the ipid index.js
So it looks like it can't resolve the identifier
Manually resolving the did
ipfs.name.resolve
returns/ipfs/bafyreihnyf7hwzeo7gzfpxdys5kyz6v3o7pvh7dd3riird3krpfqyxx2lm
butipfs.cat
returnsError: this dag node has no content.
and the cloudflare gatewayunknown node type
So I guess I'm doing something wrong but I can't figure it out. Maybe you can help.
Thanks, Lukas