Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [python]

Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

1 vote
0 answers
31 views

python "pbkdf2_hmac" function doesn't return same as Ian Coleman BIP39 tool. Why?

I am trying to go from a BIP39 phrase to Seed to xprv root key. I have the following BIP39 phrase: "prefer offer puppy imitate pink banana because whale letter thought artwork loud" which ...
0xCas's user avatar
  • 11
0 votes
0 answers
27 views

Python code to create a two-input transaction in test net

I made a transaction that can be spent by anyone and now I wanna spend it and bring it back to my address. The problem in it doesn't have enough bitcoin for transaction fee so I'm using another input ...
ali's user avatar
  • 1
0 votes
0 answers
19 views

How to spend one or more p2tr inputs in python?

I see that bitcoinlib does not support taproot yet. Is there any good lib out there to spend one or more taproot inputs? I would like to create txs like this: ... "inputs": [ { &...
user80100's user avatar
0 votes
1 answer
33 views

Unable to spend a script path using buidl python lib

I've been struggling to figure out how to spend a particular script path using buidl python lib. Currently I assume the problem lies in how I construct p2tr address or there's a bug (very unlikely) in ...
katsu's user avatar
  • 21
0 votes
1 answer
133 views

How to generate coinbase transaction in Python?

I know that on this forum a lot of questions on this topic, I have checked most of these, but can't find the solution for my task. I am creating my own algorithm for solo mining bitcoin on Python. I ...
Alex Radik's user avatar
0 votes
1 answer
126 views

How to convert signature to DER encoded format in python

vk = ecdsa.VerifyingKey.from_string(bytes.fromhex(pubKey),curve=ecdsa.SECP256k1) if vk.verify(bytes.fromhex(signature), bytes.fromhex(sha256_hash), hashlib.sha256, sigdecode=sigdecode_der) == True: # ...
aaravm's user avatar
  • 1
0 votes
0 answers
76 views

Old encrypted wallet + bitcoin core

I got desperate, I tried all the instructions I could find on the Internet - nothing helps. What I have: wallet.dat from bitcoin-core encrypted from 2015 (in four different places) the password I ...
LamoSS's user avatar
  • 1
0 votes
0 answers
61 views

Getting error "non-mandatory-script-verify-flag (Witness program hash mismatch)" when trying to send raw signed transaction

I'm trying to send a fairly simple segwit transaction with multiple input and outputs using bitcoinlib, here's how the simplified code looks like: from bitcoinlib.transactions import Output, Key, ...
Javier Villanueva's user avatar
1 vote
1 answer
80 views

Can I read blockchain's information from Electrum's python console?

I wanted to use Electrum's python console, but the documentation just gives a few examples. Is there a more complete documentation about python commands inside Electrum ? Main tasks I currently want ...
ewen-goisot's user avatar
1 vote
0 answers
36 views

scantxoutset timing out

I have extremely simple python code to use scantxoutset. The problem is that when I debug in pycharm it keeps timing out. rpc_connection = rpcConnector.rpcConnect() json_req = [{"desc": &...
user2880722's user avatar
1 vote
1 answer
66 views

I cannot broadcast my raw tx (P2PKH) on testnet: Signature must be zero for failed CHECK(MULTI)SIG operation

I am trying to broadcast my transaction on the test network with no success so far. I get always this error: sendrawtransaction RPC error: {"code":-26,"message":"mandatory-...
Dot Brian's user avatar
2 votes
1 answer
274 views

Partial private key recovery

I had the pleasure of setting up a Bitcoin wallet using the Blue Wallet app and diligently noted down the 52 characters of my private key on a piece of paper for backup purposes. Upon revisiting the ...
minodo's user avatar
  • 21
1 vote
1 answer
103 views

Deriving bip84 addresses with python

Does anyone have a python script deriving the bip84 addresses from the private key? I do have the private root key so I don't need to go all the way from the private key. I'd like to do this with the ...
Peder Rustad's user avatar
1 vote
1 answer
46 views

What is one word seed word exactly?

I have the following code import hashlib import binascii def word_to_private_key(word): sha256_hash = hashlib.sha256(word.encode()).digest() private_key = binascii.hexlify(sha256_hash).decode(...
Asif Iqbal's user avatar
2 votes
3 answers
101 views

How should I install Core Lightning if my VPS won't let me use pip install?

I tried to install Core Lightning on a Ubuntu Digital Ocean droplet using these installation instructions and it won't let me pip install anything giving me an error externally-managed-environment. ...
Michael Folkson's user avatar

15 30 50 per page
1
2 3 4 5
25