I think what I would have expected maybe is a call like appendEncoded(leafData) which does the extra round of encoding of the passed-in item - wrapEncoding looks like an internal low-level operation, specially with that number being passed in, because presumably it must be followed up with actual data - that gives the caller an unnecessary opportunity to use it the wrong way
Originally posted by @arnetheduck in status-im/nimbus-eth1#3572