Questions tagged [python]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
328 views

Pushing a large signed transaction (testnet) using Python

I have been trying to send a signed transaction using pybitcointools (Python) using the blockr_pushtx function, however it consistently returns Exception: {"status":"fail","data":"Could not push your ...
2
votes
1answer
243 views

BIP39 Japanese Mnemonic vector unit test process

There is a json for unit tests of Japanese characters which I want to validate using Python, specifically with this fork of pybitcointools, which has bip39 functionality. Unit tests from Trezor's ...
0
votes
1answer
1k views

converting RUBY script into PYTHON ( Recovering private key when someone uses the same k twice )

require 'ecdsa' public_key_hex = '02a50eb66887d03fe186b608f477d99bc7631c56e64bb3af7dc97e71b917c5b364' msghash1_hex = '01b125d18422cdfa7b153f5bcf5b01927cf59791d1d9810009c70cd37b14f4e6' msghash2_hex = '...
4
votes
1answer
3k views

Are there any blockchain inspection tools/libraries?

I am going to write software that gets information from the blockchain directly. Are there any tools or libraries to speed up that process? I am looking for things like decoding and encoding ...
2
votes
0answers
465 views

How to add blockchain.info API key to pibitcointools

I have a query-intensive app I'm building that keeps timing out with the message: Traceback (most recent call last): File "test.py", line 72, in <module> array = bitcoin.multiaccess (...
1
vote
1answer
1k views

Sample programs written using python-bitcoinlib?

Where can I get source codes of programs written using the python-bitcoinlib?
1
vote
1answer
646 views

How do I print unspent transaction outputs of an address using pybitcointools

I am a beginner looking to write a simple program that takes an input (address) and prints the unspent amount in it. I copied some code from chapter 4 of Mastering Bitcoin to generate a random ...
8
votes
4answers
5k views

How can I test if a bitcoin address is compressed or not?

I have two bitcoin addresses: 1D8VSXHFAWNhAbruwUMbNp4hsXAnRNkYvX 12T15tvMGaymMX97X9KxVzyLF323r8v6Hg One is compressed, one is not. How can I test which is which? (Preferably using python 2.7) ...
3
votes
1answer
2k views

How can I check if a bip32 xpub key is valid using python?

I'm on the hunt for some python code that will tell me if a string is a valid bip32 xpub key but I'm having trouble finding any. I also would like to check if a string is a valid bitcoin address. ...
2
votes
2answers
1k views

OP_RETURN using python

I'm trying to make a simple program that can reliably upload an OP_RETURN transaction. I have found some examples online, but so far they don't work consistently. The ones that go through seem to be ...
1
vote
2answers
1k views

Help me use python-bitcoinrpc

I have got the api working and i can run commands like access = AuthServiceProxy("http://root:123@127.0.0.1:8332") access.getinfo() However not sure how to use more complicated commands such as: ...
4
votes
2answers
4k views

How can I run an Electrum console command from outside Electrum (in Linux)?

I want to use my electrum wallet balance in my another python application. How do I make a call to the getbalance() function?
1
vote
1answer
233 views

os.getpid() in Bitcoin's python test scripts - What does it actually do?

I was looking at ../qa/rpc-tests/util.py in order to figure out how arbitrary ports are assigned to each created node. In the first lines of the code it says: ...def p2p_port(n):return 11000 + n + ...
4
votes
1answer
693 views

Clarification of BIP32 hierarchical deterministic multisig scripts

As everyone is aware, I'm a huge proponent of Vitalik Buterin's pybitcointools Python 2.7/3.x library. I am having a some trouble understanding the BIP32 concepts, which are coded in the deterministic/...
2
votes
2answers
1k views

Running pybitcointools & python-bitcoinlib concurrently

This is somewhat Python-based, but I feel it is more a Bitcoin question than a Python question. The problem is running pybitcointools and python-bitcoinlib concurrently, as both packages use the name ...
4
votes
1answer
5k views

Signing a raw transaction with Python ECDSA (or OpenSSL)

I'm looking for specifics of Step15-17 from Redeeming a raw Tx Step By Step, which is essentially the step where the concatenated raw Tx structure is double sha256 hashed, and then signed with an ...
2
votes
2answers
2k views

Bitcoin RPC works in bitcoin-cli but not in python-bitcoinrpc: No JSON object

I'm running a testnet node. I can use bitcoin-cli just fine: >bitcoin-cli.exe getinfo { "version" : 100000, "protocolversion" : 70002, "walletversion" : 60000, [... snipped] But when ...
1
vote
2answers
10k views

Solving PyCrypto 2.6.1 errors for Python 3.4 (Windows7 x64)?

Whilst there's less of an issue with Python 2.7, Python 3.4 relies on the pycrypto library for numerous wrappers/APIs/tools such as BlockTrail, pycoin, pybitcointools, etc etc. The error I'm getting:...
30
votes
2answers
8k views

How is the whitepaper decoded from the blockchain (Tx with ~1000x m of n multisig outputs)

The whitepaper is apparently encoded at 54e48e5f5c656b26c3bca14a8c95aa583d07ebe84dde3b7dd4a78f4e4186e713, which is an m of n multisig Tx with 947 outputs (just under the scriptsig limit of 20kB!). ...
2
votes
4answers
2k views

pycoin command line transaction

Is there a quick way to do transactions knowing only the private key(secret exponent) and the destination address, preferably from a command line utility such as pycoin? I am using Debian/Ubuntu and ...
0
votes
1answer
114 views

How to send user input data(Bitcoin address) from iPhone to server and then send Bitcoin back to user's Bitcoin address?

Background I just got started yesterday learning Python and I'm currently building my first iPhone game. What I'm trying to do is create a Bitcoin Pot Jar inside an iPhone app like Sarutobi:https://...
0
votes
2answers
2k views

How to use bitcoin-python

I'm trying to create a bitcoin address with the bitcoin-python library. I tried this code: import bitcoinrpc bitcoinrpc.connect_to_local().getnewaddress() But I got this error: error: [Errno 10061]...
2
votes
2answers
823 views

“value” field in raw transaction: Rounded Bitcoins (float) or Satoshis?

I am getting confused about the Bitcoin amount presentation in a raw transaction's "value" field. If i want to spend 0.05 BTC, for instance, which of these is the correct value? "value" : 0.05 "...
3
votes
1answer
1k views

bitcoind JSON-RPC interface timeouts under unit tests

I am running unit tests against bitcoind which do JSON-RPC requests in high rate. Random failures are an issue. E.g. if you have something like this in printconsole logs: ThreadRPCServer method=...
2
votes
2answers
2k views

How can I create a list of X richest bitcoin addresses?

I have looked around, but I can't find the code related directly to my question. I want to create a list in any format that contains the all accounts with balance over 0 for example. Thanks ahead for ...
0
votes
1answer
539 views

Ubuntu 14 LTS with SX tools installation issues

I'm trying to install the SX (http://SX.dyne.org) tools using Ubuntu 14 LTS following the installation instructions (http://sx.dyne.org/introduction.html#installation). I use wget to download the SH ...
1
vote
1answer
1k views

How to verify ECDSA of a sample litecoin tx using pycoin?

I'm using the litecoin testnet network for testing. I have a UTXO at 053baee857adfdc16959e9dbc9618e0e935f0a1e51e226e651fcd67242f1f462 with a vout of 0. I make a raw transaction sending the coins to ...
5
votes
2answers
1k views

Why is Python popular in Bitcoin projects?

When checking out open source projects related to Bitcoin, I see that many are written in, or make a large use of, Python language. I mostly use Ruby and have little experience in Python; so, I would ...
1
vote
2answers
914 views

API Authentication via Python

I'm having trouble following LakeBTC's API instructions for connecting to their API via Python. API Documentation: https://www.lakebtc.com/s/api I have my key (email address) and secret. I'm using ...
7
votes
3answers
13k views

Is it possible to create a transaction in pure python without needing to run bitcoin locally?

Lets say I have a bitcoin address that has 10 BTC sent to it. I also have the private key for this address Using Python (2 or 3) is there a way to create a signed transaction (which I believe is a ...
1
vote
0answers
460 views

How to get bitcoin address from the pubkey_hash using bitcoin-abe or something else?

I'm using: https://github.com/bitcoin-abe/bitcoin-abe to import the blockchain into a mysql DB it is almost done after 5 days. So I started looking at the data and didn't see any addresses. I know the ...
0
votes
1answer
381 views

How to auto deposit bitcoins on btc-e?

BTC-e gives a new address to send to for every time a deposit is to be made. These addressees can be accesses through this url: Bitcoin deposit authentication required I am currently using python to ...
1
vote
1answer
2k views

API Bitfinex question: “key amount should be a decimal string”?

I started writing code for the Bitfinex api yesterday and I've been struggling quite a lot with this. I am using jndok's python implementation. I added my pyblic and secret keys and wrote this line ...
7
votes
4answers
4k views

Is there bitcoin implementation in python or C#?

I want to play with the implementation to better understand the inner workings of Bitcoin. I'm familiar mostly with python and C# and found no clients in either of the languages. My C skills are rusty ...

1 2 3 4
5