toCbor method
Converts the metadata to CBOR.
Implementation
@override
CborObject toCbor({bool sort = false}) {
if (sort) {
final keys = value.keys.toList()..sort((a, b) => a.compareTo(b));
return CborMapValue.definite(
{for (final i in keys) i.toCbor(): value[i]!.toCbor()});
}
return CborMapValue.definite(
{for (final i in value.entries) i.key.toCbor(): i.value.toCbor()});
}