Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: milan2sky on June 17, 2021, 05:19:36 PM



Title: Which Python Package for automating BTC-tx? [required: OP_RETURN and Testnet]
Post by: milan2sky on June 17, 2021, 05:19:36 PM
Hello Guys,

I need a (good ;)) Python package for automating BTC transactions...
I need support for OP_RETURN and BitcoinTestnet...

I would also appreciate a good Documentation :D

Can you recommend me some something?


Title: Re: Which Python Package for automating BTC-tx? [required: OP_RETURN and Testnet]
Post by: BitMaxz on June 17, 2021, 05:57:32 PM
Try to check this one below

- https://github.com/coinspark/python-OP_RETURN/blob/master/send-OP_RETURN.py

I just found it when searching on the forum here https://bitcointalk.org/index.php?topic=970295.msg10594340#msg10594340

I don't know if you can automate it but it's a python package.


Title: Re: Which Python Package for automating BTC-tx? [required: OP_RETURN and Testnet]
Post by: NotATether on June 17, 2021, 08:19:43 PM
The ubiquitous bitcoin (https://pypi.org/project/bitcoin/) PyPI package can work with OP_RETURN using its usual transaction signing and broadcasting methods since it can process raw transactions. If you make the raw transaction with your OP_RETURN data you can then manipulate it using this package.

Testnet support is provided by importing the module and creating a class instance using Bitcoin(testnet=True). I must warn you though, this package is somewhat old, even its immediate successor fork hasn't been updated since 2018, but it looks like this is the most recent decent package you'll find.  :-\


Title: Re: Which Python Package for automating BTC-tx? [required: OP_RETURN and Testnet]
Post by: ranochigo on June 17, 2021, 10:34:04 PM
Try to check this one below

- https://github.com/coinspark/python-OP_RETURN/blob/master/send-OP_RETURN.py

I just found it when searching on the forum here https://bitcointalk.org/index.php?topic=970295.msg10594340#msg10594340

I don't know if you can automate it but it's a python package.
If my memory doesn't fail me, it isn't compatible with newer version of Bitcoin Core and OP seems to want to avoid using Core as well.

This module will work if OP can get the TXID and index for the raw transaction: https://pypi.org/project/bitcoin-utils/.