Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import requests, json
  2.  
  3. rpcPort = 8332
  4. rpcUser = 'basiliq'
  5. rpcPassword = 'Pine@pplePizza'
  6.  
  7. #Accessing the RPC local server
  8. serverURL = 'http://' + rpcUser + ':' + rpcPassword + '@localhost:' + str(rpcPort)
  9.  
  10. headers = {'content-type': 'application/json'}
  11. payload = json.dumps({"method": 'listunspent', "params": [0, 999999, ['1KuWLoZuoJgz3N6sLoAwGth9XGm8YuFTGt']], "jsonrpc": "2.0"})
  12. response = requests.post(serverURL, headers=headers, data=payload)
  13. print(response.text)
  14.  
  15. {"result":[],"error":null,"id":null}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement