Module Import alias alias alias alias alias Import alias alias Import alias Import alias ImportFrom alias alias alias alias alias Expr Call NameLoad NameLoad Import alias Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Dict Assign NameStore Num FunctionDef arguments args NameParam defaults body Global identifier Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Print Str NameLoad decorator_list FunctionDef arguments args defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Num For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Continue If CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Continue For NameStore AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameLoad If CompareEq NameLoad NameLoad body AugAssignAdd NameStore NameLoad Assign NameStore BinOpDiv NameLoad Num Print BinOpMod Str NameLoad NameLoad NameLoad If CompareGtE NameLoad NameLoad body Print Str NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad Str NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Global identifier If CompareNotEq NameLoad NameLoad body Return Str Assign NameStore NameLoad Return Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Global identifier If CompareNotEq NameLoad NameLoad body Return Str TryExcept body Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr TupleLoad Str TupleLoad NameLoad NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Import alias Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad TryExcept body If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Str handlers ExceptHandler type AttributeLoad NameLoad attr body Print Str Return Num Print NameLoad Return Num decorator_list If CompareEq NameLoad Str body If CompareGt Call NameLoad AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Slice Num ListLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad Assign NameStore Call NameLoad Dict Str NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Lambda arguments args defaults NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad While UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameLoad If CompareIn NameLoad NameLoad body Continue orelse With AttributeLoad NameLoad attr body Print BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index NameLoad Dict Str Str Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad Assign AttributeStore NameLoad attr NameLoad TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Num handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore Str If CompareEq NameLoad Str body Assign NameStore NameLoad Print Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad orelse If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore BinOpAdd Str BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Print NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Dict Str Str Assign NameStore Dict Str Str Str NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Print Str NameLoad ExceptHandler type NameLoad name NameStore body Print NameLoad Print Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Print Str
N/A N/A time thread sys socket os N/A urllib2 json N/A Queue N/A sqlite3 electrum Wallet WalletStorage SimpleConfig Network set_verbosity N/A N/A set_verbosity False N/A ConfigParser N/A config N/A N/A ConfigParser ConfigParser N/A N/A N/A config read merchant.conf N/A my_password N/A N/A config get main password N/A my_host N/A N/A config get main host N/A my_port N/A N/A config getint main port N/A database N/A N/A config get sqlite3 database N/A received_url N/A N/A config get callback received N/A expired_url N/A N/A config get callback expired N/A cb_password N/A N/A config get callback password N/A wallet_path N/A N/A config get electrum wallet_path N/A master_public_key N/A N/A config get electrum mpk N/A master_chain N/A N/A config get electrum chain N/A pending_requests N/A N/A num 0 check_create_table N/A N/A conn N/A N/A N/A num N/A c N/A N/A conn cursor N/A N/A N/A c execute SELECT name FROM sqlite_master WHERE type='table' AND name='electrum_payments'; N/A data N/A N/A c fetchall N/A N/A data N/A N/A N/A N/A c execute CREATE TABLE electrum_payments (address VARCHAR(40), amount FLOAT, confirmations INT(8), received_at TIMESTAMP, expires_at TIMESTAMP, paid INT(1), processed INT(1)); N/A N/A N/A conn commit N/A N/A N/A c execute SELECT Count(address) FROM 'electrum_payments' N/A num N/A N/A N/A c fetchone N/A 0 N/A num rows num N/A on_wallet_update N/A N/A N/A N/A N/A N/A addr v N/A N/A pending_requests items N/A N/A h N/A N/A N/A wallet history get addr N/A N/A requested_amount N/A N/A v get requested N/A requested_confs N/A N/A v get confirmations N/A value 0 N/A N/A tx_hash tx_height h N/A N/A tx N/A N/A N/A wallet transactions get tx_hash N/A N/A tx N/A N/A N/A N/A N/A N/A N/A wallet verifier get_confirmations tx_hash requested_confs N/A N/A N/A o N/A tx outputs N/A N/A N/A o_address o_value o N/A N/A o_address addr N/A N/A value o_value N/A s N/A value 100000000.0 N/A N/A balance for %s: addr s requested_amount N/A N/A s requested_amount N/A N/A payment accepted addr N/A N/A N/A out_queue put N/A payment addr N/A N/A stopping False do_stop N/A N/A password N/A N/A N/A stopping N/A N/A password my_password N/A N/A wrong password N/A stopping True N/A ok N/A process_request N/A N/A amount confirmations expires_in password N/A N/A N/A num N/A N/A password my_password N/A N/A wrong password N/A N/A N/A amount N/A float amount N/A confirmations N/A int confirmations N/A expires_in N/A float expires_in N/A N/A N/A Exception N/A N/A incorrect parameters N/A account N/A N/A wallet accounts N/A m/0'/0 N/A addr N/A N/A account get_address 0 num N/A num 1 N/A N/A N/A out_queue put N/A request N/A addr amount confirmations expires_in N/A addr N/A server_thread N/A N/A conn N/A N/A jsonrpclib.SimpleJSONRPCServer SimpleJSONRPCServer N/A server N/A SimpleJSONRPCServer N/A my_host my_port N/A N/A N/A server register_function process_request request N/A N/A N/A server register_function do_stop stop N/A N/A N/A server serve_forever N/A send_command N/A N/A cmd params N/A N/A N/A jsonrpclib N/A server N/A N/A jsonrpclib Server N/A http://%s:%d N/A my_host my_port N/A N/A N/A N/A cmd request N/A N/A out N/A N/A server request params N/A N/A N/A cmd stop N/A N/A out N/A N/A server stop params N/A N/A out unknown command N/A N/A N/A N/A socket error N/A N/A Server not running N/A 1 N/A out N/A 0 N/A N/A N/A __name__ __main__ N/A N/A N/A N/A len N/A sys argv 1 N/A N/A cmd N/A N/A sys argv N/A 1 N/A params N/A N/A N/A sys argv N/A 2 N/A my_password N/A ret N/A send_command cmd params N/A N/A N/A sys exit ret N/A conn N/A N/A sqlite3 connect database N/A N/A check_create_table conn N/A config N/A SimpleConfig N/A wallet_path wallet_path N/A network N/A Network config N/A N/A N/A network start wait True N/A storage N/A WalletStorage config N/A wallet N/A Wallet storage N/A N/A N/A storage file_exists N/A N/A N/A wallet seed N/A N/A N/A wallet create_watching_only_wallet master_chain master_public_key N/A N/A wallet synchronize N/A N/A N/A N/A None N/A N/A N/A wallet start_threads network N/A N/A N/A network register_callback updated on_wallet_update N/A out_queue N/A N/A Queue Queue N/A N/A N/A thread start_new_thread server_thread N/A conn N/A N/A stopping N/A N/A cur N/A N/A conn cursor N/A N/A N/A cur execute SELECT address, amount, confirmations FROM electrum_payments WHERE paid IS NULL; N/A data N/A N/A cur fetchall N/A item data N/A N/A N/A addr amount confirmations item N/A N/A addr pending_requests N/A N/A N/A N/A N/A wallet lock N/A N/A N/A subscribing to %s addr N/A N/A pending_requests N/A addr N/A requested confirmations N/A float amount N/A int confirmations N/A N/A N/A N/A wallet synchronizer subscribe_to_addresses N/A addr N/A N/A wallet up_to_date False N/A N/A N/A N/A cmd params N/A N/A out_queue get True 10 N/A N/A N/A N/A Queue Empty N/A N/A cmd N/A N/A cmd payment N/A N/A addr params N/A received payment from addr N/A N/A N/A cur execute N/A update electrum_payments set paid=1 where address='%s' addr N/A N/A N/A cmd request N/A N/A N/A addr amount confs minutes params N/A sql N/A INSERT INTO electrum_payments (address, amount, confirmations, received_at, expires_at, paid, processed) N/A  VALUES ('%s', %f, %d, datetime('now'), datetime('now', '+%d Minutes'), NULL, NULL); N/A addr amount confs minutes N/A sql N/A N/A N/A cur execute sql N/A N/A N/A cur execute UPDATE electrum_payments set paid=0 WHERE expires_at < CURRENT_TIMESTAMP and paid is NULL; N/A N/A N/A cur execute SELECT address, paid from electrum_payments WHERE paid is not NULL and processed is NULL; N/A data N/A N/A cur fetchall N/A item data N/A N/A N/A address paid item N/A paid N/A bool paid N/A headers N/A content-type application/json N/A data_json N/A address password paid address cb_password paid N/A data_json N/A N/A json dumps data_json N/A url N/A paid received_url expired_url N/A req N/A N/A urllib2 Request url data_json headers N/A N/A N/A response_stream N/A N/A urllib2 urlopen req N/A N/A N/A cur execute N/A UPDATE electrum_payments SET processed=1 WHERE id=%d; id N/A N/A N/A N/A urllib2 HTTPError N/A N/A cannot do callback data_json N/A N/A ValueError N/A e N/A N/A e N/A cannot do callback data_json N/A N/A N/A conn commit N/A N/A N/A conn close N/A Done