opSerializer

abstract fun opSerializer(vSerializer: KSerializer<V>): KSerializer<Op>

The canonical KSerializer for this CRDT's operations, threading vSerializer through the element type.

Use this rather than reaching for a compiler-generated serializer for Op. The generated sealed serializer writes a different wire format (class-discriminator polymorphism instead of the canonical leading t tag) and defaults the element type to PolymorphicSerializer(Any::class), which CBOR cannot encode — so bytes written with it would sit outside the golden vectors that pin this format across versions. Anything persisting ops for later reading must go through here.