feat: Update readme to have docker
All checks were successful
Build Docker / Build Image (push) Successful in 31s
All checks were successful
Build Docker / Build Image (push) Successful in 31s
This commit is contained in:
parent
200e2318d3
commit
2076cb6d0c
@ -22,3 +22,12 @@ python3 main.py
|
||||
```
|
||||
|
||||
Then access the wallet at http://localhost:5000
|
||||
|
||||
|
||||
Also available as a docker image:
|
||||
|
||||
To run using a HSD running directly on the host:
|
||||
|
||||
```bash
|
||||
sudo docker run --network=host -e HSD_API_KEY=yourapikeyhere git.woodburn.au/nathanwoodburn/firewallet:latest
|
||||
```
|
11
account.py
11
account.py
@ -11,8 +11,9 @@ import json
|
||||
dotenv.load_dotenv()
|
||||
|
||||
APIKEY = os.getenv("hsd_api")
|
||||
hsd = api.hsd(APIKEY)
|
||||
hsw = api.hsw(APIKEY)
|
||||
hsd = api.hsd(APIKEY,'localhost')
|
||||
hsw = api.hsw(APIKEY,'localhost')
|
||||
|
||||
|
||||
# Verify the connection
|
||||
response = hsd.getInfo()
|
||||
@ -135,7 +136,7 @@ def getDomains(account):
|
||||
# return []
|
||||
|
||||
# use requests to get the domains
|
||||
response = requests.get(f"http://x:{APIKEY}@127.0.0.1:12039/wallet/{account}/name?own=true")
|
||||
response = requests.get(f"http://x:{APIKEY}@localhost:12039/wallet/{account}/name?own=true")
|
||||
info = response.json()
|
||||
return info
|
||||
|
||||
@ -158,7 +159,7 @@ def check_address(address: str, allow_name: bool = True, return_address: bool =
|
||||
return check_hip2(address[1:])
|
||||
|
||||
# Check if the address is a valid HNS address
|
||||
response = requests.post(f"http://x:{APIKEY}@127.0.0.1:12037",json={
|
||||
response = requests.post(f"http://x:{APIKEY}@localhost:12037",json={
|
||||
"method": "validateaddress",
|
||||
"params": [address]
|
||||
}).json()
|
||||
@ -211,7 +212,7 @@ def send(account,address,amount):
|
||||
|
||||
response = hsw.rpc_walletPassphrase(password,10)
|
||||
# Unlock the account
|
||||
# response = requests.post(f"http://x:{APIKEY}@127.0.0.1:12039/wallet/{account_name}/unlock",
|
||||
# response = requests.post(f"http://x:{APIKEY}@localhost:12039/wallet/{account_name}/unlock",
|
||||
# json={"passphrase": password,"timeout": 10})
|
||||
if response['error'] is not None:
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user