Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions epyxid/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class XID:
Comment thread
MrGtee1 marked this conversation as resolved.
Outdated
def __init__(self):
self.value = "dummy-xid"

def __str__(self):
return self.value
160 changes: 160 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
annotated-types==0.7.0
Comment thread
MrGtee1 marked this conversation as resolved.
Outdated
anyio==4.9.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==3.0.0
async-lru==2.0.5
attrs==25.3.0
babel==2.17.0
beautifulsoup4==4.13.3
bleach==6.2.0
build==1.2.2.post1
CacheControl==0.14.2
certifi==2025.1.31
cffi==1.17.1
charset-normalizer==3.4.1
cleo==2.1.0
colorama==0.4.6
comm==0.2.2
contourpy==1.3.1
crashtest==0.4.1
cryptography==44.0.2
cycler==0.12.1
debugpy==1.8.13
decorator==5.2.1
defusedxml==0.7.1
distlib==0.3.9
dulwich==0.22.8
executing==2.2.0
fastjsonschema==2.21.1
filelock==3.13.1
findpython==0.6.3
fonttools==4.56.0
fqdn==1.5.1
fsspec==2024.6.1
gitdb==4.0.12
GitPython==3.1.44
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
idna==3.10
installer==0.7.0
ipykernel==6.29.5
ipython==9.0.2
ipython_pygments_lexers==1.1.1
isoduration==20.11.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.1.0
jedi==0.19.2
jeepney==0.9.0
Jinja2==3.1.6
joblib==1.4.2
json5==0.10.0
jsonpatch==1.33
jsonpointer==3.0.0
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jupyter-events==0.12.0
jupyter-lsp==2.2.5
jupyter-server-mathjax==0.2.6
jupyter_client==8.6.3
jupyter_core==5.7.2
jupyter_server==2.15.0
jupyter_server_terminals==0.5.3
jupyterlab==4.3.6
jupyterlab_git==0.51.0
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.3
keyring==25.6.0
kiwisolver==1.4.8
langchain-core==0.3.54
langsmith==0.3.32
MarkupSafe==3.0.2
matplotlib==3.10.1
matplotlib-inline==0.1.7
mistune==3.1.2
more-itertools==10.6.0
mpmath==1.3.0
msgpack==1.1.0
narwhals==1.31.0
nbclient==0.10.2
nbconvert==7.16.6
nbdime==4.0.2
nbformat==5.10.4
nest-asyncio==1.6.0
networkx==3.3
notebook_shim==0.2.4
numpy==2.2.4
orjson==3.10.16
overrides==7.7.0
packaging==24.2
pandas==2.2.3
pandocfilters==1.5.1
parso==0.8.4
pbs-installer==2025.4.9
pexpect==4.9.0
pillow==11.1.0
pkginfo==1.12.1.2
platformdirs==4.3.6
plotly==6.0.1
poetry==2.1.2
poetry-core==2.1.2
prometheus_client==0.21.1
prompt_toolkit==3.0.50
psutil==7.0.0
ptyprocess==0.7.0
pure_eval==0.2.3
pycparser==2.22
pydantic==2.11.3
pydantic_core==2.33.1
Pygments==2.19.1
pyparsing==3.2.1
pyproject_hooks==1.2.0
python-dateutil==2.9.0.post0
python-json-logger==3.3.0
pytz==2025.1
PyYAML==6.0.2
pyzmq==26.3.0
RapidFuzz==3.13.0
referencing==0.36.2
requests==2.32.3
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.23.1
scikit-learn==1.6.1
scipy==1.15.2
seaborn==0.13.2
SecretStorage==3.3.3
Send2Trash==1.8.3
setuptools==76.0.0
shellingham==1.5.4
six==1.17.0
smmap==5.0.2
sniffio==1.3.1
soupsieve==2.6
stack-data==0.6.3
sympy==1.13.1
tenacity==9.1.2
terminado==0.18.1
threadpoolctl==3.6.0
tinycss2==1.4.0
tomlkit==0.13.2
torch==2.6.0+cpu
tornado==6.4.2
traitlets==5.14.3
trove-classifiers==2025.4.11.15
types-python-dateutil==2.9.0.20241206
typing-inspection==0.4.0
typing_extensions==4.12.2
tzdata==2025.1
uri-template==1.3.0
urllib3==2.3.0
virtualenv==20.30.0
wcwidth==0.2.13
webcolors==24.11.1
webencodings==0.5.1
websocket-client==1.8.0
zstandard==0.23.0
4 changes: 4 additions & 0 deletions skills/sybil_checker/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .combined_checker import CombinedSybilChecker

def get_skills(config):
return [CombinedSybilChecker(config)]
5 changes: 5 additions & 0 deletions skills/sybil_checker/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from skills.base import Skill

class SybilCheckerSkill(Skill):
def check_sybil(self, wallet_address: str) -> dict:
raise NotImplementedError("Must implement check_sybil method")
20 changes: 20 additions & 0 deletions skills/sybil_checker/combined_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from .base import SybilCheckerSkill
from .gitcoin_passport_checker import GitcoinPassportChecker
from .proof_of_humanity_checker import ProofOfHumanityChecker

class CombinedSybilChecker(SybilCheckerSkill):
def __init__(self, config):
self.gitcoin_checker = GitcoinPassportChecker(config)
self.poh_checker = ProofOfHumanityChecker(config)

def check_sybil(self, wallet_address: str) -> dict:
gitcoin_result = self.gitcoin_checker.check_sybil(wallet_address)
poh_result = self.poh_checker.check_sybil(wallet_address)

return {
"wallet": wallet_address,
"results": [
gitcoin_result,
poh_result
]
}
22 changes: 22 additions & 0 deletions skills/sybil_checker/gitcoin_passport_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import requests
from .base import SybilCheckerSkill

class GitcoinPassportChecker(SybilCheckerSkill):
def __init__(self, config):
self.api_key = config.get("api_key")
self.base_url = "https://api.scorer.gitcoin.co"

def check_sybil(self, wallet_address: str) -> dict:
headers = {"Authorization": f"Bearer {self.api_key}"}
url = f"{self.base_url}/v1/score/{wallet_address}"
response = requests.get(url, headers=headers)
if response.status_code == 200:
return {
"source": "Gitcoin Passport",
"result": response.json()
}
else:
return {
"source": "Gitcoin Passport",
"error": f"Failed with status {response.status_code}"
}
44 changes: 44 additions & 0 deletions skills/sybil_checker/proof_of_humanity_checker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import requests
from .base import SybilCheckerSkill

class ProofOfHumanityChecker(SybilCheckerSkill):
def __init__(self, config):
self.subgraph_url = "https://api.thegraph.com/subgraphs/name/kleros/proof-of-humanity"

def check_sybil(self, wallet_address: str) -> dict:
query = {
"query": """
query ($id: ID!) {
submission(id: $id) {
id
registered
submissionTime
name
}
}
""",
"variables": {
"id": wallet_address.lower()
}
}

response = requests.post(self.subgraph_url, json=query)
data = response.json()

submission = data.get("data", {}).get("submission")
if submission and submission.get("registered"):
return {
"source": "Proof of Humanity",
"result": {
"status": "verified",
"details": submission
}
}
else:
return {
"source": "Proof of Humanity",
"result": {
"status": "not_verified",
"details": None
}
}
11 changes: 11 additions & 0 deletions skills/sybil_checker/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "object",
"properties": {
"api_key": {
Comment thread
MrGtee1 marked this conversation as resolved.
Outdated
"type": "string",
"description": "Gitcoin Passport API key"
}
},
"required": ["api_key"]
}

9 changes: 9 additions & 0 deletions test_sybil.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from skills.sybil_checker.combined_checker import CombinedSybilChecker
Comment thread
MrGtee1 marked this conversation as resolved.
Outdated

config = {
"api_key": "JJ3ZuaRt.myiyKaSSySNw74J1myDlU4M2KabnPlaa"
}

checker = CombinedSybilChecker(config)
result = checker.check_sybil("0x4c98bF5ADC39E12f81c214cC3A32Ef24F9CAbeB3") # Replace with any wallet
print(result)