This implementation allows scalus.cardano.ledger.KeepRaw to store original CBOR bytes when encoding. It writes without borer's validation, so the nesting depth is not limited to borer's 1000 levels, which Data.toCbor and the serialiseData builtin rely on.
Type parameters
A
the type of the value, must have an implicit Encoder available
Value parameters
value
the value to encode
Attributes
Returns
the CBOR-encoded data as a byte array
Note
this method uses a workaround to enable storing original CBOR bytes described here