You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v5 of this module the generate API was removed. This was done in part to remove any dealings that this module has with private key material. DID documents are designed to be public facing documents and therefore, private key material is never exposed.
The changelog states that the generate method has been replaced by the new method fromKeyPair. This language and the fact that the return value of the two methods appear to be identical {didDocument, keyPairs} would lead one to believe that the keyPairs returned by generate and those returned by fromKeyPair would be identical but this is not the case.
The keyPairs returned by the generate API did return keys that had their private key material intact and therefore a pattern of usage developed that involved using those keys as signers for various purposes. However, the keyPairs returned by the fromKeyPair API do not have private key material and therefore cannot be used as a signer.
Tests are being rev'd up in other libraries that demonstrate the new recommended pattern of usage when using v5 of this module. We will link to those tests here.
The text was updated successfully, but these errors were encountered:
https://github.com/digitalbazaar/did-method-key/blob/main/CHANGELOG.md#removed
In v5 of this module the
generate
API was removed. This was done in part to remove any dealings that this module has with private key material. DID documents are designed to be public facing documents and therefore, private key material is never exposed.The changelog states that the
generate
method has been replaced by the new methodfromKeyPair
. This language and the fact that the return value of the two methods appear to be identical{didDocument, keyPairs}
would lead one to believe that thekeyPairs
returned bygenerate
and those returned byfromKeyPair
would be identical but this is not the case.The
keyPairs
returned by thegenerate
API did return keys that had their private key material intact and therefore a pattern of usage developed that involved using those keys assigners
for various purposes. However, thekeyPairs
returned by thefromKeyPair
API do not have private key material and therefore cannot be used as asigner
.Tests are being rev'd up in other libraries that demonstrate the new recommended pattern of usage when using v5 of this module. We will link to those tests here.
The text was updated successfully, but these errors were encountered: