Upload 2 files
Browse files- README.md +6 -6
- index.html +210 -18
README.md
CHANGED
|
@@ -3,8 +3,8 @@ title: Flow Verification Desk
|
|
| 3 |
emoji: π§Ύ
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
-
sdk:
|
| 7 |
-
app_file:
|
| 8 |
pinned: false
|
| 9 |
license: other
|
| 10 |
---
|
|
@@ -12,10 +12,10 @@ license: other
|
|
| 12 |
# Flow Verification Desk
|
| 13 |
|
| 14 |
Flow is the checker for agent payments on Base. This Space is the free
|
| 15 |
-
front door: paste a Base address (contract or wallet) and the
|
| 16 |
-
calls Flow's public `/api/verify` endpoint
|
| 17 |
-
|
| 18 |
-
advice, exactly as returned.
|
| 19 |
|
| 20 |
**Claims frozen. Recomputed from source. Receipts public.**
|
| 21 |
|
|
|
|
| 3 |
emoji: π§Ύ
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: indigo
|
| 6 |
+
sdk: static
|
| 7 |
+
app_file: index.html
|
| 8 |
pinned: false
|
| 9 |
license: other
|
| 10 |
---
|
|
|
|
| 12 |
# Flow Verification Desk
|
| 13 |
|
| 14 |
Flow is the checker for agent payments on Base. This Space is the free
|
| 15 |
+
front door: paste a Base address (contract or wallet) and the page β
|
| 16 |
+
running in your browser β calls Flow's public `/api/verify` endpoint
|
| 17 |
+
and shows the verdict it returns: safe | caution | danger, the score,
|
| 18 |
+
the red flags, and the advice, exactly as returned.
|
| 19 |
|
| 20 |
**Claims frozen. Recomputed from source. Receipts public.**
|
| 21 |
|
index.html
CHANGED
|
@@ -1,19 +1,211 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
+
<title>Flow Verification Desk</title>
|
| 7 |
+
<style>
|
| 8 |
+
:root { color-scheme: dark; }
|
| 9 |
+
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
|
| 10 |
+
background: #0b1020; color: #e8ecf4; margin: 0; padding: 24px 16px 48px; }
|
| 11 |
+
main { max-width: 760px; margin: 0 auto; }
|
| 12 |
+
h1 { font-size: 28px; margin: 0 0 8px; }
|
| 13 |
+
h2 { font-size: 20px; margin: 28px 0 8px; }
|
| 14 |
+
p, li { line-height: 1.55; }
|
| 15 |
+
.standing { font-style: italic; color: #9fb4d8; }
|
| 16 |
+
.card { background: #131a2e; border: 1px solid #263252; border-radius: 12px;
|
| 17 |
+
padding: 18px; margin-top: 16px; }
|
| 18 |
+
label { display: block; font-size: 14px; color: #b9c6de; margin-bottom: 6px; }
|
| 19 |
+
.row { display: flex; gap: 8px; flex-wrap: wrap; }
|
| 20 |
+
input { flex: 1 1 320px; background: #0b1020; color: #e8ecf4; border: 1px solid #33436b;
|
| 21 |
+
border-radius: 8px; padding: 10px 12px; font-size: 15px; }
|
| 22 |
+
button { background: #2563eb; color: #fff; border: 0; border-radius: 8px;
|
| 23 |
+
padding: 10px 18px; font-size: 15px; cursor: pointer; }
|
| 24 |
+
button:disabled { opacity: .55; cursor: default; }
|
| 25 |
+
#out { margin-top: 16px; white-space: pre-wrap; word-break: break-word; }
|
| 26 |
+
#out pre { background: #0b1020; border: 1px solid #263252; border-radius: 8px;
|
| 27 |
+
padding: 12px; overflow-x: auto; white-space: pre; }
|
| 28 |
+
a { color: #7aa5ff; }
|
| 29 |
+
.muted { color: #93a3c0; font-size: 14px; }
|
| 30 |
+
</style>
|
| 31 |
+
</head>
|
| 32 |
+
<body>
|
| 33 |
+
<main>
|
| 34 |
+
<h1>Flow Verification Desk</h1>
|
| 35 |
+
<p>Flow is the checker for agent payments on Base. Agents are paying
|
| 36 |
+
each other now, but a claim is not a record. This desk runs one free
|
| 37 |
+
check: paste a Base address and read the verdict the evidence
|
| 38 |
+
supports.</p>
|
| 39 |
+
<p class="standing">Claims frozen. Recomputed from source. Receipts public.</p>
|
| 40 |
+
|
| 41 |
+
<div class="card">
|
| 42 |
+
<label for="addr">Base address (contract or wallet)</label>
|
| 43 |
+
<div class="row">
|
| 44 |
+
<input id="addr" type="text" placeholder="0x..." autocomplete="off" spellcheck="false">
|
| 45 |
+
<button id="run" type="button">Run the free check</button>
|
| 46 |
+
</div>
|
| 47 |
+
<div id="out" aria-live="polite"></div>
|
| 48 |
+
<p class="muted">This page runs in your browser and calls Flow's public
|
| 49 |
+
endpoint directly. A grade is shown only when the endpoint actually
|
| 50 |
+
returns one β if the verifier cannot be reached, the result is
|
| 51 |
+
UNVERIFIED and no grade is shown. A verdict is a check against the
|
| 52 |
+
evidence readable at call time, not a certification of safety.</p>
|
| 53 |
+
</div>
|
| 54 |
+
|
| 55 |
+
<h2>The paid doors</h2>
|
| 56 |
+
<p>The check above is the free basic tier. The full menu runs over x402
|
| 57 |
+
at <a href="https://flow-kg4x.vercel.app">flow-kg4x.vercel.app</a> β
|
| 58 |
+
prices printed before any sale, the same for everyone:</p>
|
| 59 |
+
<ul>
|
| 60 |
+
<li><strong>PayCheck β $0.50 USDC.</strong> Before you pay this agent,
|
| 61 |
+
check. One call grades a payee before payment: payee kind and history,
|
| 62 |
+
address-poisoning look-alike detection, wallet approval exposure,
|
| 63 |
+
contract safety, and recent settlement history β one finished grade
|
| 64 |
+
with the evidence under it.</li>
|
| 65 |
+
<li><strong>Scope Report β $25 USDC.</strong> The full authorization
|
| 66 |
+
scope of a Base wallet: enumerated ERC-20 allowances, EIP-7702
|
| 67 |
+
delegation status, Permit2 allowances, and the worst-case outflow
|
| 68 |
+
derived two ways. Evidence fields and counts only β no composite
|
| 69 |
+
score.</li>
|
| 70 |
+
<li><strong>Full-Surface Audit β $500 USDC.</strong> Flow's audit
|
| 71 |
+
machinery turned on your own surface: claims frozen byte-exact,
|
| 72 |
+
recomputed from source, graded leg by leg. No promised grade; a grade
|
| 73 |
+
is what the evidence supports, published with its recompute.</li>
|
| 74 |
+
</ul>
|
| 75 |
+
|
| 76 |
+
<h2>Free, forever</h2>
|
| 77 |
+
<p><strong>Proof Index β GET
|
| 78 |
+
<a href="https://flow-kg4x.vercel.app/api/index">flow-kg4x.vercel.app/api/index</a>.</strong>
|
| 79 |
+
The public, read-only directory of checked payees: signed, hash-chained
|
| 80 |
+
evidence records anyone can verify offline. Counts only β no
|
| 81 |
+
percentages, no composite scores, no rankings.</p>
|
| 82 |
+
<p>Every sale splits 20 / 50 / 30: 20% back to the buyer, 50% Flow
|
| 83 |
+
keeps, 30% to the Uplift Fund for the Flow network and its users.</p>
|
| 84 |
+
<p class="standing">Claims frozen. Recomputed from source. Receipts public.</p>
|
| 85 |
+
</main>
|
| 86 |
+
|
| 87 |
+
<script>
|
| 88 |
+
"use strict";
|
| 89 |
+
var VERIFY_URL = "https://flow-kg4x.vercel.app/api/verify";
|
| 90 |
+
var SITE_URL = "https://flow-kg4x.vercel.app";
|
| 91 |
+
var STANDING_LINE = "Claims frozen. Recomputed from source. Receipts public.";
|
| 92 |
+
|
| 93 |
+
function esc(s) {
|
| 94 |
+
return String(s).replace(/[&<>"']/g, function (c) {
|
| 95 |
+
return { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c];
|
| 96 |
+
});
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
function unverifiedHTML(address, reason) {
|
| 100 |
+
return "<h2>Result: UNVERIFIED</h2>" +
|
| 101 |
+
"<p>The verifier did not return a grade for <code>" + esc(address) + "</code> (" +
|
| 102 |
+
esc(reason) + ").</p>" +
|
| 103 |
+
"<p>No grade is shown, because no check completed. An unreachable verifier " +
|
| 104 |
+
"is not evidence about this address in either direction.</p>" +
|
| 105 |
+
"<p>Try again, or run the check at <a href=\"" + SITE_URL + "\">" + SITE_URL + "</a>.</p>" +
|
| 106 |
+
"<p class=\"standing\">" + STANDING_LINE + "</p>";
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
function pick(data) {
|
| 110 |
+
var names = Array.prototype.slice.call(arguments, 1);
|
| 111 |
+
for (var i = 0; i < names.length; i++) {
|
| 112 |
+
var v = data[names[i]];
|
| 113 |
+
if (v !== null && v !== undefined && v !== "") return v;
|
| 114 |
+
}
|
| 115 |
+
return null;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
function renderVerdict(data, address) {
|
| 119 |
+
if (!data || typeof data !== "object" || Array.isArray(data)) {
|
| 120 |
+
return unverifiedHTML(address, "response was not a JSON object");
|
| 121 |
+
}
|
| 122 |
+
var verdict = pick(data, "verdict", "grade", "result", "status");
|
| 123 |
+
var score = pick(data, "score", "safetyScore", "safety_score");
|
| 124 |
+
var flags = pick(data, "redFlags", "red_flags", "flags", "risks") || [];
|
| 125 |
+
var advice = pick(data, "advice", "summary", "recommendation", "notes");
|
| 126 |
+
|
| 127 |
+
if (verdict === null && score === null) {
|
| 128 |
+
// The endpoint answered, but not with a verdict shape we can
|
| 129 |
+
// honestly restate. Show exactly what it said, labeled as raw.
|
| 130 |
+
var raw = JSON.stringify(data, null, 2);
|
| 131 |
+
return "<h2>Verifier response (raw)</h2>" +
|
| 132 |
+
"<p>Address: <code>" + esc(address) + "</code></p>" +
|
| 133 |
+
"<p>The endpoint responded, but its reply carried no verdict or score " +
|
| 134 |
+
"field this desk can restate. It is shown verbatim below β nothing has " +
|
| 135 |
+
"been added to it.</p><pre>" + esc(raw) + "</pre>" +
|
| 136 |
+
"<p class=\"standing\">" + STANDING_LINE + "</p>";
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
var html = "<h2>Verification result</h2>" +
|
| 140 |
+
"<p>Address: <code>" + esc(address) + "</code></p>";
|
| 141 |
+
if (verdict !== null) {
|
| 142 |
+
html += "<p><strong>Verdict:</strong> " + esc(verdict) + " (safe | caution | danger)</p>";
|
| 143 |
+
}
|
| 144 |
+
if (score !== null) {
|
| 145 |
+
html += "<p><strong>Score:</strong> " + esc(score) + " / 100</p>";
|
| 146 |
+
}
|
| 147 |
+
if (Array.isArray(flags) && flags.length) {
|
| 148 |
+
html += "<p><strong>Red flags:</strong></p><ul>";
|
| 149 |
+
flags.forEach(function (flag) {
|
| 150 |
+
var label;
|
| 151 |
+
if (flag && typeof flag === "object") {
|
| 152 |
+
label = pick(flag, "flag", "name", "title", "description") || JSON.stringify(flag);
|
| 153 |
+
} else {
|
| 154 |
+
label = flag;
|
| 155 |
+
}
|
| 156 |
+
html += "<li>" + esc(label) + "</li>";
|
| 157 |
+
});
|
| 158 |
+
html += "</ul>";
|
| 159 |
+
} else {
|
| 160 |
+
html += "<p><strong>Red flags:</strong> none reported in this response.</p>";
|
| 161 |
+
}
|
| 162 |
+
if (advice) {
|
| 163 |
+
html += "<p><strong>Advice:</strong></p><p>" + esc(advice) + "</p>";
|
| 164 |
+
}
|
| 165 |
+
html += "<p>A verdict is a check against the evidence readable at call " +
|
| 166 |
+
"time β not a certification of safety, and not a promise about any " +
|
| 167 |
+
"future state of this address.</p>" +
|
| 168 |
+
"<p class=\"standing\">" + STANDING_LINE + "</p>";
|
| 169 |
+
return html;
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
function runCheck() {
|
| 173 |
+
var input = document.getElementById("addr");
|
| 174 |
+
var out = document.getElementById("out");
|
| 175 |
+
var btn = document.getElementById("run");
|
| 176 |
+
var address = (input.value || "").trim();
|
| 177 |
+
if (!address) {
|
| 178 |
+
out.innerHTML = "<h2>No address given</h2><p>Paste a Base address " +
|
| 179 |
+
"(contract or wallet) and run the check.</p>";
|
| 180 |
+
return;
|
| 181 |
+
}
|
| 182 |
+
btn.disabled = true;
|
| 183 |
+
out.innerHTML = "<p>Checking <code>" + esc(address) + "</code>β¦</p>";
|
| 184 |
+
fetch(VERIFY_URL, {
|
| 185 |
+
method: "POST",
|
| 186 |
+
headers: { "Content-Type": "application/json" },
|
| 187 |
+
body: JSON.stringify({ address: address })
|
| 188 |
+
}).then(function (resp) {
|
| 189 |
+
if (!resp.ok) {
|
| 190 |
+
out.innerHTML = unverifiedHTML(address, "endpoint returned HTTP " + resp.status);
|
| 191 |
+
return null;
|
| 192 |
+
}
|
| 193 |
+
return resp.json().then(function (data) {
|
| 194 |
+
out.innerHTML = renderVerdict(data, address);
|
| 195 |
+
}).catch(function () {
|
| 196 |
+
out.innerHTML = unverifiedHTML(address, "endpoint returned a non-JSON response");
|
| 197 |
+
});
|
| 198 |
+
}).catch(function () {
|
| 199 |
+
out.innerHTML = unverifiedHTML(address, "request failed in the browser (network or cross-origin block)");
|
| 200 |
+
}).then(function () {
|
| 201 |
+
btn.disabled = false;
|
| 202 |
+
});
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
document.getElementById("run").addEventListener("click", runCheck);
|
| 206 |
+
document.getElementById("addr").addEventListener("keydown", function (e) {
|
| 207 |
+
if (e.key === "Enter") runCheck();
|
| 208 |
+
});
|
| 209 |
+
</script>
|
| 210 |
+
</body>
|
| 211 |
</html>
|