merge: chore/cleanup-remove-bloat-and-secrets into main
This commit is contained in:
commit
bde2f3a97d
1173 changed files with 437609 additions and 0 deletions
31
app/domain/labels/sources/mbal.py
Normal file
31
app/domain/labels/sources/mbal.py
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
"""
|
||||
MBAL query adapter for the federated label API.
|
||||
|
||||
Implements the MBAL source API for the federated label system.
|
||||
|
||||
Usage (called by federated.py):
|
||||
labels = await query_mbal("0x...", "ethereum")
|
||||
|
||||
Pattern: async function that returns list[Label]
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from app.domain.labels.models import Label
|
||||
from app.domain.labels.sources.mbal_source import get_mbalsy_service
|
||||
|
||||
|
||||
async def query_mbal(address: str, chain: str) -> List[Label]:
|
||||
"""
|
||||
Query MBAL for labels for an address.
|
||||
|
||||
Args:
|
||||
address: The wallet address to look up
|
||||
chain: The blockchain network (ethereum, bitcoin, etc.)
|
||||
|
||||
Returns:
|
||||
List of labels from MBAL
|
||||
"""
|
||||
# Get or initialize the MBAL service
|
||||
service = get_mbalsy_service()
|
||||
return await service.get_labels(address, chain)
|
||||
Loading…
Add table
Add a link
Reference in a new issue