I'm trying to write a script that constructs a serialized bitcoin transaction from scratch.
But when it comes to the number of inputs, the field is a variable length integer.
It's typically only 1 byte (2 characters) in length and you do not have to do anything with it, because bitcoin transactions rarely have more than 0xFE (253) inputs.
But what happens when there are more than 253 inputs and the size of the field has to increase to accommodate it?
How would you put a count of 256 inputs in to this field?