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)
- Register platform
trustless-work via /admin or POST /api/platforms/register
- Script or service that detects TW escrow completion and calls ZCore
- 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
Summary
Pilot Trustless Work → ZCore integration on testnet: report
escrow_completedevents 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)
trustless-workvia/adminorPOST /api/platforms/registerNot in v1: TW outbound webhooks (they don't offer them) — use script/indexer approach.
ZCore event payload
Dry-run first: add
?dryRun=trueor headerX-ZCore-Dry-Run: true.Score impact: see
EVENT_WEIGHTS.escrow_completedinServer/src/constants/scoring.constants.ts.Deliverables
Docs/integrations/trustless-work.mdscripts/integrations/trustless-work-report.tsServer/src/services/stellar.service.tsverifyTransaction(no changes expected)Acceptance criteria
txHashdedup returns 409 on second reportwebhookUrlsetDocs/plan_modelo_b.mdReferences
https://dev.api.trustlesswork.com