This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # patched from https://bitcoin.stackexchange.com/questions/56923/is-this-how-to-generate-a-bitcoin-address-with-python | |
| # https://en.bitcoin.it/wiki/Protocol_documentation#Addresses | |
| # Adapted to litecoin, following https://bitcoin.stackexchange.com/questions/65282/how-is-a-litecoin-address-generated | |
| import hashlib | |
| import base58 | |
| # ECDSA bitcoin Public Key | |
| pubkey = '0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Implementation of "Pay to Witness Public Key Hash nested in BIP16 Pay to Script Hash" (P2WPKH-P2SH) address generation. | |
| Described in BIP 141 (SegWit) https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#P2WPKH_nested_in_BIP16_P2SH | |
| I.e.: Public key -> SegWit address | |
| """ | |
| import hashlib | |
| from hashlib import sha256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # https://en.bitcoin.it/wiki/Protocol_documentation#Addresses | |
| import hashlib | |
| import base58 | |
| # ECDSA bitcoin Public Key | |
| pubkey = '0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6' | |
| # See 'compressed form' at https://en.bitcoin.it/wiki/Protocol_documentation#Signatures | |
| compress_pubkey = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script to generate a new block every minute | |
| # Put this script at the root of your unpacked folder | |
| #!/bin/bash | |
| echo "Generating a block every minute. Press [CTRL+C] to stop.." | |
| address=`./bin/bitcoin-cli getnewaddress` | |
| while : | |
| do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # I hate the documentation of openpyxl and it took me a while to undertand their stuff. So I decided to write down this code. | |
| # Has some wrapper functions that reads all rows from the excel sheet and also a function to read a particular row. | |
| # Add some code to the functions if you wish to do something on fly like adding values to list and sorting them later. | |
| # | |
| # Date: 28/09/2015 | |
| from openpyxl import load_workbook | |
| # Reads all rows |
OlderNewer