dev@locazia: add ton contracts
This commit is contained in:
1 parent
92eeb4e873
commit
bf12866b8c
11 files changed
+158
-4
No files matched your search
+3
-2
@@ -13,7 +13,7 @@ app.register_middleware(close_db_session, "response")
|
||||
from app.api.routes._index import s_index
|
||||
from app.api.routes._system import s_api_system, s_api_system_version
|
||||
from app.api.routes.auth import s_api_v1_auth_twa
|
||||
from app.api.routes.tonconnect import s_api_tonconnect_manifest
|
||||
from app.api.routes.statics import s_api_tonconnect_manifest, s_api_platform_metadata
|
||||
from app.api.routes.node_storage import s_api_v1_storage_post, s_api_v1_storage_get
|
||||
from app.api.routes.account import s_api_v1_account_get
|
||||
from app.api.routes._blockchain import s_api_v1_blockchain_send_new_content_message, \
|
||||
@@ -24,7 +24,8 @@ app.add_route(s_index, "/")
|
||||
app.add_route(s_api_system, "/api/node", methods=["GET", "OPTIONS"])
|
||||
app.add_route(s_api_system_version, "/api/system.version", methods=["GET", "OPTIONS"])
|
||||
|
||||
app.add_route(s_api_tonconnect_manifest, "/api/tonconnect-manifest.json")
|
||||
app.add_route(s_api_tonconnect_manifest, "/api/tonconnect-manifest.json", methods=["GET", "OPTIONS"])
|
||||
app.add_route(s_api_platform_metadata, "/api/platform-metadata.json", methods=["GET", "OPTIONS"])
|
||||
|
||||
app.add_route(s_api_v1_auth_twa, "/api/v1/auth.twa", methods=["POST", "OPTIONS"])
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from sanic import response
|
||||
from base58 import b58encode
|
||||
from app.core._secrets import hot_pubkey, service_wallet
|
||||
from app.core._blockchain.ton.platform import platform
|
||||
import subprocess
|
||||
import docker
|
||||
from pprint import pprint
|
||||
|
||||
|
||||
def get_git_info():
|
||||
@@ -11,9 +14,15 @@ def get_git_info():
|
||||
|
||||
|
||||
async def s_api_system(request):
|
||||
client = docker.from_env()
|
||||
containers = client.containers.list(all=True)
|
||||
pprint(containers)
|
||||
|
||||
return response.json({
|
||||
'id': b58encode(hot_pubkey).decode(),
|
||||
'ton_address': service_wallet.address.to_string(1, 1, 1)
|
||||
'master_address': platform.address.to_string(1, 1, 1),
|
||||
'node_address': service_wallet.address.to_string(1, 1, 1),
|
||||
'indexer_height': 0,
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -9,3 +9,10 @@ async def s_api_tonconnect_manifest(request):
|
||||
"name": f"{PROJECT_HOST}", # TODO: maybe edit
|
||||
"iconUrl": "https://github.com/projscale/assets/blob/main/ton-connect.png?raw=true",
|
||||
})
|
||||
|
||||
|
||||
async def s_api_platform_metadata(request):
|
||||
return response.json({
|
||||
"name": "@MY",
|
||||
"image": "https://git.projscale.dev/my-dev/assets/raw/commit/81de5356c6b1d6f01988d77e22c580114b32bcbd/images/logo.jpg"
|
||||
})
|
||||
Reference in new issue
Block a user