mirror of
https://github.com/jwinterm/lightWallet.git
synced 2026-10-17 05:11:25 +02:00
29 lines
638 B
Python
29 lines
638 B
Python
import requests
|
|
import json
|
|
import time
|
|
|
|
serverURL = 'http://localhost:19091/json_rpc'
|
|
|
|
headers = {'content-type': 'application/json'}
|
|
|
|
payload = json.dumps({
|
|
"jsonrpc": "2.0",
|
|
"method": "incoming_transfers",
|
|
"params": {"transfer_type": "all"}
|
|
})
|
|
|
|
|
|
def getTransfers():
|
|
resp = requests.get(serverURL, headers=headers, data=payload)
|
|
try:
|
|
output = json.loads(resp.text)
|
|
# print output
|
|
except:
|
|
# print "Waiting for bitmonerod client to sync with network..."
|
|
output = "Waiting for bitmonerod client to sync with network..."
|
|
|
|
print output
|
|
|
|
|
|
if __name__ == '__main__':
|
|
getTransfers() |