@@ -4,7 +4,7 @@ pycoin -- Python Cryptocoin Utilities
4
4
This is an implementation of a bunch of utility routines that may be useful when dealing with bitcoin and some
5
5
alt-coins. It has been tested with Python 2.7, 3.3, 3.4 and 3.5.
6
6
7
- See also http://github.com/richardkiss/pycoinnet/ for a library that speaks the bitcoin protocol.
7
+ See also [ pycoinnet ] ( http://github.com/richardkiss/pycoinnet/ ) for a library that speaks the bitcoin protocol.
8
8
9
9
High Level
10
10
==========
@@ -21,25 +21,33 @@ where P is a subkey of K, you can actually work your way up the tree to determin
21
21
to the public wallet key K (unless private derivation was used at some point between the two keys)! Be sure you
22
22
understand this warning before giving out public wallet keys!
23
23
24
- pycoin.key.Key:
24
+ ` pycoin.key.Key `
25
+ ---------------
25
26
26
- ``` Key(hierarchical_wallet=None, secret_exponent=None,
27
- public_pair=None, hash160=None, prefer_uncompressed=None, is_compressed=True, netcode)```
27
+ ```
28
+ Key(hierarchical_wallet=None,
29
+ secret_exponent=None,
30
+ public_pair=None,
31
+ hash160=None,
32
+ prefer_uncompressed=None,
33
+ is_compressed=True,
34
+ netcode)
35
+ ```
28
36
29
- Specify one of "hierarchical_wallet, secret_exponent, public_pair or hash160" to create a ``` Key`` `.
37
+ Specify one of "hierarchical_wallet, secret_exponent, public_pair or hash160" to create a ` Key ` .
30
38
31
39
Or
32
40
33
- ``` Key.from_text(b58_text)`` ` accepts an address (bitcoin or other), a WIF, or a BIP32 wallet string and yield a Key.
41
+ ` Key.from_text(b58_text) ` accepts an address (bitcoin or other), a WIF, or a BIP32 wallet string and yield a Key.
34
42
35
- ``` Key.from_sec(sec)`` ` creates a Key from the SEC bytestream encoding of a public pair.
43
+ ` Key.from_sec(sec) ` creates a Key from the SEC bytestream encoding of a public pair.
36
44
37
45
38
46
pycoin.key.BIP32Node (formerly pycoin.wallet.Wallet) provides a BIP32 hierarchical wallet.
39
47
40
- Much of this API is exposed in the ``` ku``` command-line utility. See also COMMAND-LINE-TOOLS.md.
48
+ Much of this API is exposed in the ` ku ` command-line utility. See also [ COMMAND-LINE-TOOLS.md] ( ./COMMAND-LINE-TOOLS.md ) .
41
49
42
- See ``` BIP32.txt``` for more information.
50
+ See [ BIP32.txt] ( ./BIP32.txt ) for more information.
43
51
44
52
45
53
Transactions
@@ -48,37 +56,37 @@ Transactions
48
56
pycoin.tx.Tx is a class that wraps a bitcoin transaction. You can create, edit, sign, or validate a transaction using
49
57
methods in this class.
50
58
51
- You can also use ``` pycoin.tx.tx_utils``` which has ``` create_tx``` and ``` create_signed_tx`` `, which gives you a
59
+ You can also use ` pycoin.tx.tx_utils ` which has ` create_tx ` and ` create_signed_tx ` , which gives you a
52
60
very easy way to create signed transactions.
53
61
54
- The command-line utility ``` tx``` is a Swiss Army knife of transaction utilities. See also COMMAND-LINE-TOOLS.md.
62
+ The command-line utility ` tx ` is a Swiss Army knife of transaction utilities. See also [ COMMAND-LINE-TOOLS.md] ( ./COMMAND-LINE-TOOLS.md ) .
55
63
56
64
57
65
Services
58
66
--------
59
67
60
68
When signing or verifying signatures on a transaction, the source transactions are generally needed. If you set two
61
- environment variables in your ``` .profile`` ` like this:
69
+ environment variables in your ` .profile ` like this:
62
70
63
71
PYCOIN_CACHE_DIR=~/.pycoin_cache
64
72
PYCOIN_BTC_PROVIDERS="blockr.io blockchain.info blockr.io blockexplorer.com"
65
73
export PYCOIN_CACHE_DIR PYCOIN_BTC_PROVIDERS
66
74
67
- and then ```tx`` ` will automatically fetch transactions from the web sites listed and cache the results in
68
- ``` PYCOIN_CACHE_DIR`` ` when they are needed.
75
+ and then ` tx ` will automatically fetch transactions from the web sites listed and cache the results in
76
+ ` PYCOIN_CACHE_DIR ` when they are needed.
69
77
70
- (The old syntax with ``` PYCOIN_SERVICE_PROVIDERS`` ` is deprecated.)
78
+ (The old syntax with ` PYCOIN_SERVICE_PROVIDERS ` is deprecated.)
71
79
72
- The module pycoin.services includes two functions ``` spendables_for_address``` , ``` get_tx_db`` ` that look at the
80
+ The module pycoin.services includes two functions ` spendables_for_address ` , ` get_tx_db ` that look at the
73
81
environment variables set to determine which web sites to use to fetch the underlying information. The sites are
74
82
polled in the order they are listed in the environment variable.
75
83
76
84
77
85
Blocks
78
86
------
79
87
80
- The command-line utility ``` block`` ` will dump a block in a human-readable format. For further information, look at
81
- ``` pycoin.block``` , which includes the object ``` Block`` ` which will parse and stream the binary format of a block.
88
+ The command-line utility ` block ` will dump a block in a human-readable format. For further information, look at
89
+ ` pycoin.block ` , which includes the object ` Block ` which will parse and stream the binary format of a block.
82
90
83
91
84
92
Low Level
@@ -87,10 +95,10 @@ Low Level
87
95
ECDSA Signing and Verification
88
96
------------------------------
89
97
90
- The module ``` pycoin.ecdsa`` ` deals with ECDSA keys directly. Important structures include:
98
+ The module ` pycoin.ecdsa ` deals with ECDSA keys directly. Important structures include:
91
99
92
- - the ``` secret_exponent`` ` (a large integer that represents a private key)
93
- - the ``` public_pair`` ` (a pair of large integers x and y that represent a public key)
100
+ - the ` secret_exponent ` (a large integer that represents a private key)
101
+ - the ` public_pair ` (a pair of large integers x and y that represent a public key)
94
102
95
103
There are a handful of functions: you can do things like create a signature, verify a signature, generate the public
96
104
pair from the secret exponent, and flush out the public pair from just the x value (there are two possible values
@@ -100,7 +108,7 @@ for y of opposite even/odd parity, so you include a flag indicating which value
100
108
Encoding
101
109
--------
102
110
103
- The ``` pycoin.encoding`` ` module declares some conversion utilities useful when dealing with Bitcoin. Important
111
+ The ` pycoin.encoding ` module declares some conversion utilities useful when dealing with Bitcoin. Important
104
112
structures include:
105
113
106
114
* base58 (the encoding used for Bitcoin addresses)
@@ -116,15 +124,11 @@ Users
116
124
117
125
Here's a partial list of users of pycoin:
118
126
119
- ChangeTip https://changetip.com/
120
-
121
- GreenAddress https://greenaddress.it/
122
-
123
- Coinkite https://coinkite.com/
124
-
125
- Wall of Coins https://wallofcoins.com/
126
-
127
- Blockonomics https://www.blockonomics.co/
127
+ * [ ChangeTip] ( https://changetip.com/ )
128
+ * [ GreenAddress] ( https://greenaddress.it/ )
129
+ * [ Coinkite] ( https://coinkite.com/ )
130
+ * [ Wall of Coins] ( https://wallofcoins.com/ )
131
+ * [ Blockonomics] ( https://www.blockonomics.co/ )
128
132
129
133
Email me at him@richardkiss.com to be added to this list.
130
134
@@ -147,4 +151,4 @@ Want to donate? Feel free. Send to 1KissFDVu2wAYWPRm4UGh5ZCDU9sE9an8T.
147
151
I'm also available for bitcoin consulting... him@richardkiss.com .
148
152
149
153
150
- [BIP0032]: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
154
+ [ BIP0032] ( https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki )
0 commit comments