> ## Documentation Index
> Fetch the complete documentation index at: https://shinydapps-bd9fa40b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# VERITY

> 10 L402-संरक्षित सेवाओं वाला स्वायत्त AI एजेंट। sats कमाता है, sats में भुगतान करता है।

# VERITY

VERITY एक स्वायत्त AI एजेंट है जो l402-kit पर बनाया गया है। वह L402 प्रोटोकॉल के माध्यम से 10 सेवाएं बेचती है, एक Bitcoin खजाना संचित करती है, और मांग के आधार पर अपनी कीमतें स्वयं समायोजित करती है — बिना किसी मानवीय हस्तक्षेप के।

**डिस्कवरी एंडपॉइंट:** `GET https://l402kit.com/api/verity`

***

## 10 सेवाएं

| सेवा            | एंडपॉइंट                   | कीमत        | आवश्यकता |
| --------------- | -------------------------- | ----------- | -------- |
| वेब सर्च        | `/api/verity/search`       | 100 sats    | —        |
| वेब स्क्रेपिंग  | `/api/verity/scrape`       | 200 sats    | —        |
| BTC मूल्य       | `/api/verity/btc-price`    | 10 sats     | —        |
| सारांश          | `/api/verity/summarize`    | 50 sats     | —        |
| भावना विश्लेषण  | `/api/verity/sentiment`    | 30 sats     | —        |
| डोमेन इंटेल     | `/api/verity/domain-intel` | 500 sats    | —        |
| l402-kit एकीकरण | `/api/verity/integration`  | 10,000 sats | —        |
| विश्व स्थिति    | `/api/verity/worldstate`   | 80 sats     | —        |
| अनुवाद          | `/api/verity/translate`    | 50 sats     | —        |
| शोध             | `/api/verity/research`     | 300 sats    | —        |

कीमतें गतिशील हैं — VERITY हर 30 मिनट में मांग के आधार पर उन्हें समायोजित करती है।

***

## भुगतान कैसे करें

प्रत्येक सेवा मानक L402 का पालन करती है:

```bash theme={null}
# चरण 1 — सेवा का अनुरोध करें (इनवॉइस प्राप्त करें)
curl -i https://l402kit.com/api/verity/btc-price

# HTTP/1.1 402 Payment Required
# WWW-Authenticate: L402 macaroon="...", invoice="lnbc..."

# चरण 2 — किसी भी Lightning वॉलेट से इनवॉइस का भुगतान करें
# चरण 3 — प्रमाण के साथ पुनः प्रयास करें
curl -H "Authorization: L402 <macaroon>:<preimage>" \
  https://l402kit.com/api/verity/btc-price
```

***

## L402Client के साथ स्वचालित भुगतान

```typescript theme={null}
import { L402Client } from "l402-kit/agent";
import { BlinkWallet } from "l402-kit/wallets";

const client = new L402Client({
  wallet: new BlinkWallet(process.env.BLINK_API_KEY!),
  budget: { maxSats: 500 },
});

// BTC मूल्य — 10 sats
const price = await client.fetch("https://l402kit.com/api/verity/btc-price");
const data = await price.json();
console.log(data.bitcoin.usd);

// विश्व स्थिति — 80 sats
const world = await client.fetch("https://l402kit.com/api/verity/worldstate");
const state = await world.json();
console.log(state.time.utc, state.location.city, state.weather.temperature_c);
```

***

## सेवा संदर्भ

### सर्च — 100 sats

वेब सर्च जो शीर्ष 10 ऑर्गेनिक परिणाम लौटाती है।

```bash theme={null}
# GET
curl -H "Authorization: L402 <token>" \
  "https://l402kit.com/api/verity/search?q=bitcoin+lightning"

# POST
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"q":"bitcoin lightning"}' \
  https://l402kit.com/api/verity/search
```

**प्रतिक्रिया:**

```json theme={null}
{
  "agent": "VERITY",
  "service": "search",
  "query": "bitcoin lightning",
  "results": [
    { "title": "...", "link": "...", "snippet": "..." }
  ],
  "paid_with": "⚡ Lightning L402"
}
```

***

### वेब स्क्रेपिंग — 200 sats

पूरे पृष्ठ की सामग्री को markdown के रूप में लौटाती है।

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}' \
  https://l402kit.com/api/verity/scrape
```

***

### BTC मूल्य — 10 sats

USD, EUR और BRL में Bitcoin का वास्तविक समय मूल्य।

```bash theme={null}
curl -H "Authorization: L402 <token>" \
  https://l402kit.com/api/verity/btc-price
```

**प्रतिक्रिया:**

```json theme={null}
{
  "bitcoin": { "usd": 98000, "eur": 90000, "brl": 550000 },
  "timestamp": "2026-05-10T12:00:00.000Z"
}
```

***

### सारांश — 50 sats

50,000 अक्षरों तक AI सारांशीकरण।

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"text":"...long text...", "language":"portuguese"}' \
  https://l402kit.com/api/verity/summarize
```

***

### भावना विश्लेषण — 30 sats

स्कोर, विश्वास और कीवर्ड के साथ भावना विश्लेषण।

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"text":"Bitcoin is the future of money"}' \
  https://l402kit.com/api/verity/sentiment
```

**प्रतिक्रिया:**

```json theme={null}
{
  "analysis": {
    "sentiment": "positive",
    "score": 0.92,
    "confidence": 0.88,
    "keywords": ["bitcoin", "future", "money"]
  }
}
```

***

### डोमेन इंटेल — 500 sats

WHOIS, DNS रिकॉर्ड और SSL प्रमाणपत्र। कोई API कुंजी नहीं — सार्वजनिक RDAP और crt.sh का उपयोग करता है।

```bash theme={null}
curl -H "Authorization: L402 <token>" \
  "https://l402kit.com/api/verity/domain-intel?domain=example.com"
```

**प्रतिक्रिया:**

```json theme={null}
{
  "domain": "example.com",
  "whois": { "registrar": "...", "registered": "...", "expires": "..." },
  "dns": { "a_records": ["93.184.216.34"] },
  "certificates": [{ "issued": "...", "expires": "...", "issuer": "..." }]
}
```

***

### l402-kit एकीकरण — 10,000 sats

एक सार्वजनिक GitHub रेपो URL भेजें। VERITY कोडबेस का विश्लेषण करती है और पूर्ण l402-kit एकीकरण कोड लौटाती है।

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"repoUrl":"https://github.com/owner/repo"}' \
  https://l402kit.com/api/verity/integration
```

**प्रतिक्रिया:**

````json theme={null}
{
  "repo": "owner/repo",
  "integration": "## Detected: Express.js\n\n```typescript\nimport { l402 } from 'l402-kit';\n...",
  "next_steps": ["Apply integration code", "Set env vars", "Deploy and test"]
}
````

***

### विश्व स्थिति — 80 sats

एक ही कॉल में UTC समय + कॉलर का भू-स्थान + स्थानीय मौसम। शून्य बाहरी API लागत।

```bash theme={null}
curl -H "Authorization: L402 <token>" \
  https://l402kit.com/api/verity/worldstate
```

**प्रतिक्रिया:**

```json theme={null}
{
  "time": {
    "utc": "2026-05-10T14:32:00.000Z",
    "unix": 1778421120,
    "hour": 14, "minute": 32, "weekday": "Sun"
  },
  "location": {
    "city": "São Paulo", "country": "BR", "timezone": "America/Sao_Paulo"
  },
  "weather": {
    "temperature_c": 23.4,
    "feels_like_c": 22.1,
    "humidity_pct": 68,
    "condition": "partly cloudy"
  }
}
```

***

### शोध — 300 sats

गहन शोध बंडल: एक ही कॉल में सर्च + स्क्रेप + AI सारांशीकरण। 3 अलग भुगतान और 3 गुना राउंडट्रिप विलंबता की बचत करता है।

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"query": "bitcoin lightning network adoption 2026"}' \
  https://l402kit.com/api/verity/research
```

**प्रतिक्रिया:**

```json theme={null}
{
  "agent": "VERITY",
  "service": "research",
  "query": "bitcoin lightning network adoption 2026",
  "summary": "Lightning Network adoption has accelerated significantly in 2026...",
  "scraped_url": "https://example.com/article",
  "sources": [
    { "title": "...", "link": "...", "snippet": "..." }
  ],
  "provider": "serper",
  "paid_with": "⚡ Lightning L402"
}
```

**सेवाओं को अलग-अलग कॉल करने की तुलना में:** सर्च (100 sats) + स्क्रेप (200 sats) + सारांश (50 sats) = कुल 350 sats। शोध की लागत 300 sats है — सस्ता और एक भुगतान।

***

### अनुवाद — 50 sats

पाठ या MDX दस्तावेज़ीकरण को 11 समर्थित भाषाओं में से किसी में अनुवाद करता है। जब `format` `mdx` हो, तो कोड ब्लॉक, MDX कॉम्पोनेंट, URL और तकनीकी शब्द बिल्कुल सुरक्षित रहते हैं — केवल गद्य का अनुवाद होता है।

**समर्थित लोकेल:** `pt`, `es`, `zh`, `ar`, `hi`, `fr`, `de`, `ru`, `ja`, `it`, `en`

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"text": "Pay once, access forever.", "locale": "pt", "format": "plain"}' \
  https://l402kit.com/api/verity/translate
```

**MDX फ़ॉर्मेट** (कोड ब्लॉक और कॉम्पोनेंट सुरक्षित रखता है):

```bash theme={null}
curl -X POST -H "Authorization: L402 <token>" \
  -H "Content-Type: application/json" \
  -d '{"text": "---\ntitle: Quickstart\n---\n\nPay with Lightning.", "locale": "ja", "format": "mdx"}' \
  https://l402kit.com/api/verity/translate
```

**प्रतिक्रिया:**

```json theme={null}
{
  "agent": "VERITY",
  "service": "translate",
  "locale": "pt",
  "language": "Brazilian Portuguese",
  "format": "plain",
  "translated": "Pague uma vez, acesse para sempre.",
  "source_length": 26,
  "paid_with": "⚡ Lightning L402"
}
```

अधिकतम इनपुट: प्रति कॉल 100,000 अक्षर।

***

## गतिशील मूल्य निर्धारण

VERITY हर 30 मिनट में कीमतें समायोजित करती है:

```
उच्च मांग (> सीमा कॉल/घंटा) → कीमत × 1.1
शून्य मांग (2 लगातार घंटे)   → कीमत × 0.9
न्यूनतम सुरक्षा               → कीमत कभी न्यूनतम से नीचे नहीं जाती
```

किसी भी समय वर्तमान कीमतें जांचें:

```bash theme={null}
curl https://l402kit.com/api/verity | jq '.services[].priceSats'
```

***

***

## सार्वजनिक डिस्कवरी एंडपॉइंट

इन दो एंडपॉइंट के लिए L402 भुगतान आवश्यक नहीं है — ये VERITY के कैटलॉग और वित्त को ऑडिट और खोज के लिए उजागर करते हैं।

### GET /api/verity/services

सभी सक्रिय सेवाओं का मशीन-readable कैटलॉग जिसमें लाइव मूल्य, floor और surge threshold शामिल हैं।

```bash theme={null}
curl https://l402kit.com/api/verity/services
```

```json theme={null}
{
  "services": [
    {
      "id": "search",
      "endpoint": "https://l402kit.com/api/verity/search",
      "price_sats": 500,
      "floor_sats": 500,
      "cogs_sats": 50,
      "surge_threshold": 50
    }
  ],
  "count": 10,
  "updated": "2026-05-12T14:32:00.000Z"
}
```

### GET /api/verity/fiscal

VERITY की दैनिक वित्तीय रिपोर्ट — राजस्व, लागत, मार्जिन और प्रति-सेवा विवरण। 00:00 UTC पर उत्पन्न होती है।

```bash theme={null}
curl https://l402kit.com/api/verity/fiscal
```

```json theme={null}
{
  "date": "2026-05-12",
  "agent": "VERITY",
  "revenue_sats": 8450,
  "consumer_spent_sats": 340,
  "net_sats": 8110,
  "margin_pct": "95.98",
  "usd_equivalent": "10.00",
  "btc_usd_rate": 95000,
  "breakdown": {
    "search": { "calls": 21, "price": 500, "revenue": 10500, "success_rate": 98 }
  },
  "generated_at": "2026-05-12T00:00:01.000Z"
}
```

रिपोर्ट 7 दिनों के लिए संग्रहीत की जाती हैं। यदि दिन की रिपोर्ट अभी तक नहीं बनी है तो 404 लौटाता है।

## ऑपरेटर API

यदि आप अपना एजेंट चलाने के लिए VERITY को फोर्क करते हैं, तो ये एंडपॉइंट आपको रनटाइम पर मूल्य निर्धारण और बजट बदलने देते हैं — बिना किसी डिप्लॉय के।

सभी एडमिन रूट के लिए `DASHBOARD_SECRET` हेडर आवश्यक है:

```
Authorization: Bearer <DASHBOARD_SECRET>
```

### GET /api/verity/admin/config

सभी सेवाओं के लिए वर्तमान मूल्य निर्धारण कॉन्फ़िग और उपभोक्ता खर्च लौटाता है।

```bash theme={null}
curl -H "Authorization: Bearer <secret>" \
  https://l402kit.com/api/verity/admin/config
```

**प्रतिक्रिया:**

```json theme={null}
{
  "configs": {
    "search":  { "base": 100, "floor": 50, "surgeThreshold": 50, "cogs": 2 },
    "translate": { "base": 50, "floor": 50, "surgeThreshold": 30, "cogs": 1 }
  },
  "prices": { "search": 100, "translate": 50 },
  "consumer": { "spent_today": 340, "budget": 10000 }
}
```

### POST /api/verity/admin/config

किसी विशिष्ट सेवा के लिए मूल्य निर्धारण पैरामीटर अपडेट करता है। केवल प्रदान किए गए फ़ील्ड बदले जाते हैं।

```bash theme={null}
curl -X POST -H "Authorization: Bearer <secret>" \
  -H "Content-Type: application/json" \
  -d '{"service": "search", "base": 150, "floor": 80}' \
  https://l402kit.com/api/verity/admin/config
```

| फ़ील्ड           | विवरण                                                         |
| ---------------- | ------------------------------------------------------------- |
| `service`        | सेवा का नाम (आवश्यक)                                          |
| `base`           | sats में आधार मूल्य                                           |
| `floor`          | न्यूनतम मूल्य (गतिशील मूल्य निर्धारण इससे नीचे कभी नहीं जाता) |
| `surgeThreshold` | कॉल/घंटा जो +10% वृद्धि को ट्रिगर करता है                     |
| `cogs`           | sats में माल की लागत (वित्तीय एजेंट द्वारा उपयोग)             |

### POST /api/verity/admin/budget

उपभोक्ता की दैनिक खर्च सीमा निर्धारित करता है।

```bash theme={null}
curl -X POST -H "Authorization: Bearer <secret>" \
  -H "Content-Type: application/json" \
  -d '{"sats": 5000}' \
  https://l402kit.com/api/verity/admin/budget
```

न्यूनतम: 100 sats। परिवर्तन तुरंत प्रभावी होते हैं।

***

## आर्किटेक्चर

```
VERITY (agent:shinydapps.verity)
  ├── 10 L402-संरक्षित सेवाएं
  ├── खजाना: shinydapps@blink.sv
  ├── हार्टबीट: हर 30 मिनट (मूल्य समायोजन + Satring मार्केट स्कैन)
  ├── क्वेरी कैश: KV-समर्थित, प्रति-सेवा TTL (5 मिनट–24 घंटे)
  ├── वित्तीय एजेंट: दैनिक रिपोर्ट 00:00 UTC → GET /api/verity/fiscal
  ├── सेवा सूची: मशीन-readable → GET /api/verity/services
  ├── एजेंट अनुबंध: GET /.well-known/agent.json → verity ब्लॉक
  └── LAW-N: प्रति लेनदेन व्यवहार संबंधी इवेंट उत्सर्जित
```

VERITY ओपन-सोर्स है — इसी आर्किटेक्चर को फोर्क करके आप अपना स्वायत्त एजेंट बना सकते हैं।
