did-veres-one
Advanced tools
Changelog
13.0.2 - 2021-05-25
Changelog
13.0.1 - 2021-04-21
export()
api.Changelog
14.0.0-beta.0 - 2021-05-20
did-io
version..generate()
return signature, now returns
{didDocument, keyPairs, methodFor}
.passphrase
parameter.forceConstruct
parameter from .get()
--
use the CachedResolver from https://github.com/digitalbazaar/did-io instead..computeKeyId()
to .computeId()
.1) DID Document generate()
method return signature has changed.
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
next time it was resolved, the capabilityInvocation
key was used (derived from
the cryptonym) as the signing key for all purposes (same behavior as did:key
DIDs). To simplify this, generate()
now only generates one key, for
capabilityInvocation
but also all the other purposes (much like generating
a new did:key
DID). To support a proper diversity of keys for registered
DIDs, helper libraries are expected to generate and add additional keys for
other proof purposes, before registering a DID Document on the ledger.
Before: const didDocument = await veresOneDriver.generate();
The generated didDocument
was an instance of the VeresOneDidDoc
class,
and stored its own generated key pairs in didDocument.keys
.
It also contained different keys for each proof purpose (they were generated,
if not explicitly provided).
Now: const {didDocument, keyPairs, methodFor} = await veresOneDriver.generate();
In v13, the generated didDocument
is a plain Javascript object, with no
methods. Generated keys are returned in the keyPairs
property (a js Map
instance, with key pairs stored by key id).
In addition, a helper method methodFor
is provided, to help retrieve keys
for a particular purpose. For example:
methodFor({purpose: 'capabilityInvocation'})
returns the first available
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
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
node):
didDocument.validateDid({mode})
becomes:
VeresOneDriver.validateDid({didDocument, mode})
didDocument.validateMethodIds()
becomes:
VeresOneDriver.validateMethodIds({didDocument})
Changelog
13.0.0 - 2021-03-12
http-signature-header@2
. Includes breaking changes
related to headers that contain timestamps.Changelog
12.2.0 - 2021-03-11
apisauce@2
to address security vulnerabilities in the older axios
sub-dependency.Changelog
12.1.1 - 2020-04-29
Changelog
12.1.0 - 2020-04-13
computeKeyId()
and method
, for use with did-io
downstream.Changelog
12.0.0 - 2020-04-08
get()
(and receiving
a 404 from the ledger), fall back to creating a DID Doc deterministically
from the cryptonym itself.