Fan
c6fa743597
Update key-to-address-ecc-example.py
...
If line#24 use 'wif_compressed', it will produce a wrong Key (WIF-Compressed) started with 2.
So there should be 'wif', unless :
wif_compressed_private_key = bitcoin.encode_privkey(
bitcoin.decode_privkey(private_key, 'hex'), 'wif_compressed')
This is also right.
However, use the 'compressed_private_key' and 'wif_compressed' is wrong.
5 years ago
Will Binns
cec55847b0
Merge pull request #616 from terzim/patch-2
...
Update ec-math.py
5 years ago
Will Binns
ecbde7c77c
Merge pull request #568 from theStack/maxmoney_unusedvar
...
max_money.py: use variable start_block_reward (eliminate magic number)
5 years ago
Will Binns
ee6131abf0
Merge pull request #531 from koshikraj/code-fix
...
fixed hashlib library error for python3
5 years ago
Massimiliano Terzi
9e2817f50a
Update ec-math.py
...
python 3, no need for decoding/encoding
5 years ago
theStack
24fd7bd79b
max_money.py: use variable start_block_reward (eliminate magic number)
6 years ago
Arthur O'Dwyer
9504d804e0
Stop using numeric_limits for the constant "255", and fix a bug.
...
The bug is that `x % 255` is not quite the same thing as `x % 256`;
but `x & 255` is.
The stylistic issue is that `numeric_limits<uint8_t>::max()` is a
very verbose way of spelling `255`.
6 years ago
koshikraj
d70a0f91f2
fixed hashlib library error for python3
6 years ago
Andreas M. Antonopoulos
7ed95b283b
Errata 166266
6 years ago
MaloneGod
b01acc076b
correct an error line 24 'wif' to 'wif_compressed'
6 years ago
cclauss
ecd13d3523
whitespace fixes to placate flake8
6 years ago
Andreas M. Antonopoulos
b7d97a5e80
Use of print function from Python 3 requires ()
6 years ago
Andreas M. Antonopoulos
9dacbb40e3
Merge remote-tracking branch 'github/develop' into second_edition
6 years ago
Andreas M. Antonopoulos
cbc23caf8a
Merge pull request #431 from cjjojoba/cjjojoba-patch-1
...
Update ec-math.py
6 years ago
ZhaoChunsheng
5460eb7a8d
Update key-to-address-ecc-example.py
...
The code is very possible to miss a leading '0'.
E.g:
Private Key (hex) is: 57c003d31cca32f79a22e70334fff37875617e89c04d2746b5efc22067ccb8fd
Before: Compressed Public Key (hex) is: 03 8f0de2360796ae0fe17f1a2b0be30af6fb45eccc4a1c7afb5ebea21d041b6e0
After: Compressed Public Key (hex) is: 03 08f0de2360796ae0fe17f1a2b0be30af6fb45eccc4a1c7afb5ebea21d041b6e0
The bug is in the pybitcointools, but it is not updated, we can only repair it ourselves.
6 years ago
Cihat Imamoglu
fc84c40e8b
Update ec-math.py
...
* Add a missing word "number"
* Convert `& 1` into `% 2 == 0` for clarity
7 years ago
Manjeet Singh Bhatia
22e17ffd3c
Update hash_example.py
...
As input and hash are inbuilt functions, so I'd suggest using other names for variables.
here is output from python interpreter.
>>> hash
<built-in function hash>
>>> input
<built-in function input>
7 years ago
Will Binns
d5e2316438
Merge pull request #372 from cclauss/patch-3
...
from __future__ import print_function
7 years ago
MarcoFalke
fa6ee0557e
Rework ch03 for most recent version of Bitcoin Core
7 years ago
cclauss
b8a0cddb9f
from __future__ import print_function
7 years ago
cclauss
a47fa095cf
from __future__ import print_function
...
`from __future__ import print_function` to bring the print function from Python 3 into Python 2.6 and 2.7.
Properly deals with comma separated values in print() function.
7 years ago
Will Binns
64f851da26
Merge pull request #367 from cclauss/patch-3
...
Trailing L not needed in Py2 & Syntax Error in Py3
7 years ago
cclauss
14138a859f
Trailing L not needed in Py2 & Syntax Error in Py3
...
Also print() function, ternary if, avoid backslashes.
7 years ago
cclauss
df302e9fe5
long() and print() for Python 3
7 years ago
cclauss
35fef9a94f
long(), print(), xrange() for Python 3
...
Also remove trailing whitespace
7 years ago
cclauss
3c0b24edd7
print() function for Python 3
7 years ago
cclauss
cb1053f905
print() function for Python 3
...
Also ternary if
7 years ago
cclauss
bdc3743e30
print() and range() for Python 3
7 years ago
cclauss
06ecaf9168
print() function for Python 3
7 years ago
cclauss
5f3a3d4469
print() function for Python 3
7 years ago
cclauss
f396920189
from __future__ import print_function
...
Support print('xyz', end='') on Python 2
7 years ago
Andreas M. Antonopoulos
d930042fc6
code fixes to update to libbitcoin v3
7 years ago
Andreas M. Antonopoulos
97496a50fb
fixes to code example
7 years ago
Nick Adams
c05329d9cf
PR edits through Ch 5
7 years ago
Andreas M. Antonopoulos
611f6514a2
Updated BIP appendix
7 years ago
Andreas M. Antonopoulos
572667c69c
Merge pull request #177 from kristjanr/develop
...
Fix unorderable types error&make code more uniform
8 years ago
Andreas M. Antonopoulos
54de3ac14d
transaction fees
8 years ago
Will Binns
3e863bcf9c
code/satoshi-words: save_script, use const.
8 years ago
Andreas M. Antonopoulos
4d15f0aad3
ch03 rpc API, code examples, libraries
8 years ago
Kristjan Roosild
980363b6e1
Fix unorderable types error&make code more uniform
9 years ago
Andreas M. Antonopoulos
6040e26579
Addressing errata 152498
9 years ago
Andreas M. Antonopoulos
b841235043
Addressing errate 151301
9 years ago
Andreas M. Antonopoulos
3a7b435d85
removed time module as it is no longer used in this example
9 years ago
Andreas M. Antonopoulos
cd210e356a
Addressing errata 151300
9 years ago
Amir Taaki
e827ff5c86
delete uneeded code, replace with bc::hash_literal as per William Swanson (s_tec)'s comment.
9 years ago
Amir Taaki
d44f6aaf92
switch to decode_base16() per William Swanson (s_tec)'s comment.
9 years ago
Amir Taaki
406a3303bb
seed random number generator in ec-math.py
9 years ago
Amir Taaki
f7804da5db
Upgrade libbitcoin 1.0 code samples to libbitcoin 2.0
9 years ago
Andreas M. Antonopoulos
e51399af22
cleanup alt library code and examples, move some to appendix
10 years ago
Andreas M. Antonopoulos
aa332a7008
code examples
10 years ago