feat(demo): mock FIPS as active (status, seed anchors, reconnect, install)
fips.status reports installed+active with 5 authenticated peers and an anchor connection; list/add/remove/apply seed-anchors and reconnect/install all resolve to working states so the FIPS Mesh + Seed Anchors cards light green in the demo. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4d0c2d6717
commit
3f411c1d10
@ -1917,6 +1917,52 @@ app.post('/rpc/v1', (req, res) => {
|
|||||||
return res.json({ result: { paid: true, status: 'confirmed', confirmations: 1 } })
|
return res.json({ result: { paid: true, status: 'confirmed', confirmations: 1 } })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── FIPS encrypted-mesh transport (shows as fully active in the demo) ──
|
||||||
|
case 'fips.status': {
|
||||||
|
return res.json({
|
||||||
|
result: {
|
||||||
|
installed: true,
|
||||||
|
version: '0.4.2',
|
||||||
|
service_state: 'active',
|
||||||
|
upstream_service_state: 'active',
|
||||||
|
service_active: true,
|
||||||
|
key_present: true,
|
||||||
|
npub: 'npub1' + randomHex(28),
|
||||||
|
authenticated_peer_count: 5,
|
||||||
|
anchor_connected: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
case 'fips.list-seed-anchors': {
|
||||||
|
return res.json({
|
||||||
|
result: {
|
||||||
|
seed_anchors: [
|
||||||
|
{ npub: 'npub1' + randomHex(28), address: 'fips.v0l.io:8443', transport: 'tcp', label: 'Public anchor' },
|
||||||
|
{ npub: 'npub1' + randomHex(28), address: 'anchor.archipelago.lan:8443', transport: 'tcp', label: 'Federation anchor' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
|
case 'fips.add-seed-anchor':
|
||||||
|
case 'fips.remove-seed-anchor': {
|
||||||
|
const seed = [
|
||||||
|
{ npub: 'npub1' + randomHex(28), address: params?.address || 'fips.v0l.io:8443', transport: 'tcp', label: params?.label || 'Anchor' },
|
||||||
|
]
|
||||||
|
return res.json({ result: { seed_anchors: seed, apply: [{ npub: seed[0].npub, ok: true, message: 'applied' }] } })
|
||||||
|
}
|
||||||
|
case 'fips.apply-seed-anchors': {
|
||||||
|
return res.json({ result: { applied: 2, results: [
|
||||||
|
{ npub: 'npub1' + randomHex(28), ok: true, message: 'connected' },
|
||||||
|
{ npub: 'npub1' + randomHex(28), ok: true, message: 'connected' },
|
||||||
|
] } })
|
||||||
|
}
|
||||||
|
case 'fips.reconnect': {
|
||||||
|
return res.json({ result: { success: true, anchor_connected: true, authenticated_peer_count: 5 } })
|
||||||
|
}
|
||||||
|
case 'fips.install': {
|
||||||
|
return res.json({ result: { success: true, installed: true, version: '0.4.2' } })
|
||||||
|
}
|
||||||
|
|
||||||
case 'network.diagnostics': {
|
case 'network.diagnostics': {
|
||||||
return res.json({
|
return res.json({
|
||||||
result: {
|
result: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user