oculon 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -8
- package/dist/cli/main.js +82 -0
- package/dist/core/calls.d.ts +63 -0
- package/dist/core/calls.js +120 -0
- package/dist/core/http.d.ts +11 -0
- package/dist/core/http.js +110 -30
- package/dist/core/pdf.d.ts +51 -0
- package/dist/core/pdf.js +211 -0
- package/dist/core/verdict.d.ts +30 -0
- package/dist/core/verdict.js +164 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +29 -0
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.js +129 -5
- package/dist/modules/checks.d.ts +59 -0
- package/dist/modules/checks.js +134 -0
- package/dist/modules/doc.d.ts +61 -0
- package/dist/modules/doc.js +715 -0
- package/dist/modules/utility.d.ts +27 -1
- package/dist/modules/utility.js +108 -11
- package/dist/report-pdf.d.ts +7 -0
- package/dist/report-pdf.js +81 -0
- package/dist/web/card.d.ts +28 -0
- package/dist/web/card.js +75 -0
- package/dist/web/index.html +76 -4
- package/dist/web/openapi.js +2 -0
- package/dist/web/pages.d.ts +24 -0
- package/dist/web/pages.js +139 -0
- package/dist/web/public.js +2 -0
- package/dist/web/server.js +84 -10
- package/dist/web/token.html +2 -1
- package/dist/web/utility.html +40 -14
- package/package.json +1 -1
package/dist/web/utility.html
CHANGED
|
@@ -53,6 +53,7 @@ code{font:.86em var(--mono);background:rgba(0,20,24,.8);border:1px solid rgba(0,
|
|
|
53
53
|
.src{font:12px var(--mono);color:var(--mut);margin-top:8px}
|
|
54
54
|
.list a{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid #1b2a2f;text-decoration:none;color:var(--soft);font:14px var(--mono)}
|
|
55
55
|
.hide{display:none}
|
|
56
|
+
.pay{display:flex;gap:18px;flex-wrap:wrap}.opt{display:flex;align-items:center;gap:8px;font:14px var(--mono);color:var(--soft);text-transform:none;letter-spacing:0;margin:0}.opt input{width:auto}
|
|
56
57
|
footer{border-top:1px solid var(--line);background:rgba(0,0,0,.6)}footer .in{max-width:980px;margin:0 auto;padding:24px clamp(16px,5vw,40px);display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;font:12px var(--mono);color:#5e5e5e}footer a{color:var(--mut)}
|
|
57
58
|
@media (max-width:760px){.cards{grid-template-columns:minmax(0,1fr)}}
|
|
58
59
|
</style>
|
|
@@ -63,16 +64,17 @@ footer{border-top:1px solid var(--line);background:rgba(0,0,0,.6)}footer .in{max
|
|
|
63
64
|
<main>
|
|
64
65
|
<section id="home">
|
|
65
66
|
<div class="lbl">$OCULON utility</div>
|
|
66
|
-
<h1>
|
|
67
|
-
<p class="lead">Three ways to use OCULON, read straight from Robinhood Chain.
|
|
67
|
+
<h1>Hold to check.<br><span>Burn if you would rather not.</span></h1>
|
|
68
|
+
<p class="lead">Three ways to use OCULON, read straight from Robinhood Chain. Holding is the main way in: sign with your wallet, nothing leaves it. Burning is optional for people who would rather not hold. No account, no custody, and Oculon itself stays free for everyone.</p>
|
|
68
69
|
<div class="cards">
|
|
69
|
-
<div class="card"><div class="k">A · BURN</div><h2>Deep investigation</h2><div class="amt" id="amtA">1,500,000</div><p>One domain, wallet, token or company, checked against every relevant source and published as a public page
|
|
70
|
-
<div class="card"><div class="k">B · BURN</div><h2>Live safety badge</h2><div class="amt" id="amtB">2,000,000</div><p>Oculon watches one Robinhood Chain token
|
|
71
|
-
<div class="card"><div class="k">C · HOLD</div><h2>Holder tier</h2><div class="amt" id="amtC">3,500,000</div><p>Sign once with your wallet: up to 30 personal monitors, checked every 15 minutes instead of every hour.</p></div>
|
|
70
|
+
<div class="card"><div class="k">A · HOLD OR BURN</div><h2>Deep investigation</h2><div class="amt" id="amtA">Hold 1,500,000</div><p>One domain, wallet, token or company, checked against every relevant source and published as a public page. Holding gives one every 30 days; or burn <b id="burnA">1,500,000</b> for one.</p></div>
|
|
71
|
+
<div class="card"><div class="k">B · HOLD OR BURN</div><h2>Live safety badge</h2><div class="amt" id="amtB">Hold 2,000,000</div><p>Oculon watches one Robinhood Chain token. Holding keeps the badge live while your balance stays (one badge per wallet); or burn <b id="burnB">1,000,000</b> for 30 days. Paying never buys a better verdict.</p></div>
|
|
72
|
+
<div class="card"><div class="k">C · HOLD</div><h2>Holder tier</h2><div class="amt" id="amtC">Hold 3,500,000</div><p>Sign once with your wallet: up to 30 personal monitors, checked every 15 minutes instead of every hour.</p></div>
|
|
72
73
|
</div>
|
|
73
74
|
|
|
74
75
|
<div class="panel">
|
|
75
|
-
<h2>
|
|
76
|
+
<h2>Connect your wallet</h2>
|
|
77
|
+
<p>To use your holding, connect the wallet that holds OCULON and sign the request. Signing sends no transaction and costs nothing. To burn instead:</p>
|
|
76
78
|
<ol class="steps">
|
|
77
79
|
<li>From your wallet, send the amount of OCULON to the burn address <code>0x000000000000000000000000000000000000dEaD</code> on Robinhood Chain.</li>
|
|
78
80
|
<li>Copy the transaction hash once it is confirmed.</li>
|
|
@@ -86,14 +88,16 @@ footer{border-top:1px solid var(--line);background:rgba(0,0,0,.6)}footer .in{max
|
|
|
86
88
|
<div class="panel" id="formA">
|
|
87
89
|
<h2>A · Start an investigation</h2>
|
|
88
90
|
<label for="aTarget">What to investigate</label><input id="aTarget" placeholder="example.com, 0x… wallet or token, or a company name">
|
|
89
|
-
<label
|
|
91
|
+
<label>Pay with</label><div class="pay"><label class="opt"><input type="radio" name="aPay" value="hold" checked> my holding (1 every 30 days)</label><label class="opt"><input type="radio" name="aPay" value="burn"> a burn</label></div>
|
|
92
|
+
<div id="aBurn" class="hide"><label for="aTx">Burn transaction hash</label><input id="aTx" placeholder="0x…"></div>
|
|
90
93
|
<button id="aGo">Sign and start</button><div id="aMsg" class="msg"></div>
|
|
91
94
|
</div>
|
|
92
95
|
|
|
93
96
|
<div class="panel" id="formB">
|
|
94
97
|
<h2>B · Keep a live safety badge</h2>
|
|
95
98
|
<label for="bToken">Robinhood Chain token address</label><input id="bToken" placeholder="0x…">
|
|
96
|
-
<label
|
|
99
|
+
<label>Pay with</label><div class="pay"><label class="opt"><input type="radio" name="bPay" value="hold" checked> my holding (live while I hold)</label><label class="opt"><input type="radio" name="bPay" value="burn"> a burn (30 days)</label></div>
|
|
100
|
+
<div id="bBurn" class="hide"><label for="bTx">Burn transaction hash</label><input id="bTx" placeholder="0x…"></div>
|
|
97
101
|
<button id="bGo">Sign and start monitoring</button><div id="bMsg" class="msg"></div>
|
|
98
102
|
</div>
|
|
99
103
|
|
|
@@ -104,7 +108,7 @@ footer{border-top:1px solid var(--line);background:rgba(0,0,0,.6)}footer .in{max
|
|
|
104
108
|
</div>
|
|
105
109
|
|
|
106
110
|
<div class="panel"><h2>Recent investigations</h2><div id="recent" class="list"><p class="src">None yet.</p></div></div>
|
|
107
|
-
<p class="src" style="margin-top:22px">Verdicts are automated readings of public data, not audits or financial advice.
|
|
111
|
+
<p class="src" style="margin-top:22px">Verdicts are automated readings of public data, not audits or financial advice. Holding is checked live; a burn cannot be refunded.</p>
|
|
108
112
|
</section>
|
|
109
113
|
|
|
110
114
|
<section id="inv" class="hide">
|
|
@@ -148,12 +152,24 @@ async function connect() {
|
|
|
148
152
|
}
|
|
149
153
|
const sign = async (message) => { const a = account || await connect(); return window.ethereum.request({ method: 'personal_sign', params: [hex(message), a] }); };
|
|
150
154
|
const utilityMessage = (kind, target, tx) => `Oculon ${kind === 'investigate' ? 'investigation' : 'safety badge'}\nTarget: ${target.trim()}\nBurn: ${tx.trim().toLowerCase()}`;
|
|
155
|
+
const holdMessage = (kind, target, address, nonce) => `Oculon ${kind === 'investigate' ? 'investigation' : 'safety badge'}\nTarget: ${target.trim()}\nWallet: ${address.trim().toLowerCase()}\nPaid by: holding OCULON\nNonce: ${nonce}`;
|
|
156
|
+
const pay = (name) => document.querySelector(`input[name=${name}]:checked`).value;
|
|
157
|
+
for (const [name, box] of [['aPay', 'aBurn'], ['bPay', 'bBurn']]) document.querySelectorAll(`input[name=${name}]`).forEach((r) => r.onchange = () => $(box).classList.toggle('hide', pay(name) !== 'burn'));
|
|
158
|
+
const holdSign = async (kind, target) => { const a = account || await connect(); const { nonce } = await post('/api/utility/nonce', { address: a }); return { address: a, nonce, signature: await sign(holdMessage(kind, target, a, nonce)) }; };
|
|
151
159
|
const busy = async (btn, msg, fn) => { btn.disabled = true; try { await fn(); } catch (e) { say(msg, e.message || String(e), 'err'); } finally { btn.disabled = false; } };
|
|
152
160
|
|
|
153
161
|
$('connect').onclick = () => busy($('connect'), $('walletMsg'), connect);
|
|
154
162
|
$('aGo').onclick = () => busy($('aGo'), $('aMsg'), async () => {
|
|
155
163
|
const target = $('aTarget').value.trim(), tx = $('aTx').value.trim();
|
|
156
|
-
if (!target
|
|
164
|
+
if (!target) throw new Error('Fill in what to investigate.');
|
|
165
|
+
if (pay('aPay') === 'hold') {
|
|
166
|
+
say($('aMsg'), 'Sign the request in your wallet…');
|
|
167
|
+
const h = await holdSign('investigate', target);
|
|
168
|
+
say($('aMsg'), 'Checking your OCULON balance on Robinhood Chain…');
|
|
169
|
+
const r = await post('/api/utility/investigate', { mode: 'hold', target, ...h });
|
|
170
|
+
location.href = '/investigation/' + r.id; return;
|
|
171
|
+
}
|
|
172
|
+
if (!tx) throw new Error('Fill in the burn transaction hash.');
|
|
157
173
|
say($('aMsg'), 'Sign the request in your wallet…');
|
|
158
174
|
const signature = await sign(utilityMessage('investigate', target, tx));
|
|
159
175
|
say($('aMsg'), 'Checking the burn on Robinhood Chain…');
|
|
@@ -162,7 +178,15 @@ $('aGo').onclick = () => busy($('aGo'), $('aMsg'), async () => {
|
|
|
162
178
|
});
|
|
163
179
|
$('bGo').onclick = () => busy($('bGo'), $('bMsg'), async () => {
|
|
164
180
|
const token = $('bToken').value.trim().toLowerCase(), tx = $('bTx').value.trim();
|
|
165
|
-
if (!token
|
|
181
|
+
if (!token) throw new Error('Fill in the token address.');
|
|
182
|
+
if (pay('bPay') === 'hold') {
|
|
183
|
+
say($('bMsg'), 'Sign the request in your wallet…');
|
|
184
|
+
const h = await holdSign('safety', token);
|
|
185
|
+
say($('bMsg'), 'Checking your OCULON balance on Robinhood Chain…');
|
|
186
|
+
await post('/api/utility/safety', { mode: 'hold', token, ...h });
|
|
187
|
+
location.href = '/safety/' + token; return;
|
|
188
|
+
}
|
|
189
|
+
if (!tx) throw new Error('Fill in the burn transaction hash.');
|
|
166
190
|
say($('bMsg'), 'Sign the request in your wallet…');
|
|
167
191
|
const signature = await sign(utilityMessage('safety', token, tx));
|
|
168
192
|
say($('bMsg'), 'Checking the burn on Robinhood Chain…');
|
|
@@ -185,7 +209,8 @@ async function home() {
|
|
|
185
209
|
if (!onApp) $('cGo').textContent = 'Sign in on the app';
|
|
186
210
|
const i = await get('/api/utility/info');
|
|
187
211
|
$('ca').textContent = i.token ? i.token.ca : 'not configured';
|
|
188
|
-
$('amtA').textContent = fmt(i.amounts.
|
|
212
|
+
$('amtA').textContent = 'Hold ' + fmt(i.amounts.holdInvestigate); $('amtB').textContent = 'Hold ' + fmt(i.amounts.holdSafety); $('amtC').textContent = 'Hold ' + fmt(i.amounts.holder);
|
|
213
|
+
$('burnA').textContent = fmt(i.amounts.investigate); $('burnB').textContent = fmt(i.amounts.safety);
|
|
189
214
|
if (i.holder) { say($('cMsg'), `Holder tier on for ${i.holder.address} until ${i.holder.expiresAt.slice(0, 10)}.`, 'ok'); $('cOut').classList.remove('hide'); }
|
|
190
215
|
if (i.investigations.length) $('recent').innerHTML = i.investigations.map((x) => `<a href="/investigation/${esc(x.id)}"><span>${esc(x.target)}</span><span>${esc(x.createdAt.slice(0, 10))} · ${esc(x.status)}</span></a>`).join('');
|
|
191
216
|
}
|
|
@@ -195,6 +220,7 @@ async function investigation(id) {
|
|
|
195
220
|
const draw = (v) => {
|
|
196
221
|
$('invTarget').textContent = v.target;
|
|
197
222
|
document.title = 'Oculon investigation: ' + v.target;
|
|
223
|
+
if (v.heldBy) $('invBurn').innerHTML = `Requested by a holder of ${esc(v.heldBy.balance)} OCULON: <code>${esc(v.heldBy.address)}</code> · ${esc(v.createdAt.slice(0, 16).replace('T', ' '))} UTC`;
|
|
198
224
|
if (v.burn) $('invBurn').innerHTML = `Paid for by burning ${esc(v.burn.amount)} OCULON from <code>${esc(v.burn.from)}</code> · tx <a href="https://robin.etherscan.io/tx/${esc(v.burn.tx)}" target="_blank" rel="noopener">${esc(v.burn.tx.slice(0, 12))}…</a> · ${esc(v.createdAt.slice(0, 16).replace('T', ' '))} UTC`;
|
|
199
225
|
if (v.status !== 'done') return;
|
|
200
226
|
$('invBody').innerHTML = v.parts.map((p) => `<div class="part"><h3>${esc(p.title)}${p.verdict ? ` <span class="pill v-${esc(String(p.verdict).toUpperCase())}">${esc(String(p.verdict).toUpperCase())}</span>` : ''}</h3>${p.error ? `<p class="msg err">${esc(p.error)}</p>` : ''}${p.lines.length ? `<ul>${p.lines.map((l) => `<li>${esc(l)}</li>`).join('')}</ul>` : p.error ? '' : '<p class="src">No issues found by this check.</p>'}${p.sources.length ? `<div class="src">sources: ${esc(p.sources.join(' · '))}</div>` : ''}</div>`).join('') + '<p class="src">Automated readings of public data, not an audit.</p>';
|
|
@@ -209,9 +235,9 @@ async function safety(token) {
|
|
|
209
235
|
$('safeBadge').src = '/badge/' + token + '.svg?t=' + Date.now();
|
|
210
236
|
const abs = location.origin + '/badge/' + token + '.svg';
|
|
211
237
|
$('embed').textContent = `[](${location.origin}/safety/${token})`;
|
|
212
|
-
$('safeBody').innerHTML = !s.expiresAt ? '<p>This token is not monitored.
|
|
238
|
+
$('safeBody').innerHTML = !s.expiresAt ? '<p>This token is not monitored. Hold 2,000,000 OCULON, or burn 1,000,000, on the <a href="/utility">utility page</a> to start a live badge.</p>'
|
|
213
239
|
: `<h2>${s.active ? `<span class="pill v-${esc(s.verdict)}">${esc(s.verdict ?? 'CHECKING')}</span>` : 'Monitoring ended'}</h2>
|
|
214
|
-
<p class="src">Token <code>${esc(token)}</code> · ${s.active ? 'monitored until' : 'ended'} ${esc(s.expiresAt.slice(0, 10))} · last check ${esc((s.lastCheck || '').slice(0, 16).replace('T', ' '))} UTC</p>
|
|
240
|
+
<p class="src">Token <code>${esc(token)}</code> · ${s.heldBy ? `backed by a holder: <code>${esc(s.heldBy)}</code> · ` : ''}${s.active ? (s.heldBy ? 'live while the holder keeps 2,000,000' : 'monitored until') : 'ended'} ${s.heldBy ? '' : esc(s.expiresAt.slice(0, 10))} · last check ${esc((s.lastCheck || '').slice(0, 16).replace('T', ' '))} UTC</p>
|
|
215
241
|
${s.reasons.length ? `<ul>${s.reasons.map((r) => `<li>${esc(r)}</li>`).join('')}</ul>` : '<p>No risk flags in the last check.</p>'}
|
|
216
242
|
${s.history.length ? `<h2 style="margin-top:18px">Verdict changes</h2><ul>${s.history.map((h) => `<li>${esc(h.at.slice(0, 16).replace('T', ' '))} UTC · ${esc(h.verdict)}</li>`).join('')}</ul>` : ''}
|
|
217
243
|
<p class="src">Heuristics over pool and explorer data, not an audit. Burning for a badge never changes the verdict.</p>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oculon",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "OSINT engine you can run, script and plug into agents: 80+ live tools for scams, links, IPs, malware, outages, CVEs and research, each result with its sources. CLI, SDK, MCP server and web app. Zero dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"osint",
|