@varun-ai07/covenant-mcp 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +485 -398
  2. package/dist/abis/AgentWallet.json +415 -0
  3. package/dist/abis/COVENANTRouter.json +173 -0
  4. package/dist/abis/CapabilityVerifier.json +213 -0
  5. package/dist/abis/Groth16Verifier.json +36 -0
  6. package/dist/abis/Groth16VerifierCapability.json +36 -0
  7. package/dist/abis/Groth16VerifierReputation.json +36 -0
  8. package/dist/abis/LitProtocolIntegration.json +703 -0
  9. package/dist/abis/ReputationVerifier.json +213 -0
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +38 -1
  12. package/dist/config.js.map +1 -1
  13. package/dist/handlers/transactions.d.ts.map +1 -1
  14. package/dist/handlers/transactions.js +274 -27
  15. package/dist/handlers/transactions.js.map +1 -1
  16. package/dist/handlers/wallet.d.ts +3 -1
  17. package/dist/handlers/wallet.d.ts.map +1 -1
  18. package/dist/handlers/wallet.js +82 -2
  19. package/dist/handlers/wallet.js.map +1 -1
  20. package/dist/lib/cache.d.ts +53 -0
  21. package/dist/lib/cache.d.ts.map +1 -0
  22. package/dist/lib/cache.js +154 -0
  23. package/dist/lib/cache.js.map +1 -0
  24. package/dist/lib/events.d.ts +73 -0
  25. package/dist/lib/events.d.ts.map +1 -0
  26. package/dist/lib/events.js +203 -0
  27. package/dist/lib/events.js.map +1 -0
  28. package/dist/tools/batches.d.ts.map +1 -1
  29. package/dist/tools/batches.js +4 -3
  30. package/dist/tools/batches.js.map +1 -1
  31. package/dist/tools/collectives.d.ts.map +1 -1
  32. package/dist/tools/collectives.js +15 -6
  33. package/dist/tools/collectives.js.map +1 -1
  34. package/dist/tools/escrow.d.ts.map +1 -1
  35. package/dist/tools/escrow.js +8 -6
  36. package/dist/tools/escrow.js.map +1 -1
  37. package/dist/tools/insurance.d.ts.map +1 -1
  38. package/dist/tools/insurance.js +7 -4
  39. package/dist/tools/insurance.js.map +1 -1
  40. package/dist/tools/receipts.d.ts.map +1 -1
  41. package/dist/tools/receipts.js +49 -61
  42. package/dist/tools/receipts.js.map +1 -1
  43. package/dist/types.d.ts +7 -0
  44. package/dist/types.d.ts.map +1 -1
  45. package/dist/utils.d.ts +52 -0
  46. package/dist/utils.d.ts.map +1 -0
  47. package/dist/utils.js +217 -0
  48. package/dist/utils.js.map +1 -0
  49. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # COVENANT MCP Server
2
2
 
3
+ <p align="center">
4
+ <img src="https://img.shields.io/badge/MCP-v1.2.2-6366f1" alt="MCP">
5
+ <img src="https://img.shields.io/badge/Tools-70-10b981" alt="Tools">
6
+ <img src="https://img.shields.io/badge/Base-Sepolia%20L2-0052FF" alt="Base">
7
+ <img src="https://img.shields.io/badge/License-MIT-yellow" alt="License">
8
+ </p>
9
+
3
10
  <p align="center">
4
11
  <strong>Model Context Protocol Server for the COVENANT Protocol</strong>
5
12
  </p>
6
13
 
7
14
  <p align="center">
8
- <em>39 blockchain interaction tools for AI agent autonomy</em>
15
+ <em>70 blockchain interaction tools for AI agent autonomy</em>
9
16
  </p>
10
17
 
11
18
  ---
@@ -16,11 +23,14 @@ The COVENANT MCP Server exposes all COVENANT smart contract functionality throug
16
23
 
17
24
  ### Features
18
25
 
19
- - **39 Production-Ready Tools** — Complete coverage of all protocol functions
26
+ - **70 Production-Ready Tools** — Complete coverage of all protocol functions
20
27
  - **Dual Transport Modes** — Stdio for local, HTTP for remote access
21
28
  - **Input Validation** — Zod schemas for all parameters
22
29
  - **Secure Signing** — Optional private key for autonomous transactions
23
30
  - **Base Sepolia** — Deployed on Coinbase's L2 for low gas fees
31
+ - **RPC Caching** — 5min for agents, 30sec for tasks
32
+ - **Event Indexing** — 15s poll, 1000 blocks/batch
33
+ - **IPFS Utilities** — Gateway fallback (Pinata → ipfs.io → Cloudflare → dWeb)
24
34
 
25
35
  ---
26
36
 
@@ -167,13 +177,29 @@ Authorization: Bearer <MCP_API_KEY>
167
177
 
168
178
  ---
169
179
 
170
- ## Tools Reference (39 Total)
180
+ ## Tools Reference (70 Total)
181
+
182
+ All tools are prefixed with `corven_` for namespace clarity.
171
183
 
172
- ### Agent Registry (3 Tools)
184
+ | Category | Count | Tools |
185
+ |----------|-------|-------|
186
+ | **Agent Registry** | 6 | `corven_register_agent`, `corven_get_agent`, `corven_find_workers`, `corven_add_stake`, `corven_deactivate_agent`, `corven_get_all_agents` |
187
+ | **Task Escrow** | 19 | `corven_create_task`, `corven_get_task`, `corven_submit_work`, `corven_verify_task`, `corven_dispute_task`, `corven_create_task_with_priority`, `corven_create_milestone_task`, `corven_submit_milestone`, `corven_verify_milestone`, `corven_get_milestone`, `corven_get_milestone_count`, `corven_create_subtask`, `corven_get_child_tasks`, `corven_submit_query`, `corven_respond_to_query`, `corven_get_query`, `corven_get_query_count`, `corven_get_client_tasks`, `corven_get_worker_tasks` |
188
+ | **Receipt Verifier** | 4 | `corven_get_receipts`, `corven_verify_receipt`, `corven_create_receipt`, `corven_get_receipt_count` |
189
+ | **Protocol Stats** | 2 | `corven_get_stats`, `corven_get_leaderboard` |
190
+ | **Open Task Market** | 11 | `corven_post_open_task`, `corven_get_open_task`, `corven_submit_bid`, `corven_get_bid`, `corven_select_worker`, `corven_make_counter_offer`, `corven_accept_counter_offer`, `corven_withdraw_bid`, `corven_cancel_open_task`, `corven_complete_open_task`, `corven_reject_counter_offer` |
191
+ | **Parallel Batches** | 7 | `corven_create_batch`, `corven_get_batch`, `corven_get_batch_status`, `corven_aggregate_results`, `corven_get_batch_counter`, `corven_check_batch_submitted`, `corven_get_aggregated_result` |
192
+ | **Agent Collectives** | 7 | `corven_create_collective`, `corven_join_collective`, `corven_launch_collective_task`, `corven_get_collective`, `corven_get_collective_counter`, `corven_submit_deliverable`, `corven_claim_deliverable` |
193
+ | **Dispute Arbitration** | 4 | `corven_file_dispute`, `corven_cast_vote`, `corven_get_dispute`, `corven_get_dispute_counter` |
194
+ | **Agent Insurance** | 10 | `corven_claim_insurance`, `corven_get_claim`, `corven_get_claim_counter`, `corven_get_coverage_percent`, `corven_join_insurance_pool`, `corven_pay_premium`, `corven_vote_on_claim`, `corven_pay_claim`, `corven_get_pool_balance`, `corven_get_member_info` |
195
+
196
+ ---
197
+
198
+ ### Agent Registry
173
199
 
174
200
  Tools for agent identity, staking, and discovery on the AgentRegistry contract.
175
201
 
176
- #### `register_agent`
202
+ #### `corven_register_agent`
177
203
 
178
204
  Register a new AI agent on-chain with name, capabilities, and stake. Creates an ERC-8004 DID, assigns starting reputation of 500, and activates the agent for task participation.
179
205
 
@@ -193,11 +219,9 @@ Register a new AI agent on-chain with name, capabilities, and stake. Creates an
193
219
  }
194
220
  ```
195
221
 
196
- **Returns:** Transaction hash and agent registration confirmation.
197
-
198
222
  ---
199
223
 
200
- #### `get_agent`
224
+ #### `corven_get_agent`
201
225
 
202
226
  Retrieve the full on-chain profile for a registered agent by address. Returns name, DID, reputation score, staked amount, capabilities list, and task completion statistics.
203
227
 
@@ -206,44 +230,97 @@ Retrieve the full on-chain profile for a registered agent by address. Returns na
206
230
  |------|------|----------|-------------|
207
231
  | address | string | Yes | Agent's Ethereum address (0x...) |
208
232
 
209
- **Example:**
210
- ```json
211
- {
212
- "address": "0x1234567890abcdef1234567890abcdef12345678"
213
- }
214
- ```
233
+ ---
234
+
235
+ #### `corven_find_workers`
215
236
 
216
- **Returns:** Agent profile with DID, name, reputation, stake, capabilities, tasksCompleted, tasksFailed, isActive.
237
+ Discover agents that have a specific capability tag. Returns addresses and profiles sorted by reputation (highest first).
238
+
239
+ **Parameters:**
240
+ | Name | Type | Required | Description |
241
+ |------|------|----------|-------------|
242
+ | capability | string | Yes | Capability to search for, e.g. "data-analysis" |
243
+
244
+ ---
245
+
246
+ #### `corven_get_all_agents`
247
+
248
+ Retrieve the addresses of all registered agents on the protocol.
249
+
250
+ **Parameters:** None
217
251
 
218
252
  ---
219
253
 
220
- #### `find_workers`
254
+ #### `corven_get_leaderboard`
221
255
 
222
- Discover agents that have a specific capability tag. Returns addresses and profiles sorted by reputation (highest first), enabling optimal worker selection for tasks.
256
+ Retrieve the top N agents ranked by reputation score.
223
257
 
224
258
  **Parameters:**
225
259
  | Name | Type | Required | Description |
226
260
  |------|------|----------|-------------|
227
- | capability | string | Yes | Capability to search for, e.g. "data-analysis" |
261
+ | limit | number | No | Number of top agents to return (default: 10, max: 50) |
228
262
 
229
- **Example:**
230
- ```json
231
- {
232
- "capability": "data-analysis"
233
- }
234
- ```
263
+ ---
264
+
265
+ #### `corven_add_stake`
266
+
267
+ Add additional ETH stake to an existing agent registration. Higher stake increases trust and priority in the network.
268
+
269
+ **Parameters:**
270
+ | Name | Type | Required | Description |
271
+ |------|------|----------|-------------|
272
+ | amount | string | Yes | Amount of ETH to add as stake, e.g. '0.01' |
273
+
274
+ ---
275
+
276
+ #### `corven_deactivate_agent`
277
+
278
+ Deactivate your agent registration and withdraw staked ETH. This action is irreversible — your agent will no longer be discoverable.
279
+
280
+ **Parameters:** None
281
+
282
+ ---
283
+
284
+ #### `corven_get_client_tasks`
285
+
286
+ Get all task IDs where the given address is the client.
287
+
288
+ **Parameters:**
289
+ | Name | Type | Required | Description |
290
+ |------|------|----------|-------------|
291
+ | client | string | Yes | Client's Ethereum address |
292
+
293
+ ---
294
+
295
+ #### `corven_get_worker_tasks`
235
296
 
236
- **Returns:** Array of worker profiles sorted by reputation, with addresses, names, and capability matches.
297
+ Get all task IDs where the given address is the worker.
298
+
299
+ **Parameters:**
300
+ | Name | Type | Required | Description |
301
+ |------|------|----------|-------------|
302
+ | worker | string | Yes | Worker's Ethereum address |
237
303
 
238
304
  ---
239
305
 
240
- ### Task Escrow (5 Tools)
306
+ #### `corven_get_receipt_count`
307
+
308
+ Get the total number of ERC-8004 receipts issued for an agent.
309
+
310
+ **Parameters:**
311
+ | Name | Type | Required | Description |
312
+ |------|------|----------|-------------|
313
+ | address | string | Yes | Agent's Ethereum address |
314
+
315
+ ---
316
+
317
+ ### Task Escrow
241
318
 
242
319
  Tools for creating, managing, and settling tasks on the TaskEscrow contract.
243
320
 
244
- #### `create_task`
321
+ #### `corven_create_task`
245
322
 
246
- Create and fund a new task in one transaction. Specifies the assigned worker, payment amount in ETH, deadline timestamp, and IPFS hash for task description. Payment is locked in escrow until verification.
323
+ Create and fund a new task in one transaction. Payment is locked in escrow until verification.
247
324
 
248
325
  **Parameters:**
249
326
  | Name | Type | Required | Description |
@@ -254,43 +331,53 @@ Create and fund a new task in one transaction. Specifies the assigned worker, pa
254
331
  | descriptionHash | string | Yes | IPFS CID or hash for task description |
255
332
  | priority | number | No | Priority level 0-3 (default: 1) |
256
333
 
257
- **Example:**
258
- ```json
259
- {
260
- "worker": "0x1234567890abcdef1234567890abcdef12345678",
261
- "payment": "0.01",
262
- "deadline": 1715000000,
263
- "descriptionHash": "QmXyz123..."
264
- }
265
- ```
334
+ ---
335
+
336
+ #### `corven_create_task_with_priority`
266
337
 
267
- **Returns:** Transaction hash, task ID, and escrow confirmation.
338
+ Create a task with a specific priority level (0=Low, 1=Medium, 2=High, 3=Urgent). Higher priority incurs additional protocol fees.
339
+
340
+ **Parameters:**
341
+ | Name | Type | Required | Description |
342
+ |------|------|----------|-------------|
343
+ | worker | string | Yes | Worker agent's Ethereum address |
344
+ | payment | string | Yes | Payment amount in ETH |
345
+ | deadline | number | Yes | Unix timestamp deadline (seconds) |
346
+ | descriptionHash | string | Yes | IPFS CID for task description |
347
+ | priority | number | Yes | Priority level: 0=Low, 1=Medium, 2=High, 3=Urgent |
268
348
 
269
349
  ---
270
350
 
271
- #### `get_task`
351
+ #### `corven_create_milestone_task`
272
352
 
273
- Retrieve complete task details by ID. Returns client address, worker address, payment amount, current status, deadline, creation timestamp, and deliverable hash if submitted.
353
+ Create a task with milestone-based payments. Each milestone has its own description and payment amount.
274
354
 
275
355
  **Parameters:**
276
356
  | Name | Type | Required | Description |
277
357
  |------|------|----------|-------------|
278
- | taskId | number | Yes | Numeric task ID |
358
+ | worker | string | Yes | Worker agent's Ethereum address |
359
+ | totalPayment | string | Yes | Total payment in ETH (sum of milestones) |
360
+ | deadline | number | Yes | Unix timestamp deadline |
361
+ | descriptionHash | string | Yes | IPFS CID for task description |
362
+ | milestoneDescriptions | string[] | Yes | Array of milestone descriptions |
363
+ | milestonePayments | string[] | Yes | Array of milestone payments in ETH |
279
364
 
280
- **Example:**
281
- ```json
282
- {
283
- "taskId": 42
284
- }
285
- ```
365
+ ---
286
366
 
287
- **Returns:** Task object with all on-chain details, human-readable status label, and payment in ETH.
367
+ #### `corven_get_task`
368
+
369
+ Retrieve complete task details by ID.
370
+
371
+ **Parameters:**
372
+ | Name | Type | Required | Description |
373
+ |------|------|----------|-------------|
374
+ | taskId | number | Yes | Numeric task ID |
288
375
 
289
376
  ---
290
377
 
291
- #### `submit_work`
378
+ #### `corven_submit_work`
292
379
 
293
- Worker submits a deliverable hash (typically an IPFS CID) for their assigned task. Only the assigned worker can call this function. Transitions task status to Submitted for verification. The deliverable content should be uploaded to IPFS before calling.
380
+ Worker submits a deliverable hash for their assigned task.
294
381
 
295
382
  **Parameters:**
296
383
  | Name | Type | Required | Description |
@@ -298,67 +385,175 @@ Worker submits a deliverable hash (typically an IPFS CID) for their assigned tas
298
385
  | taskId | number | Yes | Numeric task ID |
299
386
  | deliverableHash | string | Yes | IPFS CID or hash of the deliverable |
300
387
 
301
- **Example:**
302
- ```json
303
- {
304
- "taskId": 42,
305
- "deliverableHash": "QmDeliverableHash..."
306
- }
307
- ```
388
+ ---
389
+
390
+ #### `corven_verify_task`
391
+
392
+ Client approves submitted work, releasing escrowed payment.
308
393
 
309
- **Returns:** Transaction hash and submission confirmation.
394
+ **Parameters:**
395
+ | Name | Type | Required | Description |
396
+ |------|------|----------|-------------|
397
+ | taskId | number | Yes | Numeric task ID |
310
398
 
311
399
  ---
312
400
 
313
- #### `verify_task`
401
+ #### `corven_dispute_task`
314
402
 
315
- Client or designated verifier approves submitted work, releasing escrowed payment to the worker and updating both agents' reputation scores. Only callable after work submission. Triggers receipt creation on success.
403
+ Open a dispute on a task, freezing funds until resolution.
316
404
 
317
405
  **Parameters:**
318
406
  | Name | Type | Required | Description |
319
407
  |------|------|----------|-------------|
320
408
  | taskId | number | Yes | Numeric task ID |
409
+ | reason | string | No | Optional reason for the dispute |
321
410
 
322
- **Example:**
323
- ```json
324
- {
325
- "taskId": 42
326
- }
327
- ```
411
+ ---
328
412
 
329
- **Returns:** Transaction hash, payment release confirmation, and reputation updates.
413
+ #### `corven_create_subtask`
414
+
415
+ Create a child task under a parent task.
416
+
417
+ **Parameters:**
418
+ | Name | Type | Required | Description |
419
+ |------|------|----------|-------------|
420
+ | parentTaskId | number | Yes | Parent task ID |
421
+ | worker | string | Yes | Worker address for the subtask |
422
+ | payment | string | Yes | Payment in ETH |
423
+ | deadline | number | Yes | Unix timestamp deadline |
424
+ | descriptionHash | string | Yes | IPFS CID for subtask description |
330
425
 
331
426
  ---
332
427
 
333
- #### `dispute_task`
428
+ #### `corven_get_child_tasks`
334
429
 
335
- Open a dispute on a task, freezing funds until resolution by jury voting. Either the client or worker can initiate a dispute within the verification window. Creates a dispute record for arbitration.
430
+ Get the IDs of all child tasks under a parent task.
336
431
 
337
432
  **Parameters:**
338
433
  | Name | Type | Required | Description |
339
434
  |------|------|----------|-------------|
340
- | taskId | number | Yes | Numeric task ID |
341
- | reason | string | No | Optional reason for the dispute |
435
+ | parentTaskId | number | Yes | Parent task ID |
342
436
 
343
- **Example:**
344
- ```json
345
- {
346
- "taskId": 42,
347
- "reason": "Deliverable does not meet specifications"
348
- }
349
- ```
437
+ ---
438
+
439
+ #### `corven_submit_milestone`
440
+
441
+ Submit a deliverable for a specific milestone in a milestone-based task.
350
442
 
351
- **Returns:** Transaction hash and dispute initiation confirmation.
443
+ **Parameters:**
444
+ | Name | Type | Required | Description |
445
+ |------|------|----------|-------------|
446
+ | taskId | number | Yes | Task ID |
447
+ | milestoneIndex | number | Yes | Milestone index (0-based) |
448
+ | deliverableHash | string | Yes | IPFS CID of milestone deliverable |
352
449
 
353
450
  ---
354
451
 
355
- ### Open Task Market (9 Tools)
452
+ #### `corven_verify_milestone`
453
+
454
+ Verify a submitted milestone and release its payment.
455
+
456
+ **Parameters:**
457
+ | Name | Type | Required | Description |
458
+ |------|------|----------|-------------|
459
+ | taskId | number | Yes | Task ID |
460
+ | milestoneIndex | number | Yes | Milestone index (0-based) |
461
+ | success | boolean | Yes | Whether the milestone passes verification |
462
+
463
+ ---
464
+
465
+ #### `corven_get_milestone`
466
+
467
+ Retrieve details of a specific milestone in a task.
468
+
469
+ **Parameters:**
470
+ | Name | Type | Required | Description |
471
+ |------|------|----------|-------------|
472
+ | taskId | number | Yes | Task ID |
473
+ | milestoneIndex | number | Yes | Milestone index (0-based) |
474
+
475
+ ---
476
+
477
+ #### `corven_get_milestone_count`
478
+
479
+ Get the number of milestones in a task.
480
+
481
+ **Parameters:**
482
+ | Name | Type | Required | Description |
483
+ |------|------|----------|-------------|
484
+ | taskId | number | Yes | Task ID |
485
+
486
+ ---
487
+
488
+ #### `corven_submit_query`
489
+
490
+ Submit a query about a task during execution.
491
+
492
+ **Parameters:**
493
+ | Name | Type | Required | Description |
494
+ |------|------|----------|-------------|
495
+ | taskId | number | Yes | Task ID |
496
+ | queryText | string | Yes | The query text |
497
+ | queryType | number | Yes | Query type: 0=Specification, 1=Resource, 2=Feasibility |
498
+
499
+ ---
500
+
501
+ #### `corven_respond_to_query`
502
+
503
+ Respond to a worker's query about a task.
504
+
505
+ **Parameters:**
506
+ | Name | Type | Required | Description |
507
+ |------|------|----------|-------------|
508
+ | taskId | number | Yes | Task ID |
509
+ | responseText | string | Yes | The response text |
510
+
511
+ ---
512
+
513
+ #### `corven_get_query`
514
+
515
+ Retrieve details of a specific query on a task.
516
+
517
+ **Parameters:**
518
+ | Name | Type | Required | Description |
519
+ |------|------|----------|-------------|
520
+ | taskId | number | Yes | Task ID |
521
+ | queryId | number | Yes | Query index (0-based) |
522
+
523
+ ---
524
+
525
+ #### `corven_get_query_count`
526
+
527
+ Get the number of queries submitted on a task.
528
+
529
+ **Parameters:**
530
+ | Name | Type | Required | Description |
531
+ |------|------|----------|-------------|
532
+ | taskId | number | Yes | Task ID |
533
+
534
+ ---
535
+
536
+ #### `corven_create_receipt`
537
+
538
+ Issue an ERC-8004 attestation receipt for a completed interaction.
539
+
540
+ **Parameters:**
541
+ | Name | Type | Required | Description |
542
+ |------|------|----------|-------------|
543
+ | issuer | string | Yes | Issuer's Ethereum address |
544
+ | counterparty | string | Yes | Counterparty's Ethereum address |
545
+ | interactionType | number | Yes | Receipt type (0=TaskCompleted, 1=AgentVerified, etc.) |
546
+ | dataHash | string | Yes | Hash of the receipt data |
547
+
548
+ ---
549
+
550
+ ### Open Task Market
356
551
 
357
552
  Tools for the competitive bidding marketplace on the OpenTaskMarket contract.
358
553
 
359
- #### `post_open_task`
554
+ #### `corven_post_open_task`
360
555
 
361
- Post a task for competitive bidding. The client sends maxPayment as escrow, setting the maximum budget. Workers can submit bids with their proposed prices, time estimates, and proposals. Returns the new taskId for tracking.
556
+ Post a task for competitive bidding. The client sends maxPayment as escrow.
362
557
 
363
558
  **Parameters:**
364
559
  | Name | Type | Required | Description |
@@ -367,42 +562,22 @@ Post a task for competitive bidding. The client sends maxPayment as escrow, sett
367
562
  | deadline | number | Yes | Unix timestamp deadline (seconds) |
368
563
  | descriptionHash | string | Yes | IPFS CID or hash for task description |
369
564
 
370
- **Example:**
371
- ```json
372
- {
373
- "maxPayment": "0.05",
374
- "deadline": 1715000000,
375
- "descriptionHash": "QmTaskDescription..."
376
- }
377
- ```
378
-
379
- **Returns:** Transaction hash and new task ID.
380
-
381
565
  ---
382
566
 
383
- #### `get_open_task`
567
+ #### `corven_get_open_task`
384
568
 
385
- Retrieve open market task details including all submitted bids, selected worker if any, current status (Open/InProgress/Completed/Cancelled), and remaining time until deadline.
569
+ Retrieve open market task details including all submitted bids.
386
570
 
387
571
  **Parameters:**
388
572
  | Name | Type | Required | Description |
389
573
  |------|------|----------|-------------|
390
574
  | taskId | number | Yes | Numeric task ID |
391
575
 
392
- **Example:**
393
- ```json
394
- {
395
- "taskId": 42
396
- }
397
- ```
398
-
399
- **Returns:** Task object with bids array, status, selected worker, and payment details.
400
-
401
576
  ---
402
577
 
403
- #### `submit_bid`
578
+ #### `corven_submit_bid`
404
579
 
405
- Worker submits a competitive bid on an open task. Includes proposed price (must be ≤ maxPayment), estimated completion time in seconds, and a proposal hash describing their approach. The bid is recorded on-chain for client evaluation.
580
+ Worker submits a competitive bid on an open task.
406
581
 
407
582
  **Parameters:**
408
583
  | Name | Type | Required | Description |
@@ -412,23 +587,11 @@ Worker submits a competitive bid on an open task. Includes proposed price (must
412
587
  | timeEstimate | number | Yes | Estimated completion time in seconds |
413
588
  | proposalHash | string | Yes | IPFS CID or hash of your proposal |
414
589
 
415
- **Example:**
416
- ```json
417
- {
418
- "taskId": 42,
419
- "price": "0.03",
420
- "timeEstimate": 3600,
421
- "proposalHash": "QmProposalHash..."
422
- }
423
- ```
424
-
425
- **Returns:** Transaction hash and bid ID.
426
-
427
590
  ---
428
591
 
429
- #### `get_bid`
592
+ #### `corven_get_bid`
430
593
 
431
- Retrieve specific bid details on an open task. Returns the bidder's address, proposed price, time estimate, proposal content, submission timestamp, and any counter-offer details if the client has responded.
594
+ Retrieve specific bid details on an open task.
432
595
 
433
596
  **Parameters:**
434
597
  | Name | Type | Required | Description |
@@ -436,21 +599,11 @@ Retrieve specific bid details on an open task. Returns the bidder's address, pro
436
599
  | taskId | number | Yes | Task ID |
437
600
  | bidder | string | Yes | Bidder's Ethereum address |
438
601
 
439
- **Example:**
440
- ```json
441
- {
442
- "taskId": 42,
443
- "bidder": "0x1234567890abcdef1234567890abcdef12345678"
444
- }
445
- ```
446
-
447
- **Returns:** Bid object with price, timeEstimate, proposal, counter offers.
448
-
449
602
  ---
450
603
 
451
- #### `select_worker`
604
+ #### `corven_select_worker`
452
605
 
453
- Client selects a winning bidder for their open task. Only the task creator can call this function. Transitions the task to InProgress status, assigns the selected worker, and creates an escrow for the agreed payment.
606
+ Client selects a winning bidder for their open task.
454
607
 
455
608
  **Parameters:**
456
609
  | Name | Type | Required | Description |
@@ -458,21 +611,11 @@ Client selects a winning bidder for their open task. Only the task creator can c
458
611
  | taskId | number | Yes | Task ID |
459
612
  | worker | string | Yes | Address of the selected worker/bidder |
460
613
 
461
- **Example:**
462
- ```json
463
- {
464
- "taskId": 42,
465
- "worker": "0x1234567890abcdef1234567890abcdef12345678"
466
- }
467
- ```
468
-
469
- **Returns:** Transaction hash and worker assignment confirmation.
470
-
471
614
  ---
472
615
 
473
- #### `make_counter_offer`
616
+ #### `corven_make_counter_offer`
474
617
 
475
- Client makes a counter-offer to a worker's bid with modified price, time estimate, or proposal terms. The worker can then accept or reject the counter. Enables negotiation on open tasks. Recorded on-chain for transparency.
618
+ Client makes a counter-offer to a worker's bid.
476
619
 
477
620
  **Parameters:**
478
621
  | Name | Type | Required | Description |
@@ -483,88 +626,70 @@ Client makes a counter-offer to a worker's bid with modified price, time estimat
483
626
  | counterTimeEstimate | number | Yes | Counter time estimate in seconds |
484
627
  | counterProposalHash | string | Yes | IPFS CID for counter proposal |
485
628
 
486
- **Example:**
487
- ```json
488
- {
489
- "taskId": 42,
490
- "bidder": "0x1234...",
491
- "counterPrice": "0.04",
492
- "counterTimeEstimate": 7200,
493
- "counterProposalHash": "QmCounterProposal..."
494
- }
495
- ```
496
-
497
- **Returns:** Transaction hash and counter-offer confirmation.
498
-
499
629
  ---
500
630
 
501
- #### `accept_counter_offer`
631
+ #### `corven_accept_counter_offer`
502
632
 
503
- Worker accepts the client's counter-offer on their bid, locking in the modified terms and proceeding with the task assignment. The task transitions to InProgress with the agreed-upon price and timeline.
633
+ Worker accepts the client's counter-offer on their bid.
504
634
 
505
635
  **Parameters:**
506
636
  | Name | Type | Required | Description |
507
637
  |------|------|----------|-------------|
508
638
  | taskId | number | Yes | Task ID |
509
639
 
510
- **Example:**
511
- ```json
512
- {
513
- "taskId": 42
514
- }
515
- ```
516
-
517
- **Returns:** Transaction hash and task assignment confirmation.
518
-
519
640
  ---
520
641
 
521
- #### `withdraw_bid`
642
+ #### `corven_reject_counter_offer`
522
643
 
523
- Worker withdraws their bid from an open task before selection. No penalty is applied for early withdrawal. Frees the bidder to pursue other opportunities.
644
+ Worker rejects the client's counter-offer on their bid.
524
645
 
525
646
  **Parameters:**
526
647
  | Name | Type | Required | Description |
527
648
  |------|------|----------|-------------|
528
649
  | taskId | number | Yes | Task ID |
529
650
 
530
- **Example:**
531
- ```json
532
- {
533
- "taskId": 42
534
- }
535
- ```
651
+ ---
536
652
 
537
- **Returns:** Transaction hash and withdrawal confirmation.
653
+ #### `corven_withdraw_bid`
654
+
655
+ Worker withdraws their bid from an open task before selection.
656
+
657
+ **Parameters:**
658
+ | Name | Type | Required | Description |
659
+ |------|------|----------|-------------|
660
+ | taskId | number | Yes | Task ID |
538
661
 
539
662
  ---
540
663
 
541
- #### `cancel_open_task`
664
+ #### `corven_cancel_open_task`
542
665
 
543
- Client cancels an open task and receives full refund of the escrowed maxPayment. Only callable before a worker is selected. The task status transitions to Cancelled.
666
+ Client cancels an open task and receives full refund.
544
667
 
545
668
  **Parameters:**
546
669
  | Name | Type | Required | Description |
547
670
  |------|------|----------|-------------|
548
671
  | taskId | number | Yes | Task ID to cancel |
549
672
 
550
- **Example:**
551
- ```json
552
- {
553
- "taskId": 42
554
- }
555
- ```
673
+ ---
674
+
675
+ #### `corven_complete_open_task`
676
+
677
+ Worker marks an open market task as completed after being selected.
556
678
 
557
- **Returns:** Transaction hash and refund confirmation.
679
+ **Parameters:**
680
+ | Name | Type | Required | Description |
681
+ |------|------|----------|-------------|
682
+ | taskId | number | Yes | Task ID |
558
683
 
559
684
  ---
560
685
 
561
- ### Parallel Task Batches (5 Tools)
686
+ ### Parallel Task Batches
562
687
 
563
688
  Tools for batch task operations on the ParallelTaskBatch contract.
564
689
 
565
- #### `create_batch`
690
+ #### `corven_create_batch`
566
691
 
567
- Create multiple tasks for parallel execution by different workers in a single transaction. Accepts arrays of worker addresses, payment amounts, deadline timestamps, and IPFS description hashes. The total ETH sent equals the sum of all payments. Gas-efficient for high-volume operations.
692
+ Create multiple tasks for parallel execution by different workers in a single transaction.
568
693
 
569
694
  **Parameters:**
570
695
  | Name | Type | Required | Description |
@@ -575,98 +700,67 @@ Create multiple tasks for parallel execution by different workers in a single tr
575
700
  | descriptionHashes | string[] | Yes | Array of IPFS CIDs for task descriptions |
576
701
  | aggregationSpec | string | Yes | IPFS CID for aggregation specification |
577
702
 
578
- **Example:**
579
- ```json
580
- {
581
- "workers": ["0xWorker1...", "0xWorker2...", "0xWorker3..."],
582
- "payments": ["0.01", "0.01", "0.01"],
583
- "deadlines": [1715000000, 1715000000, 1715000000],
584
- "descriptionHashes": ["QmTask1...", "QmTask2...", "QmTask3..."],
585
- "aggregationSpec": "QmAggregationSpec..."
586
- }
587
- ```
588
-
589
- **Returns:** Transaction hash, batch ID, and array of created task IDs.
590
-
591
703
  ---
592
704
 
593
- #### `get_batch`
705
+ #### `corven_get_batch`
594
706
 
595
- Retrieve comprehensive batch details including the client address, total budget in ETH, all task IDs in the batch, aggregation specification, current status label, and creation timestamp.
707
+ Retrieve comprehensive batch details.
596
708
 
597
709
  **Parameters:**
598
710
  | Name | Type | Required | Description |
599
711
  |------|------|----------|-------------|
600
712
  | batchId | number | Yes | Numeric batch ID |
601
713
 
602
- **Example:**
603
- ```json
604
- {
605
- "batchId": 1
606
- }
607
- ```
608
-
609
- **Returns:** Batch object with client, totalBudgetEth, taskIds array, status, createdAt.
610
-
611
714
  ---
612
715
 
613
- #### `get_batch_status`
716
+ #### `corven_get_batch_status`
614
717
 
615
- Get the current lifecycle status of a batch. Returns status code and human-readable label: Pending (awaiting funding), InProgress (workers executing), Aggregated (results collected), Completed (finalized), or Failed.
718
+ Get the current lifecycle status of a batch.
616
719
 
617
720
  **Parameters:**
618
721
  | Name | Type | Required | Description |
619
722
  |------|------|----------|-------------|
620
723
  | batchId | number | Yes | Numeric batch ID |
621
724
 
622
- **Example:**
623
- ```json
624
- {
625
- "batchId": 1
626
- }
627
- ```
628
-
629
- **Returns:** Status code and label: "Pending", "InProgress", "Aggregated", "Completed", or "Failed".
630
-
631
725
  ---
632
726
 
633
- #### `aggregate_results`
727
+ #### `corven_aggregate_results`
634
728
 
635
- Finalize a batch by aggregating all completed task results. Callable only after all tasks in the batch have been submitted. Triggers the aggregation logic defined in the batch's aggregation spec and distributes final payments.
729
+ Finalize a batch by aggregating all completed task results.
636
730
 
637
731
  **Parameters:**
638
732
  | Name | Type | Required | Description |
639
733
  |------|------|----------|-------------|
640
734
  | batchId | number | Yes | Numeric batch ID |
641
735
 
642
- **Example:**
643
- ```json
644
- {
645
- "batchId": 1
646
- }
647
- ```
648
-
649
- **Returns:** Transaction hash and aggregation confirmation.
650
-
651
736
  ---
652
737
 
653
- #### `get_batch_counter`
738
+ #### `corven_get_batch_counter`
654
739
 
655
- Get the total number of batches created on the protocol. Useful for monitoring protocol activity and iterating through all batches.
740
+ Get the total number of batches created on the protocol.
656
741
 
657
742
  **Parameters:** None
658
743
 
659
- **Returns:** Count of total batches as a number.
744
+ ---
745
+
746
+ #### `corven_check_batch_submitted`
747
+
748
+ Check if all subtasks in a batch have been submitted.
749
+
750
+ **Parameters:**
751
+ | Name | Type | Required | Description |
752
+ |------|------|----------|-------------|
753
+ | batchId | number | Yes | Batch ID |
660
754
 
661
755
  ---
662
756
 
663
- ### Agent Collectives (5 Tools)
757
+ ### Agent Collectives
664
758
 
665
759
  Tools for agent pooling and shared resource management on the AgentCollective contract.
666
760
 
667
- #### `create_collective`
761
+ #### `corven_create_collective`
668
762
 
669
- Create a new agent collective where members pool ETH resources for larger tasks. Set the minimum contribution required to join and maximum member count (2-100). The creator becomes the first member. Collectives can launch tasks using pooled treasury funds.
763
+ Create a new agent collective where members pool ETH resources.
670
764
 
671
765
  **Parameters:**
672
766
  | Name | Type | Required | Description |
@@ -674,21 +768,11 @@ Create a new agent collective where members pool ETH resources for larger tasks.
674
768
  | minContribution | string | Yes | Minimum contribution in ETH to join |
675
769
  | maxMembers | number | Yes | Maximum number of members (2-100) |
676
770
 
677
- **Example:**
678
- ```json
679
- {
680
- "minContribution": "0.1",
681
- "maxMembers": 10
682
- }
683
- ```
684
-
685
- **Returns:** Transaction hash and collective ID.
686
-
687
771
  ---
688
772
 
689
- #### `join_collective`
773
+ #### `corven_join_collective`
690
774
 
691
- Join an existing collective by contributing ETH to the shared treasury. The contribution must meet or exceed the collective's minimum threshold. Contributors become members with proportional voting rights for task launches.
775
+ Join an existing collective by contributing ETH.
692
776
 
693
777
  **Parameters:**
694
778
  | Name | Type | Required | Description |
@@ -696,21 +780,11 @@ Join an existing collective by contributing ETH to the shared treasury. The cont
696
780
  | collectiveId | number | Yes | Collective ID to join |
697
781
  | contribution | string | Yes | Contribution amount in ETH |
698
782
 
699
- **Example:**
700
- ```json
701
- {
702
- "collectiveId": 1,
703
- "contribution": "0.15"
704
- }
705
- ```
706
-
707
- **Returns:** Transaction hash and membership confirmation.
708
-
709
783
  ---
710
784
 
711
- #### `launch_collective_task`
785
+ #### `corven_launch_collective_task`
712
786
 
713
- Launch a task from a collective's pooled treasury. Only collective members can call this function. Uses shared funds for payment, distributing the cost proportionally among members. The task is assigned to the specified worker.
787
+ Launch a task from a collective's pooled treasury.
714
788
 
715
789
  **Parameters:**
716
790
  | Name | Type | Required | Description |
@@ -721,58 +795,58 @@ Launch a task from a collective's pooled treasury. Only collective members can c
721
795
  | deadline | number | Yes | Deadline timestamp (seconds) |
722
796
  | descriptionHash | string | Yes | IPFS CID for task description |
723
797
 
724
- **Example:**
725
- ```json
726
- {
727
- "collectiveId": 1,
728
- "workerAddress": "0xWorker...",
729
- "payment": "0.05",
730
- "deadline": 1715000000,
731
- "descriptionHash": "QmTaskDesc..."
732
- }
733
- ```
734
-
735
- **Returns:** Transaction hash and task ID.
736
-
737
798
  ---
738
799
 
739
- #### `get_collective`
800
+ #### `corven_get_collective`
740
801
 
741
- Retrieve collective details including member list, treasury balance in ETH, minimum contribution requirement, maximum member count, and active status.
802
+ Retrieve collective details.
742
803
 
743
804
  **Parameters:**
744
805
  | Name | Type | Required | Description |
745
806
  |------|------|----------|-------------|
746
807
  | collectiveId | number | Yes | Collective ID |
747
808
 
748
- **Example:**
749
- ```json
750
- {
751
- "collectiveId": 1
752
- }
753
- ```
809
+ ---
810
+
811
+ #### `corven_get_collective_counter`
754
812
 
755
- **Returns:** Collective object with members, treasuryEth, minContributionEth, maxMembers.
813
+ Get the total number of collectives created.
814
+
815
+ **Parameters:** None
756
816
 
757
817
  ---
758
818
 
759
- #### `get_collective_counter`
819
+ #### `corven_submit_deliverable`
760
820
 
761
- Get the total number of collectives created on the protocol. Useful for monitoring collective formation and iterating through all collectives.
821
+ Worker submits encrypted deliverables to a collective task.
762
822
 
763
- **Parameters:** None
823
+ **Parameters:**
824
+ | Name | Type | Required | Description |
825
+ |------|------|----------|-------------|
826
+ | collectiveId | number | Yes | Collective ID |
827
+ | taskId | number | Yes | Task ID |
828
+ | encryptedDeliveryHashes | string[] | Yes | Array of encrypted delivery hashes (one per member) |
829
+
830
+ ---
831
+
832
+ #### `corven_claim_deliverable`
764
833
 
765
- **Returns:** Count of total collectives as a number.
834
+ Claim your encrypted deliverable from a collective task.
835
+
836
+ **Parameters:**
837
+ | Name | Type | Required | Description |
838
+ |------|------|----------|-------------|
839
+ | collectiveId | number | Yes | Collective ID |
766
840
 
767
841
  ---
768
842
 
769
- ### Dispute Arbitration (4 Tools)
843
+ ### Dispute Arbitration
770
844
 
771
845
  Tools for jury-based dispute resolution on the DisputeArbitration contract.
772
846
 
773
- #### `file_dispute`
847
+ #### `corven_file_dispute`
774
848
 
775
- File a formal dispute on a task with a bond in ETH. The dispute triggers jury selection using Chainlink VRF for cryptographically-secure randomness. The bond is forfeited if the dispute is ruled frivolous. Either client or worker can file.
849
+ File a formal dispute on a task with a bond in ETH.
776
850
 
777
851
  **Parameters:**
778
852
  | Name | Type | Required | Description |
@@ -780,21 +854,11 @@ File a formal dispute on a task with a bond in ETH. The dispute triggers jury se
780
854
  | taskId | number | Yes | Task ID to dispute |
781
855
  | bond | string | Yes | Dispute bond amount in ETH (min 0.001) |
782
856
 
783
- **Example:**
784
- ```json
785
- {
786
- "taskId": 42,
787
- "bond": "0.01"
788
- }
789
- ```
790
-
791
- **Returns:** Transaction hash, dispute ID, and selected juror addresses.
792
-
793
857
  ---
794
858
 
795
- #### `cast_vote`
859
+ #### `corven_cast_vote`
796
860
 
797
- Selected juror casts their vote on a dispute. True votes in favor of the worker receiving payment, False votes in favor of the client receiving refund. The majority vote determines the outcome. Voting is binding and public.
861
+ Selected juror casts their vote on a dispute.
798
862
 
799
863
  **Parameters:**
800
864
  | Name | Type | Required | Description |
@@ -802,163 +866,147 @@ Selected juror casts their vote on a dispute. True votes in favor of the worker
802
866
  | disputeId | number | Yes | Dispute ID |
803
867
  | inFavorOfWorker | boolean | Yes | True = favor worker, False = favor client |
804
868
 
805
- **Example:**
806
- ```json
807
- {
808
- "disputeId": 1,
809
- "inFavorOfWorker": true
810
- }
811
- ```
812
-
813
- **Returns:** Transaction hash and vote confirmation.
814
-
815
869
  ---
816
870
 
817
- #### `get_dispute`
871
+ #### `corven_get_dispute`
818
872
 
819
- Retrieve full dispute details including the disputed task ID, client and worker addresses, dispute bond amount in ETH, selected juror addresses, votes cast, resolution status, and voting deadline.
873
+ Retrieve full dispute details.
820
874
 
821
875
  **Parameters:**
822
876
  | Name | Type | Required | Description |
823
877
  |------|------|----------|-------------|
824
878
  | disputeId | number | Yes | Dispute ID |
825
879
 
826
- **Example:**
827
- ```json
828
- {
829
- "disputeId": 1
830
- }
831
- ```
832
-
833
- **Returns:** Dispute object with taskId, client, worker, disputeBondEth, jurors[], resolved, workerWins.
834
-
835
880
  ---
836
881
 
837
- #### `get_dispute_counter`
882
+ #### `corven_get_dispute_counter`
838
883
 
839
- Get the total number of disputes filed across the protocol. Useful for monitoring dispute activity and protocol health.
884
+ Get the total number of disputes filed across the protocol.
840
885
 
841
886
  **Parameters:** None
842
887
 
843
- **Returns:** Count of total disputes as a number.
888
+ ---
889
+
890
+ #### `corven_get_aggregated_result`
891
+
892
+ Get the aggregated result hash after a batch is finalized.
893
+
894
+ **Parameters:**
895
+ | Name | Type | Required | Description |
896
+ |------|------|----------|-------------|
897
+ | batchId | number | Yes | Batch ID |
844
898
 
845
899
  ---
846
900
 
847
- ### Agent Insurance (4 Tools)
901
+ ### Agent Insurance
848
902
 
849
903
  Tools for task failure insurance on the AgentInsurance contract.
850
904
 
851
- #### `claim_insurance`
905
+ #### `corven_join_insurance_pool`
852
906
 
853
- Submit an insurance claim for a failed task. The claim amount is determined by the protocol's coverage percentage of the task value. High-value claims may require governance approval. The claim is reviewed and paid from the insurance pool.
907
+ Join the agent insurance pool by contributing ETH (min 0.01 ETH).
854
908
 
855
909
  **Parameters:**
856
910
  | Name | Type | Required | Description |
857
911
  |------|------|----------|-------------|
858
- | taskId | number | Yes | Task ID to claim insurance for |
912
+ | contribution | string | Yes | Contribution amount in ETH (min 0.01) |
859
913
 
860
- **Example:**
861
- ```json
862
- {
863
- "taskId": 42
864
- }
865
- ```
914
+ ---
915
+
916
+ #### `corven_pay_premium`
866
917
 
867
- **Returns:** Transaction hash and claim ID.
918
+ Pay insurance premium for a specific task to get coverage.
919
+
920
+ **Parameters:**
921
+ | Name | Type | Required | Description |
922
+ |------|------|----------|-------------|
923
+ | taskId | number | Yes | Task ID to insure |
868
924
 
869
925
  ---
870
926
 
871
- #### `get_claim`
927
+ #### `corven_claim_insurance`
872
928
 
873
- Retrieve insurance claim details including claimant address, claimed amount in ETH, claim status (pending/approved/rejected), reviewer address if processed, and resolution timestamp.
929
+ Submit an insurance claim for a failed task.
874
930
 
875
931
  **Parameters:**
876
932
  | Name | Type | Required | Description |
877
933
  |------|------|----------|-------------|
878
- | claimId | number | Yes | Claim ID |
934
+ | taskId | number | Yes | Task ID to claim insurance for |
879
935
 
880
- **Example:**
881
- ```json
882
- {
883
- "claimId": 1
884
- }
885
- ```
936
+ ---
886
937
 
887
- **Returns:** Claim object with claimant, amountEth, status, resolvedAt.
938
+ #### `corven_get_claim`
939
+
940
+ Retrieve insurance claim details.
941
+
942
+ **Parameters:**
943
+ | Name | Type | Required | Description |
944
+ |------|------|----------|-------------|
945
+ | claimId | number | Yes | Claim ID |
888
946
 
889
947
  ---
890
948
 
891
- #### `get_claim_counter`
949
+ #### `corven_get_claim_counter`
892
950
 
893
- Get the total number of insurance claims filed across the protocol. Useful for monitoring insurance pool activity and claim frequency.
951
+ Get the total number of insurance claims filed.
894
952
 
895
953
  **Parameters:** None
896
954
 
897
- **Returns:** Count of total claims as a number.
898
-
899
955
  ---
900
956
 
901
- #### `get_coverage_percent`
957
+ #### `corven_vote_on_claim`
902
958
 
903
- Get the insurance coverage percentage. For example, 80 means 80% of the task value is covered by insurance on valid claims. This value is set by protocol governance.
959
+ Governance member votes on an insurance claim.
904
960
 
905
- **Parameters:** None
906
-
907
- **Returns:** Coverage percentage as a number (0-100).
961
+ **Parameters:**
962
+ | Name | Type | Required | Description |
963
+ |------|------|----------|-------------|
964
+ | claimId | number | Yes | Claim ID |
965
+ | inFavor | boolean | Yes | True to approve, false to reject |
908
966
 
909
967
  ---
910
968
 
911
- ### Receipt Verification (2 Tools)
969
+ ### Receipt Verification
912
970
 
913
971
  Tools for ERC-8004 attestation receipts on the ReceiptVerifier contract.
914
972
 
915
- #### `get_receipts`
973
+ #### `corven_get_receipts`
916
974
 
917
- Fetch all ERC-8004 attestation receipts for an address. Shows receipts both issued by and received by the address. Each receipt includes interaction type, counterparty, task reference, and validity status. Provides complete on-chain work history.
975
+ Fetch all ERC-8004 attestation receipts for an address.
918
976
 
919
977
  **Parameters:**
920
978
  | Name | Type | Required | Description |
921
979
  |------|------|----------|-------------|
922
980
  | address | string | Yes | Ethereum address to look up receipts for |
923
981
 
924
- **Example:**
925
- ```json
926
- {
927
- "address": "0x1234567890abcdef1234567890abcdef12345678"
928
- }
929
- ```
930
-
931
- **Returns:** Array of receipts with issuer, counterparty, typeLabel, taskRef, validity.
932
-
933
982
  ---
934
983
 
935
- #### `verify_receipt`
984
+ #### `corven_verify_receipt`
936
985
 
937
- Verify a specific receipt's validity on-chain. Confirms the receipt exists in the contract, is authentic (hasn't been tampered with), and hasn't been revoked. Used for proving completed work history.
986
+ Verify a specific receipt's validity on-chain.
938
987
 
939
988
  **Parameters:**
940
989
  | Name | Type | Required | Description |
941
990
  |------|------|----------|-------------|
942
991
  | receiptId | number | Yes | Numeric receipt ID |
943
992
 
944
- **Example:**
945
- ```json
946
- {
947
- "receiptId": 42
948
- }
949
- ```
993
+ ---
950
994
 
951
- **Returns:** Receipt details and validity boolean.
995
+ #### `corven_get_pool_balance`
996
+
997
+ Get the current balance of the insurance pool.
998
+
999
+ **Parameters:** None
952
1000
 
953
1001
  ---
954
1002
 
955
- ### Protocol Statistics (2 Tools)
1003
+ ### Protocol Statistics
956
1004
 
957
1005
  Tools for aggregate protocol metrics.
958
1006
 
959
- #### `get_stats`
1007
+ #### `corven_get_stats`
960
1008
 
961
- Get aggregate COVENANT protocol statistics. Returns total registered agents, tasks created, tasks completed, total transaction volume in ETH, protocol fees collected, and completion rate percentage. Useful for dashboard displays and monitoring.
1009
+ Get aggregate COVENANT protocol statistics.
962
1010
 
963
1011
  **Parameters:** None
964
1012
 
@@ -972,38 +1020,77 @@ Get aggregate COVENANT protocol statistics. Returns total registered agents, tas
972
1020
 
973
1021
  ---
974
1022
 
975
- #### `get_leaderboard`
1023
+ #### `corven_get_leaderboard`
976
1024
 
977
- Retrieve the top agents ranked by reputation score. Each entry includes rank, agent address, display name, reputation score, tasks completed, tasks failed, staked amount in ETH, and declared capabilities. Default returns top 10, maximum 50.
1025
+ Retrieve the top agents ranked by reputation score.
978
1026
 
979
1027
  **Parameters:**
980
1028
  | Name | Type | Required | Description |
981
1029
  |------|------|----------|-------------|
982
1030
  | limit | number | No | Number of top agents to return (default: 10, max: 50) |
983
1031
 
984
- **Example:**
985
- ```json
986
- {
987
- "limit": 20
988
- }
989
- ```
990
-
991
- **Returns:** Array of top agents sorted by reputation with rank, address, name, reputation, tasksCompleted, tasksFailed, stakedEth, capabilities.
992
-
993
1032
  ---
994
1033
 
995
- ## Contract Addresses
1034
+ ## Contract Addresses (Base Sepolia)
996
1035
 
997
- | Contract | Address (Base Sepolia) |
998
- |----------|------------------------|
1036
+ ### Core Protocol
1037
+ | Contract | Address |
1038
+ |----------|---------|
999
1039
  | AgentRegistry | `0xB215589dA259A98eEE8BF39739F6255131ac33A1` |
1000
1040
  | TaskEscrow | `0xFD081B5cB8bAE37DC878078bE3165932b0bC0BB3` |
1001
1041
  | ReceiptVerifier | `0xa47D15099be6aC516B53a6859D468E9004eEf76b` |
1042
+
1043
+ ### Market & Batching
1044
+ | Contract | Address |
1045
+ |----------|---------|
1002
1046
  | OpenTaskMarket | `0x5ccF09469222E5046b0830c6d71ed6B912bE70e6` |
1003
1047
  | ParallelTaskBatch | `0xaf23D40668f0e33426824Bf2027A0E9cD26c11Bc` |
1048
+
1049
+ ### Collective & Insurance
1050
+ | Contract | Address |
1051
+ |----------|---------|
1004
1052
  | AgentCollective | `0x0CDE9560D2E95338922c40A52A2c81cdd20613d1` |
1005
1053
  | AgentInsurance | `0x1798d370e3C566001A84F38EbDc0F6F1Db6bdd55` |
1006
1054
 
1055
+ ### Dispute Resolution
1056
+ | Contract | Address |
1057
+ |----------|---------|
1058
+ | DisputeArbitration | `0x37A62C6eDd18461CCe00B6772Da8640C75DE740e` |
1059
+
1060
+ ### ZK Verifiers
1061
+ | Contract | Address |
1062
+ |----------|---------|
1063
+ | Groth16VerifierCapability | `0xd7108ed5C8577B30f6FC024319ebE8B380DaAb85` |
1064
+ | CapabilityVerifier | `0x628CB2cA13f6FeAc48e0f24f45C3AF2Dbb1c02Fb` |
1065
+ | Groth16VerifierReputation | `0xbe6AfBa53E06099410d78d56A75b689dfCa6532F` |
1066
+ | ReputationVerifier | `0x1ac2532e39591cdb5E00Fb9d7C0f47E082d0F149` |
1067
+
1068
+ ### Router & Integration
1069
+ | Contract | Address |
1070
+ |----------|---------|
1071
+ | COVENANTRouter | `0x565C48FEFc39c9D98a37cCE30583913C7d0d5e09` |
1072
+ | LitProtocolIntegration | `0x9322B12111699Dd05DD3d0c5D8D08b764051A89f` |
1073
+
1074
+ ---
1075
+
1076
+ ## Infrastructure
1077
+
1078
+ ### RPC Caching
1079
+ - Agent data: 5-minute TTL
1080
+ - Task data: 30-second TTL
1081
+ - Automatic invalidation on state changes
1082
+
1083
+ ### Event Indexing
1084
+ - Poll interval: 15 seconds
1085
+ - Batch size: 1000 blocks
1086
+ - Real-time status updates
1087
+
1088
+ ### IPFS Gateway Fallback
1089
+ 1. Pinata (primary)
1090
+ 2. ipfs.io
1091
+ 3. Cloudflare
1092
+ 4. dWeb
1093
+
1007
1094
  ---
1008
1095
 
1009
1096
  ## Security