Skip to content

Commit 6b2299d

Browse files
Validator decentralized backend
0 parents  commit 6b2299d

File tree

80 files changed

+8496
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+8496
-0
lines changed

.env.example

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
SUPABASE_SERVICE_ROLE_KEY=
2+
SUPABASE_URL=
3+
SUPABASE_JWT_SECRET=
4+
SUPABASE_JWT_ISSUER=
5+
ASYNC_DB_URL=
6+
ADMIN_KEY=
7+
ADMIN_HASHKEY=
8+
9+
# env vars for proxy creation and management
10+
LIVE_WALLET_PATH=
11+
LIVE_MNEMONIC_FILEPATH=
12+
LIVE_ARCHIVE_WALLET_PATH=
13+
LIVE_ARCHIVE_MNEMONIC_FILEPATH=
14+
15+
# 64 byte password decrypting the coldkey files
16+
LIVE_WALLET_PASSWORD=

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Graphite-Subnet
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# yield_server
2+
Boilerplate for implementing the authentication services for the yield problem

requirements.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
fastapi>=0.110.1
2+
uvicorn>=0.22.0
3+
pydantic>=2.8.2
4+
SQLAlchemy==2.0.36
5+
python-dotenv==1.0.1
6+
supabase==2.15.0
7+
PyJWT==2.10.1
8+
greenlet==3.1.1
9+
names-generator==0.2.0
10+
shortuuid==1.0.13
11+
substrate-interface==1.7.11
12+
async-substrate-interface==1.2.1
13+

setup.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
import re
2+
import os
3+
import codecs
4+
import pathlib
5+
from os import path
6+
from io import open
7+
from setuptools import setup, find_packages
8+
from pkg_resources import parse_requirements
9+
10+
11+
def read_requirements(path):
12+
with open(path, "r") as f:
13+
requirements = f.read().splitlines()
14+
processed_requirements = []
15+
16+
for req in requirements:
17+
# For git or other VCS links
18+
if req.startswith("git+") or "@" in req:
19+
pkg_name = re.search(r"(#egg=)([\w\-_]+)", req)
20+
if pkg_name:
21+
processed_requirements.append(pkg_name.group(2))
22+
else:
23+
# You may decide to raise an exception here,
24+
# if you want to ensure every VCS link has an #egg=<package_name> at the end
25+
continue
26+
else:
27+
processed_requirements.append(req)
28+
return processed_requirements
29+
30+
31+
requirements = read_requirements("requirements.txt")
32+
here = path.abspath(path.dirname(__file__))
33+
34+
with open(path.join(here, "README.md"), encoding="utf-8") as f:
35+
long_description = f.read()
36+
37+
# loading version from setup.py
38+
with codecs.open(
39+
os.path.join(here, "yield_server/__init__.py"), encoding="utf-8"
40+
) as init_file:
41+
version_match = re.search(
42+
r"^__version__ = ['\"]([^'\"]*)['\"]", init_file.read(), re.M
43+
)
44+
version_string = version_match.group(1)
45+
46+
setup(
47+
name="yield-server",
48+
version=version_string,
49+
description="Graphite Subnet Yield Problem Server",
50+
long_description=long_description,
51+
long_description_content_type="text/markdown",
52+
url="https://github.com/GraphiteAI/yield-server/",
53+
author="Graphite Team;",
54+
packages=find_packages(),
55+
include_package_data=True,
56+
author_email="team@graphite-ai.net",
57+
license="MIT",
58+
python_requires=">=3.10",
59+
install_requires=requirements,
60+
classifiers=[
61+
"Development Status :: 3 - Alpha",
62+
"Intended Audience :: Developers",
63+
"Topic :: Software Development :: Build Tools",
64+
"License :: OSI Approved :: MIT License",
65+
"Programming Language :: Python :: 3 :: Only",
66+
"Programming Language :: Python :: 3.10",
67+
"Topic :: Scientific/Engineering",
68+
"Topic :: Scientific/Engineering :: Mathematics",
69+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
70+
"Topic :: Software Development",
71+
"Topic :: Software Development :: Libraries",
72+
"Topic :: Software Development :: Libraries :: Python Modules",
73+
],
74+
)

yield_server/__init__.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
__version__ = "0.0.0"
2+
3+
version_split = __version__.split(".")
4+
__spec_version__ = (
5+
(1000 * int(version_split[0]))
6+
+ (10 * int(version_split[1]))
7+
+ (1 * int(version_split[2]))
8+
)
9+
10+
# Import all submodules.
11+
from . import backend
12+
from . import endpoints
13+
from . import utils
14+
from . import middleware
15+
from . import core
16+
from . import errors
17+
from . import config
18+
from . import utils

yield_server/backend/__init__.py

Whitespace-only changes.

yield_server/backend/crud/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)