fix: fix did derivation and signature generation.
This fixes two bugs that were affecting did derivation and signature generation.
- The
UnsignedOperationandOperationtypes were not serializing prev asnulland were instead skipping serialization when it wasNone. - The DID was being calculated from the hash of the JSON encoding instead of the CBOR encoding.
Note that there is still an issue with using p256 keys. For some reason the did:key serialization for p256 keys is the wrong length.