fromCompressedP256

fun fromCompressedP256(compressedPublicKey: ByteArray): String

Generates a did:key from a compressed P-256 public key.

Return

The DID string, e.g. did:key:zDn...

Parameters

compressedPublicKey

33-byte compressed P-256 public key (0x02/0x03 + x)

Throws

if key is not 33 bytes or has invalid prefix