[CS] Add arity to `encode` for origin tracing.

Origin tracing barcode encoding.