Skip to content

Commit

Permalink
Update test vectors to use did:key.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Aug 22, 2024
1 parent b1970b2 commit c9f2707
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 35 deletions.
28 changes: 0 additions & 28 deletions test/documentLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,3 @@ loader.addStatic(
}
}
);

// controller document for test vectors
loader.addStatic(
'https://vc.example/issuers/5678',
{
'@context': [
'https://www.w3.org/ns/did/v1',
'https://w3id.org/security/multikey/v1'
],
id: 'https://vc.example/issuers/5678',
assertionMethod: {
id: 'https://vc.example/issuers/5678#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2',
type: 'Multikey',
controller: 'https://vc.example/issuers/5678',
publicKeyMultibase: 'z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2'
}
}
);
loader.addStatic(
'https://vc.example/issuers/5678#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2',
{
'@context': 'https://w3id.org/security/multikey/v1',
id: 'https://vc.example/issuers/5678#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2',
type: 'Multikey',
controller: 'https://vc.example/issuers/5678',
publicKeyMultibase: 'z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2'
}
);
4 changes: 2 additions & 2 deletions test/test-vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export const signedFixture = {
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-rdfc-2022",
"created": "2023-02-24T23:36:38Z",
"verificationMethod": "https://vc.example/issuers/5678#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
"verificationMethod": "did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2",
"proofPurpose": "assertionMethod",
"proofValue": "z21EVs3eXERqTn4acNHT9viboqgzUaQ3kTmhPT3eA8qrVPE7CrQq78WkzctnMX5W4CrzcKnHw8V6dvy5pgWYCU5e9"
"proofValue": "z2YwC8z3ap7yx1nZYCg4L3j3ApHsF8kgPdSb5xoS1VR7vPG3F561B52hYnQF9iseabecm3ijx4K1FBTQsCZahKZme"
}
};
/* eslint-enable quotes */
Expand Down
5 changes: 0 additions & 5 deletions test/test-vectors.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ describe('test vectors', () => {
keyPair = await Ed25519Multikey.from(keyMaterial);
keyPair.controller = `did:key:${keyPair.publicKeyMultibase}`;
keyPair.id = `${keyPair.controller}#${keyPair.publicKeyMultibase}`;

// FIXME: test fixture should be updated to use `did:key`
keyPair.controller = 'https://vc.example/issuers/5678';
keyPair.id = keyPair.controller +
'#z6MkrJVnaZkeFzdQyMZu1cgjg7k1pZZ6pvBQ7XJPt4swbTQ2';
});

it('should create proof', async () => {
Expand Down

0 comments on commit c9f2707

Please sign in to comment.