Questions tagged [python-bitcoinlib]
The python-bitcoinlib tag has no usage guidance.
28
questions
0
votes
1
answer
88
views
How to get scriptPubKey from public key hash
My goal is to create a transaction. For that I need to know the following things:
The private key signing the transaction.
Who can spend the bitcoins that I'm sending.
Valid UTXOs that the sender can ...
0
votes
1
answer
111
views
How to get UTXOs Data from the network Using python?
I want to have the Bitcoin Network UTXOs only for a data analysis project and the purpose is visualization of the time series of 1>BTC wallets . how can I do it using python ? ( or is there any ...
1
vote
1
answer
110
views
Error Validating Segwit Transactions using Python Blockcypher API: Error Running Input Script
As the title states, I'm trying to send a Litecoin transaction using the Blockcypher API Python SDK, and using Bitcoinlib for key management. I have extensively reviewed the documentation and source ...
1
vote
0
answers
85
views
How to set change address with python bitcoinlib
I am using python's bitcoinlib to try and set up payments where a client sends funds to a server and then sends requests signed with their key as proof that the request came from them. The server ...
1
vote
0
answers
134
views
Bitcoin Transaction Builder in Python
is there a python code that helps build raw bitcoin transactions (Legacy and Segwit)?
I have seen javascript but not in python.
0
votes
0
answers
63
views
How to get unspents using the private key of the bip84 wallet
Maybe my question is stupid, but I really can't figure
out why when I use the bip44 private key, it works, but if it's bip84, it doesn't
from bit import PrivateKey, Key
import bitcoinlib
my_key = ...
1
vote
1
answer
75
views
I am trying to convert the 12 words into BTC addresses, but they do not match
I am trying to convert the 12 words into BTC addresses, but they do not match the ones shown to me by Safepal, Coinomi, and Trust Wallet. I have tried using several libraries and doing it manually.
I ...
0
votes
1
answer
42
views
Recreate Java code in python
I have a java code that I need to pass to python but I don't know which libraries to use and how to start and if you can help me I would really appreciate it
MNEMONIC = "twenty four mnemonic ...
1
vote
0
answers
38
views
Pass Java code to Python [closed]
I have a Java code that I need to pass to python but I don't know which libraries to use and how to start and if you can help me it is very grateful
MNEMONIC = "twenty four word mnemonic here&...
0
votes
1
answer
316
views
How to create SegWit address from mnemonic in Python 3.8.10
I am having trouble creating SegWit address from mnemonic. I can't find any useful code to do that. I tried using BitcoinLib but I don't know how to disable saving wallets to disk.
EDIT:
I found ...
1
vote
1
answer
110
views
Keep getting wrong bitcoin addresses
I'm trying to write a script that can generate a private key and the compressed and uncompressed addresses. It seems to work however the private key doesn't correspond to the addresses generated. Can'...
1
vote
0
answers
87
views
Cannot import python-bitcoinlib into a simple script
Im writing a simple python script to connect to a local bitcoin node and list transactions.
I created a virtual environment with:
virtualenv bitcoinenv
And then activated:
source bitcoinenv/bin/...
0
votes
1
answer
112
views
Should an offline address generated from private key send funds to wallet?
I'm trying to use the python package python-bitcoinlib to send a timelock transaction on testnet. The github has two examples to create an address, and then use that address to send the bitcoin to ...
1
vote
0
answers
67
views
BlockCypher API signature bitcoin transaction Error
I'm trying to make a bitcoin transaction using the BlockCypher API and I'm getting an error when I try to sign the transaction.
This function creates an unsigned transaction:
def buildTransaction(...
0
votes
1
answer
133
views
p2sh addresses in elements
I'm building a script and have it's hex representation, then I convert it to a pubkey and address, which results in something like: 3NqNAUBEWarVjKerLcCnPrTGbaQ4QFcAfr or ...
1
vote
1
answer
2k
views
Invalid transaction. Error: TX decode failed. Make sure the tx has at least one input
I'm using bitcoinlib for python to create a transaction and send it but I'm getting the following error:
Funds not sent, exception error: Error connecting to blockchair on url
https://api.blockchair....
0
votes
0
answers
132
views
Creating an OP_Return TX with Python bitcoinlib
How can I create an op_return TX with python bitcoinlib?
The transaction should include the OP_RETURN HEX-Data and an address where I send my change money
0
votes
1
answer
480
views
python - No module named 'bitcoin' on Ubuntu using WSL on Windows 10
Which version of python should I use?
When running pip3 install python-bitcoinlib I get 'Requirement already satisfied'.
I run on Ubuntu using WSL in Windows 10.
I have this error:
>>> from ...
0
votes
0
answers
42
views
how to get every inputs signature from a raw hex bitcoin transaction using python? [duplicate]
I have this raw transaction :
...
2
votes
1
answer
186
views
Problem spending funds from P2WSH address: non-mandatory-script-verify-flag
I've tried to find an answer here and on BTT but without luck so far.
I'm having issues creating a transaction to spend from a P2WSH address which I created and sent funds to.
I based my code off of ...
0
votes
1
answer
72
views
Does python-bitcoinlib and the Bitcoin Core functional test framework share code? Were changes ever pushed down/upstream?
Does python-bitcoinlib and the Bitcoin Core functional test framework share code? Were changes ever pushed down/upstream?
1
vote
2
answers
400
views
Why do I have a socket.timeout with python-bitcoinlib?
I am using a small script and get a timeout from python. This is my script:
import bitcoin
import bitcoin.rpc
from bitcoin.rpc import RawProxy
p = RawProxy()
hash = '...
7
votes
2
answers
6k
views
python-bitcoinlib | Create Private Keys, Public Keys and Addresses - How to Do It?
I'm trying to use the python-bitcoinlib library but its docs aren't entirely clear to me.
I'm a programmer but quite new to Python, and not very versed in the Bitcoin protocol.
What's the process, ...
1
vote
1
answer
276
views
What is the Best Way to Learn python-bitcoinlib?
I have tried to find tutorials everywhere, but can't find anything. Is there any step by step guide to use the library?
2
votes
1
answer
1k
views
What is the required input for python-bitcoinlib getrawtransaction command?
I am running a bitcoin node on my machine, fully synced with RPC commands enabled, rpc server live and txindex=1.
In the command-line I can run the following RPC call and obtain the information ...
2
votes
1
answer
2k
views
How can I sign transaction hex with Python library
I have a unsigned transaction hex. Now I want to sign this transaction input with my private key in Python. Are there any Python libraries?
Transaction Hex
...
0
votes
1
answer
680
views
How to getreceivedbyaddress() with the python-bitcoinlib?
I'm trying to use the python-bitcoinlib in my bitcoin project. I now understand how I can send a payment, but I can't find anything similar to the getreceivedbyaddress() command I normally used.
Isn'...
5
votes
2
answers
7k
views
How to make a simple payment with the python-bitcoinlib?
I've been using the bitcoin-python library for making payments from within Python. This worked pretty simple:
>>> import bitcoinrpc
>>> conn = bitcoinrpc.connect_to_local()
>>&...