0

My problem is that I am unable to resolve the Decentralized Identify (DID) document using short-Form URI after publishing it to ION chain. Thanks if you can help correct me or some suggestion.

A sample code

import { anchor, DID, generateKeyPair } from '@decentralized-identity/ion-tools';

// Generate keys and ION DID
let authnKeys = await generateKeyPair();
let did = new DID(..);

// Generate and publish create request to an ION node
let createRequest = await did.generateRequest(0);
//anchor: post and publish DID document to https://beta.ion.msidentity.com/api/v1.0/proof-of-work-challenge
let anchorResponse = await anchor(createRequest);
console.log(anchorResponse) 
let uri = await did.getURI();
let shortURI = await did.getURI('short');
console.log("Long URI "+ uri+ "\nShort URI: "+ shortURI);

This code is nearly copied from Readme.md in https://github.com/decentralized-identity/ion-tools. The method anchor()at the bottom posts and publishes the request to ION chain, which is L2 for bitcoin chain. After execution, both short URI and Long URI are print, in which the short URI is only resolvable after it is published.

Previously, both Short URI and Long URI can be resolved in both https://identity.foundation/ion/explorer and https://dev.uniresolver.io/. I can get a fully defined DID Document from registry. But the resolve fails and returns 404 since 28 July.

My understanding is that the short uri should also be resolved to the specified document as the long URI.

Here are two screenshots: 404 DID Document not found Creation and Registration log, and the sample code https://github.com/decentralized-identity/ion-pow-sdk/blob/main/src/index.js IonProofOfWork::submitIonRequest() DID Document URI definiton in GITHUB repository

shijie xu
  • 1,975
  • 21
  • 52

0 Answers0