start of refactor to objects

This commit is contained in:
2026-04-24 07:29:26 +00:00
parent ea46b173fa
commit afa2d1fd79
11 changed files with 1003 additions and 6884 deletions

View File

@@ -17,7 +17,7 @@ private_key = os.getenv("ASTER_API_PRIVATE_KEY")
_last_ms = 0
_i = 0
def post_authenticated_url(req: dict) -> dict:
async def post_authenticated_url(req: dict) -> dict:
typed_data = {
"types": {
"EIP712Domain": [
@@ -71,7 +71,7 @@ def post_authenticated_url(req: dict) -> dict:
)
return Account.sign_message(message, private_key=private_key)
def send_by_url(req):
async def send_by_url(req):
my_dict = req['params'].copy()
url = host + req['url']
method = req['method']
@@ -105,4 +105,4 @@ def post_authenticated_url(req: dict) -> dict:
# print(res.status_code, res.text)
return res.json()
return send_by_url(req=req)
return await send_by_url(req=req)