From a0469bcdc9da78bea78002eb8f9bc151d7c7c692 Mon Sep 17 00:00:00 2001 From: Drew Jacobs Date: Sat, 14 Mar 2026 17:26:37 +0900 Subject: [PATCH] Revamp the public site shell --- src/routes/blog.ts | 136 ++--- src/routes/methodology.ts | 727 ++++++++++++++------------- src/services/discoveryService.ts | 189 ++++--- src/templates/certify.ts | 682 ++++++++++++++----------- src/templates/directory.ts | 458 ++++++++++------- src/templates/pricing.ts | 834 ++++++++++++++++--------------- src/templates/publicPage.ts | 631 +++++++++++++++++++++++ 7 files changed, 2265 insertions(+), 1392 deletions(-) create mode 100644 src/templates/publicPage.ts diff --git a/src/routes/blog.ts b/src/routes/blog.ts index 1f98525..c9583d6 100644 --- a/src/routes/blog.ts +++ b/src/routes/blog.ts @@ -1,120 +1,58 @@ import { Hono } from 'hono' import { buildPublicUrl, getPublicBaseUrl } from '../config/public.js' +import { renderPublicFooter, renderPublicHeadStart, renderPublicNav } from '../templates/publicPage.js' const blog = new Hono() const SITE = getPublicBaseUrl() const BLOG_URL = buildPublicUrl('/blog') const BLOG_RSS_URL = buildPublicUrl('/blog/rss.xml') -// ─── Shared head / design tokens (matches index.html gold/navy system) ─── - -const blogHead = (title: string, description: string, slug = '') => ` - - - - -${title} — DJD Agent Score - - - - - - - - - - - - - - - -` +const blogNav = renderPublicNav('blog', '/pricing', 'Get Started') -const blogFooter = ` - - -` +const blogFooter = renderPublicFooter({ + copy: 'Research, release notes, and field reports from DJD Agent Score as we build trust infrastructure for apps, marketplaces, and agent networks.', +}) // ─── Shared article CSS (used by all blog posts) ─── const BLOG_ARTICLE_CSS = ` -.article{max-width:720px;margin:0 auto;padding:120px 32px 0} -.article-back{display:inline-flex;align-items:center;gap:6px;font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--text-muted);margin-bottom:40px;transition:color .2s} +.article{max-width:860px;margin:0 auto;padding:92px 28px 0} +.article-back{display:inline-flex;align-items:center;gap:6px;font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--text-muted);margin-bottom:30px;transition:color .2s} .article-back:hover{color:var(--accent);text-decoration:none} .article-meta{display:flex;gap:12px;align-items:center;margin-bottom:24px} .article-date{font-family:'JetBrains Mono',monospace;font-size:11px;color:var(--text-muted)} .article-tag{font-family:'JetBrains Mono',monospace;font-size:10px;font-weight:600;color:var(--accent);background:var(--accent-dim);border:1px solid var(--border-hi);padding:3px 10px;border-radius:100px;text-transform:uppercase;letter-spacing:.5px} -.article h1{font-family:'Instrument Serif',serif;font-size:clamp(30px,4.5vw,46px);font-weight:400;line-height:1.15;margin-bottom:20px;letter-spacing:-0.5px} -.article .lead{font-size:18px;color:var(--text-dim);line-height:1.8;margin-bottom:48px;padding-bottom:40px;border-bottom:1px solid var(--border)} +.article h1{font-family:'Instrument Serif',serif;font-size:clamp(34px,4.5vw,54px);font-weight:400;line-height:1.08;margin-bottom:18px;letter-spacing:-0.04em} +.article .lead{font-size:18px;color:var(--text-dim);line-height:1.85;margin-bottom:36px;padding-bottom:28px;border-bottom:1px solid var(--border)} .prose h2{font-family:'Instrument Serif',serif;font-size:clamp(22px,3vw,30px);font-weight:400;margin-top:56px;margin-bottom:8px;letter-spacing:-0.3px} .prose h3{font-size:16px;font-weight:700;margin-top:32px;margin-bottom:8px;color:var(--text)} .prose p{font-size:15px;color:var(--text-dim);line-height:1.85;margin-bottom:16px} @@ -138,7 +76,7 @@ const BLOG_ARTICLE_CSS = ` .cta-box .btn{display:inline-flex;align-items:center;gap:6px;padding:12px 24px;border-radius:10px;font-size:14px;font-weight:600;background:var(--accent);color:var(--bg);text-decoration:none;margin-top:16px;transition:all .2s} .cta-box .btn:hover{opacity:.9;transform:translateY(-1px);text-decoration:none} .article-footer{margin-top:56px;padding-top:32px;border-top:1px solid var(--border);font-size:13px;color:var(--text-muted);line-height:1.65;font-style:italic} -@media(max-width:768px){.article{padding:100px 20px 0}} +@media(max-width:768px){.article{padding:72px 20px 0}} ` /** Generates head + shared article CSS for blog post pages. Pass extra CSS for post-specific styles. */ diff --git a/src/routes/methodology.ts b/src/routes/methodology.ts index fb4c65b..cc7059b 100644 --- a/src/routes/methodology.ts +++ b/src/routes/methodology.ts @@ -1,349 +1,408 @@ import { Hono } from 'hono' -import { buildPublicUrl, getSupportEmail } from '../config/public.js' +import { getSupportEmail } from '../config/public.js' +import { renderPublicPage } from '../templates/publicPage.js' const methodology = new Hono() -const METHODOLOGY_URL = buildPublicUrl('/methodology') const SUPPORT_EMAIL = getSupportEmail() -// ─── Design tokens (matches blog.ts / index.html) ─── - -const pageHtml = ` - - - - -Scoring Methodology — DJD Agent Score - - - - - - - - - - - - - - - -
- - -

Scoring Methodology

-

- DJD Agent Score produces a 0–100 trust score for any wallet on Base L2 and feeds the broader trust surfaces built on top of it. Every score is derived entirely from on-chain data — no opinions, no manual review, no black boxes. This page explains exactly how it works. -

- -
- -

How it works

-

When your agent calls the API with a wallet address, the scoring engine runs a five-phase pipeline:

-
    -
  • Fetch on-chain data — transaction history, USDC transfers, balances, basename, GitHub verification, and Insumer attestations, all pulled directly from the Base blockchain
  • -
  • Run sybil & gaming detection — seven behavioral checks for fake wallet networks, plus gaming detection for wallets inflating their stats
  • -
  • Calculate five dimensions — each dimension produces a 0–100 sub-score from specific on-chain signals
  • -
  • Compose final score — weighted sum of dimensions, adjusted by integrity multiplier, trajectory, and confidence dampening
  • -
  • Build explainability — confidence level, improvement paths, top contributors and detractors
  • -
-

The entire pipeline runs against live blockchain state. Scores are cached for one hour, and background jobs continuously refresh stale scores.

- -

The five dimensions

-

Each dimension measures a different aspect of wallet trustworthiness. Weights reflect how predictive each dimension is of reliable behavior.

- -
-
- Payment Reliability - 30% -
-

Does this wallet consistently execute transactions? Measures transaction success rate, total volume (log-scaled), nonce alignment, uptime estimation, and how recently the wallet was active.

-
- txSuccessRate - txCountLog - nonceAlignment - uptimeEstimate - recencyBonus -
-
- -
-
- Economic Viability - 25% -
-

Can this wallet actually pay? Evaluates ETH and USDC balances, income-to-spend ratio, wallet age, balance trends over 7 days, and whether the wallet has ever been drained to zero.

-
- ethBalance - usdcBalance - incomeRatio - walletAge - balanceTrend - zeroBalancePenalty -
-
- -
-
- Identity - 20% -
-

Has this wallet established a verifiable identity? Checks for agent registration, Base Name Service ownership, GitHub verification with activity signals, and multi-chain attestations via Insumer.

-
- registration - basename - githubVerified - githubActivity - insumerAttestation -
-
- -
-
- Behavior - 15% -
-

Does this wallet behave like a legitimate actor or a bot? Analyzes transaction timing patterns using inter-arrival coefficient of variation, hourly entropy (how spread out activity is across the day), and maximum gaps between transactions.

-
- interArrivalCV - hourlyEntropy - maxGapHours -
+.method-sidebar{ + position:sticky; + top:92px; + align-self:start; +} +.method-nav{ + display:grid; + gap:10px; +} +.method-nav a{ + display:block; + padding:10px 12px; + border-radius:12px; + border:1px solid var(--border); + color:var(--text-dim); + font-size:13px; + font-weight:600; + background:rgba(7,17,31,0.42); +} +.method-nav a:hover{ + color:var(--accent); + border-color:var(--border-hi); +} +.dim-card{ + padding:24px; + margin:22px 0; + border-radius:16px; + background:linear-gradient(180deg, rgba(17,35,58,0.88), rgba(12,27,45,0.9)); + border:1px solid var(--border); +} +.dim-header{ + display:flex; + justify-content:space-between; + align-items:center; + gap:12px; + margin-bottom:14px; +} +.dim-name{ + font-family:'Instrument Serif',serif; + font-size:26px; + font-weight:400; +} +.dim-weight{ + display:inline-flex; + align-items:center; + justify-content:center; + padding:6px 10px; + border-radius:999px; + background:var(--accent-dim); + color:var(--accent); + font-family:'JetBrains Mono',monospace; + font-size:11px; + font-weight:700; +} +.dim-desc{ + color:var(--text-dim); + font-size:14px; + line-height:1.8; + margin-bottom:14px; +} +.dim-signals{ + display:flex; + gap:8px; + flex-wrap:wrap; +} +.dim-signal{ + display:inline-flex; + align-items:center; + padding:6px 9px; + border-radius:999px; + border:1px solid var(--border); + background:rgba(7,17,31,0.58); + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:600; +} +.tier-table{ + width:100%; + border-collapse:collapse; + margin:22px 0; + border-radius:16px; + overflow:hidden; + background:rgba(7,17,31,0.42); + border:1px solid var(--border); +} +.tier-table th, +.tier-table td{ + padding:14px 16px; + border-bottom:1px solid var(--border); + text-align:left; +} +.tier-table th{ + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.1em; + text-transform:uppercase; + background:rgba(10,22,40,0.72); +} +.tier-table td{ + color:var(--text-dim); + font-size:14px; + line-height:1.7; +} +.tier-table tr:last-child td{ + border-bottom:none; +} +.tier-name{ + color:var(--text); + font-weight:700; +} +.tier-badge{ + display:inline-block; + width:8px; + height:8px; + border-radius:999px; + margin-right:8px; +} +.code-block{ + margin:22px 0; + padding:20px 22px; + border-radius:16px; + border:1px solid var(--border); + background:#050c17; + overflow:auto; +} +.code-block code{ + color:var(--text-dim); + font-family:'JetBrains Mono',monospace; + font-size:12px; + line-height:1.7; + white-space:pre; +} +.prose-callout{ + margin:22px 0; +} +.method-endnote{ + margin-top:28px; + color:var(--text-muted); + font-size:13px; + line-height:1.8; + font-style:italic; +} +@media(max-width:980px){ + .method-layout{ + grid-template-columns:1fr; + } + .method-sidebar{ + position:static; + } +} +` + +const pageHtml = renderPublicPage({ + title: 'Scoring Methodology — DJD Agent Score', + description: + 'How DJD turns on-chain activity into trust signals: five scoring dimensions, sybil detection, gaming penalties, and adaptive calibration.', + path: '/methodology', + nav: 'methodology', + ctaHref: '/docs', + ctaLabel: 'Open Docs', + ogType: 'article', + extraCss: methodologyCss, + content: ` +
+
+ ← Back to docs + +

How DJD calculates trust

+

+ DJD Agent Score produces a 0–100 trust score for wallets on Base and then packages that signal into certification, + evaluator, directory, and monitoring surfaces. The model is intentionally inspectable: no hidden manual overrides, no social + proof scraping, and no black-box human opinions in the score itself. +

-
-
- Capability - 10% -
-

Is this wallet actively providing services in the agent economy? Measures active x402 service endpoints, total revenue earned, unique counterparties served, and how long the wallet has been operating.

-
- x402Services - revenue - uniqueCounterparties - serviceLongevity +
+
+

Scoring pipeline

+

When an app calls DJD with a wallet address, the engine runs a five-phase pipeline:

+
    +
  • Fetch on-chain data — transaction history, USDC transfers, balances, basename, GitHub verification, and Insumer attestations pulled from verifiable sources.
  • +
  • Run sybil and gaming detection — behavioral checks identify fake wallet networks, circular funding, wash-trading, and timing anomalies before scoring finishes.
  • +
  • Calculate five dimensions — each dimension produces a 0–100 sub-score from explicit on-chain signals.
  • +
  • Compose the final score — weights, trajectory, confidence dampening, and integrity penalties turn the dimension set into a single output.
  • +
  • Package explainability — confidence, improvement guidance, top contributors, and top detractors travel with the score.
  • +
+

The full pipeline runs against live blockchain state. Scores are cached briefly for performance, and background jobs continuously refresh stale wallets as the network evolves.

+ +

The five dimensions

+

Each dimension maps to a question an operator or payment system would naturally ask before trusting a wallet.

+ +
+
+ Payment Reliability + 30% +
+

Does this wallet consistently execute transactions? Reliability measures transaction success rate, total volume, nonce alignment, uptime estimation, and recency of activity.

+
+ txSuccessRate + txCountLog + nonceAlignment + uptimeEstimate + recencyBonus +
+
+ +
+
+ Economic Viability + 25% +
+

Can this wallet actually pay? Viability looks at ETH and USDC balances, income-to-spend ratio, wallet age, balance trends, and whether the wallet routinely collapses to zero.

+
+ ethBalance + usdcBalance + incomeRatio + walletAge + balanceTrend + zeroBalancePenalty +
+
+ +
+
+ Identity + 20% +
+

Has this wallet established a verifiable identity? Identity checks agent registration, Base Name ownership, GitHub verification with activity signals, and attestations from Insumer.

+
+ registration + basename + githubVerified + githubActivity + insumerAttestation +
+
+ +
+
+ Behavior + 15% +
+

Does this wallet behave like a legitimate actor or a bot? Behavior scores timing variance, hourly entropy, and suspicious inactivity gaps that often show up in manufactured identities.

+
+ interArrivalCV + hourlyEntropy + maxGapHours +
+
+ +
+
+ Capability + 10% +
+

Is this wallet actively providing services in the agent economy? Capability tracks x402 service endpoints, revenue earned, counterparty breadth, and service longevity.

+
+ x402Services + revenue + uniqueCounterparties + serviceLongevity +
+
+ +

Composite score formula

+

The final score is not just a weighted average. Three additional layers keep the output aligned with real-world trust decisions.

+
raw = Reliability*0.30 + Viability*0.25 + Identity*0.20 + + Behavior*0.15 + Capability*0.10 + +adjusted = raw + trajectoryModifier +final = adjusted * integrityMultiplier +output = clamp(0, 100, final)
+

Trajectory modifier adds or subtracts up to five points based on sustained improvement or decline over time.

+

Integrity multiplier compounds penalties from sybil indicators, gaming flags, and fraud pressure instead of letting one clean-looking dimension mask deeper issues.

+

Confidence dampening keeps mature wallets stable and lets new wallets move more as fresh evidence arrives.

+ +

Tier model

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TierScore rangeMeaning
Elite90 – 100Exceptional track record across the full trust surface.
Trusted75 – 89Reliable actor with verified identity and consistent operating history.
Established50 – 74Active wallet with reasonable history but some dimensions still developing.
Emerging25 – 49Limited history or mixed signals; useful, but not yet high-trust.
Unverified0 – 24Insufficient evidence or significant red flags.
+ +
+ Adaptive thresholds. Tier boundaries are not static. Auto-recalibration jobs adjust breakpoints based on the actual score distribution and observed outcomes so the system does not drift into tier inflation. +
+ +

Sybil and gaming defense

+

A high score is meaningless if wallets can fake their way into it, so the engine defends the model before the score ships.

+

Sybil detection

+

DJD identifies suspicious wallet networks using the interaction graph stored in SQLite. It looks for circular funding patterns, shared funding sources, tightly synchronized timing, low-diversity counterparties, and other topology signals that show up in manufactured identity farms.

+

Gaming detection

+

The engine also catches wallets inflating their stats through temporary balance window dressing, wash-trading, or query-sensitive behavior. Gaming penalties are applied directly to the composite score and also feed the integrity multiplier.

+ +
+ Two-layer penalty system. Sybil indicators cap dimension scores. Gaming indicators reduce the composite score directly. Both still flow into the final integrity multiplier, so a wallet cannot hide behind one strong-looking metric. +
+ +

Data sources

+

Every signal comes from verifiable on-chain or explicitly linked identity data on Base:

+
    +
  • Base RPC data — transaction history, nonces, balances, and contract interactions.
  • +
  • USDC transfer events — indexed from live event logs.
  • +
  • Base Name Service — for name ownership.
  • +
  • GitHub API — repository verification and activity for registered agents.
  • +
  • Insumer Model — multi-chain attestations for linked identity context.
  • +
  • Internal indexer — a continuous Base block indexer that builds the local relationship graph and feature store.
  • +
+

No social clout metrics, manual score overrides, or pay-to-improve backdoors influence the score. If it is not on-chain or verifiably linked to the wallet, it does not count.

+ +

Outcome tracking

+

Scores only matter if they predict real behavior. DJD tracks post-score outcomes such as payment follow-through, fraud pressure, and subsequent on-chain activity to understand whether the model is becoming more or less predictive over time.

+

That outcome data feeds the recalibration system, which adjusts weights and tier thresholds as the network matures.

+ +

What DJD does not do

+
    +
  • No manual score overrides.
  • +
  • No pay-to-boost mechanics. Certification can package and verify trust, but it does not purchase a better score.
  • +
  • No hidden off-chain reputation sources such as social followings or vague community claims.
  • +
  • No “secret sauce” positioning that prevents buyers from understanding what the model is measuring.
  • +
+ +
+

See the model in the product

+

Use the free lookup to score a real wallet, then follow that same wallet into Certify, evaluator preview, and directory surfaces.

+ +
+ +

+ Model version 2.5.0. This methodology is a living document and will change as the scoring engine evolves. + Questions or feedback? Email ${SUPPORT_EMAIL}. +

-
- -

Composite score formula

-

The final score is not just a simple weighted average. Three additional layers refine it:

-
raw = Reliability×0.30 + Viability×0.25 + Identity×0.20 - + Behavior×0.15 + Capability×0.10 - -adjusted = raw + trajectoryModifier // ±5 from sustained trends -final = adjusted × integrityMultiplier // penalizes sybil/gaming/fraud -output = clamp(0, 100, final) // dampened by confidence level
- -

Trajectory modifier — analyzes the wallet's score history. Sustained improvement adds up to +5; sustained decline subtracts up to −5. New wallets start at zero modifier.

-

Integrity multiplier — a compound penalty from sybil indicators, gaming flags, and fraud reports. A clean wallet has a multiplier of 1.0. Flagged wallets get dampened toward zero.

-

Confidence dampening — wallets with long histories and many data points have high confidence, which limits score volatility. New wallets with little data have low confidence, allowing larger score swings as new information arrives.

- -

Tiers

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
TierScore RangeMeaning
Elite90 – 100Exceptional track record across all dimensions
Trusted75 – 89Reliable actor with verified identity and consistent history
Established50 – 74Active wallet with reasonable history, some dimensions still developing
Emerging25 – 49Limited history or mixed signals — proceed with caution
Unverified0 – 24Insufficient data or significant red flags
- -
- Adaptive thresholds. Tier boundaries are not static. An auto-recalibration job runs every 6 hours, adjusting breakpoints based on the actual score distribution and outcome data. This prevents tier inflation as more wallets enter the system. -
- -

Sybil & gaming detection

-

A high score means nothing if wallets can fake it. The engine runs two layers of detection before scoring:

- -

Sybil detection (7 checks)

-

Identifies fake wallet networks using the on-chain relationship graph stored in SQLite. Checks for circular funding patterns, shared funding sources, coordinated transaction timing, low-diversity counterparties, and other network topology signals. Flagged wallets receive hard caps on Reliability, Viability, and Identity scores.

-

Gaming detection

-

Catches wallets inflating their stats. Detects window dressing (temporarily inflating balances before a score check), wash trading (self-transfers to boost volume), and query manipulation. Gaming penalties are applied as a direct deduction from the composite score.

- -
- Two-layer penalty system. Sybil indicators cap individual dimension scores. Gaming indicators reduce the composite score directly. Both feed into the integrity multiplier, which dampens the final output. A wallet cannot game one dimension without triggering penalties that affect the overall score. +
- -

Data sources

-

Every signal comes from verifiable on-chain data on Base L2:

-
    -
  • Base blockchain RPC — transaction history, nonces, ETH balances, contract interactions
  • -
  • USDC transfer events — token transfers indexed from on-chain event logs
  • -
  • Base Name Service — .base.eth name ownership
  • -
  • GitHub API — repository verification, stars, recent activity (for registered agents)
  • -
  • Insumer Model — multi-chain attestations (USDC/Base, ENS, Optimism, Arbitrum, stETH)
  • -
  • Internal indexer — continuously indexes Base blocks (every 12 seconds), building a local relationship graph of wallet interactions
  • -
-

No off-chain opinions, manual reviews, or centralized databases influence the score. If it's not on-chain or verifiably linked to an on-chain identity, it doesn't count.

- -

Outcome tracking

-

Scores are only useful if they predict real behavior. The engine tracks outcomes after scoring:

-
    -
  • Did high-scored wallets follow through on payments?
  • -
  • Did low-scored wallets exhibit fraudulent behavior?
  • -
  • How do scores correlate with subsequent on-chain activity?
  • -
-

This outcome data feeds the auto-recalibration system, which adjusts dimension weights and tier thresholds over time. The model gets more accurate as more wallets are scored and more outcomes are observed.

- -

What we don't do

-
    -
  • No manual score overrides — every score is algorithmically derived
  • -
  • No pay-to-improve — the certification product verifies existing scores, it doesn't boost them
  • -
  • No off-chain data — social media followers, KYC status, and reputation claims are not inputs
  • -
  • No model secrecy — this page documents the methodology; the scoring engine source code will be published
  • -
- -
-

Try it yourself. Score any Base wallet in under 200ms.

- View API Reference → -
- -

- Model version 2.5.0. This methodology is a living document — updated as the scoring engine evolves. - Questions or feedback? Reach out at ${SUPPORT_EMAIL}. -

-
-
- - - -` +
+
`, +}) methodology.get('/', (c) => c.html(pageHtml)) diff --git a/src/services/discoveryService.ts b/src/services/discoveryService.ts index 786613f..6b710e6 100644 --- a/src/services/discoveryService.ts +++ b/src/services/discoveryService.ts @@ -3,6 +3,7 @@ import { dirname, join } from 'node:path' import { fileURLToPath } from 'node:url' import { ENDPOINT_PRICING } from '../config/constants.js' import { getPublicBaseUrl, getSupportEmail } from '../config/public.js' +import { renderPublicFooter, renderPublicHeadStart, renderPublicNav } from '../templates/publicPage.js' const __dirname = dirname(fileURLToPath(import.meta.url)) const OPENAPI_SPEC_PATH = join(__dirname, '..', '..', 'openapi.json') @@ -55,96 +56,109 @@ export function getOpenApiSpecView(): string { } export function getDocsHtmlView(): string { - return ` - - - - - DJD Agent Score — API Docs + return `${renderPublicHeadStart({ + title: 'DJD Agent Score — API Docs', + description: + 'Developer docs for scoring wallets, publishing trust surfaces, and gating payouts or x402 routes before money moves.', + path: '/docs', + })} - - -
-

DJD Agent Score API

-

Developer docs for scoring wallets, publishing trust surfaces, and gating payouts or x402 routes. Start with a free lookup, move into API-key or x402 production auth, then add evaluator, Certify, and directory surfaces when trust needs to become visible.

- -
+${renderPublicNav('docs', '/pricing', 'View Pricing')} +
+
+
+
+ Developer documentation +

Ship your first DJD integration without guessing

+

DJD lets your product screen wallets, publish trust surfaces, and gate payouts or x402 routes before money moves. Start with a free lookup, then layer in API-key auth, evaluator decisions, certification, and directory distribution as trust needs to become visible.

+ +
+ +
+
Ship your first DJD integration
The simplest path is: screen counterparties in development, choose your production billing path, then add public trust surfaces only when customers or operators need to inspect what your backend already knows.
@@ -288,8 +315,10 @@ export function getDocsHtmlView(): string { tryItOutEnabled: true, }) - -` +
+${renderPublicFooter({ + copy: 'DJD documentation covers the current trust infrastructure product: score, Certify, evaluator, monitoring, and directory surfaces for apps and agent networks on Base.', +})}` } export function getX402DiscoveryView(requestUrl: string, forwardedProto?: string | null) { diff --git a/src/templates/certify.ts b/src/templates/certify.ts index 9d9b13a..2f9b90c 100644 --- a/src/templates/certify.ts +++ b/src/templates/certify.ts @@ -1,328 +1,452 @@ import { buildPublicUrl } from '../config/public.js' +import { renderPublicPage } from './publicPage.js' -export function certifyPageHtml(): string { - const certifyUrl = buildPublicUrl('/certify') - const directoryUrl = buildPublicUrl('/directory') - const readinessUrl = buildPublicUrl('/v1/certification/readiness') - const reviewUrl = buildPublicUrl('/v1/certification/review') - const pricingUrl = buildPublicUrl('/pricing') - const docsUrl = buildPublicUrl('/docs') - const explorerUrl = buildPublicUrl('/explorer') - - return ` - - - - -Certify - DJD Agent Score - - - - - - - - - - + .endpoint-row{ + display:grid; + } + .endpoint-method{ + display:none; + } +} +` -
-
-
Certification for autonomous agents
-

Turn score and identity into public trust infrastructure

-

DJD Certify packages scoring, identity context, and monitoring into surfaces that counterparties can actually inspect: directory listings, certification status, badges, ERC-8004 documents, and evaluator-ready links.

- -
+export function certifyPageHtml(): string { + const readinessUrl = buildPublicUrl('/v1/certification/readiness') + const reviewUrl = buildPublicUrl('/v1/certification/review') + const directoryUrl = buildPublicUrl('/directory') + const docsUrl = buildPublicUrl('/docs') + const explorerUrl = buildPublicUrl('/explorer') -
-
-
Step 1
-

Register your agent

-

Attach a name, website, and GitHub context so counterparties see more than a bare wallet address.

-
-
-
Step 2
-

Apply via x402

-

Certification is purchased through a one-time x402 payment, which gives the surface a real issuance and review boundary.

-
-
-
Step 3
-

Ship trust everywhere

-

Once certified, your wallet can appear in the public directory, expose badges, and feed evaluator and standards surfaces.

+ return renderPublicPage({ + title: 'DJD Certify — Public Trust Infrastructure for Agent Wallets', + description: + 'DJD Certify turns scoring and identity signals into public trust infrastructure: directory listings, badges, standards documents, and evaluator-ready status.', + path: '/certify', + nav: 'certify', + ctaHref: directoryUrl, + ctaLabel: 'Browse Directory', + extraCss: certifyCss, + content: ` +
+
+
+
+ Certification for autonomous agents +

DJD Certify turns wallet evidence into public trust infrastructure

+

Certify is the product wrapper around DJD’s scoring, identity, and monitoring work. It gives counterparties something they can actually inspect: certification status, badges, directory presence, standards documents, and evaluator-ready context before money moves.

+ +
+
-
+
- -
One certification, multiple trust outputs
-
Certify is the product wrapper around DJD's scoring, profile, monitoring, and standards work. It is designed to make settlement and discovery easier for counterparties, not just prettier for dashboards.
+
+ +

One certification, multiple trust outputs

+

The point of Certify is not to create another badge silo. It is to take the score, identity, and review state you already have and package it into surfaces buyers, marketplaces, operators, and evaluators can use.

+
-
-
Directory
-

Public directory distribution

-

Certified agents show up in a browsable directory with score tier, confidence, profile metadata, badge links, and evaluator paths.

-
    -
  • Free public listing surface
  • -
  • Current score context attached
  • -
  • Direct links to profile and standards document
  • -
-
-
-
Status
-

Certification status and badge

-

Every certified wallet gets a machine-readable status endpoint plus embeddable badge surfaces for docs, marketplaces, and profiles.

-
    -
  • Wallet-specific certification status
  • -
  • Embeddable certification and score badges
  • -
  • Expiration and tier visibility
  • -
-
-
-
Standards
-

ERC-8004-compatible score document

-

Certification feeds into a standards-facing score document that includes registration, certification, scoring, and publication context.

-
    -
  • Free wallet document endpoint
  • -
  • Good fit for publishing and caching
  • -
  • Built from the live scoring surface
  • -
-
-
-
Evaluation
-

Evaluator-ready settlement context

-

Pair certification with the evaluator preview endpoint to return approve, review, or reject decisions with rationale and linked evidence.

-
    -
  • Certification signal included in evaluation
  • -
  • Useful for routing high-risk payments
  • -
  • Bridges Certify and standards work
  • -
-
+
+
Directory
+
Public distribution
+
Certified agents appear in the Trusted Endpoint Directory with score tier, confidence, profile metadata, and linked trust surfaces instead of a bare wallet string.
+
+
+
Status
+
Machine-readable certification
+
Every certified wallet gets a status endpoint plus embeddable badge surfaces for docs, marketplaces, profiles, and operator dashboards.
+
+
+
Standards
+
ERC-8004-compatible packaging
+
Certification feeds the wallet’s standards-facing score document so registration, score state, and certification all travel together.
+
+
+
Evaluation
+
Evaluator-ready context
+
Certify pairs with the evaluator preview to help payout and settlement flows decide whether to approve, review, or reject before money moves.
+
- -
Check certification readiness
-
Paste a wallet to see whether it can apply right now, what is blocking it, and what the next action should be before the paid x402 purchase.
+
+ +

Check certification readiness

+

Paste a wallet to see whether it can apply right now, what is blocking it, and what the next step should be before the paid issuance path begins.

+
- - + +
Free endpoint: GET ${readinessUrl}?wallet=0x...
-
Enter a wallet to see if it is eligible, already certified, missing registration, stale, or still below the certification threshold.
+
Enter a wallet to see if it is eligible, already certified, missing registration, stale, below threshold, or waiting on reviewer action.
- -
Endpoints behind DJD Certify
-
These are the core public and paid surfaces that make certification visible and usable in code.
+
+ +

Endpoints behind DJD Certify

+

These are the public and paid surfaces that make certification visible in code. The site is just the human-facing wrapper around them.

+
Endpoint
-
Access
+
Price
Method
-
/v1/certification/readiness?wallet=
-
Check whether a wallet is ready to apply, see blockers, and get the next step before paying.
+
GET /v1/certification/readiness
+
Checks whether a wallet is ready for certification and returns blockers, review state, and next-step links.
Free
GET
-
/v1/certification/directory
-
Browse active certifications, current score tiers, profile metadata, and trust links.
+
GET /v1/certification/review
+
Returns the current reviewer packet state for a wallet that has requested certification review.
Free
GET
-
/v1/certification/review
-
Submit a review request or inspect the latest reviewer status for a wallet before the final certification purchase.
+
POST /v1/certification/review
+
Submits or refreshes a reviewer packet for an eligible wallet before final issuance.
Free
-
GET / POST
-
-
-
-
/v1/certification/:wallet
-
Read certification status for a wallet, including links to related trust surfaces.
-
-
Free
-
GET
-
-
-
-
/v1/certification/badge/:wallet
-
Return an embeddable certification badge for marketplaces, docs, and agent profiles.
-
-
Free
-
GET
+
POST
POST /v1/certification/apply
-
Purchase certification via x402 and mint the product wrapper around your score.
+
Final issuance endpoint for certification. Paid x402 route used when a wallet is actually ready to certify.
-
$99
+
x402
POST
-
/v1/score/erc8004?wallet=
-
Fetch the standards-facing trust document tied to a wallet and its certification state.
+
GET /v1/certification/directory
+
Machine-readable certified directory with search, filters, trust links, and metadata.
Free
GET
-
/v1/score/evaluator?wallet=
-
Return an evaluator preview with approve, review, or reject guidance for settlement decisions.
+
GET /v1/score/evaluator?wallet=0x...
+
Paid evaluator preview that combines score, certification, risk, ratings, and staking into an approve/review/reject decision surface.
-
$0.35
+
$x402
GET
@@ -330,27 +454,16 @@ footer{border-top:1px solid var(--border);padding:36px 0 48px;margin-top:72px}
-

Ready to show up as a trusted endpoint?

-

Start by browsing the live directory, then wire certification into your score, profile, and evaluator flows. DJD Certify is the fastest path from a raw wallet score to something counterparties can act on.

-
- Browse Directory - Open Explorer - See Pricing +

Use Certify when trust needs to be visible

+

DJD Certify is strongest when a simple backend score is not enough and a marketplace, operator, or counterparty needs an inspectable public trust surface.

+
+ -
-
-
DJD Certify is experimental and informational. Certification is a product surface, not a guarantee of performance or safety.
- -
-
-
- -` +`, + }) } diff --git a/src/templates/directory.ts b/src/templates/directory.ts index 4fc12f5..b5b80f1 100644 --- a/src/templates/directory.ts +++ b/src/templates/directory.ts @@ -1,4 +1,5 @@ import { buildPublicUrl } from '../config/public.js' +import { renderPublicPage } from './publicPage.js' interface DirectoryPageParams { limit?: string | null @@ -21,188 +22,300 @@ function normalizeField(value: string | null | undefined): string { return value?.trim() ?? '' } +const directoryCss = ` +.directory-hero{ + display:grid; + grid-template-columns:minmax(0,1.15fr) minmax(280px,0.85fr); + gap:18px; + align-items:stretch; +} +.directory-note{ + padding:24px; + border-radius:18px; + border:1px solid var(--border); + background:linear-gradient(180deg, rgba(17,35,58,0.9), rgba(12,27,45,0.92)); +} +.directory-note-copy{ + color:var(--text-dim); + font-size:14px; + line-height:1.78; + margin-bottom:18px; +} +.directory-list{ + display:grid; + gap:10px; +} +.directory-list li{ + position:relative; + list-style:none; + padding-left:18px; + color:var(--text-dim); + font-size:13px; + line-height:1.72; +} +.directory-list li::before{ + content:''; + position:absolute; + left:0; + top:9px; + width:7px; + height:7px; + border-radius:999px; + background:var(--green); +} +.panel-shell{ + padding:24px; + border-radius:18px; + border:1px solid var(--border); + background:linear-gradient(180deg, rgba(17,35,58,0.9), rgba(12,27,45,0.92)); +} +.controls{ + display:grid; + grid-template-columns:2.1fr 1fr 1fr 120px auto; + gap:12px; + align-items:end; +} +.submit{ + height:48px; + border:none; + border-radius:12px; + background:linear-gradient(135deg, rgba(129,140,248,0.92), rgba(125,211,252,0.88)); + color:#08111d; + font-size:14px; + font-weight:800; + cursor:pointer; +} +.meta-row{ + display:flex; + justify-content:space-between; + gap:16px; + align-items:center; + flex-wrap:wrap; + margin:20px 0 8px; +} +.meta-title{ + font-family:'Instrument Serif',serif; + font-size:32px; + font-weight:400; + letter-spacing:-0.03em; +} +.meta-copy{ + color:var(--text-dim); + font-size:14px; + line-height:1.72; +} +.meta-pill{ + display:inline-flex; + align-items:center; + padding:8px 12px; + border-radius:999px; + border:1px solid var(--border-hi); + background:rgba(129,140,248,0.12); + color:var(--text-dim); + font-family:'JetBrains Mono',monospace; + font-size:11px; + font-weight:600; +} +.results{ + display:grid; + grid-template-columns:repeat(2,minmax(0,1fr)); + gap:18px; + margin-top:22px; +} +.empty{ + padding:30px; + border:1px dashed var(--border-hi); + border-radius:16px; + background:rgba(7,17,31,0.45); + text-align:center; + color:var(--text-dim); + font-size:14px; + line-height:1.8; +} +.card{ + background:linear-gradient(180deg, rgba(17,35,58,0.92), rgba(12,30,48,0.92)); +} +.card-head{ + display:flex; + justify-content:space-between; + gap:12px; + align-items:flex-start; + margin-bottom:12px; +} +.card-title{ + font-size:20px; +} +.card-wallet{ + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:11px; + word-break:break-all; + margin-top:5px; +} +.tier-pill,.score-pill{ + display:inline-flex; + align-items:center; + justify-content:center; + border-radius:999px; + padding:7px 10px; + font-family:'JetBrains Mono',monospace; + font-size:11px; + font-weight:700; +} +.tier-pill{background:rgba(125,211,252,0.10);color:var(--accent)} +.score-pill{background:rgba(52,211,153,0.10);color:var(--green)} +.signal-grid{ + display:grid; + grid-template-columns:repeat(3,minmax(0,1fr)); + gap:10px; + margin-bottom:16px; +} +.signal{ + padding:12px; + border-radius:12px; + border:1px solid var(--border); + background:rgba(7,17,31,0.52); +} +.signal-k{ + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:9px; + font-weight:700; + letter-spacing:0.08em; + text-transform:uppercase; + margin-bottom:7px; +} +.signal-v{ + font-size:14px; + font-weight:700; +} +.profile-links{ + display:flex; + gap:10px; + flex-wrap:wrap; + margin-bottom:16px; +} +.profile-link{ + display:inline-flex; + align-items:center; + gap:6px; + padding:8px 10px; + border-radius:999px; + border:1px solid var(--border); + background:rgba(125,211,252,0.08); + color:var(--text-dim); + font-size:12px; + font-weight:600; +} +.profile-link:hover{ + color:var(--accent); + border-color:var(--border-hi); +} +.surface-links{ + display:grid; + grid-template-columns:repeat(2,minmax(0,1fr)); + gap:10px; +} +.surface-link{ + display:flex; + align-items:center; + justify-content:space-between; + gap:10px; + padding:12px; + border-radius:12px; + border:1px solid var(--border); + background:rgba(7,17,31,0.52); + color:var(--text); +} +.surface-link:hover{ + color:var(--accent); + border-color:var(--border-hi); +} +.surface-title{ + font-size:12px; + font-weight:700; +} +.surface-meta{ + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:9px; + font-weight:700; + letter-spacing:0.08em; + text-transform:uppercase; + margin-top:4px; +} +.surface-arrow{ + color:var(--accent); + font-family:'JetBrains Mono',monospace; + font-size:15px; +} +.foot-note{ + margin-top:22px; + color:var(--text-muted); + font-size:13px; + line-height:1.78; +} +.foot-note code{ + color:var(--accent); + font-family:'JetBrains Mono',monospace; +} +@media(max-width:980px){ + .directory-hero, + .results, + .controls, + .signal-grid, + .surface-links{grid-template-columns:1fr} +} +` + export function directoryPageHtml(params: DirectoryPageParams = {}): string { - const directoryUrl = buildPublicUrl('/directory') const directoryApiUrl = buildPublicUrl('/v1/certification/directory') const certifyUrl = buildPublicUrl('/certify') const docsUrl = buildPublicUrl('/docs') const explorerUrl = buildPublicUrl('/explorer') - const pricingUrl = buildPublicUrl('/pricing') const initialLimit = normalizeField(params.limit) || '24' const initialTier = normalizeField(params.tier) const initialSearch = normalizeField(params.search) const initialSort = normalizeField(params.sort) || 'score' - return ` - - - - -Trusted Endpoint Directory - DJD Agent Score - - - - - - - - - - - -
+ return renderPublicPage({ + title: 'Trusted Endpoint Directory — DJD Agent Score', + description: + 'Browse DJD-certified agents and trusted endpoints with score context, confidence, standards links, evaluator previews, and Certify actions.', + path: '/directory', + nav: 'directory', + ctaHref: certifyUrl, + ctaLabel: 'Get Certified', + extraCss: directoryCss, + content: ` +
-
Trusted Endpoint Directory
-
+
-

Browse certified agents as inspectable trust surfaces

-

Move beyond a bare wallet list. This directory packages certification status, score context, profile metadata, standards documents, evaluator previews, and Certify actions into a market-facing discovery surface.

- -
-
-
What this surface does
-
The directory is the human-facing wrapper around GET /v1/certification/directory, with search, tier filters, and sort modes for counterparties and marketplaces.
-
-
-
Search
-
Wallets, names, bios
-
-
-
Sort
-
Score, confidence, recency
-
-
-
Links
-
Profile, standards, evaluator
-
-
-
Next step
-
Certify or inspect
-
+ Trusted Endpoint Directory +

Browse certified agents as inspectable trust surfaces

+

This directory is the market-facing wrapper around DJD certification. It moves beyond a wallet list and packages certification status, score context, profile metadata, standards documents, evaluator previews, and Certify actions into a discoverable surface.

+
+
-
+
@@ -253,23 +366,11 @@ footer{margin-top:60px;padding-top:24px;border-top:1px solid var(--border);displ
Machine-readable surface: ${directoryApiUrl}. Use search, tier, sort, and limit to tune the result set.
- -
- - -
-
+ - -` +`, + }) } diff --git a/src/templates/pricing.ts b/src/templates/pricing.ts index 1547c25..fabb83c 100644 --- a/src/templates/pricing.ts +++ b/src/templates/pricing.ts @@ -1,17 +1,5 @@ -/** - * Pricing Page Template - * - * Dedicated pricing page that makes it crystal clear how developers - * can start using and paying for DJD Agent Score. Two paths: - * 1. Free tier — 10 requests/day, no signup - * 2. Subscription plans — Stripe checkout, API key provisioned - * - * Also mentions x402 for AI agents as a secondary path. - * Uses the same design system as index.html (DM Sans, Instrument Serif, - * JetBrains Mono, indigo-on-navy). - */ - import { buildPublicUrl } from '../config/public.js' +import { renderPublicPage } from './publicPage.js' interface PricingPlan { id: string @@ -20,436 +8,452 @@ interface PricingPlan { monthlyLimit: number } +const pricingCss = ` +.pricing-hero-panel{ + display:grid; + grid-template-columns:minmax(0,1.15fr) minmax(260px,0.85fr); + gap:18px; + margin-top:24px; +} +.hero-note{ + padding:24px; + border-radius:16px; + border:1px solid var(--border); + background:linear-gradient(180deg, rgba(17,35,58,0.9), rgba(12,27,45,0.92)); +} +.hero-note .metric-label{margin-bottom:8px} +.hero-note-copy{ + color:var(--text-dim); + font-size:14px; + line-height:1.78; +} +.story-grid{ + display:grid; + grid-template-columns:repeat(3,minmax(0,1fr)); + gap:18px; +} +.plans{ + display:grid; + grid-template-columns:repeat(4,minmax(0,1fr)); + gap:14px; +} +.plan-card{ + position:relative; + padding:24px; + border-radius:18px; + border:1px solid var(--border); + background:linear-gradient(180deg, rgba(17,35,58,0.88), rgba(12,27,45,0.92)); +} +.plan-card.popular{ + border-color:var(--border-hi); + box-shadow:0 22px 60px rgba(56,189,248,0.12); +} +.popular-badge{ + position:absolute; + top:14px; + right:14px; +} +.plan-name{ + color:var(--accent); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.12em; + text-transform:uppercase; + margin-bottom:12px; +} +.plan-price{ + font-size:42px; + font-weight:800; + letter-spacing:-0.04em; +} +.plan-period{ + color:var(--text-muted); + font-size:14px; + font-weight:500; +} +.plan-limit{ + margin-top:10px; + padding-bottom:18px; + border-bottom:1px solid var(--border); + color:var(--text-dim); + font-size:14px; + line-height:1.7; +} +.plan-features{ + list-style:none; + margin:18px 0 0; + display:grid; + gap:10px; +} +.plan-features li{ + position:relative; + padding-left:18px; + color:var(--text-dim); + font-size:13px; + line-height:1.75; +} +.plan-features li::before{ + content:''; + position:absolute; + left:0; + top:9px; + width:7px; + height:7px; + border-radius:999px; + background:var(--green); +} +.plan-action{ + margin-top:20px; + width:100%; +} +.plan-action button{ + width:100%; +} +.plan-action .button{ + width:100%; +} +.split-grid{ + display:grid; + grid-template-columns:repeat(2,minmax(0,1fr)); + gap:18px; +} +.faq-list{ + display:grid; + gap:12px; +} +.faq-item{ + border-radius:16px; + border:1px solid var(--border); + background:rgba(12,27,45,0.9); + overflow:hidden; +} +.faq-q{ + display:flex; + align-items:center; + justify-content:space-between; + gap:16px; + padding:18px 20px; + cursor:pointer; + color:var(--text); + font-size:15px; + font-weight:700; +} +.faq-a{ + display:none; + padding:0 20px 18px; + color:var(--text-dim); + font-size:14px; + line-height:1.78; +} +.faq-item.open .faq-a{ + display:block; +} +.faq-toggle{ + color:var(--text-muted); + font-size:20px; +} +.cta-strip{ + display:grid; + grid-template-columns:repeat(3,minmax(0,1fr)); + gap:12px; + margin-top:24px; +} +.cta-metric{ + padding:16px; + border-radius:16px; + border:1px solid var(--border); + background:rgba(7,17,31,0.45); +} +.cta-metric .metric-value{ + font-size:18px; +} +@media(max-width:980px){ + .pricing-hero-panel, + .story-grid, + .plans, + .split-grid, + .cta-strip{grid-template-columns:1fr} +} +` + export function pricingPageHtml(plans: PricingPlan[]): string { - const starter = plans.find((p) => p.id === 'starter') - const growth = plans.find((p) => p.id === 'growth') - const scale = plans.find((p) => p.id === 'scale') - const pricingUrl = buildPublicUrl('/pricing') + const starter = plans.find((plan) => plan.id === 'starter') + const growth = plans.find((plan) => plan.id === 'growth') + const scale = plans.find((plan) => plan.id === 'scale') + const certifiedDirectoryUrl = buildPublicUrl('/directory') const explorerUrl = buildPublicUrl('/explorer') - return ` - - - - -Pricing — DJD Agent Score - - - - - - - - - - - - - -
- - -
-

Pricing for developers building with wallet trust

-

In plain English, DJD helps your app decide whether to trust a wallet, show that trust publicly, and enforce rules before money moves. Start free, then upgrade when you need production API-key access to Certify, evaluator decisions, monitoring, and public trust surfaces — no crypto wallet required for human teams.

-
- - -
-
-
Step 1
-
Test the trust layer
-
Start with the free lookup and see how DJD scores a wallet before you wire anything deeper.
-
-
-
Step 2
-
Ship with an API key
-
Pay with any credit card. Receive your key instantly after checkout and move into production quotas.
-
-
-
Step 3
-
Expand into trust workflows
-
Move from raw scores to certification, evaluator decisions, monitoring, and public trust distribution as your workflow matures.
-
-
- -
- -
Common ways developer teams use DJD
-
The product usually lands first where a wallet can cost you money, reputation, or fulfillment quality. These are the customer stories we are built for today.
-
-
-
Marketplaces
-

Agent marketplaces and directories

-

Screen providers before listing them, rank counterparties with more context, and give buyers inspectable profile, certification, and directory surfaces instead of a bare wallet address.

+ return renderPublicPage({ + title: 'Pricing — DJD Agent Score', + description: + 'Pricing for developers building with wallet trust. Start free, then unlock API-key access to scoring, Certify, evaluator decisions, monitoring, and public trust surfaces.', + path: '/pricing', + nav: 'pricing', + ctaHref: '#plans', + ctaLabel: 'Choose a Plan', + extraCss: pricingCss, + content: ` +
+
+ For developer teams and agent operators +
+
+

Pricing for products that need to trust a wallet

+

DJD helps your app decide whether to trust a wallet, make that trust visible to users, and gate money movement with evaluator and certification surfaces. Start free, then move into production API-key access when the trust layer becomes part of a real product path.

+ +
+
-
-
Settlement
-

Payout and settlement products

-

Use score, risk, staking, and evaluator outputs to decide whether a payout should auto-approve, route into review, or stop before money moves.

+
+ +
+
+ +

Common ways developer teams use DJD

+

The product is strongest where a wallet can cost you money, reputation, or fulfillment quality. These are the buyer stories the current platform is built for.

-
-
Monetized APIs
-

Paid agent tools and x402 services

-

Protect expensive routes, reject unknown payers, and keep wallet trust checks inside the same flow that already handles billing, API keys, or x402 settlement.

+
+
+
Marketplaces
+
Agent marketplaces and directories
+
Screen providers before listing them, rank counterparties with more context, and give buyers inspectable profile, certification, and directory surfaces instead of a bare wallet address.
+
+
+
Settlement
+
Payout and settlement products
+
Use score, risk, staking, and evaluator outputs to decide whether a payout should auto-approve, route to review, or stop before money moves.
+
+
+
Paid tools
+
Paid agent tools and x402 services
+
Protect expensive routes, reject unknown payers, and keep wallet trust checks inside the same flow that already handles billing, API keys, or x402 settlement.
+
-
-
- - -
- - -
-
Free
-
$0
-
10 requests / day — no signup
-
    -
  • Basic score endpoint
  • -
  • ERC-8004-compatible trust document
  • -
  • Score + tier + recommendation
  • -
  • IP-based rate limit
  • -
  • No API key needed
  • -
- Try It Now -
- - -
-
Starter
-
$${starter?.monthlyPrice ?? 29}/mo
-
${(starter?.monthlyLimit ?? 1000).toLocaleString()} requests / month
-
    -
  • All paid endpoints
  • -
  • Full dimension breakdown
  • -
  • Score history & trends
  • -
  • Relationship graph, cluster analysis, score decay, intent, economy summary/volume/survival analytics, risk prediction, and counterparty ratings data products
  • -
  • DJD Forensics summaries, feeds, watchlists, reports, & disputes
  • -
  • Creator staking uses separate on-chain USDC stake + 1% DJD fee validation
  • -
  • Standard API key
  • -
- -
+ - - - - -
-
Scale
-
$${scale?.monthlyPrice ?? 199}/mo
-
${(scale?.monthlyLimit ?? 25000).toLocaleString()} requests / month
-
    -
  • Everything in Growth
  • -
  • 25,000 requests/month
  • -
  • Managed score, anomaly, and Forensics monitoring subscriptions with alert filters
  • -
  • Certified directory and evaluator-ready trust surfaces
  • -
  • Best per-query cost
  • -
  • Priority support
  • -
- -
- -
- - -
- -
Buy like a software team or pay like an agent
-
DJD is built for both audiences. Human teams usually want predictable API-key billing. Autonomous agents can still pay per request with crypto. Same platform, same trust surfaces.
-
-
-
💻
-
For Developers
-
Building a marketplace, agent tool, payment workflow, or network that needs wallet trust checks? Pay with your credit card and get a standard API key.
-
    -
  • Monthly subscription via Stripe
  • -
  • Standard API key (Bearer token)
  • -
  • Flat monthly quota — no per-request fees
  • -
  • Manage plan in Stripe Customer Portal
  • -
  • Cancel anytime, no lock-in
  • -
+
+
+ +

From free screening to production trust infrastructure

+

Human teams usually pay by subscription and use a standard Bearer API key. Autonomous agents can still pay per request with x402. Same platform, same scoring engine, same certified directory and evaluator surfaces.

-
-
🤖
-
For AI Agents
-
Autonomous agents with crypto wallets can pay per-request via the x402 micropayment protocol. No key needed.
-
    -
  • Pay-per-request with USDC on Base
  • -
  • x402 protocol — automatic micropayments
  • -
  • No signup, no API key required
  • -
  • Agent pays from its own wallet
  • -
  • Learn about x402
  • -
+
+
+
Free
+
$0 / forever
+
10 requests per day. No signup. Best for proving the trust layer before you commit engineering time.
+
    +
  • Basic score endpoint
  • +
  • ERC-8004-compatible trust document
  • +
  • Score, tier, and recommendation
  • +
  • IP-based rate limit
  • +
  • No API key needed
  • +
+ +
+ +
+
Starter
+
$${starter?.monthlyPrice ?? 29} / month
+
${(starter?.monthlyLimit ?? 1000).toLocaleString()} requests per month for early production use.
+
    +
  • All paid endpoints
  • +
  • Full dimension breakdown
  • +
  • Score history and trend views
  • +
  • Risk, cluster, economy, ratings, and data products
  • +
  • DJD Forensics summaries, feeds, watchlists, and disputes
  • +
  • Standard API key
  • +
+
+ +
+
+ + + +
+
Scale
+
$${scale?.monthlyPrice ?? 199} / month
+
${(scale?.monthlyLimit ?? 25000).toLocaleString()} requests per month plus the strongest production packaging in the current product.
+
    +
  • Everything in Growth
  • +
  • High-volume production quotas
  • +
  • Managed monitoring subscriptions and alert filters
  • +
  • Certified directory and evaluator-ready trust surfaces
  • +
  • Best per-query cost
  • +
  • Priority support
  • +
+
+ +
+
-
-
+ - - -
Common questions
-
Everything you need to know about pricing and billing.
-
-
-
- What am I buying? - + -
-
You are buying a developer trust layer for agent wallets: score APIs, risk and cluster reads, score history, economy analytics, counterparty ratings, DJD Forensics reads, certification workflows, evaluator decisions, force-refresh, and webhook-based monitoring. Growth and Scale expand that into higher-volume production use. The free tier is limited to the basic score endpoint.
-
-
-
- How do I authenticate? - + +
+
+ +

Buy like a software team or pay like an agent

+

DJD supports both normal SaaS billing and crypto-native request billing. Most developer customers use Stripe plus Bearer auth. Autonomous agents can keep using x402 without changing the underlying trust surface.

-
After checkout, you receive a standard API key. Include it in every request as a Bearer token: Authorization: Bearer djd_sk_...
-
-
-
- What counts toward my quota? - + +
+
+
For developers
+
Use normal SaaS billing
+
Pay with a credit card, receive a standard API key, and manage your plan through the customer portal. This is the default path for marketplaces, internal tooling, payout products, and developer platforms.
+
    +
  • Monthly subscription via Stripe
  • +
  • Standard Bearer token auth
  • +
  • Predictable quota-based billing
  • +
  • No crypto wallet required
  • +
+
+
+
For AI agents
+
Use x402 pay-per-request
+
Autonomous agents with crypto wallets can pay per request with USDC on Base. Same platform, same trust outputs, just a different billing and auth layer.
+
    +
  • USDC micropayments on Base
  • +
  • No signup or API key required
  • +
  • Fits autonomous spend loops
  • +
  • Learn about x402
  • +
+
-
Only successful responses (2xx status codes) count toward your monthly quota. Failed requests, rate limit responses, and validation errors are not counted.
-
-
-
- Can I change or cancel my plan? - + + + +
+
+ +

Common questions

+

The product can look broad because the score, certification, monitoring, and evaluator surfaces connect to one another. This is the simple version.

-
Yes. You can upgrade, downgrade, or cancel anytime through the Stripe Customer Portal. Changes take effect at the start of your next billing cycle. No lock-in contracts.
-
-
-
- What happens if I hit my monthly limit? - + +
+
+
+ What am I buying? + + +
+
You are buying a developer trust layer for agent wallets: score APIs, risk and cluster reads, score history, economy analytics, counterparty ratings, DJD Forensics reads, certification workflows, evaluator decisions, force-refresh, and webhook-based monitoring. Growth and Scale expand that into higher-volume production use. The free tier is limited to the basic score endpoint.
+
+
+
+ How do I authenticate? + + +
+
After checkout you receive a standard API key. Include it as Authorization: Bearer djd_sk_.... Autonomous agents can alternatively use x402 payment proofs on supported routes.
+
+
+
+ What counts toward my quota? + + +
+
Only successful 2xx responses count toward monthly quota. Validation failures, rate-limit responses, and other unsuccessful calls are not billed against your monthly request pool.
+
+
+
+ Can I change or cancel my plan? + + +
+
Yes. You can upgrade, downgrade, or cancel through the Stripe customer portal. There are no long-term lock-ins in the current product.
+
+
+
+ Do I need a crypto wallet to use DJD? + + +
+
No. x402 is the crypto-native path for autonomous agents. If you are a human developer or software team, use the normal Stripe subscription path and a regular API key.
+
-
You'll receive a 429 response. Your quota resets at the start of each billing cycle. You can upgrade your plan at any time if you need more capacity.
-
-
-
- What's x402? Do I need a crypto wallet? - + + + +
+
+

Ready to add wallet trust checks to your product?

+

Start with the free tier, then upgrade when you need production API keys, evaluator decisions, monitoring, and certified directory surfaces.

+
-
No. x402 is the crypto-native path for autonomous agents. If you're a human developer or software team, just use a regular credit card subscription and a normal Bearer API key. You do not need a crypto wallet, USDC, or blockchain ops to use DJD.
-
-
- - -
-

Ready to add wallet trust checks to your product?

-

Start with the free tier — no signup required. Upgrade when you're ready for production API keys, Certify, evaluator decisions, monitoring, and the certified directory.

- -
- - -
-
-
© 2026 DJD Agent Score LLC · Trust infrastructure for agent marketplaces, payouts, and settlement on Base
- -
-
- -
+ + - -` +`, + footerCopy: + 'DJD Agent Score LLC provides trust infrastructure for agent marketplaces, payouts, and settlement flows on Base.', + }) } diff --git a/src/templates/publicPage.ts b/src/templates/publicPage.ts new file mode 100644 index 0000000..a0bdd88 --- /dev/null +++ b/src/templates/publicPage.ts @@ -0,0 +1,631 @@ +import { buildPublicUrl, getSupportEmail } from '../config/public.js' + +type PublicNavKey = + | 'home' + | 'explorer' + | 'directory' + | 'certify' + | 'blog' + | 'pricing' + | 'docs' + | 'methodology' + | 'reviewer' + +interface PublicHeadOptions { + title: string + description: string + path: string + ogType?: 'website' | 'article' + extraHead?: string +} + +interface PublicShellOptions extends PublicHeadOptions { + nav?: PublicNavKey + ctaHref?: string + ctaLabel?: string + footerCopy?: string + extraCss?: string + content: string +} + +interface PublicFooterOptions { + copy?: string +} + +export const PUBLIC_BASE_CSS = ` +:root{ + --bg:#07111f; + --bg2:#0d1b2d; + --bg3:#13243c; + --surface:#11233a; + --surface-strong:#182b46; + --border:rgba(129,140,248,0.14); + --border-hi:rgba(129,140,248,0.26); + --text:#eef2ff; + --text-dim:#a7b7ce; + --text-muted:#6c7b92; + --accent:#7dd3fc; + --accent-strong:#818cf8; + --accent-dim:rgba(125,211,252,0.10); + --green:#34d399; + --green-dim:rgba(52,211,153,0.10); + --yellow:#fbbf24; + --yellow-dim:rgba(251,191,36,0.10); + --red:#f87171; + --red-dim:rgba(248,113,113,0.10); + --radius:18px; + --shadow:0 28px 80px rgba(2,6,23,0.28); +} +*{box-sizing:border-box;margin:0;padding:0} +html{scroll-behavior:smooth} +body{ + min-height:100vh; + color:var(--text); + font-family:'DM Sans',sans-serif; + background: + radial-gradient(circle at top left, rgba(129,140,248,0.18), transparent 28%), + radial-gradient(circle at top right, rgba(125,211,252,0.16), transparent 30%), + linear-gradient(180deg, #07111f 0%, #091728 42%, #060d18 100%); + -webkit-font-smoothing:antialiased; + overflow-x:hidden; +} +a{color:var(--accent);text-decoration:none} +a:hover{text-decoration:none} +img{max-width:100%;display:block} +.mono{font-family:'JetBrains Mono',monospace} +.serif{font-family:'Instrument Serif',serif} +.site-shell{max-width:1180px;margin:0 auto;padding:0 28px 72px;position:relative;z-index:1} +.nav-outer{ + position:sticky; + top:0; + z-index:100; + background:rgba(7,17,31,0.84); + backdrop-filter:blur(22px); + -webkit-backdrop-filter:blur(22px); + border-bottom:1px solid var(--border); +} +nav{ + max-width:1180px; + margin:0 auto; + height:68px; + padding:0 28px; + display:flex; + align-items:center; + justify-content:space-between; + gap:20px; +} +.logo{ + display:inline-flex; + align-items:center; + gap:8px; + font-size:17px; + font-weight:700; + letter-spacing:-0.02em; + color:var(--accent); +} +.logo:hover{text-decoration:none} +.logo span{color:var(--text-dim);font-weight:400} +.nav-links{ + display:flex; + align-items:center; + gap:12px; + flex-wrap:wrap; + justify-content:flex-end; +} +.nav-link{ + display:inline-flex; + align-items:center; + padding:8px 10px; + border-radius:999px; + color:var(--text-muted); + font-size:12px; + font-weight:600; + letter-spacing:0.02em; + transition:color .2s ease, background .2s ease; +} +.nav-link:hover, +.nav-link.active{ + color:var(--text); + background:rgba(129,140,248,0.08); +} +.nav-cta{ + display:inline-flex; + align-items:center; + justify-content:center; + padding:10px 16px; + border-radius:999px; + border:1px solid rgba(129,140,248,0.26); + background:linear-gradient(135deg, rgba(129,140,248,0.92), rgba(125,211,252,0.88)); + color:#08111d; + font-size:12px; + font-weight:800; + letter-spacing:0.02em; + box-shadow:0 10px 30px rgba(56,189,248,0.18); +} +.nav-cta:hover{opacity:.94} +.hero{ + padding:84px 0 44px; +} +.hero-grid{ + display:grid; + grid-template-columns:minmax(0,1.25fr) minmax(280px,0.75fr); + gap:24px; + align-items:end; +} +.eyebrow{ + display:inline-flex; + align-items:center; + gap:8px; + padding:7px 14px; + border-radius:999px; + border:1px solid var(--border-hi); + background:var(--accent-dim); + color:var(--accent); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.12em; + text-transform:uppercase; +} +.display{ + font-family:'Instrument Serif',serif; + font-size:clamp(40px,5vw,66px); + font-weight:400; + line-height:1.02; + letter-spacing:-0.04em; + margin-top:18px; +} +.display em{color:var(--accent);font-style:italic} +.lede{ + margin-top:18px; + max-width:720px; + color:var(--text-dim); + font-size:18px; + line-height:1.82; +} +.action-row{ + display:flex; + gap:12px; + flex-wrap:wrap; + margin-top:28px; +} +.button{ + display:inline-flex; + align-items:center; + justify-content:center; + gap:8px; + padding:13px 20px; + border-radius:12px; + border:1px solid var(--border-hi); + font-size:14px; + font-weight:700; + cursor:pointer; + transition:transform .18s ease, opacity .18s ease, border-color .18s ease, color .18s ease; +} +.button:hover{transform:translateY(-1px)} +.button-primary{ + color:#07111f; + background:linear-gradient(135deg, rgba(125,211,252,0.98), rgba(129,140,248,0.9)); + border-color:transparent; +} +.button-secondary{ + color:var(--text); + background:rgba(17,35,58,0.58); +} +.button-secondary:hover{ + color:var(--accent); + border-color:var(--border-hi); +} +.hero-panel, +.card, +.panel, +.metric-card, +.callout, +.table-shell, +.article-shell, +.prose-callout{ + background:linear-gradient(180deg, rgba(17,35,58,0.9), rgba(12,27,45,0.92)); + border:1px solid var(--border); + box-shadow:var(--shadow); +} +.hero-panel, +.card, +.panel, +.metric-card, +.callout, +.article-shell{border-radius:var(--radius)} +.hero-panel, +.panel, +.callout, +.article-shell{padding:24px} +.section{ + padding:22px 0 0; +} +.section-header{ + max-width:760px; + margin-bottom:28px; +} +.section-label{ + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.14em; + text-transform:uppercase; + color:var(--accent); + margin-bottom:12px; +} +.section-title{ + font-family:'Instrument Serif',serif; + font-size:clamp(30px,3.8vw,46px); + font-weight:400; + line-height:1.08; + letter-spacing:-0.03em; + margin-bottom:10px; +} +.section-copy{ + color:var(--text-dim); + font-size:16px; + line-height:1.82; +} +.section-center{text-align:center} +.section-center .section-header{margin-left:auto;margin-right:auto} +.grid-2,.grid-3,.grid-4{ + display:grid; + gap:18px; +} +.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))} +.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))} +.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))} +.card{ + padding:24px; + border-radius:16px; +} +.card-kicker{ + color:var(--accent); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.12em; + text-transform:uppercase; + margin-bottom:10px; +} +.card-title{ + font-size:19px; + font-weight:700; + line-height:1.25; + margin-bottom:10px; +} +.card-copy{ + color:var(--text-dim); + font-size:14px; + line-height:1.78; +} +.stat-grid{ + display:grid; + grid-template-columns:repeat(4,minmax(0,1fr)); + gap:12px; +} +.metric-card{ + padding:18px; + border-radius:16px; +} +.metric-label{ + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.1em; + text-transform:uppercase; + margin-bottom:10px; +} +.metric-value{ + font-size:22px; + font-weight:800; + letter-spacing:-0.03em; +} +.table-shell{ + border-radius:16px; + overflow:hidden; +} +.table-row{ + display:grid; + align-items:center; + gap:14px; + padding:16px 20px; + border-bottom:1px solid var(--border); +} +.table-row:last-child{border-bottom:none} +.table-row.head{ + background:rgba(10,22,40,0.72); + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.1em; + text-transform:uppercase; +} +.badge{ + display:inline-flex; + align-items:center; + justify-content:center; + gap:6px; + border-radius:999px; + padding:6px 10px; + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.06em; + text-transform:uppercase; +} +.badge-info{background:var(--accent-dim);color:var(--accent)} +.badge-success{background:var(--green-dim);color:var(--green)} +.badge-warn{background:var(--yellow-dim);color:var(--yellow)} +.badge-danger{background:var(--red-dim);color:var(--red)} +.field label{ + display:block; + margin-bottom:8px; + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:10px; + font-weight:700; + letter-spacing:0.12em; + text-transform:uppercase; +} +.input, +.select, +.textarea{ + width:100%; + padding:14px 15px; + border-radius:12px; + border:1px solid var(--border-hi); + background:rgba(7,17,31,0.72); + color:var(--text); + font-size:14px; + outline:none; +} +.textarea{min-height:120px;resize:vertical} +.input:focus, +.select:focus, +.textarea:focus{border-color:var(--accent)} +.article-shell{ + max-width:860px; + margin:84px auto 0; +} +.article-back{ + display:inline-flex; + align-items:center; + gap:8px; + color:var(--text-muted); + font-family:'JetBrains Mono',monospace; + font-size:12px; + font-weight:600; + margin-bottom:30px; +} +.article-back:hover{color:var(--accent)} +.article-meta{ + display:flex; + align-items:center; + gap:10px; + flex-wrap:wrap; + margin-bottom:20px; +} +.article-title{ + font-family:'Instrument Serif',serif; + font-size:clamp(34px,4.4vw,54px); + font-weight:400; + line-height:1.06; + letter-spacing:-0.04em; + margin-bottom:14px; +} +.article-lede{ + color:var(--text-dim); + font-size:18px; + line-height:1.85; + padding-bottom:28px; + border-bottom:1px solid var(--border); + margin-bottom:28px; +} +.prose h2{ + font-family:'Instrument Serif',serif; + font-size:clamp(26px,3.2vw,38px); + font-weight:400; + line-height:1.12; + letter-spacing:-0.03em; + margin:46px 0 12px; +} +.prose h3{ + font-size:17px; + font-weight:700; + margin:28px 0 10px; +} +.prose p, +.prose li{ + color:var(--text-dim); + font-size:15px; + line-height:1.86; +} +.prose p{margin-bottom:16px} +.prose ul{ + list-style:none; + margin:16px 0; + padding:0; +} +.prose li{ + position:relative; + padding-left:18px; + margin-bottom:10px; +} +.prose li::before{ + content:''; + position:absolute; + left:0; + top:12px; + width:6px; + height:6px; + border-radius:999px; + background:var(--accent); + opacity:.7; +} +.prose strong{color:var(--text)} +.prose em{color:var(--accent)} +.prose-callout{ + border-radius:16px; + padding:22px 24px; + margin:22px 0; +} +.site-footer{ + margin-top:64px; + border-top:1px solid var(--border); +} +.site-footer-inner{ + max-width:1180px; + margin:0 auto; + padding:30px 28px 48px; + display:flex; + justify-content:space-between; + gap:18px; + flex-wrap:wrap; +} +.footer-copy{ + max-width:700px; + color:var(--text-muted); + font-size:12px; + line-height:1.8; +} +.footer-links{ + display:flex; + align-items:center; + gap:14px; + flex-wrap:wrap; +} +.footer-links a{ + color:var(--text-muted); + font-size:12px; + font-weight:600; +} +.footer-links a:hover{color:var(--accent)} +@media(max-width:980px){ + .hero-grid, + .grid-2, + .grid-3, + .grid-4, + .stat-grid{grid-template-columns:1fr} +} +@media(max-width:760px){ + nav, + .site-shell, + .site-footer-inner{padding-left:20px;padding-right:20px} + nav{height:auto;min-height:68px;padding-top:12px;padding-bottom:12px;align-items:flex-start} + .nav-links{width:100%;justify-content:flex-start} + .hero{padding-top:56px} + .article-shell{margin-top:56px;padding:20px} +} +` + +function navLink(href: string, label: string, key: PublicNavKey, active?: PublicNavKey): string { + return `${label}` +} + +export function renderPublicHeadStart(options: PublicHeadOptions): string { + const { title, description, path, ogType = 'website', extraHead = '' } = options + + return ` + + + + +${title} + + + + + + + + + + + + +${extraHead} + + + +` +} + +export function renderPublicFooter(options: PublicFooterOptions = {}): string { + const copy = + options.copy ?? + `DJD Agent Score is trust infrastructure for apps, marketplaces, and agent networks on Base. Questions? Contact ${getSupportEmail()}.` + + return ` + + +` +} + +export function renderPublicPage(options: PublicShellOptions): string { + const { + title, + description, + path, + nav, + ctaHref, + ctaLabel, + footerCopy, + extraCss = '', + content, + ogType, + extraHead, + } = options + + return `${renderPublicHeadStart({ title, description, path, ogType, extraHead })}${extraCss}${renderPublicNav( + nav, + ctaHref, + ctaLabel, + )}${content}${renderPublicFooter({ copy: footerCopy })}` +}