toCbor method

  1. @override
CborObject toCbor()
override

Converts the object to a CBOR object.

Implementation

@override
CborObject toCbor() {
  return CborCustomLengthListValue.fixedLength([
    CborSignedValue.i32(blockNumber),
    CborUnsignedValue.u64(slot),
    prevHash?.toCbor() ?? const CborNullValue(),
    CborBytesValue(issuerKey.toBytes(false)),
    vrfvKey.toCbor(),
    ...leaderCert.toCborObjects(),
    CborUnsignedValue.u32(blockBodySize),
    blockBodyHash.toCbor(),
    ...operationalCert.toCborObjects(),
    ...protocolVersion.toCborObjects()
  ], length: 15);
}