Questions tagged [python-bitcoinlib]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
103 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
63 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
47 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/...
  • 137
0 votes
1 answer
62 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
39 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
0 answers
97 views

Error creating transaction using Python bitcoinlib

I'm trying to create a transaction with the Bitcoinlib python library and I'm getting an error. I am trying to load an existing wallet using the private key and then send money from it to another ...
0 votes
0 answers
37 views

Generate list address bitcoin - python 3.9.6

i try to generate list address bitcoin by code below but not worked, please help. Thanks low = 0x2C45E9017ED4 #2^250 high = 0x2C45E9017fff #2^251 def prv(): while True: ran = (low,high,1) def ...
  • 21
0 votes
0 answers
117 views

Create transaction without importing wallet using python bitcoinlib

I am trying to find a way to send bitcoins from one address to another, having only private key, without importing any wallets, just simply get txins, create a transaction and send it to some address. ...
  • 101
0 votes
1 answer
107 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 ...
  • 133
1 vote
1 answer
884 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
88 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
351 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
37 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
155 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 ...
  • 21
0 votes
1 answer
61 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
374 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 = '...
  • 498
7 votes
2 answers
5k 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
248 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 ...
  • 95
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 ...
  • 1,885
0 votes
1 answer
649 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'...
  • 315
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() >>&...
  • 315