What about witness transactions?
Is there a guide on how to put together unsigned witness transactions?
The steps are explained in
BIP143 the Specification section
Or, can someone please post me an unsigned Witness Raw-Tx with an input and an output?
Exactly in the state before the SHA256² hash is formed as a signature hash.
BIP143 also has a bunch of examples, the good thing about these examples is that they both have the "sigHash" (the final hash digest you are looking for) and the preimage that was hashed as "hash preimage" (the state you want).
The examples get increasingly complicated.
This is very extensive indeed, but it is better than nothing. Thanks so far!
At the moment I can't get any further because I don't know how to create the signature hash for a witness transaction.
More precisely, I don't know where the PK script of the previous transaction should go, or whether it will be inserted at all.
I don't know whether I will be able to get this information from this documentation.
So if anyone here would like to help me, that would be very nice.
It would help a lot if I could see an unsigned raw transaction in Witness format exactly like this before the SHA256² hash is applied for signing.
From that I could then take the information on how to serialize it.
Edit:
Is that what i'm looking for? Is that correct?
If so, then witness transactions are serialized significantly differently.
So if this is true, then I think I can do it that way.
Thanks so far.
hash preimage: 0100000096b827c8483d4e9b96712b6713a7b68d6e8003a781feba36c31143470b4efd3752b0a642eea2fb7ae638c36f6252b6750293dbe574a806984b8e4d8548339a3bef51e1b804cc89d182d279655c3aa89e815b1b309fe287d9b2b55d57b90ec68a010000001976a9141d0f172a0ecb48aee1be1f2687d2963ae33f71a188ac0046c32300000000ffffffff863ef3e1a92afbfdb97f31ad0fc7683ee943e9abcf2501590ff8f6551f47e5e51100000001000000
nVersion: 01000000
hashPrevouts: 96b827c8483d4e9b96712b6713a7b68d6e8003a781feba36c31143470b4efd37
hashSequence: 52b0a642eea2fb7ae638c36f6252b6750293dbe574a806984b8e4d8548339a3b
outpoint: ef51e1b804cc89d182d279655c3aa89e815b1b309fe287d9b2b55d57b90ec68a01000000
scriptCode: 1976a9141d0f172a0ecb48aee1be1f2687d2963ae33f71a188ac
amount: 0046c32300000000
nSequence: ffffffff
hashOutputs: 863ef3e1a92afbfdb97f31ad0fc7683ee943e9abcf2501590ff8f6551f47e5e5
nLockTime: 11000000
nHashType: 01000000
sigHash: c37af31116d1b27caf68aae9e3ac82f1477929014d5b917657d0eb49478cb670