# Path: bitcoinpy/lib/coredefs.py
# COIN = 100000000
# 
# Path: bitcoinpy/lib/base58.py
# class CBitcoinAddress(CBase58Data):
#     PUBKEY_ADDRESS = 0
#     SCRIPT_ADDRESS = 5
#     PUBKEY_ADDRESS_TEST = 111
#     SCRIPT_ADDRESS_TEST = 196


    import http.client as httplib
    import httplib
import base64
import decimal
import json
import os
import platform
    import urllib.parse as urlparse
    import urlparse
from bitcoinpy.lib.coredefs import COIN
from bitcoinpy.lib.base58 import CBitcoinAddress
        ~/.bitcoin/bitcoin.conf or equivalent is used by default.

        Usually no arguments to Proxy() are needed; the local bitcoind will be
        used.

        timeout - timeout in seconds before the HTTP interface times out
        """
        super(Proxy, self).__init__(service_url=service_url, service_port=service_port, btc_conf_file=btc_conf_file,
                                    timeout=HTTP_TIMEOUT,
                                    **kwargs)

    def getinfo(self):
        """Returns an object containing various state info"""
        r = self._call('getinfo')
        r['balance'] = int(r['balance'] * COIN)
        r['paytxfee'] = int(r['paytxfee'] * COIN)
        return r

    def getnewaddress(self, account=None):
        """Return a new Bitcoin address for receiving payments.

        If account is not None, it is added to the address book so payments
        received with the address will be credited to account.
        """
        r = None
        if account is not None:
            r = self._call('getnewaddress', account)
        else:
            r = self._call('getnewaddress')


# Path: bitcoinpy/lib/coredefs.py
# COIN = 100000000
# 
# Path: bitcoinpy/lib/base58.py
# class CBitcoinAddress(CBase58Data):
#     PUBKEY_ADDRESS = 0
#     SCRIPT_ADDRESS = 5
#     PUBKEY_ADDRESS_TEST = 111
#     SCRIPT_ADDRESS_TEST = 196


# Path: bitcoinpy/lib/rpc.py
    import http.client as httplib
    import httplib
import base64
import decimal
import json
import os
import platform
    import urllib.parse as urlparse
    import urlparse
from bitcoinpy.lib.coredefs import COIN
from bitcoinpy.lib.base58 import CBitcoinAddress

        ~/.bitcoin/bitcoin.conf or equivalent is used by default.

        Usually no arguments to Proxy() are needed; the local bitcoind will be
        used.

        timeout - timeout in seconds before the HTTP interface times out
        """
        super(Proxy, self).__init__(service_url=service_url, service_port=service_port, btc_conf_file=btc_conf_file,
                                    timeout=HTTP_TIMEOUT,
                                    **kwargs)

    def getinfo(self):
        """Returns an object containing various state info"""
        r = self._call('getinfo')
        r['balance'] = int(r['balance'] * COIN)
        r['paytxfee'] = int(r['paytxfee'] * COIN)
        return r

    def getnewaddress(self, account=None):
        """Return a new Bitcoin address for receiving payments.

        If account is not None, it is added to the address book so payments
        received with the address will be credited to account.
        """
        r = None
        if account is not None:
            r = self._call('getnewaddress', account)
        else:
            r = self._call('getnewaddress')


        return CBitcoinAddress.from_str(r)