#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . import re import sys, os, time import optparse try: import ecdsa except ImportError: sys.exit("Error: python-ecdsa does not seem to be installed. Try 'sudo pip install ecdsa'") try: import aes except ImportError: sys.exit("Error: AES does not seem to be installed. Try 'sudo pip install slowaes'") try: from lib import * except ImportError: from electrum import * from decimal import Decimal known_commands = { 'help':'Prints this help', 'validateaddress':'Check that the address is valid', 'balance': "Display the balance of your wallet or of an address.\nSyntax: balance [
]", 'contacts': "Show your list of contacts", 'create':'Create a wallet', 'restore':'Restore a wallet', 'payto':"""Create and broadcast a transaction. Syntax: payto [label] can be a bitcoin address or a label options:\n --fee, -f: set transaction fee\n --fromaddr, -s: send from address -\n --changeaddr, -c: send change to address """, 'sendtx': 'Broadcasts a transaction to the network. \nSyntax: sendtx \n must be in hexadecimal.', 'password': "Changes your password", 'addresses': """Shows your list of addresses. options: -a: show all addresses, including change addresses -k: show private keys -b: show the balance of addresses""", 'history':"Shows the transaction history", 'label':'Assign a label to an item\nSyntax: label