From 2dc2b57ef351f46c9ef298bbfbaa979a62af1b55 Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 12:18:11 -0400 Subject: [PATCH 1/9] Add feature to generate did from seed. --- lib/VeresOneDriver.js | 18 ++++++++++++------ test/VeresOneDriver.spec.js | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/lib/VeresOneDriver.js b/lib/VeresOneDriver.js index 2fe28ea..1ff39c0 100644 --- a/lib/VeresOneDriver.js +++ b/lib/VeresOneDriver.js @@ -196,12 +196,12 @@ class VeresOneDriver { */ async generate({ didType = DEFAULT_DID_TYPE, invokeKey, authKey, delegateKey, assertionKey, - keyAgreementKey + keyAgreementKey, seed } = {}) { const {mode, cryptoLd, verificationSuite} = this; return VeresOneDriver.generate({ didType, cryptoLd, verificationSuite, mode, invokeKey, authKey, - delegateKey, assertionKey, keyAgreementKey + delegateKey, assertionKey, keyAgreementKey, seed }); } @@ -223,7 +223,8 @@ class VeresOneDriver { * @param {LDKeyPair} [options.delegateKey] - Capability delegation key pair. * @param {LDKeyPair} [options.assertionKey] - Assertion method key pair. * @param {LDKeyPair} [options.keyAgreementKey] - Key agreement key pair. - * + * @param {Uint8Array} [options.seed] - A 32-byte array seed for a + * deterministic key. * @returns {Promise<{didDocument: object, keyPairs: Map, * methodFor: Function}>} Resolves with the generated DID Document, along * with the corresponding key pairs used to generate it. @@ -231,7 +232,7 @@ class VeresOneDriver { static async generate({ didType = DEFAULT_DID_TYPE, cryptoLd, mode, verificationSuite = DEFAULT_VERIFICATION_SUITE, - invokeKey, authKey, delegateKey, assertionKey, keyAgreementKey + invokeKey, authKey, delegateKey, assertionKey, keyAgreementKey, seed } = {}) { const cryptoSuiteContexts = new Set(); const keyPairs = new Map(); @@ -239,8 +240,13 @@ class VeresOneDriver { // Before we initialize the rest of the keys, we need to compose the DID // Document `.id` itself, from the capabilityInvocation key pair. - const capabilityInvocationKeyPair = invokeKey || - await cryptoLd.generate({type: keyType}); + let capabilityInvocationKeyPair; + if(seed) { + capabilityInvocationKeyPair = await verificationSuite.generate({seed}); + } else { + capabilityInvocationKeyPair = invokeKey || + await cryptoLd.generate({type: keyType}); + } cryptoSuiteContexts .add(capabilityInvocationKeyPair.constructor.SUITE_CONTEXT); diff --git a/test/VeresOneDriver.spec.js b/test/VeresOneDriver.spec.js index f848d61..3cd4dd2 100644 --- a/test/VeresOneDriver.spec.js +++ b/test/VeresOneDriver.spec.js @@ -11,6 +11,7 @@ const {expect} = chai; const {Ed25519VerificationKey2020} = require('@digitalbazaar/ed25519-verification-key-2020'); +const {randomBytes} = require('crypto'); const {CryptoLD} = require('crypto-ld'); const {VeresOneDriver} = require('..'); @@ -173,6 +174,23 @@ describe('methods/veres-one', () => { expect(didDocument.id).to.match(/^did:v1:nym:z.*/); }); + it('should create a DID document from seed', async () => { + const seed = randomBytes(32); + const {didDocument} = await driver.generate({seed}); + console.log(JSON.stringify(didDocument, null, 2), 'didDocument'); + expect(didDocument).to.have.keys([ + '@context', 'id', 'authentication', 'assertionMethod', + 'capabilityDelegation', 'capabilityInvocation', 'keyAgreement' + ]); + expect(didDocument.id).to.match(/^did:v1:test:nym:z.*/); + expect(didDocument['@context']).to.eql([ + 'https://www.w3.org/ns/did/v1', + 'https://w3id.org/veres-one/v1', + 'https://w3id.org/security/suites/ed25519-2020/v1', + 'https://w3id.org/security/suites/x25519-2020/v1' + ]); + }); + it('should generate a cryptonym based DID Document', async () => { const {didDocument, methodFor, keyPairs} = await driver.generate(); From ab16bf15dd75e6c58bb1396090becf2ead57d07f Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 12:25:24 -0400 Subject: [PATCH 2/9] Update changelog. --- CHANGELOG.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe7148c..e3a1cd7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,15 @@ ### `14.0.0-beta.2` - 2021-08-19 ### Added -- Add `driver.getInitial()` method, to explicitly construct a DID Document deterministically, from a cryptonym DID. +- Add `driver.getInitial()` method, to explicitly construct a DID Document + deterministically, from a cryptonym DID. +- Add an optional `seed` param to `generate()` to generate DID documment from + a 32-byte array seed. + ### Changed -- **BREAKING**: Replaced axios with @digitalbazaar/http-client. Errors returned directly from http-client do not match the axios API. +- **BREAKING**: Replaced axios with @digitalbazaar/http-client. Errors returned + directly from http-client do not match the axios API. - Changed API `getTicketServiceProof` to use `@digitalbazaar/http-client`. - Changed API `sendToAccelerator` to use `@digitalbazaar/http-client`. - **BREAKING**: API attachInvocationProof now requires the parameter `invocationTarget`. @@ -19,7 +24,7 @@ ### Changed - **BREAKING**: Change in `generate()` semantics to support the common un-registered DID use case. (See the "Upgrading from `<=12.x` section" below, item 1.) - Now, `generate()` now only generates one key, for `capabilityInvocation` but + Now, `generate()` now only generates one key, for `capabilityInvocation` but also all the other purposes (much like generating a new `did:key` DID). (Helper libraries are expected to generate other keys before registering the DID Document on the ledger.) @@ -38,7 +43,7 @@ ### Upgrading from <=12.x **1)** DID Document `generate()` method return signature has changed. -Change in `generate()` semantics (as of `v14.0.0-beta.1`). Since we expect using +Change in `generate()` semantics (as of `v14.0.0-beta.1`). Since we expect using an un-registered Veres One DID to be a common use case, the previous `generate()` behavior introduced complications, since different keys for each proof purpose were created by default. Except that, for the case of un-registered DIDs, the @@ -69,14 +74,14 @@ public/private key pair instance that is referenced in the DID Document's `capabilityInvocation` verification relationship. **2)** Driver `.get()` method has changed -- no longer uses the `forceConstruct` -parameter. Developers are encouraged to use the CachedResolver from +parameter. Developers are encouraged to use the CachedResolver from https://github.com/digitalbazaar/did-io instead. `driver.get()` can still be used to fetch either the full DID Document (via `await driver.get({did})`) or a key document (via `await driver.get({url: keyId})`). **3)** Check for `.computeKeyId()` usage. It's been renamed to `.computeId()`. -**4)** Validation methods have changed (used by the `did-veres-one` validator +**4)** Validation methods have changed (used by the `did-veres-one` validator node): - `didDocument.validateDid({mode})` becomes: From bbb022f9025d466dbe3fbdca1b99063adfce8839 Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 12:30:37 -0400 Subject: [PATCH 3/9] Fix typo. --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a1cd7..9353424 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Added - Add `driver.getInitial()` method, to explicitly construct a DID Document deterministically, from a cryptonym DID. -- Add an optional `seed` param to `generate()` to generate DID documment from +- Add an optional `seed` param to `generate()` to generate DID document from a 32-byte array seed. From 4d96220a3f05adcb6240c7f91468f7d99b8464af Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 12:44:39 -0400 Subject: [PATCH 4/9] Remove if conditional and pass `seed` to `cryptoLd.generate()`. --- lib/VeresOneDriver.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/VeresOneDriver.js b/lib/VeresOneDriver.js index 1ff39c0..b9d02db 100644 --- a/lib/VeresOneDriver.js +++ b/lib/VeresOneDriver.js @@ -240,13 +240,8 @@ class VeresOneDriver { // Before we initialize the rest of the keys, we need to compose the DID // Document `.id` itself, from the capabilityInvocation key pair. - let capabilityInvocationKeyPair; - if(seed) { - capabilityInvocationKeyPair = await verificationSuite.generate({seed}); - } else { - capabilityInvocationKeyPair = invokeKey || - await cryptoLd.generate({type: keyType}); - } + const capabilityInvocationKeyPair = invokeKey || + await cryptoLd.generate({type: keyType, seed}); cryptoSuiteContexts .add(capabilityInvocationKeyPair.constructor.SUITE_CONTEXT); From f35d5db1f147ac9ff20b5a02680d0f0f3d5b38a3 Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 12:46:30 -0400 Subject: [PATCH 5/9] Use static seed in test. --- test/VeresOneDriver.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/VeresOneDriver.spec.js b/test/VeresOneDriver.spec.js index 3cd4dd2..1f7dcdc 100644 --- a/test/VeresOneDriver.spec.js +++ b/test/VeresOneDriver.spec.js @@ -11,13 +11,14 @@ const {expect} = chai; const {Ed25519VerificationKey2020} = require('@digitalbazaar/ed25519-verification-key-2020'); -const {randomBytes} = require('crypto'); const {CryptoLD} = require('crypto-ld'); const {VeresOneDriver} = require('..'); // eslint-disable-next-line max-len const TEST_DID = 'did:v1:test:nym:z6MkpuEWNixE7JwBfbiZu4feAgtGL8zB1RCAJtKoZNLyJYTJ'; +// eslint-disable-next-line max-len +const TEST_SEED = '8c2114a150a16209c653817acc7f3e7e9c6c6290ae93d6689cbd61bb038cd31b'; const UNREGISTERED_NYM = 'did:v1:test:nym:z6MkiCqJ7vhBXRau9BT9yXA9LxSGarmL4W8gFD8qajBZz4gQ'; const UNREGISTERED_UUID = 'did:v1:test:2G7RmkvGrBX5jf3M'; @@ -175,9 +176,8 @@ describe('methods/veres-one', () => { }); it('should create a DID document from seed', async () => { - const seed = randomBytes(32); - const {didDocument} = await driver.generate({seed}); - console.log(JSON.stringify(didDocument, null, 2), 'didDocument'); + const seedBytes = (new TextEncoder()).encode(TEST_SEED).slice(0, 32); + const {didDocument} = await driver.generate({seed: seedBytes}); expect(didDocument).to.have.keys([ '@context', 'id', 'authentication', 'assertionMethod', 'capabilityDelegation', 'capabilityInvocation', 'keyAgreement' From 73dee05ccc4198ecfaa8dc94b3c2ae68d08810cf Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 13:16:43 -0400 Subject: [PATCH 6/9] Add assertion to compare with expectedDidDoc. --- test/VeresOneDriver.spec.js | 2 ++ test/dids/expected-did-doc.json | 34 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 test/dids/expected-did-doc.json diff --git a/test/VeresOneDriver.spec.js b/test/VeresOneDriver.spec.js index 1f7dcdc..a889ec2 100644 --- a/test/VeresOneDriver.spec.js +++ b/test/VeresOneDriver.spec.js @@ -27,6 +27,7 @@ const TEST_DID_RESULT = require('./dids/ashburn.capybara.did.json'); const LEDGER_AGENTS_DOC = require('./dids/ledger-agents.json'); const LEDGER_AGENT_STATUS = require('./dids/ledger-agent-status.json'); const TICKET_SERVICE_PROOF = require('./dids/ticket-service-proof.json'); +const expectedDidDoc = require('./dids/expected-did-doc.json'); describe('methods/veres-one', () => { let driver; @@ -189,6 +190,7 @@ describe('methods/veres-one', () => { 'https://w3id.org/security/suites/ed25519-2020/v1', 'https://w3id.org/security/suites/x25519-2020/v1' ]); + expect(didDocument).eql(expectedDidDoc); }); it('should generate a cryptonym based DID Document', async () => { diff --git a/test/dids/expected-did-doc.json b/test/dids/expected-did-doc.json new file mode 100644 index 0000000..03a727b --- /dev/null +++ b/test/dids/expected-did-doc.json @@ -0,0 +1,34 @@ +{ + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3id.org/veres-one/v1", + "https://w3id.org/security/suites/ed25519-2020/v1", + "https://w3id.org/security/suites/x25519-2020/v1" + ], + "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "capabilityInvocation": [ + { + "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "type": "Ed25519VerificationKey2020", + "controller": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "publicKeyMultibase": "z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + } + ], + "authentication": [ + "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + ], + "assertionMethod": [ + "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + ], + "capabilityDelegation": [ + "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + ], + "keyAgreement": [ + { + "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6LSgxJr5q1pwHPbiK7u8Pw1GvnfMTZSMxkhaorQ1aJYWFz3", + "type": "X25519KeyAgreementKey2020", + "controller": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "publicKeyMultibase": "z6LSgxJr5q1pwHPbiK7u8Pw1GvnfMTZSMxkhaorQ1aJYWFz3" + } + ] +} From e5c3db4bc6d5ad76a2285d5a1f6bedc76d0f532d Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 13:30:22 -0400 Subject: [PATCH 7/9] Update `README.md` for `generate DID Document` section. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b44a51..8b17de6 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,9 @@ const veresDriver = v1.driver(options); // Generate a new DID Document const didDocument = await veresDriver.generate(); // default +// A DID Document can also be generated from a 32-byte array seed +const didDocument = await veresDriver.generate({seed}); + // Log the new didDocument to the console. console.log(JSON.stringify(didDocument, null, 2)); ``` @@ -121,7 +124,7 @@ const veresOneDriver2018 = v1.driver({ }); await veresOneDriver2018.generate(); -// -> +// -> { "@context": [ "https://www.w3.org/ns/did/v1", From f4aed86abac5c6c6a1a26487ea1048490b49d577 Mon Sep 17 00:00:00 2001 From: Tashi D Gyeltshen Date: Fri, 29 Oct 2021 13:34:03 -0400 Subject: [PATCH 8/9] Fix indentation. --- lib/VeresOneDriver.js | 2 +- test/VeresOneDriver.spec.js | 2 +- test/dids/expected-did-doc.json | 64 ++++++++++++++++----------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/lib/VeresOneDriver.js b/lib/VeresOneDriver.js index b9d02db..fa57bcd 100644 --- a/lib/VeresOneDriver.js +++ b/lib/VeresOneDriver.js @@ -241,7 +241,7 @@ class VeresOneDriver { // Before we initialize the rest of the keys, we need to compose the DID // Document `.id` itself, from the capabilityInvocation key pair. const capabilityInvocationKeyPair = invokeKey || - await cryptoLd.generate({type: keyType, seed}); + await cryptoLd.generate({type: keyType, seed}); cryptoSuiteContexts .add(capabilityInvocationKeyPair.constructor.SUITE_CONTEXT); diff --git a/test/VeresOneDriver.spec.js b/test/VeresOneDriver.spec.js index a889ec2..d0d97af 100644 --- a/test/VeresOneDriver.spec.js +++ b/test/VeresOneDriver.spec.js @@ -176,7 +176,7 @@ describe('methods/veres-one', () => { expect(didDocument.id).to.match(/^did:v1:nym:z.*/); }); - it('should create a DID document from seed', async () => { + it('should generate a DID document from seed', async () => { const seedBytes = (new TextEncoder()).encode(TEST_SEED).slice(0, 32); const {didDocument} = await driver.generate({seed: seedBytes}); expect(didDocument).to.have.keys([ diff --git a/test/dids/expected-did-doc.json b/test/dids/expected-did-doc.json index 03a727b..1c542b0 100644 --- a/test/dids/expected-did-doc.json +++ b/test/dids/expected-did-doc.json @@ -1,34 +1,34 @@ { - "@context": [ - "https://www.w3.org/ns/did/v1", - "https://w3id.org/veres-one/v1", - "https://w3id.org/security/suites/ed25519-2020/v1", - "https://w3id.org/security/suites/x25519-2020/v1" - ], - "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", - "capabilityInvocation": [ - { - "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", - "type": "Ed25519VerificationKey2020", - "controller": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", - "publicKeyMultibase": "z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" - } - ], - "authentication": [ - "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" - ], - "assertionMethod": [ - "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" - ], - "capabilityDelegation": [ - "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" - ], - "keyAgreement": [ - { - "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6LSgxJr5q1pwHPbiK7u8Pw1GvnfMTZSMxkhaorQ1aJYWFz3", - "type": "X25519KeyAgreementKey2020", - "controller": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", - "publicKeyMultibase": "z6LSgxJr5q1pwHPbiK7u8Pw1GvnfMTZSMxkhaorQ1aJYWFz3" - } - ] + "@context": [ + "https://www.w3.org/ns/did/v1", + "https://w3id.org/veres-one/v1", + "https://w3id.org/security/suites/ed25519-2020/v1", + "https://w3id.org/security/suites/x25519-2020/v1" + ], + "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "capabilityInvocation": [ + { + "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "type": "Ed25519VerificationKey2020", + "controller": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "publicKeyMultibase": "z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + } + ], + "authentication": [ + "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + ], + "assertionMethod": [ + "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + ], + "capabilityDelegation": [ + "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C" + ], + "keyAgreement": [ + { + "id": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C#z6LSgxJr5q1pwHPbiK7u8Pw1GvnfMTZSMxkhaorQ1aJYWFz3", + "type": "X25519KeyAgreementKey2020", + "controller": "did:v1:test:nym:z6Mkpw72M9suPCBv48X2Xj4YKZJH9W7wzEK1aS6JioKSo89C", + "publicKeyMultibase": "z6LSgxJr5q1pwHPbiK7u8Pw1GvnfMTZSMxkhaorQ1aJYWFz3" + } + ] } From b96fa3cbc2e057055d4c57f2d877f4049853ddc4 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 3 Jan 2022 18:04:24 -0500 Subject: [PATCH 9/9] Space @returns from @param in jsdoc comment on seeds. Co-authored-by: Dave Longley --- lib/VeresOneDriver.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/VeresOneDriver.js b/lib/VeresOneDriver.js index fa57bcd..76606b2 100644 --- a/lib/VeresOneDriver.js +++ b/lib/VeresOneDriver.js @@ -225,6 +225,7 @@ class VeresOneDriver { * @param {LDKeyPair} [options.keyAgreementKey] - Key agreement key pair. * @param {Uint8Array} [options.seed] - A 32-byte array seed for a * deterministic key. + * * @returns {Promise<{didDocument: object, keyPairs: Map, * methodFor: Function}>} Resolves with the generated DID Document, along * with the corresponding key pairs used to generate it.