def register_new_account(private_key):
    data = {}
    data['pub_key'] = private_key.publickey().exportKey()

    def get_success_from_body(body):
        r = json.loads(body)
        if not 'success' in r or r['success'] is False:
            return False
        return True

    d = get_body_from_request('/register/', data)

    d.addCallback(get_success_from_body)
    return d
dataset/ETHPy150Open lbryio/lbry/lbrynet/pointtraderclient/pointtraderclient.py/register_new_account/original