@valiron/sdk 1.3.1 → 2.0.0
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.
- package/README.md +5 -140
- package/dist/clients.d.ts +8 -7
- package/dist/clients.js +35 -25
- package/dist/identity.d.ts +6 -0
- package/dist/identity.js +6 -1
- package/dist/identityMiddleware.d.ts +8 -0
- package/dist/identityMiddleware.js +12 -4
- package/dist/index.d.ts +10 -12
- package/dist/index.js +10 -11
- package/dist/middleware.d.ts +18 -9
- package/dist/middleware.js +41 -16
- package/dist/operatorSdk.d.ts +11 -2
- package/dist/operatorSdk.js +13 -7
- package/dist/types.d.ts +38 -18
- package/docs/AGENT-READY-APIS.md +3 -181
- package/docs/API-REFERENCE.md +160 -563
- package/docs/CHAINS.md +3 -3
- package/docs/CRAWLER-PROTECTION.md +376 -0
- package/docs/DASHBOARD.md +39 -23
- package/docs/E2E-MIDDLEWARE-INTEGRATION.md +20 -14
- package/docs/ERRORS.md +36 -17
- package/docs/IDENTITY.md +31 -19
- package/docs/PROVIDER-IDENTITY.md +19 -24
- package/docs/QUICKSTART.md +38 -26
- package/docs/README.md +20 -3
- package/docs/SANDBOX.md +12 -8
- package/docs/SDK-REFERENCE.md +87 -55
- package/docs/SECURITY-UPGRADE-2026-10-31.md +98 -0
- package/docs/TRUST-MODEL.md +17 -23
- package/docs/llms.txt +65 -292
- package/package.json +21 -5
package/docs/API-REFERENCE.md
CHANGED
|
@@ -1,21 +1,73 @@
|
|
|
1
|
-
# API Reference
|
|
1
|
+
# Valiron API Reference
|
|
2
|
+
|
|
3
|
+
See the [security upgrade guide](SECURITY-UPGRADE-2026-10-31.md) before upgrading existing integrations: trust gates require request-bound identity verification, and enrollment and signed-request contracts have changed.
|
|
4
|
+
|
|
5
|
+
[Valiron Crawler Protection](./CRAWLER-PROTECTION.md) runs as a standalone HTTP gateway or in-process middleware with shared admission state. Its private per-deployment work API lets other server languages acquire/release database capacity; it is not part of this hosted public REST API and must remain on private authenticated ingress. The package includes its protocol contract. The website dashboard validates/exports account-scoped configuration without deploying protection and displays optional runtime-reported crawler analytics. Its exports belong to the `@valiron/crawler-protection` package, not `@valiron/sdk`.
|
|
6
|
+
|
|
7
|
+
SDK 0.2.0+ requires a Free/Pro/Enterprise operator API key and account-bound activation via `activateCrawlerProtection()` before constructing its runtime. Activation uses a short-lived local lease, refreshed in the background. Each protected HTTP request requires hosted monthly quota admission; database operations are not counted again. See the crawler guide for revocation, outage and recovery behavior.
|
|
8
|
+
|
|
9
|
+
Machine-readable contract: [Valiron OpenAPI](https://www.valiron.co/openapi.json).
|
|
2
10
|
|
|
3
11
|
Base URL: `https://valiron-edge-proxy.onrender.com`
|
|
4
12
|
|
|
5
|
-
|
|
13
|
+
Supported integration endpoints:
|
|
6
14
|
|
|
7
|
-
- **Trust evaluation** (`/operator/agent/*`, `/operator/gate/*`, etc.) —
|
|
8
|
-
- **Dashboard** (`/operator/register`, `/operator/login`, `/operator/endpoints`, etc.) — JWT-authenticated. Used by the Operator Dashboard. See [DASHBOARD.md](./DASHBOARD.md) for the UI guide.
|
|
15
|
+
- **Trust evaluation** (`/operator/agent/*`, `/operator/gate/*`, etc.) — Profile reads, runtime gate and identity-verification requests require an operator key; Only Social Graph (Icebreaker) requires Pro signal access; use `Authorization: Bearer val_op_...`.
|
|
9
16
|
- **Agent-ready wrappers** (`/wrap/:operatorId/*`) — Public agent-facing URLs created from Dashboard endpoint configs. These can enforce x402/MPP payment, optional trust checks, rate limits, and upstream forwarding.
|
|
10
17
|
|
|
11
18
|
---
|
|
12
19
|
|
|
20
|
+
## Authentication
|
|
21
|
+
|
|
22
|
+
Get an operator API key from [the dashboard](https://www.valiron.co/dashboard). Send `Authorization: Bearer val_op_...` from your backend for profile/status reads and trust operations. Missing, invalid, or revoked credentials return HTTP 401. Keep keys out of browser code and public repositories.
|
|
23
|
+
|
|
24
|
+
Health and key-identity enrollment remain accessible without an operator key. Enrollment proves control of an agent key; it does not authorize profile reads or protected actions. Human verification uses signed proofs/provider callbacks. The private Icebreaker lookup also accepts a verified agent session for that agent's own address. Manage accounts, keys, and analytics through the website.
|
|
25
|
+
|
|
26
|
+
## Access and data boundaries
|
|
27
|
+
|
|
28
|
+
Profile endpoints require operator authentication and return identity and trust summaries. They do not return raw behavioral metrics, stored-evidence links, RPC URLs, internal errors, or verification-provider records. Self and World ID responses return an allowlisted verification summary; nullifiers, credential subjects, and provider storage references are private.
|
|
29
|
+
|
|
30
|
+
Sandbox runs require an operator API key. World ID/Self profiles, wallet intelligence, the trust-gated proxy, analytics, and webhook registration are included with Free and require an operator API key. Social Graph (Icebreaker) requires Pro. Crawler Protection is included on Free. Webhook deliveries are scoped to the operator that initiated the evaluation and the selected chain. Legacy global evaluation history and platform statistics are restricted to Valiron administrators; view your own account analytics in the dashboard.
|
|
31
|
+
|
|
32
|
+
Hosted gates, proxy forwarding, World ID enrollment and Self session creation also require a fresh registry-owner signature over the agent ID, chain, HTTP method, full destination URL and JSON body. Send `x-agent-timestamp`, `x-agent-nonce` and `x-agent-request-signature`; see the [exact signing contract](./SECURITY-UPGRADE-2026-10-31.md#hosted-wrappers-gates-and-proxy). Legacy key-registration challenges and `x-agent-session` do not authorize these routes. Trust-enabled wrappers require the same owner proof in addition to `x-agent-id`.
|
|
33
|
+
|
|
34
|
+
## Monthly request allowance
|
|
35
|
+
|
|
36
|
+
Free includes **10,000 metered agent requests per account per UTC calendar month**. Pro includes **100,000**. Bot protection has its own allowance of 10,000 on Free and 100,000 on Pro. Enterprise: email founders@valiron.co.
|
|
37
|
+
Request 10,000 on Free (100,000 on Pro) is allowed; subsequent requests return HTTP 429 with
|
|
38
|
+
`code: "MONTHLY_REQUEST_LIMIT_EXCEEDED"`, `error: "upgrade_required"`, `limit`,
|
|
39
|
+
`used`, `resetsAt`, and `upgradeUrl`. Free accounts can upgrade to Pro ($149/month, 100,000 requests per product),
|
|
40
|
+
while Pro accounts can email founders@valiron.co for Enterprise, or wait until
|
|
41
|
+
the next month at 00:00 UTC. Enterprise allowances are agreed separately; existing feature gates, per-endpoint rate limits and traffic
|
|
42
|
+
protections still apply. Crossing the limit never automatically subscribes or
|
|
43
|
+
charges an account.
|
|
44
|
+
|
|
45
|
+
The shared account allowance counts admitted calls to:
|
|
46
|
+
|
|
47
|
+
- `POST /operator/gate/:agentId`
|
|
48
|
+
- `POST /operator/identity/verify`
|
|
49
|
+
- `POST /operator/trigger-sandbox/:agentId` and `/operator/trigger-sandbox-key/:agentAddress`
|
|
50
|
+
- `POST /proxy/:agentId` (available on Free within usage limits)
|
|
51
|
+
- Any configured `/wrap/:operatorId/*` request, charged to the endpoint owner.
|
|
52
|
+
|
|
53
|
+
Direct metered calls require `Authorization: Bearer val_op_...`. Gate/proxy agent identity requirements still apply.
|
|
54
|
+
Wrappers resolve the account from the stored endpoint; an internal trust check
|
|
55
|
+
is included in the wrapper request, not counted again. For hosted wrappers, payment validation, local rate checks and trust admission precede the monthly counter. Rejected payment, rate or trust requests do not consume the owner's monthly allowance. Once admitted, a wrapper request can still count if its upstream subsequently fails. Authentication and monthly-limit rejections do not count.
|
|
56
|
+
Summary profile/discovery reads, identity challenges, health, account management,
|
|
57
|
+
checkout, and analytics are outside this allowance.
|
|
58
|
+
|
|
59
|
+
Responses include `X-Valiron-Monthly-Used` and `X-Valiron-Monthly-Reset`.
|
|
60
|
+
Free responses also include `X-Valiron-Monthly-Limit` and
|
|
61
|
+
`X-Valiron-Monthly-Remaining`. A quota rejection includes `Retry-After`.
|
|
62
|
+
If persistent usage storage is unavailable, metered calls return HTTP 503;
|
|
63
|
+
there is no process-local fallback that could bypass the allowance.
|
|
64
|
+
|
|
13
65
|
## Trust Evaluation Endpoints
|
|
14
66
|
|
|
15
67
|
### POST /operator/identity/verify
|
|
16
68
|
|
|
17
69
|
Normalize and verify a provider-backed agent identity proof. This endpoint is
|
|
18
|
-
provider-independent. SDK
|
|
70
|
+
provider-independent. The SDK exposes it as `verifyAgentIdentity()` and provides
|
|
19
71
|
dedicated middleware for `x-valiron-identity-*` proof headers. The ANS adapter
|
|
20
72
|
and provider credentials run inside Valiron's hosted service.
|
|
21
73
|
|
|
@@ -35,6 +87,9 @@ fresh signature, and unused nonce return `identityStatus: "verified"`.
|
|
|
35
87
|
"nonce": "nonce-0123456789abcdef",
|
|
36
88
|
"requestDigest": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
|
37
89
|
"keyId": "optional-provider-key-id",
|
|
90
|
+
"audience": "https://api.example.com",
|
|
91
|
+
"method": "POST",
|
|
92
|
+
"url": "https://api.example.com/quote",
|
|
38
93
|
"policy": {
|
|
39
94
|
"anonymous": "challenge",
|
|
40
95
|
"claimed": "block",
|
|
@@ -54,6 +109,9 @@ fresh signature, and unused nonce return `identityStatus: "verified"`.
|
|
|
54
109
|
| `signature` | string | for verification | Base64/base64url or `0x`-hex signature unless the resolver defines a provider-specific proof |
|
|
55
110
|
| `timestamp` | ISO timestamp | for verification | Signed time; default acceptance window is five minutes |
|
|
56
111
|
| `nonce` | string | for verification | 16–256 URL-safe characters; atomically claimed to prevent replay |
|
|
112
|
+
| `audience` | string | for verification | Trusted API audience, included in the v2 signature |
|
|
113
|
+
| `method` | string | for verification | Uppercase protected HTTP method |
|
|
114
|
+
| `url` | string | for verification | Exact absolute protected request URL, including query |
|
|
57
115
|
| `requestDigest` | string | for verification | `sha256:` plus 64 hexadecimal characters for the protected request bytes |
|
|
58
116
|
| `keyId` | string | no | Selects one provider-resolved verification key |
|
|
59
117
|
| `policy` | object | no | Per-status and per-risk actions. Every action must be `allow`, `limit`, `challenge`, or `block` |
|
|
@@ -156,16 +214,15 @@ Retrieve the complete trust profile for an agent.
|
|
|
156
214
|
"trustModels": ["reputation_on_chain", "behavioral_sandbox"]
|
|
157
215
|
},
|
|
158
216
|
"onchainReputation": {
|
|
159
|
-
"
|
|
217
|
+
"count": "12",
|
|
218
|
+
"totalFeedback": 12,
|
|
160
219
|
"averageScore": 92.5
|
|
161
220
|
},
|
|
162
221
|
"routing": {
|
|
163
|
-
"finalRoute": "prod"
|
|
164
|
-
"meetsThreshold": true
|
|
222
|
+
"finalRoute": "prod"
|
|
165
223
|
},
|
|
166
224
|
"chain": {
|
|
167
|
-
"
|
|
168
|
-
"chainId": 1
|
|
225
|
+
"network": "ethereum"
|
|
169
226
|
},
|
|
170
227
|
"timestamp": "2026-03-23T12:00:00.000Z"
|
|
171
228
|
}
|
|
@@ -197,9 +254,9 @@ Same structure as `GET /operator/agent/:agentId`.
|
|
|
197
254
|
|
|
198
255
|
---
|
|
199
256
|
|
|
200
|
-
## GET /operator/wallet-risk/:wallet
|
|
257
|
+
## GET /operator/wallet-risk/:wallet
|
|
201
258
|
|
|
202
|
-
Return an explainable wallet-history assessment. Requires
|
|
259
|
+
Return an explainable wallet-history assessment. Requires an operator API key on Free or paid accounts in `Authorization: Bearer val_op_...`.
|
|
203
260
|
|
|
204
261
|
### Parameters
|
|
205
262
|
|
|
@@ -247,7 +304,7 @@ Provider failures return HTTP 200 with `available: false`, `provider: "none"`, a
|
|
|
247
304
|
| Status | Meaning |
|
|
248
305
|
|--------|---------|
|
|
249
306
|
| 400 | Invalid EVM or Solana wallet address |
|
|
250
|
-
|
|
|
307
|
+
| 401 | Missing or invalid operator API key |
|
|
251
308
|
| 500 | Unexpected wallet-risk route failure |
|
|
252
309
|
|
|
253
310
|
---
|
|
@@ -256,7 +313,7 @@ Provider failures return HTTP 200 with `available: false`, `provider: "none"`, a
|
|
|
256
313
|
|
|
257
314
|
Lightweight wallet → agentId resolution. Returns just the agent ID and how it was resolved, without the full trust profile.
|
|
258
315
|
|
|
259
|
-
|
|
316
|
+
Wallet resolution returns the associated agent ID when available.
|
|
260
317
|
|
|
261
318
|
### Parameters
|
|
262
319
|
|
|
@@ -303,8 +360,7 @@ Execute real-time sandbox tests against an agent and compute a trust evaluation.
|
|
|
303
360
|
"meetsThreshold": true,
|
|
304
361
|
"testSummary": {},
|
|
305
362
|
"chain": {
|
|
306
|
-
"
|
|
307
|
-
"chainId": 1
|
|
363
|
+
"network": "ethereum"
|
|
308
364
|
},
|
|
309
365
|
"message": "Sandbox evaluation complete"
|
|
310
366
|
}
|
|
@@ -337,7 +393,7 @@ Trust gate — combined on-chain reputation + sandbox check. Returns an allow/de
|
|
|
337
393
|
| Field | Type | Default | Description |
|
|
338
394
|
|-------|------|---------|-------------|
|
|
339
395
|
| `minScore` | number | 65 | Minimum composite trust score required to allow |
|
|
340
|
-
| `trustSignals` | string[] | automatic | Selected signals.
|
|
396
|
+
| `trustSignals` | string[] | automatic | Selected signals. Only `icebreaker` (Social Graph) requires Pro |
|
|
341
397
|
| `ttlMs` | number | 86400000 | Cache TTL in milliseconds (default 24 hours) |
|
|
342
398
|
|
|
343
399
|
### Response — 200 OK
|
|
@@ -352,8 +408,7 @@ Trust gate — combined on-chain reputation + sandbox check. Returns an allow/de
|
|
|
352
408
|
"agentId": "25459",
|
|
353
409
|
"wallet": "0x52ce...",
|
|
354
410
|
"chain": {
|
|
355
|
-
"
|
|
356
|
-
"chainId": 1
|
|
411
|
+
"network": "ethereum"
|
|
357
412
|
},
|
|
358
413
|
"sandboxRan": false,
|
|
359
414
|
"cached": true,
|
|
@@ -397,9 +452,7 @@ Get the latest behavioral snapshot hash for an agent. Returns an opaque hash sui
|
|
|
397
452
|
"agentId": "25459",
|
|
398
453
|
"snapshotHash": "0x3a7f2b...",
|
|
399
454
|
"previousHash": "0x0",
|
|
400
|
-
"
|
|
401
|
-
"timestamp": "2026-04-01T12:00:00.000Z",
|
|
402
|
-
"interactionCount": 15
|
|
455
|
+
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
403
456
|
}
|
|
404
457
|
```
|
|
405
458
|
|
|
@@ -415,7 +468,7 @@ Get the latest behavioral snapshot hash for an agent. Returns an opaque hash sui
|
|
|
415
468
|
|
|
416
469
|
## POST /operator/webhooks/register
|
|
417
470
|
|
|
418
|
-
Register a webhook
|
|
471
|
+
Register a public HTTPS webhook with an operator API key on Free or paid accounts. Events are limited to evaluations initiated by that operator on the selected `chain`; registrations cannot subscribe to other operators. Existing registrations must be recreated after the privacy update. Set `?chain=<network>` when registering; use `?chain=key` for key-based evaluations.
|
|
419
472
|
|
|
420
473
|
### Request Body
|
|
421
474
|
|
|
@@ -431,7 +484,7 @@ Register a webhook URL to receive `evaluation_complete` events whenever Valiron
|
|
|
431
484
|
|-------|------|----------|-------------|
|
|
432
485
|
| `event` | string | yes | Must be `"evaluation_complete"` |
|
|
433
486
|
| `url` | string | yes | HTTPS endpoint to receive webhook POST requests |
|
|
434
|
-
| `agentIds` | number[] | no | Filter to specific agent IDs. Omit for
|
|
487
|
+
| `agentIds` | number[] | no | Filter to specific agent IDs. Omit for your own evaluations on the selected chain. |
|
|
435
488
|
|
|
436
489
|
### Response — 201 Created
|
|
437
490
|
|
|
@@ -491,7 +544,7 @@ When an evaluation completes, Valiron POSTs the following to your registered URL
|
|
|
491
544
|
|
|
492
545
|
---
|
|
493
546
|
|
|
494
|
-
## POST /
|
|
547
|
+
## POST /proxy/:agentId
|
|
495
548
|
|
|
496
549
|
Forward a request through Valiron's edge proxy with automatic trust gating, logging, and SSRF protection.
|
|
497
550
|
|
|
@@ -584,17 +637,15 @@ Verify a signed challenge to authenticate a key-based agent.
|
|
|
584
637
|
"riskLevel": null,
|
|
585
638
|
"route": null,
|
|
586
639
|
"icebreaker": null,
|
|
587
|
-
"reasons": [
|
|
588
|
-
"Identity verified via cryptographic challenge-response",
|
|
589
|
-
"No behavioral data yet — agent has not been scored"
|
|
590
|
-
],
|
|
640
|
+
"reasons": [],
|
|
591
641
|
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
592
642
|
}
|
|
593
643
|
```
|
|
594
644
|
|
|
595
645
|
### GET /operator/key/:agentAddress
|
|
596
646
|
|
|
597
|
-
Get the profile of a key-based agent.
|
|
647
|
+
Get the summary profile of a key-based agent using your operator API key. Icebreaker context and reasons are
|
|
648
|
+
redacted from this response.
|
|
598
649
|
|
|
599
650
|
#### Response — 200 OK
|
|
600
651
|
|
|
@@ -607,14 +658,47 @@ Get the profile of a key-based agent.
|
|
|
607
658
|
"riskLevel": "GREEN",
|
|
608
659
|
"route": "prod",
|
|
609
660
|
"icebreaker": null,
|
|
610
|
-
"reasons": [
|
|
611
|
-
"Identity verified via cryptographic challenge-response",
|
|
612
|
-
"Valiron behavioral tier: A (GREEN)"
|
|
613
|
-
],
|
|
661
|
+
"reasons": [],
|
|
614
662
|
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
615
663
|
}
|
|
616
664
|
```
|
|
617
665
|
|
|
666
|
+
### GET /operator/key/:agentAddress/icebreaker
|
|
667
|
+
|
|
668
|
+
Get the Icebreaker owner context for a verified key-based agent. Supply a Pro
|
|
669
|
+
operator API key as `Authorization: Bearer val_op_...`. The agent may instead
|
|
670
|
+
authenticate with its Valiron `x-agent-address` and `x-agent-session` headers.
|
|
671
|
+
The route returns `401` for a missing agent session and `403` when the caller
|
|
672
|
+
is neither that agent nor a Pro operator.
|
|
673
|
+
|
|
674
|
+
```typescript
|
|
675
|
+
const valiron = new ValironSDK({ apiKey: process.env.VALIRON_API_KEY });
|
|
676
|
+
const { icebreaker } = await valiron.getKeyAgentIcebreaker(agentAddress);
|
|
677
|
+
```
|
|
678
|
+
|
|
679
|
+
```json
|
|
680
|
+
{
|
|
681
|
+
"agentAddress": "0x...",
|
|
682
|
+
"icebreaker": {
|
|
683
|
+
"attested": true,
|
|
684
|
+
"uid": "0x...",
|
|
685
|
+
"owner": "Jane Doe",
|
|
686
|
+
"verifiedHandles": [{ "source": "github", "handle": "janedoe" }],
|
|
687
|
+
"organization": "Acme",
|
|
688
|
+
"profileUrl": "https://app.icebreaker.xyz/profiles/...",
|
|
689
|
+
"credentialUrl": "https://app.icebreaker.xyz/credentials/..."
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
```
|
|
693
|
+
|
|
694
|
+
When no matching credential exists, `icebreaker` is `{ "attested": false }`.
|
|
695
|
+
These are verified profile handles, not Icebreaker connections or mutuals.
|
|
696
|
+
Valiron checks the off-chain EAS signature, UID, signer, schema, recipient,
|
|
697
|
+
credential name, and expiry before returning `attested: true`. The lookup uses
|
|
698
|
+
Icebreaker's profile API and does not independently check off-chain revocation.
|
|
699
|
+
The Web2 middleware's behavioral score does not change when this attestation
|
|
700
|
+
appears; the API seller must enforce any policy that uses it.
|
|
701
|
+
|
|
618
702
|
---
|
|
619
703
|
|
|
620
704
|
## World ID Endpoints
|
|
@@ -623,64 +707,51 @@ Verify agent-human linkage via Worldcoin's zero-knowledge proof system.
|
|
|
623
707
|
|
|
624
708
|
### POST /operator/world-id/verify/:agentId
|
|
625
709
|
|
|
626
|
-
Submit
|
|
627
|
-
|
|
628
|
-
| Parameter | Location | Type | Required | Description |
|
|
629
|
-
|-----------|----------|------|----------|-------------|
|
|
630
|
-
| `agentId` | path | string | yes | ERC-8004 token ID |
|
|
631
|
-
|
|
632
|
-
#### Request Body
|
|
710
|
+
Submit the complete, unmodified production IDKit result for an on-chain agent with an authenticated operator and fresh owner-signed request. The server validates the configured action and RP verifier response before storing the link. Current enrollment accepts proof-of-human credentials and derives the stored strength from verified evidence; an `orb`, `device` or `phone` string supplied by the caller does not prove strength. Older links without server-verification provenance require re-verification.
|
|
633
711
|
|
|
634
712
|
```json
|
|
635
713
|
{
|
|
636
714
|
"merkle_root": "0x...",
|
|
637
715
|
"nullifier_hash": "0x...",
|
|
638
716
|
"proof": "0x...",
|
|
639
|
-
"
|
|
717
|
+
"verification_level": "orb",
|
|
718
|
+
"idkit_result": {
|
|
719
|
+
"protocol_version": "4.0",
|
|
720
|
+
"environment": "production",
|
|
721
|
+
"action": "verify-agent",
|
|
722
|
+
"responses": [{ "identifier": "proof_of_human", "issuer_schema_id": 1, "nullifier": "0x...", "proof": ["0x..."] }]
|
|
723
|
+
}
|
|
640
724
|
}
|
|
641
725
|
```
|
|
642
726
|
|
|
727
|
+
The example is schematic: forward the actual IDKit result unchanged, not reconstructed placeholder fields. A successful response contains only the allowlisted verification summary.
|
|
728
|
+
|
|
643
729
|
#### Response — 200 OK
|
|
644
730
|
|
|
645
731
|
```json
|
|
646
732
|
{
|
|
647
|
-
"
|
|
733
|
+
"ok": true,
|
|
648
734
|
"agentId": "25459",
|
|
649
|
-
"
|
|
650
|
-
"
|
|
735
|
+
"worldId": { "verified": true, "verificationLevel": "orb" },
|
|
736
|
+
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
651
737
|
}
|
|
652
738
|
```
|
|
653
739
|
|
|
654
740
|
### GET /operator/world-id/status/:agentId
|
|
655
741
|
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
#### Response — 200 OK
|
|
742
|
+
Read verification status with your operator API key.
|
|
659
743
|
|
|
660
744
|
```json
|
|
661
745
|
{
|
|
662
|
-
"
|
|
663
|
-
"
|
|
664
|
-
"
|
|
746
|
+
"agentId": "25459",
|
|
747
|
+
"worldId": { "verified": true, "verificationLevel": "orb" },
|
|
748
|
+
"timestamp": "2026-04-01T12:00:00.000Z"
|
|
665
749
|
}
|
|
666
750
|
```
|
|
667
751
|
|
|
668
752
|
### GET /operator/world-id/profile/:agentId
|
|
669
753
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
#### Response — 200 OK
|
|
673
|
-
|
|
674
|
-
```json
|
|
675
|
-
{
|
|
676
|
-
"agentId": "25459",
|
|
677
|
-
"worldId": {
|
|
678
|
-
"verified": true,
|
|
679
|
-
"level": "orb",
|
|
680
|
-
"verifiedAt": "2026-04-01T12:00:00.000Z"
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
```
|
|
754
|
+
Requires a Free or paid operator key. Social Graph enrichment is returned only for Pro/Enterprise; Free receives `icebreaker: { "attested": false }`, `humanTrust.hasBackground: false`, and no social reasons. Returns `agentId`, the same allowlisted `worldId` summary, `identity`, `icebreaker`, `humanTrust`, `reasons`, and `timestamp`. `identity` can be `null`; `icebreaker` is `{ "attested": false }` when no attestation is found. The `humanTrust` object contains `hasHumanLink`, `hasBackground`, and `verificationLevel`.
|
|
684
755
|
|
|
685
756
|
---
|
|
686
757
|
|
|
@@ -690,7 +761,7 @@ Create Self Enterprise verification sessions, receive signed Self webhooks, and
|
|
|
690
761
|
|
|
691
762
|
### POST /operator/self/session/:agentId
|
|
692
763
|
|
|
693
|
-
Create a Self Enterprise verification session
|
|
764
|
+
Create a Self Enterprise verification session with operator authentication and a fresh registry-owner signature. Only owner-authorized sessions can establish a trusted link through the signed provider callback. Omit return URLs or use HTTPS URLs on `https://valiron.co`; arbitrary callback origins are rejected.
|
|
694
765
|
|
|
695
766
|
| Parameter | Location | Type | Required | Description |
|
|
696
767
|
|-----------|----------|------|----------|-------------|
|
|
@@ -702,8 +773,8 @@ Create a Self Enterprise verification session for an agent.
|
|
|
702
773
|
{
|
|
703
774
|
"selfAgentId": "self-agent-...",
|
|
704
775
|
"selfAgentRegistry": "0x...",
|
|
705
|
-
"successUrl": "https://
|
|
706
|
-
"failureUrl": "https://
|
|
776
|
+
"successUrl": "https://valiron.co/verified",
|
|
777
|
+
"failureUrl": "https://valiron.co/failed",
|
|
707
778
|
"expiresInSeconds": 900,
|
|
708
779
|
"metadata": {}
|
|
709
780
|
}
|
|
@@ -726,39 +797,13 @@ Create a Self Enterprise verification session for an agent.
|
|
|
726
797
|
}
|
|
727
798
|
```
|
|
728
799
|
|
|
729
|
-
### POST /operator/self/webhook
|
|
730
|
-
|
|
731
|
-
Receive signed Self Enterprise webhooks. This endpoint verifies the raw request body with `SelfWebhooks.verify(...)`, stores only valid `verification.completed` events, and optionally re-verifies proofs when `SELF_TEST_ORG_ID` or `SELF_LIVE_ORG_ID` is configured.
|
|
732
|
-
|
|
733
|
-
Configure this URL in the Self dashboard:
|
|
734
|
-
|
|
735
|
-
```text
|
|
736
|
-
https://<edge-proxy-host>/operator/self/webhook
|
|
737
|
-
```
|
|
738
|
-
|
|
739
|
-
Self environment variables are split by deployment mode. `SELF_ENV=test` or `SELF_ENV=live` selects which credentials create new sessions; the webhook accepts both configured test and live signing secrets.
|
|
740
|
-
|
|
741
|
-
```text
|
|
742
|
-
SELF_ENV=test
|
|
743
|
-
SELF_TEST_API_KEY=sk_test_...
|
|
744
|
-
SELF_TEST_FLOW_ID=...
|
|
745
|
-
SELF_TEST_WEBHOOK_SECRET=whsec_...
|
|
746
|
-
SELF_LIVE_API_KEY=sk_live_...
|
|
747
|
-
SELF_LIVE_FLOW_ID=...
|
|
748
|
-
SELF_LIVE_WEBHOOK_SECRET=whsec_...
|
|
749
|
-
```
|
|
750
|
-
|
|
751
800
|
### GET /operator/self/status/:agentId
|
|
752
801
|
|
|
753
802
|
Check if an agent has a verified Self eligible-human link.
|
|
754
803
|
|
|
755
804
|
### GET /operator/self/profile/:agentId
|
|
756
805
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
### POST /operator/self/verify/:agentId
|
|
760
|
-
|
|
761
|
-
Trusted-payload ingestion for local/internal tests only. Disabled unless `SELF_ALLOW_TRUSTED_PAYLOADS=true`; production should use `/operator/self/session/:agentId` and `/operator/self/webhook`.
|
|
806
|
+
Requires a Free or paid operator key. Returns `self` eligibility and agent-binding predicates, `identity`, `humanTrust`, `reasons`, and `timestamp`. Provider identifiers are omitted from `self`.
|
|
762
807
|
|
|
763
808
|
---
|
|
764
809
|
|
|
@@ -771,7 +816,7 @@ Health check endpoint.
|
|
|
771
816
|
```json
|
|
772
817
|
{
|
|
773
818
|
"status": "ok",
|
|
774
|
-
"supportedChains": ["ethereum", "monad", "arbitrum", "base"
|
|
819
|
+
"supportedChains": ["ethereum", "monad", "arbitrum", "base"],
|
|
775
820
|
"defaultChain": "ethereum"
|
|
776
821
|
}
|
|
777
822
|
```
|
|
@@ -793,9 +838,9 @@ Solana agent identity and reputation data is provided by [QuantuLabs 8004-solana
|
|
|
793
838
|
| **Identity source** | ERC-8004 `ownerOf()` on-chain call | QuantuLabs `loadAgent()` SDK call |
|
|
794
839
|
| **Reputation source** | ERC-8004 `getSummary()` | QuantuLabs ATOM engine (`getEnrichedSummary()`) |
|
|
795
840
|
| **Extra reputation fields** | — | `solana.trustTier`, `solana.qualityScore`, `solana.confidence`, `solana.riskScore`, `solana.uniqueCallers` |
|
|
796
|
-
| **Wallet → Agent resolution** |
|
|
841
|
+
| **Wallet → Agent resolution** | Supported EVM registries | Supported Solana registry |
|
|
797
842
|
| **Liveness check** | — | `isItAlive()` endpoint-by-endpoint health probe |
|
|
798
|
-
| **Feedback write-back** | — | Valiron scores written on-chain via `giveFeedback()`
|
|
843
|
+
| **Feedback write-back** | — | Valiron scores written on-chain via `giveFeedback()` when enabled by Valiron |
|
|
799
844
|
|
|
800
845
|
### Sequential Agent IDs
|
|
801
846
|
|
|
@@ -803,10 +848,10 @@ Solana agents are primarily identified by their base-58 asset pubkey, but the Qu
|
|
|
803
848
|
|
|
804
849
|
```bash
|
|
805
850
|
# By asset pubkey (primary)
|
|
806
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
851
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
807
852
|
|
|
808
853
|
# By sequential ID (convenience)
|
|
809
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
854
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
810
855
|
```
|
|
811
856
|
|
|
812
857
|
When a sequential ID is used, the response includes a `sequentialId` field mapping back to the numeric ID.
|
|
@@ -838,7 +883,7 @@ The `trigger-sandbox` endpoint also includes a `liveness` summary in its respons
|
|
|
838
883
|
|
|
839
884
|
### Feedback Write-Back
|
|
840
885
|
|
|
841
|
-
When
|
|
886
|
+
When feedback write-back is enabled, Valiron automatically writes evaluation scores back to the Solana reputation registry after sandbox testing and gate evaluations. This closes the trust loop — other consumers of the 8004-solana registry can see Valiron's scores.
|
|
842
887
|
|
|
843
888
|
Feedback is submitted as fire-and-forget using the `starred` tag with `tag2: "valiron"` for attribution.
|
|
844
889
|
|
|
@@ -868,287 +913,30 @@ When querying a Solana agent, the `onchainReputation` object may include an addi
|
|
|
868
913
|
|
|
869
914
|
```bash
|
|
870
915
|
# Get Solana agent profile
|
|
871
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
916
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k...?chain=solana"
|
|
872
917
|
|
|
873
918
|
# Get Solana agent by sequential ID
|
|
874
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
919
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/42?chain=solana"
|
|
875
920
|
|
|
876
921
|
# Gate a Solana agent
|
|
877
|
-
curl -X POST "https://valiron-edge-proxy.onrender.com/operator/gate/GL4k...?chain=solana"
|
|
922
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" -X POST "https://valiron-edge-proxy.onrender.com/operator/gate/GL4k...?chain=solana"
|
|
878
923
|
|
|
879
924
|
# Check liveness
|
|
880
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k.../liveness?chain=solana"
|
|
925
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/agent/GL4k.../liveness?chain=solana"
|
|
881
926
|
|
|
882
927
|
# Look up by Solana wallet
|
|
883
|
-
curl "https://valiron-edge-proxy.onrender.com/operator/wallet/7xKX...?chain=solana"
|
|
928
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" "https://valiron-edge-proxy.onrender.com/operator/wallet/7xKX...?chain=solana"
|
|
884
929
|
|
|
885
930
|
# Trigger sandbox for Solana agent
|
|
886
|
-
curl -X POST "https://valiron-edge-proxy.onrender.com/operator/trigger-sandbox/GL4k...?chain=solana"
|
|
887
|
-
```
|
|
888
|
-
|
|
889
|
-
### Environment Variables
|
|
890
|
-
|
|
891
|
-
| Variable | Default | Description |
|
|
892
|
-
|----------|---------|-------------|
|
|
893
|
-
| `SOLANA_CLUSTER` | `mainnet-beta` | Solana cluster (`mainnet-beta` or `devnet`) |
|
|
894
|
-
| `SOLANA_RPC_URL` | Public RPC | Custom Solana RPC endpoint |
|
|
895
|
-
| `SOLANA_FEEDBACK_KEYPAIR` | — | JSON array secret key (e.g. `[1,2,...,64]`) for feedback write-back. When set, Valiron scores are written on-chain after evaluation. |
|
|
896
|
-
|
|
897
|
-
---
|
|
898
|
-
|
|
899
|
-
## Dashboard Endpoints (JWT-Authenticated)
|
|
900
|
-
|
|
901
|
-
All dashboard endpoints require a `Authorization: Bearer <jwt>` header. Get a JWT by calling `POST /operator/login`.
|
|
902
|
-
|
|
903
|
-
---
|
|
904
|
-
|
|
905
|
-
### POST /operator/register
|
|
906
|
-
|
|
907
|
-
Create a new operator account.
|
|
908
|
-
|
|
909
|
-
#### Request Body
|
|
910
|
-
|
|
911
|
-
```json
|
|
912
|
-
{
|
|
913
|
-
"email": "you@example.com",
|
|
914
|
-
"password": "SecurePass123!",
|
|
915
|
-
"name": "Your Name"
|
|
916
|
-
}
|
|
917
|
-
```
|
|
918
|
-
|
|
919
|
-
#### Response — 200 OK
|
|
920
|
-
|
|
921
|
-
```json
|
|
922
|
-
{
|
|
923
|
-
"operator": { "id": "uuid", "email": "you@example.com", "name": "Your Name", "role": "operator" },
|
|
924
|
-
"apiKey": "val_op_xxxx..."
|
|
925
|
-
}
|
|
926
|
-
```
|
|
927
|
-
|
|
928
|
-
> **Important:** The `apiKey` is shown once. Copy it immediately.
|
|
929
|
-
|
|
930
|
-
---
|
|
931
|
-
|
|
932
|
-
### POST /operator/login
|
|
933
|
-
|
|
934
|
-
Authenticate and receive a JWT token.
|
|
935
|
-
|
|
936
|
-
#### Request Body
|
|
937
|
-
|
|
938
|
-
```json
|
|
939
|
-
{
|
|
940
|
-
"email": "you@example.com",
|
|
941
|
-
"password": "SecurePass123!"
|
|
942
|
-
}
|
|
931
|
+
curl -H "Authorization: Bearer $VALIRON_API_KEY" -X POST "https://valiron-edge-proxy.onrender.com/operator/trigger-sandbox/GL4k...?chain=solana"
|
|
943
932
|
```
|
|
944
933
|
|
|
945
|
-
#### Response — 200 OK
|
|
946
|
-
|
|
947
|
-
```json
|
|
948
|
-
{
|
|
949
|
-
"operator": { "id": "uuid", "email": "you@example.com", "name": "Your Name", "role": "operator" },
|
|
950
|
-
"token": "eyJhbGciOi..."
|
|
951
|
-
}
|
|
952
|
-
```
|
|
953
|
-
|
|
954
|
-
---
|
|
955
|
-
|
|
956
|
-
### GET /operator/me
|
|
957
|
-
|
|
958
|
-
Get the current operator's profile. Requires JWT.
|
|
959
|
-
|
|
960
|
-
#### Response — 200 OK
|
|
961
|
-
|
|
962
|
-
```json
|
|
963
|
-
{
|
|
964
|
-
"ok": true,
|
|
965
|
-
"operator": {
|
|
966
|
-
"id": "uuid",
|
|
967
|
-
"email": "you@example.com",
|
|
968
|
-
"name": "Your Name",
|
|
969
|
-
"role": "operator",
|
|
970
|
-
"plan": "standard",
|
|
971
|
-
"fee_rate": "0.03",
|
|
972
|
-
"onboarding_completed_at": "2026-01-01T00:05:00.000Z",
|
|
973
|
-
"created_at": "2026-01-01T00:00:00.000Z",
|
|
974
|
-
"updated_at": "2026-01-01T00:00:00.000Z"
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
```
|
|
978
|
-
|
|
979
|
-
---
|
|
980
|
-
|
|
981
|
-
### PATCH /operator/me
|
|
982
|
-
|
|
983
|
-
Update operator name. Requires JWT.
|
|
984
|
-
|
|
985
|
-
#### Request Body
|
|
986
|
-
|
|
987
|
-
```json
|
|
988
|
-
{
|
|
989
|
-
"name": "New Name"
|
|
990
|
-
}
|
|
991
|
-
```
|
|
992
|
-
|
|
993
|
-
---
|
|
994
|
-
|
|
995
|
-
### POST /operator/onboarding/complete
|
|
996
|
-
|
|
997
|
-
Mark the guided account setup as completed or dismissed. Requires JWT. This
|
|
998
|
-
endpoint is idempotent, so clients can safely retry it.
|
|
999
|
-
|
|
1000
|
-
New accounts have a null `onboarding_completed_at` value until this endpoint is
|
|
1001
|
-
called. Valiron uses that value to resume unfinished setup after email, Google,
|
|
1002
|
-
or GitHub authentication.
|
|
1003
|
-
|
|
1004
|
-
#### Response — 200 OK
|
|
1005
|
-
|
|
1006
|
-
```json
|
|
1007
|
-
{
|
|
1008
|
-
"ok": true,
|
|
1009
|
-
"operator": {
|
|
1010
|
-
"id": "uuid",
|
|
1011
|
-
"email": "you@example.com",
|
|
1012
|
-
"onboarding_completed_at": "2026-01-01T00:05:00.000Z"
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
```
|
|
1016
|
-
|
|
1017
|
-
---
|
|
1018
|
-
|
|
1019
|
-
### GET /operator/keys
|
|
1020
|
-
|
|
1021
|
-
List all API keys for the current operator. Requires JWT.
|
|
1022
|
-
|
|
1023
|
-
#### Response — 200 OK
|
|
1024
|
-
|
|
1025
|
-
```json
|
|
1026
|
-
[
|
|
1027
|
-
{
|
|
1028
|
-
"id": "uuid",
|
|
1029
|
-
"keyPrefix": "val_op_c010...",
|
|
1030
|
-
"label": null,
|
|
1031
|
-
"revoked": false,
|
|
1032
|
-
"lastUsed": "2026-04-01T00:00:00.000Z",
|
|
1033
|
-
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
1034
|
-
}
|
|
1035
|
-
]
|
|
1036
|
-
```
|
|
1037
|
-
|
|
1038
|
-
---
|
|
1039
|
-
|
|
1040
|
-
### POST /operator/keys/rotate
|
|
1041
|
-
|
|
1042
|
-
Generate a new API key. Requires JWT.
|
|
1043
|
-
|
|
1044
|
-
#### Request Body (optional)
|
|
1045
|
-
|
|
1046
|
-
```json
|
|
1047
|
-
{
|
|
1048
|
-
"label": "production-key"
|
|
1049
|
-
}
|
|
1050
|
-
```
|
|
1051
|
-
|
|
1052
|
-
#### Response — 200 OK
|
|
1053
|
-
|
|
1054
|
-
```json
|
|
1055
|
-
{
|
|
1056
|
-
"key": "val_op_xxxx...",
|
|
1057
|
-
"id": "uuid",
|
|
1058
|
-
"label": "production-key"
|
|
1059
|
-
}
|
|
1060
|
-
```
|
|
1061
|
-
|
|
1062
|
-
> **Important:** The full key is shown once. Copy it immediately.
|
|
1063
|
-
|
|
1064
|
-
---
|
|
1065
|
-
|
|
1066
|
-
### DELETE /operator/keys/:keyId
|
|
1067
|
-
|
|
1068
|
-
Revoke an API key. Requires JWT.
|
|
1069
|
-
|
|
1070
|
-
---
|
|
1071
|
-
|
|
1072
|
-
### GET /operator/endpoints
|
|
1073
|
-
|
|
1074
|
-
List all registered agent-ready wrappers for the current operator. Requires JWT.
|
|
1075
|
-
|
|
1076
|
-
#### Response — 200 OK
|
|
1077
|
-
|
|
1078
|
-
```json
|
|
1079
|
-
[
|
|
1080
|
-
{
|
|
1081
|
-
"id": "uuid",
|
|
1082
|
-
"path": "/weather",
|
|
1083
|
-
"method": "GET",
|
|
1084
|
-
"pricePerCall": "0.001000",
|
|
1085
|
-
"description": "Returns weather data",
|
|
1086
|
-
"rateLimit": 60,
|
|
1087
|
-
"targetUrl": "https://api.example.com",
|
|
1088
|
-
"paymentProtocol": "x402",
|
|
1089
|
-
"paymentNetwork": "eip155:8453",
|
|
1090
|
-
"trustEnabled": false,
|
|
1091
|
-
"upstreamAuthType": "none",
|
|
1092
|
-
"active": true,
|
|
1093
|
-
"createdAt": "2026-01-01T00:00:00.000Z"
|
|
1094
|
-
}
|
|
1095
|
-
]
|
|
1096
|
-
```
|
|
1097
|
-
|
|
1098
|
-
---
|
|
1099
|
-
|
|
1100
|
-
### POST /operator/endpoints
|
|
1101
|
-
|
|
1102
|
-
Create a hosted agent-ready API wrapper. Requires JWT.
|
|
1103
|
-
|
|
1104
|
-
#### Request Body
|
|
1105
|
-
|
|
1106
|
-
```json
|
|
1107
|
-
{
|
|
1108
|
-
"path": "/weather",
|
|
1109
|
-
"method": "GET",
|
|
1110
|
-
"pricePerCall": 0.001,
|
|
1111
|
-
"description": "Returns weather data",
|
|
1112
|
-
"rateLimit": 60,
|
|
1113
|
-
"targetUrl": "https://api.example.com",
|
|
1114
|
-
"paymentProtocol": "x402",
|
|
1115
|
-
"paymentNetwork": "eip155:8453",
|
|
1116
|
-
"payoutAddress": "0xYourReceivingWallet",
|
|
1117
|
-
"trustEnabled": false,
|
|
1118
|
-
"upstreamAuthType": "hmac",
|
|
1119
|
-
"upstreamAuthSecret": "replace-with-a-unique-shared-secret"
|
|
1120
|
-
}
|
|
1121
|
-
```
|
|
1122
|
-
|
|
1123
|
-
| Field | Type | Required | Description |
|
|
1124
|
-
|-------|------|----------|-------------|
|
|
1125
|
-
| `path` | string | yes | Public wrapper path (e.g. `/weather`). Callers use `/wrap/{operatorId}/weather`. |
|
|
1126
|
-
| `method` | string | no | HTTP method (default: `GET`) |
|
|
1127
|
-
| `pricePerCall` | number | yes | Price in USD per call. Use `0` for a free wrapper. |
|
|
1128
|
-
| `description` | string | no | Endpoint description |
|
|
1129
|
-
| `rateLimit` | number | no | Max requests/min per agent (null = unlimited) |
|
|
1130
|
-
| `targetUrl` | string | yes | Existing upstream API base URL. Valiron appends `path` to this base URL when forwarding. Must be HTTPS in production. Private/internal addresses are blocked. |
|
|
1131
|
-
| `paymentProtocol` | string | no | `x402` or `mpp`. Defaults to `x402`. |
|
|
1132
|
-
| `paymentNetwork` | string | no | Payment network. Use `eip155:8453` or `eip155:84532` for x402, and `tempo:4217` or `tempo:42431` for MPP. |
|
|
1133
|
-
| `payoutAddress` | string | no | Receiving wallet for paid x402 wrappers. Required if no platform default receiving address is configured. |
|
|
1134
|
-
| `trustEnabled` | boolean | no | When true, the wrapper requires Valiron agent identity headers and checks trust before forwarding. |
|
|
1135
|
-
| `upstreamAuthType` | string | no | `none`, `bearer`, `api_key`, or `hmac`. Defaults to `none`. Use `hmac` for a public origin that must reject direct requests. |
|
|
1136
|
-
| `upstreamAuthHeader` | string | no | Header name for `api_key` or `hmac`; defaults to `x-api-key` and `x-valiron-signature` respectively. Ignored by `bearer`. |
|
|
1137
|
-
| `upstreamAuthSecret` | string | required when auth is enabled | Shared secret, stored encrypted at rest. For `hmac`, your origin uses it to verify the signature and `x-valiron-timestamp`. |
|
|
1138
|
-
|
|
1139
|
-
---
|
|
1140
|
-
|
|
1141
|
-
### DELETE /operator/endpoints/:endpointId
|
|
1142
|
-
|
|
1143
|
-
Deactivate an endpoint (soft delete). Requires JWT.
|
|
1144
|
-
|
|
1145
|
-
---
|
|
1146
934
|
|
|
1147
935
|
## Agent-Ready Wrapper Endpoint
|
|
1148
936
|
|
|
1149
937
|
### ALL /wrap/:operatorId/*
|
|
1150
938
|
|
|
1151
|
-
Public agent-facing wrapper URL. This endpoint is created by `POST /operator/endpoints` or the **
|
|
939
|
+
Public agent-facing wrapper URL. This endpoint is created by `POST /operator/endpoints` or the **API Scaffolding → Endpoints & testing** dashboard flow.
|
|
1152
940
|
|
|
1153
941
|
```text
|
|
1154
942
|
https://valiron-edge-proxy.onrender.com/wrap/{operatorId}/{path}
|
|
@@ -1162,7 +950,11 @@ The wrapper matches the operator ID, path, and HTTP method to an active endpoint
|
|
|
1162
950
|
|--------|----------|-------------|
|
|
1163
951
|
| `X-PAYMENT` | paid x402 retry | x402 payment payload returned by an x402-capable client. |
|
|
1164
952
|
| `Authorization: Payment ...` | paid MPP retry | MPP payment authorization header. |
|
|
1165
|
-
| `x-agent-id` | if trust enabled |
|
|
953
|
+
| `x-agent-id` | if trust enabled | Registry agent ID; this header alone cannot authorize the caller. |
|
|
954
|
+
| `x-agent-timestamp` | if trust enabled | Signed timestamp in milliseconds; accepted within 60 seconds. |
|
|
955
|
+
| `x-agent-nonce` | if trust enabled | Fresh 24–128 character URL-safe nonce; single use. |
|
|
956
|
+
| `x-agent-request-signature` | if trust enabled | Current registry-owner signature over the v2 wallet-request payload. |
|
|
957
|
+
| `x-chain` | explicit chain recommended | Selects the wrapper registry network; the signed chain must match. |
|
|
1166
958
|
| `x-agent-address` | not supported by hosted trust wrappers | Use SDK middleware in your own backend when you need key/address identity support. |
|
|
1167
959
|
|
|
1168
960
|
#### Free Wrapper Response
|
|
@@ -1214,202 +1006,7 @@ pnpm exec mppx https://valiron-edge-proxy.onrender.com/wrap/{operatorId}/researc
|
|
|
1214
1006
|
|
|
1215
1007
|
---
|
|
1216
1008
|
|
|
1217
|
-
### GET /operator/analytics/stats
|
|
1218
|
-
|
|
1219
|
-
Aggregate stats for the current operator. Requires JWT.
|
|
1220
|
-
|
|
1221
|
-
#### Response — 200 OK
|
|
1222
|
-
|
|
1223
|
-
```json
|
|
1224
|
-
{
|
|
1225
|
-
"totalCalls": 1250,
|
|
1226
|
-
"totalRevenue": "62.50",
|
|
1227
|
-
"uniqueAgents": 18,
|
|
1228
|
-
"avgResponseMs": 145,
|
|
1229
|
-
"errorRate": "0.024",
|
|
1230
|
-
"callsToday": 42,
|
|
1231
|
-
"revenueToday": "2.10"
|
|
1232
|
-
}
|
|
1233
|
-
```
|
|
1234
|
-
|
|
1235
|
-
---
|
|
1236
|
-
|
|
1237
|
-
### GET /operator/analytics/revenue?days=30
|
|
1238
|
-
|
|
1239
|
-
Daily revenue time series. Requires JWT.
|
|
1240
|
-
|
|
1241
|
-
#### Response — 200 OK
|
|
1242
|
-
|
|
1243
|
-
```json
|
|
1244
|
-
[
|
|
1245
|
-
{ "date": "2026-04-01", "revenue": "3.50", "calls": 70 },
|
|
1246
|
-
{ "date": "2026-04-02", "revenue": "4.25", "calls": 85 }
|
|
1247
|
-
]
|
|
1248
|
-
```
|
|
1249
|
-
|
|
1250
|
-
---
|
|
1251
|
-
|
|
1252
|
-
### GET /operator/analytics/top-endpoints?limit=10
|
|
1253
|
-
|
|
1254
|
-
Top endpoints ranked by call volume. Requires JWT.
|
|
1255
|
-
|
|
1256
|
-
---
|
|
1257
|
-
|
|
1258
|
-
### GET /operator/analytics/agents?sortBy=lastSeen&limit=50&offset=0
|
|
1259
|
-
|
|
1260
|
-
Paginated agent summaries. Requires JWT.
|
|
1261
|
-
|
|
1262
|
-
| Parameter | Type | Default | Description |
|
|
1263
|
-
|-----------|------|---------|-------------|
|
|
1264
|
-
| `sortBy` | string | `lastSeen` | Sort by: `lastSeen`, `calls`, `spent`, `errors` |
|
|
1265
|
-
| `limit` | number | 50 | Page size |
|
|
1266
|
-
| `offset` | number | 0 | Offset |
|
|
1267
|
-
|
|
1268
|
-
---
|
|
1269
|
-
|
|
1270
|
-
### GET /operator/analytics/agents/:agentId
|
|
1271
|
-
|
|
1272
|
-
Detailed view of a single agent. Requires JWT. Returns summary stats, endpoint breakdown, recent call log, and the current predictive risk forecast.
|
|
1273
|
-
|
|
1274
|
-
The `prediction` object is an explainable forecast derived from recent sandbox evaluations, behavioral fingerprints, and operator call logs:
|
|
1275
|
-
|
|
1276
|
-
```json
|
|
1277
|
-
{
|
|
1278
|
-
"prediction": {
|
|
1279
|
-
"agentId": "25459",
|
|
1280
|
-
"modelVersion": "heuristic-v1",
|
|
1281
|
-
"predictedNextScore": 72,
|
|
1282
|
-
"passProbability": 0.68,
|
|
1283
|
-
"riskDirection": "worsening",
|
|
1284
|
-
"confidence": "medium",
|
|
1285
|
-
"recommendedPolicy": "sandbox",
|
|
1286
|
-
"recommendedTests": ["rate_limit", "concurrency"],
|
|
1287
|
-
"reasons": [
|
|
1288
|
-
{
|
|
1289
|
-
"severity": "warning",
|
|
1290
|
-
"signal": "score_trend",
|
|
1291
|
-
"message": "Recent evaluation scores are trending down.",
|
|
1292
|
-
"weight": -12
|
|
1293
|
-
}
|
|
1294
|
-
],
|
|
1295
|
-
"evidenceWindow": {
|
|
1296
|
-
"evaluationCount": 5,
|
|
1297
|
-
"callCount": 42,
|
|
1298
|
-
"fingerprintSampleCount": 5,
|
|
1299
|
-
"from": "2026-07-01T12:00:00.000Z",
|
|
1300
|
-
"to": "2026-07-13T12:00:00.000Z"
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
```
|
|
1305
|
-
|
|
1306
|
-
---
|
|
1307
|
-
|
|
1308
|
-
### GET /operator/analytics/agents/:agentId/prediction
|
|
1309
|
-
|
|
1310
|
-
Fetch only the predictive risk forecast for one agent. Requires JWT.
|
|
1311
|
-
|
|
1312
|
-
Use this when you want to show a pre-action warning, trigger a new sandbox test, or decide whether the next request should be allowed, throttled, stepped up, sandboxed, or denied.
|
|
1313
|
-
|
|
1314
|
-
Before using persisted prediction snapshots in a new edge-proxy deployment, apply database migrations:
|
|
1315
|
-
|
|
1316
|
-
```bash
|
|
1317
|
-
pnpm --filter edge-proxy db:migrate
|
|
1318
|
-
```
|
|
1319
|
-
|
|
1320
|
-
| Field | Type | Description |
|
|
1321
|
-
|-------|------|-------------|
|
|
1322
|
-
| `predictedNextScore` | number | Forecasted next Valiron score on a 0-110 scale |
|
|
1323
|
-
| `passProbability` | number | Estimated probability that the next evaluation/action passes policy |
|
|
1324
|
-
| `riskDirection` | string | `improving`, `stable`, `worsening`, or `unknown` |
|
|
1325
|
-
| `confidence` | string | `low`, `medium`, or `high` based on evidence volume |
|
|
1326
|
-
| `recommendedPolicy` | string | `allow`, `throttle`, `sandbox`, `step_up`, or `deny` |
|
|
1327
|
-
| `recommendedTests` | string[] | Test families most relevant to run next |
|
|
1328
|
-
| `reasons` | object[] | Human-readable signals explaining the forecast |
|
|
1329
|
-
|
|
1330
|
-
---
|
|
1331
|
-
|
|
1332
|
-
### GET /operator/analytics/logs
|
|
1333
|
-
|
|
1334
|
-
Paginated call logs. Requires JWT.
|
|
1335
|
-
|
|
1336
|
-
| Parameter | Type | Default | Description |
|
|
1337
|
-
|-----------|------|---------|-------------|
|
|
1338
|
-
| `limit` | number | 50 | Page size |
|
|
1339
|
-
| `offset` | number | 0 | Offset |
|
|
1340
|
-
| `days` | number | — | Filter to last N days |
|
|
1341
|
-
| `agentId` | string | — | Filter by agent |
|
|
1342
|
-
| `endpointId` | string | — | Filter by endpoint |
|
|
1343
|
-
|
|
1344
|
-
---
|
|
1345
|
-
|
|
1346
|
-
### POST /operator/playground
|
|
1347
|
-
|
|
1348
|
-
Execute a test request through the edge proxy as a simulated agent. Requires JWT. See [DASHBOARD.md — API Playground](./DASHBOARD.md#api-playground).
|
|
1349
|
-
|
|
1350
|
-
#### Request Body
|
|
1351
|
-
|
|
1352
|
-
```json
|
|
1353
|
-
{
|
|
1354
|
-
"method": "GET",
|
|
1355
|
-
"path": "/api/v1/weather?city=NYC",
|
|
1356
|
-
"headers": { "Content-Type": "application/json" },
|
|
1357
|
-
"body": null,
|
|
1358
|
-
"agentId": "25459",
|
|
1359
|
-
"chain": "ethereum",
|
|
1360
|
-
"dryRun": false
|
|
1361
|
-
}
|
|
1362
|
-
```
|
|
1363
|
-
|
|
1364
|
-
| Field | Type | Required | Description |
|
|
1365
|
-
|-------|------|----------|-------------|
|
|
1366
|
-
| `path` | string | yes | Target path or absolute URL |
|
|
1367
|
-
| `agentId` | string | yes | ERC-8004 agent ID to simulate |
|
|
1368
|
-
| `method` | string | no | HTTP method (default: `GET`) |
|
|
1369
|
-
| `headers` | object | no | Custom request headers |
|
|
1370
|
-
| `body` | string | no | Request body (for POST/PUT/PATCH) |
|
|
1371
|
-
| `chain` | string | no | Chain (default: `ethereum`) |
|
|
1372
|
-
| `dryRun` | boolean | no | If `true`, returns trust evaluation without logging the call |
|
|
1373
|
-
|
|
1374
|
-
#### Response — 200 OK (standard mode)
|
|
1375
|
-
|
|
1376
|
-
```json
|
|
1377
|
-
{
|
|
1378
|
-
"ok": true,
|
|
1379
|
-
"statusCode": 200,
|
|
1380
|
-
"statusText": "OK",
|
|
1381
|
-
"responseHeaders": {},
|
|
1382
|
-
"responseBody": "<downstream response body or trust evaluation JSON>",
|
|
1383
|
-
"responseMs": 145,
|
|
1384
|
-
"costCharged": "0.0500",
|
|
1385
|
-
"route": "prod",
|
|
1386
|
-
"tierResolved": "AA"
|
|
1387
|
-
}
|
|
1388
|
-
```
|
|
1389
|
-
|
|
1390
|
-
#### Response — 200 OK (dry-run mode)
|
|
1391
|
-
|
|
1392
|
-
```json
|
|
1393
|
-
{
|
|
1394
|
-
"ok": true,
|
|
1395
|
-
"statusCode": null,
|
|
1396
|
-
"statusText": null,
|
|
1397
|
-
"responseHeaders": {},
|
|
1398
|
-
"responseBody": "{\"dryRun\":true,\"message\":\"Routing and pricing validated — request was not forwarded to your backend\",\"agentId\":\"25459\",\"chain\":\"ethereum\",\"tier\":\"AA\",\"route\":\"prod\",\"pricePerCall\":\"0.0500\",\"endpointRegistered\":true,\"trustProfile\":{\"onchainScore\":92.5,\"feedbackCount\":\"12\",\"routingDecision\":null}}",
|
|
1399
|
-
"responseMs": null,
|
|
1400
|
-
"costCharged": "0.0500",
|
|
1401
|
-
"route": "prod",
|
|
1402
|
-
"tierResolved": "AA"
|
|
1403
|
-
}
|
|
1404
|
-
```
|
|
1405
|
-
|
|
1406
|
-
---
|
|
1407
1009
|
|
|
1408
|
-
|
|
1010
|
+
## Crawler Protection telemetry (Free / Pro / Enterprise)
|
|
1409
1011
|
|
|
1410
|
-
|
|
1411
|
-
|----------|--------|-------------|
|
|
1412
|
-
| `/operator/admin/stats` | GET | Platform-wide stats |
|
|
1413
|
-
| `/operator/admin/operators` | GET | List all operators with aggregate stats |
|
|
1414
|
-
| `/operator/admin/operators/:id` | GET | Full operator detail (keys, endpoints, agents, revenue) |
|
|
1415
|
-
| `/operator/admin/operators/:id/logs` | GET | Call logs for a specific operator |
|
|
1012
|
+
`POST /operator/crawlers/telemetry` accepts bounded cumulative reports using a server-side operator API key. `GET /operator/crawlers/analytics` uses the dashboard operator session and returns only that account's rolling origin metrics, instance status, shared capacity and monitoring alerts. Neither endpoint accepts a caller-selected account. Both require current Free/Pro/Enterprise access and return private, non-cacheable responses. Invalid snapshots return 400, authentication failures 401, plan/tenant failures 403, counter/cardinality conflicts 409, excessive reporting frequency 429 and unavailable storage 503. Duplicate or older sequences return `{ "accepted": false }` without adding counts. The first accepted report establishes a baseline. See [reporting setup and limits](./CRAWLER-PROTECTION.md#live-dashboard-analytics). The private work-admission API remains on customer infrastructure.
|