2

There is very good answer here: How to redeem a basic Tx? It works great.

But the algorithm is only for uncompressed addresses/keys, how can I change it to deal with compressed ones?

And the second question - how should I change the procedure to redeem several inputs?

  • Uncompress it? I can't think of why anyone would use lossy compression. – John T Feb 2 '14 at 9:03
  • I think it should be a compressed key you want to redeem, not an address. Edited accordingly, please check if I got it right. – Murch Feb 2 '14 at 14:35
  • Sorry for my poor English. Of course I want to redeem the output to my address taken of compressed-form public-key. This part of question is solved. Now thinking how to put several inputs in one transaction – amaclin Feb 2 '14 at 18:54
0

Exactly the same way, except instead of putting the compressed public key in the redeeming script, you use the compressed one. Decompressing it won't work, as that would change its hash (the address).

  • Thank you very much. It really works either with compressed keys :) Now I have to sign several inputs and send them to one output. Unfortunately I can not understand how should I change this algorythm - seems to me that I should create several "simplified transactions" with one input and one output, sign them, and after that combine them into one final transaction. I've asked for a help also here: bitcointalk.org/index.php?topic=422021.msg4893746#msg4893746 – amaclin Feb 2 '14 at 17:40
  • Thank you again. The question is solved. I was able to manually sign two inputs for one output. On testnet of course. blockexplorer.com/testnet/tx/… This one uses uncompressed public keys, but there is no difference – amaclin Feb 2 '14 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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