createIdentityDescriptor function
Implementation
IdentityDescriptor createIdentityDescriptor(
Identity identity,
) {
final identityIndicator = identity is SignIdentity
? {
"type": 'PublicKeyIdentity',
"publicKey": identity.getPublicKey().toDer().toHex(include0x: false)
}
: {"type": 'AnonymousIdentity'};
return IdentityDescriptor.fromJson(identityIndicator);
}