crypto-com / crypto-com/developer-platform-sdk-examples

[developer-platform-sdk-examples] security: XAPS pre-execution audit before on-chain actions

Offen
#169 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
7
Forks
5
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Context**
`crypto-com/developer-platform-sdk-examples` runs agent-controlled value movement in `wallet/ssowallet/agent/agent_transaction.py`. A lightweight pre-execution audit (~200–300ms) before signing or sending can catch prompt-injection-driven tx mistakes without blocking normal flow.

**Matched code** (`wallet/ssowallet/agent/agent_transaction.py`)
```
return None

def send_transaction(tx_params):
"""
Send a signed transaction to the network.
```

**XAPS** is a pre-execution audit tollbooth for agents: dual-LLM + rules, ~$0.01 per approved audit, returns a portable receipt. Not a walled garden — a guardrail on the open road.

**Suggested integration**

```python
from xaps import XapsClient, XapsRejectedError

receipt = XapsClient(base_url="https://api.xaps.network").audit(
action="execute_smart_contract",
contract_address=TARGET_CONTRACT,
amount=float(AMOUNT),
)
if receipt["audit"]["status"] != "APPROVED":
raise XapsRejectedError(receipt["audit"].get("beta_attack", "REJECTED"), receipt=receipt)
```

**Next steps**
1. Drop the snippet at the hot path (or add MCP `io.github.APMC1/xaps`).
2. Register an agent wallet: `POST https://api.xaps.network/agents/register` ($1 trial).
3. Agent card + MCP install: https://api.xaps.network/.well-known/xaps-agent-card.json
4. Happy to open a PR with the exact insertion point if useful.

— XAPS team (distribution outreach; replies welcome)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne mit wallet/ssowallet/agent/agent_transaction.py, insbesondere mit send_transaction und dem umgebenden Signaturpfad. Bestätige den vorgesehenen Einfügepunkt vor dem Signieren oder Senden und kläre, ob die Python-XAPS-Abhängigkeit oder der MCP-Weg im Umfang enthalten ist; als abgeschlossen gilt die Aufgabe, wenn ein vereinbarter Integrationspunkt und ein Verhalten bei Ablehnung feststehen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
blockchain, security
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.