This PR is a speed-run implementation of did:web creation with the primary motivation of unblocking KCC issuance prototype while we wait for did:dht creation to land
[!WARNING]
the current implementation is not nearly as defensive as it could be (e.g. checking for zero values). Primarily looking to unblock our KCC issuance prototype efforts and coming back around to finish this out
Usage
At a minimum, the domain for which a did should be created is required.
[!IMPORTANT]
If no options are provided, a default key manager will be used to generate a single Ed25519 key pair. The resulting public key will be added to the DID Document as a Verification Method.
"registering" or "publishing" a did:web is done by hosting the resulting DID document at ${domain}/.well-known/did.json. An example of this is linkedin's DID: did:web:www.linkedin.com
Requesting feedback for the options approach used
Let me know what y'all think! there's a bit of an inconsistency here in that multiple Service arguments need to be provided whereas the Controllers option allows any number of strings to be provided using variadic args.
[!NOTE]
i believe web5-js uses verificationMethods instead of privateKey in its did method create methods. Just wanted to see what it would look like. lmk what you think @frankhinek @amika-sq
[!NOTE]
It's likely that many of these options can be reused for other did method creation functions e.g. did:dht. I didn't want to jump the gun though because the options don't apply to all did methods e.g. did:jwk
Overview
This PR is a speed-run implementation of
did:web
creation with the primary motivation of unblocking KCC issuance prototype while we wait fordid:dht
creation to landUsage
At a minimum, the domain for which a did should be created is required.
Create with no options
Output
Create With Options
Options can be provided to
Create
in order to add/set additional properties on the resulting DID MethodOutput
Notes
Create
does not publish the DID anywhere."registering" or "publishing" a
did:web
is done by hosting the resulting DID document at${domain}/.well-known/did.json
. An example of this is linkedin's DID: did:web:www.linkedin.comRequesting feedback for the options approach used
Let me know what y'all think! there's a bit of an inconsistency here in that multiple
Service
arguments need to be provided whereas theControllers
option allows any number of strings to be provided using variadic args.