Refactor create algorithm to address issues #3 and #4#7
Conversation
|
converting to draft; |
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com>
| and |options|. The output is a [=map=] containing the completed `did:cel` |didDocument|, | ||
| the generated |verificationMethod|, and the initial |cryptographicEventLog|, or an error. |
There was a problem hiding this comment.
It's not clear what the other side of the "or" is. Is the output all three of the listed "and" items or one error? Or can you get one or two of the listed "and" items with one or two errors?
There was a problem hiding this comment.
The meaning is intended to be: A map is returned OR an error is raised.
Thank you for the reviews!
There was a problem hiding this comment.
OK. I think this does the job. There are other possibilities which you or others may suggest.
| and |options|. The output is a [=map=] containing the completed `did:cel` |didDocument|, | |
| the generated |verificationMethod|, and the initial |cryptographicEventLog|, or an error. | |
| and |options|. The output is either a [=map=] — containing the completed `did:cel` |didDocument|, | |
| the generated |verificationMethod|, and the initial |cryptographicEventLog| — or an error. |
There was a problem hiding this comment.
The primary purpose is to explain what result to expect without forcing the reader to go through the algorithm. The possibility of an error is implicit, so we could omit “or an error” entirely.
There was a problem hiding this comment.
This is the other major option. I'm OK with either; just need to separate the error from the stuff in the map.
| and |options|. The output is a [=map=] containing the completed `did:cel` |didDocument|, | |
| the generated |verificationMethod|, and the initial |cryptographicEventLog|, or an error. | |
| and |options|. If not an error, the output is a [=map=] containing the completed `did:cel` | |
| |didDocument|, the generated |verificationMethod|, and the initial |cryptographicEventLog|. |
Co-authored-by: Manu Sporny <msporny@digitalbazaar.com> Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
This reverts commit 31a6466.
|
Something is still wrong with GitHub. After committing a review from @TallTed, the entire file was replaced, forcing me to revert to the previous commit. |
This PR addresses issues #3 and #4. It allows passing a predefined DID document and an existing key pair to the algorithm, as well as defining a custom verification method ID. Feedback welcome.
Preview | Diff