Back to prompt library
Build a Trade Document Endorsement and Evidence Request Workspace — implementation
Linked challenge: Build a Trade Document Endorsement and Evidence Request Workspace
Prompt source
implementation85 lines11 sectionsNo variables1 code block
## Build
Review trade invoices and delivery proofs for missing digital endorsements. Construct TradeTrust verification queries and dispatch structured evidence requests to counterparties.
## User
Trade finance operations analyst
## Workflow
1. Inspect trade document bundles containing bills of lading, commercial invoices, and inspection notes.
2. Validate cryptographic signatures and DNS-TXT identity proofs against TradeTrust specifications.
3. Identify missing endorsement chains, unverified counterparties, or altered hashes.
4. Generate structured evidence requests and notification dossiers for counterparty compliance.
## Interface
Split-view workspace presenting document provenance tree, signature verification indicators, and an interactive evidence request drafter.
## Data
Synthesize normalized trade document envelopes utilizing TradeTrust test fixture formats from source 1.
Starter examples below are synthetic. They are not downloaded records.
## Source
[TradeTrust](https://raw.githubusercontent.com/TradeTrust/tradetrust-website/master/README.md)
Adheres to TradeTrust DNS-TXT identity proof validation and document store verification specifications.
## Tools
mastra-ai, ethers, zod.
Mastra AI orchestrates deterministic schema verification tools combined with agentic evidence gap reporting.
Instruction-tuned hosted model with structured JSON formatting and high extraction consistency.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Verifies Secp256k1 digital signatures and DNS-TXT bindings on incoming trade packets.
- Flags unendorsed bills of lading when transfer of ownership proofs are missing.
- Drafts counterparty requests specifying precise missing document fields.
- Outputs verifiable compliance status reports for audit logs.
## Starter Examples
```json
[
{
"input": {
"document_id": "BL-SGP-2025-001",
"document_type": "BillOfLading",
"issuers": [
{
"name": "PSA Logistics",
"identityProof": {
"type": "DNS-TXT",
"location": "tradetrust.io"
},
"has_endorsement": true
}
],
"transferee": "SingaTech Trading Pte Ltd"
},
"expected_output": {
"verification_status": "VALID",
"missing_endorsements": [],
"action_required": "PROCEED_TO_SETTLEMENT",
"evidence_request_generated": false
}
},
{
"input": {
"document_id": "INV-MY-SGP-992",
"document_type": "CommercialInvoice",
"issuers": [
{
"name": "Johor Agro Ltd",
"identityProof": {
"type": "DNS-TXT",
"location": "unregistered-domain.xyz"
},
"has_endorsement": false
}
],
"transferee": "SingaTech Trading Pte Ltd"
},
"expected_output": {
"verification_status": "FLAGGED",
"missing_endorsements": [
"DNS_IDENTITY_MISMATCH",
"MISSING_COUNTERPARTY_SIGNATURE"
],
"action_required": "REQUEST_EVIDENCE",
"evidence_request_generated": true
}
}
]
```
## Safety
No real financial clearing or legal ownership transfer occurs; all endorsements are evaluated in a local sandbox.
Use mock external writes. Require human review before any real deployment.