I have exported a testnet transaction into a .txn file:
{
"hex": "45505446ff0002000000000101c6be24d86ab1ae5b54e7e7905b...",
"complete": false,
"final": false
}
However, as explained in this article, a raw transaction string starts with version number and:
The version number is four bytes long and is expressed as a hexadecimal value in little endian format.
There are two version types. Version 01 indicates that there is no relative time lock. Version 02 indicates that there may be a relative time lock.
So this hex is not a qualified raw transaction encoding, due to the prefix
45505446ff00
The version number comes after this prefix:
02000000
So I was wondering, what is the function of this prefix that Electrum adds to the raw transaction string? And is it always the same length? Because I need to automatically splice it off in order to get a valid raw transaction string.