Skip to content

Trustless Work integration: escrow_completed events on testnet #17

Description

@Cbiux

Summary

Pilot Trustless Work → ZCore integration on testnet: report escrow_completed events when an escrow releases funds, with on-chain tx verification.

ZCore already accepts partner events via POST /api/events/report (#6/#7 anti-Sybil, webhooks #37, dry-run #55, @zcore/lender-sdk #48).


Scope (v1)

  1. Register platform trustless-work via /admin or POST /api/platforms/register
  2. Script or service that detects TW escrow completion and calls ZCore
  3. Integration doc with copy-paste examples

Not in v1: TW outbound webhooks (they don't offer them) — use script/indexer approach.


ZCore event payload

curl -X POST https://zcore-api.vercel.app/api/events/report \
  -H "Content-Type: application/json" \
  -d '{
    "apiKey": "<platform_key>",
    "eventType": "escrow_completed",
    "walletAddress": "G<SERVICE_PROVIDER>",
    "amount": 250,
    "currency": "USDC",
    "txHash": "<stellar_tx_hash>",
    "timestamp": "2026-06-20T12:00:00.000Z"
  }'

Dry-run first: add ?dryRun=true or header X-ZCore-Dry-Run: true.

Score impact: see EVENT_WEIGHTS.escrow_completed in Server/src/constants/scoring.constants.ts.


Deliverables

Path Action
Docs/integrations/trustless-work.md Create — API mapping, testnet IDs, example script
scripts/integrations/trustless-work-report.ts Optional — poll TW API or accept manual txHash
Server/src/services/stellar.service.ts Reuse verifyTransaction (no changes expected)

Acceptance criteria


References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSPart of the GrantFox OSS programMaybe RewardedThis issue may receive a reward or bountyOfficial CampaignPart of an official ZCore campaignenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions