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


The version number comes after this prefix:


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.

1 Answer 1


It stands for:

45505446 - EPTF - Electrum Partial Transaction Format
ff - Separator
00 - EPTF Version - This is currently always 0.

You can verify this quickly by running a python interpreter.

Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b'EPTF\xff'.hex()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.