-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlukso_utils.py
More file actions
30 lines (22 loc) · 748 Bytes
/
lukso_utils.py
File metadata and controls
30 lines (22 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
base_api = "http://localhost:3000"
import requests
import json
def check_signature(signature, address) -> bool:
url = base_api + "/is_signature_valid"
payload = json.dumps({
"signature": signature,
"address": address
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
return response.json().get('is_valid', False)
def get_sign_message(address):
url = base_api + "/get_message?up=" + address
response = requests.request("GET", url)
return response.json()
def get_user_profile(address):
url = base_api + "/fetch_up?up=" + address
response = requests.request("GET", url)
return response.json()