Pages:
Author

Topic: Python Bitcoin ECC library, supports signing, transactions, determinstic wallets (Read 11455 times)

full member
Activity: 191
Merit: 100
I'm making a UI on top of this, similar to electrum.
I really like your clean code!
full member
Activity: 157
Merit: 100
Try "from bitcoin import *"

I get the following error when I type the first line of code:
>>> from pybitcointools import *
Traceback (most recent call last):
  File "", line 1, in
ImportError: No module named pybitcointools
member
Activity: 114
Merit: 12
Thank you for all you are doing for us.
I have scarse experience in python and programming in general but I like a lot your tutorial on multisig (http://bitcoinmagazine.com/11113/pybitcointools-multisig-tutorial/).

I get the following error when I type the first line of code:
>>> from pybitcointools import *
Traceback (most recent call last):
  File "", line 1, in
ImportError: No module named pybitcointools

also using the command line tool I get instead:
 k1=`pybtctool random_key`
Traceback (most recent call last):
  File "/usr/local/bin/pybtctool", line 8, in
    cmd = sys.argv[2]
IndexError: list index out of range

I work on Mac OS. I have installed the tools with:

sudo pip install bitcoin

Thank you.

Same exact issue. The command-line tool works just fine. Can someone post what is in their python path?
newbie
Activity: 9
Merit: 0
nice work, put a footprint here [feasibility on multiple public keys]
full member
Activity: 162
Merit: 100
Thank you for all you are doing for us.
I have scarse experience in python and programming in general but I like a lot your tutorial on multisig (http://bitcoinmagazine.com/11113/pybitcointools-multisig-tutorial/).

I get the following error when I type the first line of code:
>>> from pybitcointools import *
Traceback (most recent call last):
  File "", line 1, in
ImportError: No module named pybitcointools

also using the command line tool I get instead:
 k1=`pybtctool random_key`
Traceback (most recent call last):
  File "/usr/local/bin/pybtctool", line 8, in
    cmd = sys.argv[2]
IndexError: list index out of range

I work on Mac OS. I have installed the tools with:

sudo pip install bitcoin

Thank you.
sr. member
Activity: 469
Merit: 253
I deliberately designed the library to be simple and no-nonsense.
Thanks for the effort, and I feel bad having to ask for assistance when so much has already been given.

What is required before you reach this point
Quote
> from pybitcointools import *

The command line examples are fine, but this "> from pybitcointools import *" only caused me grief.

"from pybitcointools import *" is Python.

If you have Python installed, you can just type 'python' (assuming it's in your path) at the command line to start the Python interpreter, and then you will get
 
>

from there you can do the above command.

Feel free to ask further questions as necessary. People will be happy to help.
member
Activity: 114
Merit: 12
I deliberately designed the library to be simple and no-nonsense.
Thanks for the effort, and I feel bad having to ask for assistance when so much has already been given.

What is required before you reach this point
Quote
> from pybitcointools import *

The command line examples are fine, but this "> from pybitcointools import *" only caused me grief.

Same here. I couldn't get it to import, even with adding the correct folders to path(even inside the script using sys.path).

I'm no linux expert though so I'm probably doing something wrong.
newbie
Activity: 3
Merit: 0
I deliberately designed the library to be simple and no-nonsense.
Thanks for the effort, and I feel bad having to ask for assistance when so much has already been given.

What is required before you reach this point
Quote
> from pybitcointools import *

The command line examples are fine, but this "> from pybitcointools import *" only caused me grief.
full member
Activity: 128
Merit: 107
My application of pybitcointools: offbit - Minimalistic offline key generation, offline TX signing and Tor protected TX broadcasting.

https://bitcointalksearch.org/topic/annrfc-offbit-off-grid-bitcoin-txs-v0001-488915
newbie
Activity: 40
Merit: 0
What are you coding that needs such breakneck speed?
sr. member
Activity: 421
Merit: 250
That's cool!  But a different language can be better cause this ain't all that fast
sr. member
Activity: 469
Merit: 253
I opened an issue with regard to signature padding here: https://github.com/vbuterin/pybitcointools/issues/9

I think fixing it might be a bit above my paygrade (or at least would take me a while), so if anyone can help I'd appreciate it.

Edit: Vitalik pushed a fix already, thanks (although it needs testing, which might be tricky).
legendary
Activity: 1708
Merit: 1020
the time part of the two random functions looses entropy:

str(int(time.time())**7)   is probably meant to be
str(int(time.time()**7))   or
str(time.time()**7)

It would be nice to be able to add some base entropy by hammering your tinfoil hat on the keyboard at start.
newbie
Activity: 28
Merit: 12
Vitalik, this is exactly what I was looking for. I'm going to replace my HW wallet test harness with your library (the one I was using before was functional, but I'd say not the cleanest library in the world). Thanks for sharing - I'll let you know if I run across any issues or have any improvement ideas.
sr. member
Activity: 469
Merit: 253
(On the above posts, Vitalik seems to have added an "eligius_pushtx" method to allow the more exotic multisig txs to go through (eligius processes them apparently) so that's cool Smiley )

Question: I want to do verifying messages with addresses from external wallets
..[snipped]

Question can be ignored, the code is already there in ecdsa_recover. Thanks Smiley
sr. member
Activity: 469
Merit: 253
Are there any practical limits in numbers of parties to a multisig transaction? I am thinking of a scenario like 6 of 10 of 8 of 15. Does the size of the script start to break anything at any point?
n=20 is the maximum allowed by protocol.

n>3 is currently non-standard, so you have to make a private arrangement with a miner to get those transactions included in a block.

Ah thanks that is a very important point for me ... I did notice the darkwallet guys using a 3 of 5 address, I guess I can ask them about that. I only have one special use for large numbers, maybe I can work around it.
legendary
Activity: 1400
Merit: 1013
Are there any practical limits in numbers of parties to a multisig transaction? I am thinking of a scenario like 6 of 10 of 8 of 15. Does the size of the script start to break anything at any point?
n=20 is the maximum allowed by protocol.

n>3 is currently non-standard, so you have to make a private arrangement with a miner to get those transactions included in a block.
sr. member
Activity: 469
Merit: 253
Are there any practical limits in numbers of parties to a multisig transaction? I am thinking of a scenario like 6 of 10 of 8 of 15. Does the size of the script start to break anything at any point?

Quote
I assume mktx will put anything not spent explicitly to mining fees?
Yes, it works like that here as that's part of the bitcoin protocol.
legendary
Activity: 1708
Merit: 1020
I assume mktx will put anything not spent explicitly to mining fees?
sdp
sr. member
Activity: 470
Merit: 281
Nice, congratulations. Though I would've suggested a different language cause simply Python ain't all that fast when it comes to these expensive operations there.


This reminds me when someone mentioned to me that I shouldn't use iostreams in C++.  That it was faster to use C-style printf functions.  After some bench marking and some inspection he was right that C++ iostreams are slower.  Each << is a function call.  I think this argument is similar.  In the end it doesn't matter.  Computers are fast today.
Pages:
Jump to: