0

I'm in the midst of working this github --> https://github.com/karask/python-bitcoin-utils/blob/master/examples/spend_p2sh_transaction.py

Sorry as I'm not that good in this. I would like to ask the following:

  1. Where can I create this "transaction input from tx id of UTXO"? This is for Bitcoin UTXO.

I mean is it using bitcoin node? vscode? python in Gitpods? I just want to know where I can run this and able to provide me the TXID along with the Transaction value in it. Like for example snapshot below:

enter image description here

Care to guide me? Please.. Thank you in advance.

0

TxInput is a class used in this example to define the input used for creating a transaction.

You can download and install Atom Editor.
Install script package to run python code in atom.
Download and Install Python.

Install bitcoin-utils library:

$ pip install bitcoin-utils
Atom-Editor-Screenshot

| improve this answer | |
  • Hi @Prayank. Thanks for your reply. I did follow your instructions. However, in the Atom Editor, I'm unable to install bitcoin-utils library and unable to run the script like what you did in your snapshot. It stated here as Traceback (most recent call last): File "C:\GitPod\python-bitcoin-utils-master\bitcoinutils\utils.py", line 13, in <module> from bitcoinutils.constants import SATOSHIS_PER_BITCOIN ModuleNotFoundError: No module named 'bitcoinutils' [Finished in 0.206s] – Jsim Aug 21 at 14:50
  • Open "command prompt" as an administrator and run the command "pip install bitcoin-utils" Relaunch Atom Editor and try to run the python code – Prayank Aug 21 at 15:00
  • Hi @Prayank. Thanks so much for your prompt reply and good guidance. It really works except for the node_proxy.py --> due to I think this is under "Testnet" and if I change to "Mainnet" do you think, it will automatically connect? Actually, I wanted to create a (new) UTXO with (new) Transaction in order to the TXID Input. do you think I can get it here in the bitcoin-utils library? Or shall I make a new script for this? Please advise, thanks so much in advance. – Jsim Aug 22 at 14:18

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.