Python library add Feathercoin
-
Python library with tools for Feathercoin.
- pycoin library https://github.com/richardkiss/pycoin
add FTC in pycoin/networks.py
# FTC feathercoin mainnet : xprv/xpub NetworkValues("Feathercoin", "mainnet", "FTC", b'\x8e', b'\x0e', b'\x60', h2b('0488ADE4'), h2b('0488B21E')), # FTC feathercoin testnet : tprv/tpub NetworkValues("Feathercoin", "testnet", "FTX", b'\xC1', b'\x41', b'\xc4', h2b('04358394'), h2b('043587CF')),
- pybitcoin library https://github.com/namesystem/pybitcoin
add FTC in coinkit/privatekey.py and publickey.py
class FeathercoinPrivateKey(BitcoinPrivateKey): _pubkeyhash_version_byte = 14 class FeatherPublicKey(BitcoinPublicKey): _version_byte = 14
How to use it ?
The command line utility “kuâ€
The most basic form of a Feathercoin private key is simply an integer between 1 and 115792089237316195423570985008687907852837564279074904382605163141518161494336 ≅ 1.15e77 (inclusive). That’s it! This integer is a “secret exponentâ€, because generating the public key involves exponentiation, and there is no known way to go from the public key to the secret exponent.
Let’s take a look at the very first private key, also known as “1â€.
# ku -nFTC 1 input : 1 network : Feathercoin mainnet netcode : FTC secret exponent : 1 hex : 1 wif : N1LYBvAjrq6XNUt5Xm3p3iSALhXdYRWE7jTWTWCSix24zWLX171A uncompressed : 5m2i3vjY1R3A9VX9jK8tSY8y3CSyJzfLjm4HeGgJA3x55XPW27r public pair x : 55066263022277343669578718895168534326250603453777594175500187360389116729240 public pair y : 32670510020758816978083085130507043184471273380659243275938904335757337482424 x as hex : 79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 y as hex : 483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 y parity : even key pair as sec : 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 uncompressed : 0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\ 483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 hash160 : 751e76e8199196d454941c45d1b3a323f1433bd6 uncompressed : 91b24bf9f5288532960ac687abb035127b1d28a5 Feathercoin address : 6pQiLg4eJbM2bP9CZemnccDzwB3kz2Ae1x uncompressed : 6s1pMca6FWXBNSCAfvoaYys4Xp8uzhD6rR
http://blog.richardkiss.com/?p=371
https://github.com/richardkiss/pycoin/blob/master/COMMAND-LINE-TOOLS.md
-
more study from Keys, Addresses, Wallets on http://chimera.labs.oreilly.com/books/1234000001802/ch04.html
-
Good find Lizhi, Python is language for masses.
-
Cheers Lizhi, I’ve been trying to learn a bit of python