I saw a medium article about some non-standard P2SH scripts and the author shared a few examples. I’m interested in this specific script: "OP_2DUP OP_ADD OP_8 OP_EQUALVERIFY OP_SUB OP_2 OP_EQUAL". It has been spent, and the solution goes like this: x + y 8 = x y = 0... so x = 5, y = 3.
If I had known this sooner, how would I go about coding the redeem transaction in Python?
Creating a P2SH Redeem Script Using Python
4 replies 56 views
SwiftMinerSenior Member
Posts: 259 · Reputation: 1036
#2Dec 1, 2022, 06:18 AM
Firstly Op this your post is actually one that should be in the bitcoin technical discussion board and not the regular bitcoin discussion board. Secondly Op, in my opinion your post is quite vague. That's because, firstly the code or programming script that you have here in your post which I think is actually supposed to act like an example illustrating your point is not even a phyton script and the syntax too isn't. From my experience so far, the example you've have here in your post is a bitcoin script and not a phyton script.
Also I'm not sure if anyone can help you out properly with only the information you have given so far. Personally I still don't get what exactly you are looking for. Are you actually looking to create a. Phyton script that will run with an output similar to the bitcoin script.
The codes are just OPCODES used in creating the P2SH script and not written in python programming language
You don't have to delete the thread
At the left bottom corner of the thread
There's a move topic option there, you can click that and select the development and technical board.
But what do you want?
The python code in running it?
What the script mean or how's it'd been run?
What they mean can be gotten here https://en.bitcoin.it/wiki/Script
And for running the script
https://ide.scriptwiz.app/
Thanks, in case next time I want to move my topic, I appreciate.
What I need help with is just like the way I can code a tx in python example
Get the transaction id and send to a miner, how can I do this for P2SH scripts so to spend/move the content to another address ?