0

I am trying to create a htlc smart contract manually by writing a script and finding the hex using the btcc compiler. Now node A has to create a transaction using that hex and lock money in that p2sh address for upto 150 blocks. If node B can provide the secret value before 150 blocks then he can claim the coins and if not the it will go back to node A. I am new to this concept and where ever i read about creating transactions they are explaining in a theoretical way and I could not understand what to do the redeem script hex and how to lock money and how will node B claim it before 150 blocks and how will the raw transaction created by node A will be accessible to node B. Can you please give a reference or steps to follow to understand and implement it? I want to start from the basic with step by step guide.

Which documentation should i refer for doing it and what commands should be used and how it should be used?

How to create the p2sh address. And another problem i am facing is that i am getting different hash160 everytime in different website. Not sure which one is accurate. Please guide me.

P.S: I am running bitcoin in regtest mode. Collapse

Your Answer

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

Browse other questions tagged or ask your own question.