Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: myfy on April 25, 2024, 09:31:46 AM



Title: how to sign a message with python code
Post by: myfy on April 25, 2024, 09:31:46 AM
hello

I want to send a transaction with python, but I can't sign rawtransaction.

I want to know which python library I need to learn.


Title: Re: how to sign a message with python code
Post by: OmegaStarScream on April 25, 2024, 09:46:29 AM
Bit[1] should do exactly what you're looking for. I have looked for other alternatives before, but I think Bit serve the purpose perfectly.

You can see the documentation here[2]. If you find that the documentation is a bit unclear, you can always use Chatgpt for some help.

[1] https://github.com/ofek/bit
[2] https://ofek.dev/bit/guide/transactions.html


Title: Re: how to sign a message with python code
Post by: ABCbits on April 25, 2024, 10:02:29 AM
Please be more specific. If it's something you need to do one, have you tried using one of Bitcoin wallet software instead? What kind of transaction you need to sign? What kind of address (e.g. P2PKH and P2WPKH) used as input of the TX?

If you find that the documentation is a bit unclear, you can always use Chatgpt for some help.

Please stop suggesting that, without mentioning to double-check the result. It could be a way to lose access to your Bitcoin.


Title: Re: how to sign a message with python code
Post by: DifDrama on April 26, 2024, 02:43:23 AM
BitcoinLib may be a good choice. Plenty of examples out there are capable to help you get the hang of it.

Here is the link: https://github.com/1200wd/bitcoinlib



Title: Re: how to sign a message with python code
Post by: punk.zink on April 26, 2024, 04:47:14 AM
hello

I want to send a transaction with python, but I can't sign rawtransaction.

I want to know which python library I need to learn.

I once made a tutorial, Create transactions in Python, but everything is presented in Bahasa Indonesia. But at least you can find out the modules and libraries that I use to make Bitcoin transactions, and you can also find what kind of script I use to sign the transaction.

https://bitcointalk.org/index.php?topic=5484019.msg63657542#msg63657542