You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

9 lines
322 B

# parameter #1: password c to unlock wallet
import base64, codecs, json, requests, sys
url = 'https://localhost:8080/v1/unlockwallet'
cert_path = '/mnt/hdd/lnd/tls.cert'
data = {
'wallet_password': base64.b64encode(sys.argv[1]).decode()
}
r = requests.post(url, verify=cert_path, data=json.dumps(data))
print(r.json())