When one sets up a transaction, the input of the transaction needs to have a script with a signature to show that you can spend those coins. Which fields of the previous and current transactions need to be concatenated into a message and signed to generate a proper signature? Can someone provide some examples?
-
Does this thread give any help? bitcointalk.org/index.php?topic=50282.0 and verifier here: bitsend.rowit.co.uk– Stephen GornickMar 22, 2012 at 2:56
-
@StephenGornick Well, it gives a couple examples of raw transactions and a way to verify them online, but still doesn't explain how to create such transactions without using the Bitcoin client.– ThePiachuMar 22, 2012 at 15:40
-
see 'Signatures & Witnesses' of the following link : medium.com/coinmonks/…– mkcisseJan 30, 2019 at 23:23
2 Answers
Here and in the following articles I explain how to build and sign a Bitcoin transaction from scratch. There are also C code examples attached:
https://davidederosa.com/basic-blockchain-programming/inside-transactions/
This is done in the Javascript from BlockChain.info:
The transaction can then be sent using either of the following: