Skip to content

Commit

Permalink
Switch to TBD ION node due to issue with MSFT node
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Hinek <[email protected]>
  • Loading branch information
frankhinek committed Dec 4, 2023
1 parent ede18ae commit e98b786
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/dids/src/did-ion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ export class DidIonMethod implements DidMethod {
operationsEndpoint?: string
}): Promise<DidResolutionResult | undefined> {
const {
challengeEnabled = true,
challengeEnabled = false,
challengeEndpoint = 'https://beta.ion.msidentity.com/api/v1.0/proof-of-work-challenge',
keySet,
services,
operationsEndpoint = 'https://beta.ion.msidentity.com/api/v1.0/operations'
operationsEndpoint = 'https://ion.tbd.engineering/operations'
} = options;

// Create ION Document.
Expand Down Expand Up @@ -460,7 +460,7 @@ export class DidIonMethod implements DidMethod {
};
}

const { resolutionEndpoint = 'https://discover.did.msidentity.com/1.0/identifiers/' } = resolutionOptions;
const { resolutionEndpoint = 'https://ion.tbd.engineering/identifiers/' } = resolutionOptions;
const normalizeUrl = (url: string): string => url.endsWith('/') ? url : url + '/';
const resolutionUrl = `${normalizeUrl(resolutionEndpoint)}${parsedDid.did}`;

Expand Down
4 changes: 2 additions & 2 deletions packages/dids/tests/did-ion.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,15 +682,15 @@ describe('DidIonMethod', () => {
expect(resolutionResult.didDocumentMetadata.method).to.have.property('published', true);
});

it('returns notFound error with unpublished short form ION DIDs', async() => {
it('returns internalError error with unpublished short form ION DIDs', async() => {
const did = 'did:ion:EiBCi7lnGtotBsFkbI_lQskQZLk_GPelU0C5-nRB4_nMfA';
const resolutionResult = await DidIonMethod.resolve({ didUrl: did });

expect(resolutionResult).to.have.property('@context');
expect(resolutionResult).to.have.property('didDocument');
expect(resolutionResult).to.have.property('didDocumentMetadata');

expect(resolutionResult.didResolutionMetadata).to.have.property('error', 'notFound');
expect(resolutionResult.didResolutionMetadata).to.have.property('error', 'internalError');
});

it('resolves published long form ION DIDs', async() => {
Expand Down

0 comments on commit e98b786

Please sign in to comment.