2026-03-17 00:03:08 +00:00
|
|
|
<script setup lang="ts">
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
import { ref, computed, watch, nextTick, onMounted, onUnmounted } from 'vue'
|
2026-03-17 00:03:08 +00:00
|
|
|
import { useMeshStore } from '@/stores/mesh'
|
2026-03-17 00:45:37 +00:00
|
|
|
import { useTransportStore } from '@/stores/transport'
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
import type { MeshPeer, SessionStatus } from '@/stores/mesh'
|
2026-03-17 00:03:08 +00:00
|
|
|
import AnimatedLogo from '@/components/AnimatedLogo.vue'
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
import { rpcClient } from '@/api/rpc-client'
|
2026-03-17 00:03:08 +00:00
|
|
|
|
|
|
|
|
const mesh = useMeshStore()
|
2026-03-17 00:45:37 +00:00
|
|
|
const transport = useTransportStore()
|
2026-03-17 00:03:08 +00:00
|
|
|
|
|
|
|
|
// Active chat: either a peer or a channel
|
|
|
|
|
const activeChatPeer = ref<MeshPeer | null>(null)
|
|
|
|
|
const activeChatChannel = ref<{ index: number; name: string } | null>(null)
|
|
|
|
|
const messageText = ref('')
|
|
|
|
|
const sendError = ref('')
|
|
|
|
|
const broadcasting = ref(false)
|
|
|
|
|
const configuring = ref(false)
|
|
|
|
|
const chatScrollEl = ref<HTMLElement | null>(null)
|
|
|
|
|
let pollInterval: ReturnType<typeof setInterval> | null = null
|
|
|
|
|
|
|
|
|
|
// The Public channel (always available on Meshcore)
|
|
|
|
|
const publicChannel = { index: 0, name: 'Public' }
|
|
|
|
|
|
2026-03-17 00:45:37 +00:00
|
|
|
const togglingOffGrid = ref(false)
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
const peerSessionInfo = ref<SessionStatus | null>(null)
|
|
|
|
|
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
// Phase 4: Off-grid Bitcoin + Dead Man's Switch
|
|
|
|
|
const activeTab = ref<'chat' | 'bitcoin' | 'deadman'>('chat')
|
|
|
|
|
const txHexInput = ref('')
|
|
|
|
|
const bolt11Input = ref('')
|
|
|
|
|
const bolt11AmountInput = ref('')
|
|
|
|
|
const relayingTx = ref(false)
|
|
|
|
|
const relayingLn = ref(false)
|
|
|
|
|
const relayResult = ref('')
|
|
|
|
|
const meshSendAddr = ref('')
|
|
|
|
|
const meshSendAmount = ref('')
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
const relayMode = ref<'archy' | 'broadcast'>('archy')
|
|
|
|
|
const sendTab = ref<'onchain' | 'lightning'>('onchain')
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
const deadmanConfiguring = ref(false)
|
|
|
|
|
const deadmanInterval = ref('21600')
|
|
|
|
|
const deadmanEnabled = ref(false)
|
|
|
|
|
const deadmanCustomMsg = ref('')
|
|
|
|
|
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
// Fetch session status when active peer changes
|
|
|
|
|
watch(() => activeChatPeer.value, async (peer) => {
|
|
|
|
|
if (peer) {
|
|
|
|
|
try {
|
|
|
|
|
peerSessionInfo.value = await mesh.getSessionStatus(peer.contact_id)
|
|
|
|
|
} catch {
|
|
|
|
|
peerSessionInfo.value = null
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
peerSessionInfo.value = null
|
|
|
|
|
}
|
|
|
|
|
})
|
2026-03-17 00:45:37 +00:00
|
|
|
|
|
|
|
|
async function handleToggleOffGrid() {
|
|
|
|
|
togglingOffGrid.value = true
|
|
|
|
|
try {
|
|
|
|
|
await transport.setMeshOnly(!transport.meshOnly)
|
|
|
|
|
} finally { togglingOffGrid.value = false }
|
|
|
|
|
}
|
|
|
|
|
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
async function handleMeshSendBitcoin() {
|
|
|
|
|
if (!meshSendAddr.value.trim() || !meshSendAmount.value) return
|
|
|
|
|
relayingTx.value = true
|
|
|
|
|
relayResult.value = ''
|
|
|
|
|
try {
|
|
|
|
|
// Step 1: Create signed raw TX locally (no broadcast)
|
|
|
|
|
relayResult.value = 'Creating signed transaction...'
|
|
|
|
|
const rawRes = await rpcClient.call<{ raw_tx_hex: string; amount_sats: number }>({
|
|
|
|
|
method: 'lnd.create-raw-tx',
|
|
|
|
|
params: { addr: meshSendAddr.value.trim(), amount_sats: parseInt(meshSendAmount.value) },
|
|
|
|
|
})
|
|
|
|
|
// Step 2: Relay via mesh
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
relayResult.value = relayMode.value === 'broadcast'
|
|
|
|
|
? 'Broadcasting via mesh network...'
|
|
|
|
|
: 'Sending to Archy peers (encrypted)...'
|
|
|
|
|
const relayRes = await mesh.relayTransaction(rawRes.raw_tx_hex, relayMode.value)
|
|
|
|
|
relayResult.value = `Sent via mesh! Request #${relayRes.request_id} — waiting for relay peer to broadcast...`
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
meshSendAddr.value = ''
|
|
|
|
|
meshSendAmount.value = ''
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
// Step 3: Poll for relay result (every 3s for 90s)
|
|
|
|
|
pollRelayStatus(relayRes.request_id)
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
} catch (err: unknown) {
|
|
|
|
|
relayResult.value = err instanceof Error ? err.message : 'Send failed'
|
|
|
|
|
} finally {
|
|
|
|
|
relayingTx.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
function pollRelayStatus(requestId: number) {
|
|
|
|
|
let attempts = 0
|
|
|
|
|
const maxAttempts = 30
|
|
|
|
|
const interval = setInterval(async () => {
|
|
|
|
|
attempts++
|
|
|
|
|
try {
|
|
|
|
|
const res = await mesh.relayStatus(requestId)
|
|
|
|
|
if (res.status === 'confirmed' && res.txid) {
|
|
|
|
|
relayResult.value = `TX broadcast! txid: ${res.txid.slice(0, 8)}...${res.txid.slice(-8)}`
|
|
|
|
|
clearInterval(interval)
|
|
|
|
|
} else if (res.status === 'failed') {
|
|
|
|
|
const code = res.error_code ? ` [${res.error_code}]` : ''
|
|
|
|
|
relayResult.value = `Relay failed${code}: ${res.error || 'unknown error'}`
|
|
|
|
|
clearInterval(interval)
|
|
|
|
|
} else if (attempts >= maxAttempts) {
|
|
|
|
|
relayResult.value += ' (timed out waiting for confirmation)'
|
|
|
|
|
clearInterval(interval)
|
|
|
|
|
}
|
|
|
|
|
} catch {
|
|
|
|
|
if (attempts >= maxAttempts) clearInterval(interval)
|
|
|
|
|
}
|
|
|
|
|
}, 3000)
|
|
|
|
|
}
|
|
|
|
|
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
async function handleRelayTx() {
|
|
|
|
|
if (!txHexInput.value.trim()) return
|
|
|
|
|
relayingTx.value = true
|
|
|
|
|
relayResult.value = ''
|
|
|
|
|
try {
|
|
|
|
|
const res = await mesh.relayTransaction(txHexInput.value.trim())
|
|
|
|
|
relayResult.value = `TX queued (request #${res.request_id})`
|
|
|
|
|
txHexInput.value = ''
|
|
|
|
|
} catch (err: unknown) {
|
|
|
|
|
relayResult.value = err instanceof Error ? err.message : 'Relay failed'
|
|
|
|
|
} finally {
|
|
|
|
|
relayingTx.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleRelayLightning() {
|
|
|
|
|
if (!bolt11Input.value.trim() || !bolt11AmountInput.value) return
|
|
|
|
|
relayingLn.value = true
|
|
|
|
|
relayResult.value = ''
|
|
|
|
|
try {
|
|
|
|
|
const res = await mesh.relayLightning(bolt11Input.value.trim(), parseInt(bolt11AmountInput.value))
|
|
|
|
|
relayResult.value = `Lightning relay queued (request #${res.request_id})`
|
|
|
|
|
bolt11Input.value = ''
|
|
|
|
|
bolt11AmountInput.value = ''
|
|
|
|
|
} catch (err: unknown) {
|
|
|
|
|
relayResult.value = err instanceof Error ? err.message : 'Relay failed'
|
|
|
|
|
} finally {
|
|
|
|
|
relayingLn.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleDeadmanToggle() {
|
|
|
|
|
// Instant enable/disable without waiting for full save
|
|
|
|
|
deadmanConfiguring.value = true
|
|
|
|
|
try {
|
|
|
|
|
await mesh.configureDeadman({ enabled: deadmanEnabled.value })
|
|
|
|
|
await mesh.fetchDeadmanStatus()
|
|
|
|
|
} finally {
|
|
|
|
|
deadmanConfiguring.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleDeadmanConfigure() {
|
|
|
|
|
deadmanConfiguring.value = true
|
|
|
|
|
try {
|
|
|
|
|
await mesh.configureDeadman({
|
|
|
|
|
enabled: deadmanEnabled.value,
|
|
|
|
|
interval_secs: parseInt(deadmanInterval.value) || 21600,
|
|
|
|
|
custom_message: deadmanCustomMsg.value || undefined,
|
|
|
|
|
})
|
|
|
|
|
await mesh.fetchDeadmanStatus()
|
|
|
|
|
} finally {
|
|
|
|
|
deadmanConfiguring.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleDeadmanCheckin() {
|
|
|
|
|
await mesh.deadmanCheckin()
|
|
|
|
|
await mesh.fetchDeadmanStatus()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function formatTimeRemaining(secs: number): string {
|
|
|
|
|
if (secs >= 86400) return `${Math.floor(secs / 3600)}h`
|
|
|
|
|
if (secs >= 3600) return `${Math.floor(secs / 3600)}h ${Math.floor((secs % 3600) / 60)}m`
|
|
|
|
|
if (secs >= 60) return `${Math.floor(secs / 60)}m ${secs % 60}s`
|
|
|
|
|
return `${secs}s`
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-17 00:03:08 +00:00
|
|
|
onMounted(async () => {
|
2026-03-17 00:45:37 +00:00
|
|
|
await Promise.all([mesh.refreshAll(), transport.fetchStatus()])
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
// Sync deadman UI state from server
|
|
|
|
|
if (mesh.deadmanStatus) {
|
|
|
|
|
deadmanEnabled.value = mesh.deadmanStatus.dead_man_enabled
|
|
|
|
|
deadmanInterval.value = String(mesh.deadmanStatus.dead_man_interval_secs)
|
|
|
|
|
}
|
2026-03-17 00:03:08 +00:00
|
|
|
pollInterval = setInterval(() => {
|
|
|
|
|
mesh.fetchStatus()
|
|
|
|
|
mesh.fetchPeers()
|
|
|
|
|
mesh.fetchMessages()
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
mesh.fetchDeadmanStatus()
|
|
|
|
|
mesh.fetchBlockHeaders()
|
2026-03-17 00:03:08 +00:00
|
|
|
}, 5000)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
if (pollInterval) clearInterval(pollInterval)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Active chat name for the header
|
|
|
|
|
const activeChatName = computed(() => {
|
|
|
|
|
if (activeChatChannel.value) return activeChatChannel.value.name
|
|
|
|
|
if (activeChatPeer.value) return activeChatPeer.value.advert_name
|
|
|
|
|
return ''
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const activeChatSub = computed(() => {
|
|
|
|
|
if (activeChatChannel.value) return 'Mesh channel'
|
|
|
|
|
if (activeChatPeer.value) return truncatePubkey(activeChatPeer.value.pubkey_hex)
|
|
|
|
|
return ''
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const hasActiveChat = computed(() => !!activeChatPeer.value || !!activeChatChannel.value)
|
|
|
|
|
|
|
|
|
|
// Messages filtered to the active chat
|
|
|
|
|
const chatMessages = computed(() => {
|
|
|
|
|
if (activeChatChannel.value) {
|
|
|
|
|
// Channel messages have negative contact_id = -(channel_index + 1)
|
|
|
|
|
const chanId = -(activeChatChannel.value.index + 1)
|
|
|
|
|
return mesh.messages.filter(m => m.peer_contact_id === chanId)
|
|
|
|
|
}
|
|
|
|
|
if (activeChatPeer.value) {
|
|
|
|
|
const cid = activeChatPeer.value.contact_id
|
|
|
|
|
return mesh.messages.filter(m => m.peer_contact_id === cid)
|
|
|
|
|
}
|
|
|
|
|
return []
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
// Check if a peer is an Archipelago node (name starts with "Archy-")
|
|
|
|
|
function isArchyNode(peer: MeshPeer): boolean {
|
|
|
|
|
return peer.advert_name.startsWith('Archy-')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Sort peers: Archy nodes first, then alphabetical
|
|
|
|
|
const sortedPeers = computed(() => {
|
|
|
|
|
return [...mesh.peers].sort((a, b) => {
|
|
|
|
|
const aArchy = isArchyNode(a) ? 0 : 1
|
|
|
|
|
const bArchy = isArchyNode(b) ? 0 : 1
|
|
|
|
|
if (aArchy !== bArchy) return aArchy - bArchy
|
|
|
|
|
return a.advert_name.localeCompare(b.advert_name)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function openChat(peer: MeshPeer) {
|
|
|
|
|
activeChatPeer.value = peer
|
|
|
|
|
activeChatChannel.value = null
|
|
|
|
|
sendError.value = ''
|
|
|
|
|
messageText.value = ''
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
activeTab.value = 'chat'
|
2026-03-17 00:03:08 +00:00
|
|
|
mesh.markChatRead(peer.contact_id)
|
|
|
|
|
nextTick(() => scrollChatToBottom())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function openChannelChat(channel: { index: number; name: string }) {
|
|
|
|
|
activeChatChannel.value = channel
|
|
|
|
|
activeChatPeer.value = null
|
|
|
|
|
sendError.value = ''
|
|
|
|
|
messageText.value = ''
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
activeTab.value = 'chat'
|
2026-03-17 00:03:08 +00:00
|
|
|
nextTick(() => scrollChatToBottom())
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function closeChat() {
|
|
|
|
|
activeChatPeer.value = null
|
|
|
|
|
activeChatChannel.value = null
|
|
|
|
|
mesh.clearViewingChat()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleSendMessage() {
|
|
|
|
|
if (!activeChatPeer.value || !messageText.value.trim()) return
|
|
|
|
|
sendError.value = ''
|
|
|
|
|
try {
|
|
|
|
|
await mesh.sendMessage(activeChatPeer.value.contact_id, messageText.value)
|
|
|
|
|
messageText.value = ''
|
|
|
|
|
nextTick(() => scrollChatToBottom())
|
|
|
|
|
} catch (err: unknown) {
|
|
|
|
|
sendError.value = err instanceof Error ? err.message : 'Send failed'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function scrollChatToBottom() {
|
|
|
|
|
if (chatScrollEl.value) {
|
|
|
|
|
chatScrollEl.value.scrollTop = chatScrollEl.value.scrollHeight
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleBroadcast() {
|
|
|
|
|
broadcasting.value = true
|
|
|
|
|
try { await mesh.broadcastIdentity() } finally { broadcasting.value = false }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handleToggleEnabled() {
|
|
|
|
|
configuring.value = true
|
|
|
|
|
try {
|
|
|
|
|
const newEnabled = !(mesh.status?.enabled ?? false)
|
|
|
|
|
await mesh.configure({ enabled: newEnabled })
|
|
|
|
|
} finally { configuring.value = false }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function signalBars(rssi: number | null): number {
|
|
|
|
|
if (rssi === null) return 0
|
|
|
|
|
if (rssi > -60) return 4
|
|
|
|
|
if (rssi > -75) return 3
|
|
|
|
|
if (rssi > -90) return 2
|
|
|
|
|
return 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function timeAgo(iso: string): string {
|
|
|
|
|
const diff = Date.now() - new Date(iso).getTime()
|
|
|
|
|
const secs = Math.floor(diff / 1000)
|
|
|
|
|
if (secs < 60) return `${secs}s ago`
|
|
|
|
|
const mins = Math.floor(secs / 60)
|
|
|
|
|
if (mins < 60) return `${mins}m ago`
|
|
|
|
|
const hours = Math.floor(mins / 60)
|
|
|
|
|
return `${hours}h ago`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function truncatePubkey(hex: string | null): string {
|
|
|
|
|
if (!hex) return ''
|
|
|
|
|
return hex.slice(0, 8) + '...' + hex.slice(-6)
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="mesh-view">
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<!-- Header (hidden on mobile — title is in the tab bar) -->
|
|
|
|
|
<div class="mesh-header hidden md:flex">
|
2026-03-17 00:03:08 +00:00
|
|
|
<div class="mesh-header-left">
|
|
|
|
|
<h1 class="mesh-title">Mesh Network</h1>
|
|
|
|
|
<p class="mesh-subtitle">
|
|
|
|
|
{{ mesh.status?.peer_count ?? 0 }} peer{{ (mesh.status?.peer_count ?? 0) !== 1 ? 's' : '' }}
|
|
|
|
|
<span v-if="mesh.status?.device_connected" class="mesh-subtitle-badge">Live</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<a
|
|
|
|
|
href="https://flasher.meshcore.co.uk/"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
|
class="glass-button mesh-flasher-btn"
|
|
|
|
|
>
|
|
|
|
|
Flash Meshcore <span class="mesh-flasher-sep">|</span> Choose Companion USB
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Error banner -->
|
|
|
|
|
<div v-if="mesh.error" class="mesh-error">{{ mesh.error }}</div>
|
|
|
|
|
|
|
|
|
|
<!-- Two-column layout (desktop) / single-column (mobile) -->
|
|
|
|
|
<div class="mesh-columns">
|
|
|
|
|
<!-- LEFT COLUMN: Status + Peers -->
|
|
|
|
|
<div class="mesh-left">
|
|
|
|
|
<!-- Device Status -->
|
|
|
|
|
<div class="glass-card mesh-status-card">
|
|
|
|
|
<div class="mesh-status-header">
|
|
|
|
|
<div class="mesh-status-indicator" :class="mesh.status?.device_connected ? 'connected' : 'disconnected'" />
|
|
|
|
|
<h2 class="mesh-section-title">Device</h2>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="mesh.loading && !mesh.status" class="mesh-loading">Loading...</div>
|
|
|
|
|
|
|
|
|
|
<div v-else-if="mesh.status" class="mesh-status-grid">
|
|
|
|
|
<div class="mesh-stat">
|
|
|
|
|
<span class="mesh-stat-label">Status</span>
|
|
|
|
|
<span class="mesh-stat-value" :class="mesh.status.device_connected ? 'text-green' : mesh.status.enabled ? 'text-orange' : 'text-muted'">
|
|
|
|
|
{{ mesh.status.device_connected ? 'Broadcasting' : mesh.status.enabled ? 'Connecting...' : 'Disabled' }}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-stat">
|
|
|
|
|
<span class="mesh-stat-label">Type</span>
|
|
|
|
|
<span class="mesh-stat-value">{{ mesh.status.device_type === 'unknown' ? '—' : mesh.status.device_type }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-stat">
|
|
|
|
|
<span class="mesh-stat-label">Port</span>
|
|
|
|
|
<span class="mesh-stat-value">{{ mesh.status.device_path ?? 'Auto' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-stat">
|
|
|
|
|
<span class="mesh-stat-label">Sent</span>
|
|
|
|
|
<span class="mesh-stat-value">{{ mesh.status.messages_sent }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-stat">
|
|
|
|
|
<span class="mesh-stat-label">Recv</span>
|
|
|
|
|
<span class="mesh-stat-value">{{ mesh.status.messages_received }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-stat">
|
|
|
|
|
<span class="mesh-stat-label">Channel</span>
|
|
|
|
|
<span class="mesh-stat-value">{{ mesh.status.channel_name }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Detected USB devices -->
|
|
|
|
|
<div v-if="mesh.status?.detected_devices?.length" class="mesh-detected-devices">
|
|
|
|
|
<div v-for="dev in mesh.status.detected_devices" :key="dev" class="mesh-device-row">
|
|
|
|
|
<div class="mesh-device-indicator" />
|
|
|
|
|
<span class="mesh-device-path">{{ dev }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-03-17 00:45:37 +00:00
|
|
|
<!-- Off-grid mode banner -->
|
|
|
|
|
<div v-if="transport.meshOnly" class="mesh-offgrid-banner">
|
|
|
|
|
<svg class="w-4 h-4 text-orange-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
|
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 5.636a9 9 0 11-12.728 0M12 9v4m0 4h.01" />
|
|
|
|
|
</svg>
|
|
|
|
|
<span class="text-sm font-medium text-orange-300">OFF-GRID</span>
|
|
|
|
|
<span class="text-xs text-white/50">Tor disabled — mesh only</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-03-17 00:03:08 +00:00
|
|
|
<!-- Actions row -->
|
|
|
|
|
<div class="mesh-actions">
|
|
|
|
|
<button class="glass-button mesh-action-btn" :disabled="configuring" @click="handleToggleEnabled">
|
|
|
|
|
{{ mesh.status?.enabled ? 'Disable' : 'Enable' }}
|
|
|
|
|
</button>
|
|
|
|
|
<button class="glass-button mesh-action-btn" :disabled="!mesh.status?.device_connected || broadcasting" @click="handleBroadcast">
|
|
|
|
|
{{ broadcasting ? 'Sending...' : 'Broadcast' }}
|
|
|
|
|
</button>
|
2026-03-17 00:45:37 +00:00
|
|
|
<button
|
|
|
|
|
class="glass-button mesh-action-btn"
|
|
|
|
|
:class="transport.meshOnly ? 'mesh-offgrid-active' : ''"
|
|
|
|
|
:disabled="togglingOffGrid"
|
|
|
|
|
@click="handleToggleOffGrid"
|
|
|
|
|
>
|
|
|
|
|
{{ transport.meshOnly ? 'Go Online' : 'Off-Grid' }}
|
|
|
|
|
</button>
|
2026-03-17 00:03:08 +00:00
|
|
|
<button class="glass-button mesh-action-btn" @click="mesh.refreshAll()">Refresh</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Peers list (scrollable) -->
|
|
|
|
|
<div class="glass-card mesh-peers-card">
|
|
|
|
|
<h2 class="mesh-section-title">Peers <span class="mesh-peer-count">{{ mesh.peers.length }}</span></h2>
|
|
|
|
|
|
|
|
|
|
<div v-if="mesh.peers.length === 0 && !mesh.status?.device_connected" class="mesh-empty">
|
|
|
|
|
No peers discovered yet.
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-else class="mesh-peer-list">
|
|
|
|
|
<!-- Public channel -->
|
|
|
|
|
<div
|
|
|
|
|
class="mesh-peer-row is-channel"
|
|
|
|
|
:class="{ active: activeChatChannel?.index === 0 }"
|
|
|
|
|
@click="openChannelChat(publicChannel)"
|
|
|
|
|
>
|
|
|
|
|
<div class="mesh-peer-avatar channel">#</div>
|
|
|
|
|
<div class="mesh-peer-info">
|
|
|
|
|
<div class="mesh-peer-name">Public</div>
|
|
|
|
|
<div class="mesh-peer-sub">Mesh channel</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-for="peer in sortedPeers" :key="peer.contact_id"
|
|
|
|
|
class="mesh-peer-row"
|
|
|
|
|
:class="{ active: activeChatPeer?.contact_id === peer.contact_id, 'is-archy': isArchyNode(peer) }"
|
|
|
|
|
@click="openChat(peer)"
|
|
|
|
|
>
|
|
|
|
|
<div class="mesh-peer-avatar" :class="{ archy: isArchyNode(peer) }">
|
|
|
|
|
<AnimatedLogo v-if="isArchyNode(peer)" size="sm" />
|
|
|
|
|
<template v-else>{{ peer.advert_name.charAt(0).toUpperCase() }}</template>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-peer-info">
|
|
|
|
|
<div class="mesh-peer-name">
|
|
|
|
|
{{ peer.advert_name || `Node #${peer.contact_id}` }}
|
|
|
|
|
<span v-if="isArchyNode(peer)" class="mesh-peer-archy-badge">Archy</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-peer-sub">{{ truncatePubkey(peer.pubkey_hex) }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<span v-if="mesh.unreadCounts[peer.contact_id]" class="mesh-unread-badge">
|
|
|
|
|
{{ mesh.unreadCounts[peer.contact_id] }}
|
|
|
|
|
</span>
|
|
|
|
|
<div class="mesh-peer-signal">
|
|
|
|
|
<div class="mesh-signal-bars">
|
|
|
|
|
<div v-for="i in 4" :key="i" class="mesh-signal-bar" :class="{ active: i <= signalBars(peer.rssi) }" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<!-- RIGHT COLUMN: Tabbed panels -->
|
2026-03-17 00:03:08 +00:00
|
|
|
<div class="mesh-right">
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<!-- Tab bar -->
|
|
|
|
|
<div class="mesh-tab-bar">
|
|
|
|
|
<button class="mesh-tab" :class="{ active: activeTab === 'chat' }" @click="activeTab = 'chat'">Chat</button>
|
|
|
|
|
<button class="mesh-tab" :class="{ active: activeTab === 'bitcoin' }" @click="activeTab = 'bitcoin'">
|
|
|
|
|
Off-Grid Bitcoin
|
|
|
|
|
<span v-if="mesh.latestBlockHeight > 0" class="mesh-tab-badge">{{ mesh.latestBlockHeight }}</span>
|
|
|
|
|
</button>
|
|
|
|
|
<button class="mesh-tab" :class="{ active: activeTab === 'deadman' }" @click="activeTab = 'deadman'">
|
|
|
|
|
Dead Man
|
|
|
|
|
<span v-if="mesh.deadmanStatus?.triggered" class="mesh-tab-badge mesh-tab-badge-alert">!</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Off-Grid Bitcoin Panel -->
|
|
|
|
|
<div v-if="activeTab === 'bitcoin'" class="glass-card mesh-bitcoin-panel">
|
|
|
|
|
<h3 class="mesh-panel-title">Off-Grid Bitcoin</h3>
|
|
|
|
|
<p class="mesh-panel-sub">Relay transactions and receive block headers via mesh radio</p>
|
|
|
|
|
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
<!-- Relay status notification -->
|
|
|
|
|
<div v-if="relayResult" class="mesh-relay-result" :class="relayResult.includes('failed') || relayResult.includes('Failed') ? 'error' : 'success'">
|
|
|
|
|
{{ relayResult }}
|
|
|
|
|
</div>
|
|
|
|
|
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<!-- Block Headers -->
|
|
|
|
|
<div class="mesh-bitcoin-section">
|
|
|
|
|
<div class="mesh-bitcoin-section-header">
|
|
|
|
|
<span class="mesh-bitcoin-label">Latest Block</span>
|
|
|
|
|
<span v-if="mesh.latestBlockHeight > 0" class="mesh-bitcoin-height">#{{ mesh.latestBlockHeight.toLocaleString() }}</span>
|
|
|
|
|
<span v-else class="mesh-bitcoin-height mesh-muted">No headers yet</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="mesh.blockHeaders.length" class="mesh-block-list">
|
|
|
|
|
<div v-for="h in mesh.blockHeaders.slice(0, 2)" :key="h.height" class="mesh-block-row">
|
|
|
|
|
<span class="mesh-block-height">#{{ h.height.toLocaleString() }}</span>
|
|
|
|
|
<span class="mesh-block-hash">{{ h.hash.slice(0, 12) }}...{{ h.hash.slice(-8) }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
<!-- On-Chain / Lightning tabs -->
|
|
|
|
|
<div class="mesh-send-tabs">
|
|
|
|
|
<button class="mesh-send-tab" :class="{ active: sendTab === 'onchain' }" @click="sendTab = 'onchain'">On-Chain</button>
|
|
|
|
|
<button class="mesh-send-tab" :class="{ active: sendTab === 'lightning' }" @click="sendTab = 'lightning'">Lightning</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- On-Chain tab -->
|
|
|
|
|
<div v-if="sendTab === 'onchain'" class="mesh-bitcoin-section">
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<p class="mesh-bitcoin-hint">Creates a signed transaction locally and relays via mesh peers</p>
|
|
|
|
|
<input v-model="meshSendAddr" class="mesh-bitcoin-input" placeholder="Bitcoin address (bc1...)" />
|
|
|
|
|
<input v-model="meshSendAmount" class="mesh-bitcoin-input mesh-bitcoin-input-sm" type="number" placeholder="Amount (sats)" min="546" />
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
<div class="mesh-relay-mode">
|
|
|
|
|
<label class="mesh-relay-mode-option" :class="{ active: relayMode === 'archy' }">
|
|
|
|
|
<input type="radio" v-model="relayMode" value="archy" />
|
|
|
|
|
<span>Archy Peers <small>(E2E encrypted, direct)</small></span>
|
|
|
|
|
</label>
|
|
|
|
|
<label class="mesh-relay-mode-option" :class="{ active: relayMode === 'broadcast' }">
|
|
|
|
|
<input type="radio" v-model="relayMode" value="broadcast" />
|
|
|
|
|
<span>Mesh Broadcast <small>(multi-hop, wider reach)</small></span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<button class="glass-button" :disabled="!meshSendAddr.trim() || !meshSendAmount || relayingTx" @click="handleMeshSendBitcoin">
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
{{ relayingTx ? 'Sending...' : 'Send via Mesh' }}
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
</button>
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
<details class="mesh-bitcoin-advanced">
|
|
|
|
|
<summary class="mesh-bitcoin-label">Raw TX Relay</summary>
|
|
|
|
|
<div style="margin-top: 8px;">
|
|
|
|
|
<textarea v-model="txHexInput" class="mesh-bitcoin-input" placeholder="Paste raw transaction hex..." rows="3" />
|
|
|
|
|
<button class="glass-button" :disabled="!txHexInput.trim() || relayingTx" @click="handleRelayTx">
|
|
|
|
|
{{ relayingTx ? 'Relaying...' : 'Relay Raw TX' }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</details>
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
</div>
|
|
|
|
|
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
<!-- Lightning tab -->
|
|
|
|
|
<div v-if="sendTab === 'lightning'" class="mesh-bitcoin-section">
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<p class="mesh-bitcoin-hint">Relays a Lightning invoice to an internet-connected peer for payment</p>
|
|
|
|
|
<input v-model="bolt11Input" class="mesh-bitcoin-input" placeholder="lnbc... (bolt11 invoice)" />
|
|
|
|
|
<input v-model="bolt11AmountInput" class="mesh-bitcoin-input mesh-bitcoin-input-sm" type="number" placeholder="Amount (sats)" />
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
<div class="mesh-relay-mode">
|
|
|
|
|
<label class="mesh-relay-mode-option" :class="{ active: relayMode === 'archy' }">
|
|
|
|
|
<input type="radio" v-model="relayMode" value="archy" />
|
|
|
|
|
<span>Archy Peers <small>(E2E encrypted, direct)</small></span>
|
|
|
|
|
</label>
|
|
|
|
|
<label class="mesh-relay-mode-option" :class="{ active: relayMode === 'broadcast' }">
|
|
|
|
|
<input type="radio" v-model="relayMode" value="broadcast" />
|
|
|
|
|
<span>Mesh Broadcast <small>(multi-hop, wider reach)</small></span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
<button class="glass-button" :disabled="!bolt11Input.trim() || !bolt11AmountInput || relayingLn" @click="handleRelayLightning">
|
|
|
|
|
{{ relayingLn ? 'Relaying...' : 'Pay via Mesh' }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Dead Man's Switch Panel -->
|
|
|
|
|
<div v-if="activeTab === 'deadman'" class="glass-card mesh-deadman-panel">
|
|
|
|
|
<h3 class="mesh-panel-title">Dead Man's Switch</h3>
|
|
|
|
|
<p class="mesh-panel-sub">Auto-broadcasts a signed emergency alert if you don't check in</p>
|
|
|
|
|
|
|
|
|
|
<!-- Status -->
|
|
|
|
|
<div v-if="mesh.deadmanStatus" class="mesh-deadman-status">
|
|
|
|
|
<div class="mesh-deadman-indicator" :class="mesh.deadmanStatus.triggered ? 'triggered' : mesh.deadmanStatus.dead_man_enabled ? 'armed' : 'disabled'">
|
|
|
|
|
{{ mesh.deadmanStatus.triggered ? 'TRIGGERED' : mesh.deadmanStatus.dead_man_enabled ? 'ARMED' : 'DISABLED' }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="mesh.deadmanStatus.dead_man_enabled && !mesh.deadmanStatus.triggered" class="mesh-deadman-timer">
|
|
|
|
|
{{ formatTimeRemaining(mesh.deadmanStatus.time_remaining_secs) }}
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="deadmanCustomMsg || mesh.deadmanStatus.dead_man_enabled" class="mesh-deadman-message">
|
|
|
|
|
{{ deadmanCustomMsg || 'Dead man\'s switch triggered — operator unresponsive' }}
|
|
|
|
|
</div>
|
|
|
|
|
<button v-if="mesh.deadmanStatus.dead_man_enabled" class="glass-button mesh-deadman-checkin-btn" @click="handleDeadmanCheckin">
|
|
|
|
|
I'm OK — Check In
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Configuration -->
|
|
|
|
|
<div class="mesh-deadman-config">
|
|
|
|
|
<label class="mesh-deadman-toggle">
|
|
|
|
|
<input v-model="deadmanEnabled" type="checkbox" @change="handleDeadmanToggle" />
|
|
|
|
|
<span>{{ deadmanEnabled ? 'Dead Man\'s Switch Active' : 'Enable Dead Man\'s Switch' }}</span>
|
|
|
|
|
</label>
|
|
|
|
|
|
|
|
|
|
<template v-if="deadmanEnabled">
|
|
|
|
|
<div class="mesh-deadman-field">
|
|
|
|
|
<label class="mesh-bitcoin-label">Trigger Interval</label>
|
|
|
|
|
<select v-model="deadmanInterval" class="mesh-bitcoin-input mesh-bitcoin-input-sm">
|
|
|
|
|
<option value="3600">1 hour</option>
|
|
|
|
|
<option value="21600">6 hours</option>
|
|
|
|
|
<option value="43200">12 hours</option>
|
|
|
|
|
<option value="86400">24 hours</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mesh-deadman-field">
|
|
|
|
|
<label class="mesh-bitcoin-label">Alert Message</label>
|
|
|
|
|
<input v-model="deadmanCustomMsg" class="mesh-bitcoin-input" placeholder="Dead man's switch triggered — operator unresponsive" />
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="mesh-deadman-info">
|
|
|
|
|
<span v-if="mesh.deadmanStatus?.has_gps" class="mesh-deadman-info-item">GPS: included</span>
|
|
|
|
|
<span class="mesh-deadman-info-item">Contacts: {{ mesh.deadmanStatus?.emergency_contacts ?? 0 }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<button class="glass-button" :disabled="deadmanConfiguring" @click="handleDeadmanConfigure">
|
|
|
|
|
{{ deadmanConfiguring ? 'Saving...' : 'Save Configuration' }}
|
|
|
|
|
</button>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Chat Panel (existing) -->
|
|
|
|
|
<div v-if="activeTab === 'chat'" class="glass-card mesh-chat-card">
|
2026-03-17 00:03:08 +00:00
|
|
|
<!-- No chat selected -->
|
|
|
|
|
<div v-if="!hasActiveChat" class="mesh-chat-empty">
|
|
|
|
|
<div class="mesh-chat-empty-icon">📡</div>
|
|
|
|
|
<p>Select a peer or channel to chat</p>
|
|
|
|
|
<p class="mesh-chat-empty-sub">Messages are sent over LoRa mesh radio</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Chat active -->
|
|
|
|
|
<template v-else>
|
|
|
|
|
<!-- Chat header -->
|
|
|
|
|
<div class="mesh-chat-header">
|
|
|
|
|
<button class="mesh-chat-back" @click="closeChat">←</button>
|
|
|
|
|
<div class="mesh-chat-header-info">
|
|
|
|
|
<div class="mesh-chat-header-name">
|
|
|
|
|
{{ activeChatName }}
|
|
|
|
|
<span v-if="activeChatPeer && isArchyNode(activeChatPeer)" class="mesh-peer-archy-badge">Archy</span>
|
|
|
|
|
<span v-if="activeChatChannel" class="mesh-peer-channel-badge">Channel</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-chat-header-sub">{{ activeChatSub }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-chat-header-status">
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
<span v-if="activeChatPeer && peerSessionInfo" class="mesh-session-badge" :class="peerSessionInfo.forward_secrecy ? 'session-ratchet' : peerSessionInfo.has_session ? 'session-static' : 'session-none'" :title="peerSessionInfo.forward_secrecy ? 'Double Ratchet (forward secrecy)' : peerSessionInfo.has_session ? 'Static encryption' : 'No encryption'">🛡</span>
|
2026-03-17 00:03:08 +00:00
|
|
|
<span v-if="activeChatPeer" class="mesh-chat-header-time">{{ timeAgo(activeChatPeer.last_heard) }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Messages area -->
|
|
|
|
|
<div ref="chatScrollEl" class="mesh-chat-messages">
|
|
|
|
|
<div v-if="chatMessages.length === 0" class="mesh-chat-no-messages">
|
|
|
|
|
No messages yet. Say hello!
|
|
|
|
|
</div>
|
|
|
|
|
<div
|
|
|
|
|
v-for="msg in chatMessages" :key="msg.id"
|
|
|
|
|
class="mesh-chat-bubble-wrapper"
|
|
|
|
|
:class="msg.direction"
|
|
|
|
|
>
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
<div class="mesh-chat-bubble" :class="[msg.direction, msg.message_type ? 'typed-' + msg.message_type : '']">
|
|
|
|
|
<!-- Invoice card -->
|
|
|
|
|
<div v-if="msg.message_type === 'invoice' && msg.typed_payload" class="mesh-typed-invoice">
|
|
|
|
|
<div class="mesh-typed-invoice-header">
|
|
|
|
|
<span class="mesh-typed-icon">⚡</span>
|
|
|
|
|
<span class="mesh-typed-label">Lightning Invoice</span>
|
|
|
|
|
<span v-if="msg.typed_payload.paid" class="mesh-typed-paid">Paid</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-typed-invoice-amount">{{ (msg.typed_payload.amount_sats || 0).toLocaleString() }} sats</div>
|
|
|
|
|
<div v-if="msg.typed_payload.memo" class="mesh-typed-invoice-memo">{{ msg.typed_payload.memo }}</div>
|
|
|
|
|
<div class="mesh-typed-invoice-bolt11">{{ (msg.typed_payload.bolt11 || '').substring(0, 40) }}...</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Alert card -->
|
|
|
|
|
<div v-else-if="msg.message_type === 'alert' && msg.typed_payload" class="mesh-typed-alert" :class="'alert-' + (msg.typed_payload.alert_type || 'status')">
|
|
|
|
|
<div class="mesh-typed-alert-header">
|
|
|
|
|
<span class="mesh-typed-icon">{{ msg.typed_payload.alert_type === 'emergency' ? '🚨' : msg.typed_payload.alert_type === 'dead_man' ? '☠' : 'ℹ' }}</span>
|
|
|
|
|
<span class="mesh-typed-label">{{ msg.typed_payload.alert_type === 'emergency' ? 'EMERGENCY' : msg.typed_payload.alert_type === 'dead_man' ? 'DEAD MAN' : 'Status' }}</span>
|
|
|
|
|
<span v-if="msg.typed_payload.signed" class="mesh-typed-signed">Signed</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-typed-alert-message">{{ msg.typed_payload.message }}</div>
|
|
|
|
|
<a v-if="msg.typed_payload.coordinate" class="mesh-typed-alert-location" :href="'https://www.openstreetmap.org/?mlat=' + (msg.typed_payload.coordinate.lat / 1000000) + '&mlon=' + (msg.typed_payload.coordinate.lng / 1000000) + '&zoom=14'" target="_blank" rel="noopener">
|
|
|
|
|
📍 {{ msg.typed_payload.coordinate.label || 'View location' }}
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Coordinate card -->
|
|
|
|
|
<div v-else-if="msg.message_type === 'coordinate' && msg.typed_payload" class="mesh-typed-coordinate">
|
|
|
|
|
<div class="mesh-typed-coordinate-header">
|
|
|
|
|
<span class="mesh-typed-icon">📍</span>
|
|
|
|
|
<span class="mesh-typed-label">Location</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-typed-coordinate-value">{{ (msg.typed_payload.lat / 1000000).toFixed(4) }}, {{ (msg.typed_payload.lng / 1000000).toFixed(4) }}</div>
|
|
|
|
|
<div v-if="msg.typed_payload.label" class="mesh-typed-coordinate-label">{{ msg.typed_payload.label }}</div>
|
|
|
|
|
<a class="mesh-typed-coordinate-link" :href="'https://www.openstreetmap.org/?mlat=' + (msg.typed_payload.lat / 1000000) + '&mlon=' + (msg.typed_payload.lng / 1000000) + '&zoom=14'" target="_blank" rel="noopener">Open Map</a>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Block header -->
|
|
|
|
|
<div v-else-if="msg.message_type === 'block_header' && msg.typed_payload" class="mesh-typed-block">
|
|
|
|
|
<span class="mesh-typed-icon">⛓</span>
|
|
|
|
|
<span class="mesh-typed-label">{{ msg.typed_payload.message || msg.plaintext }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- Default: plain text -->
|
|
|
|
|
<div v-else class="mesh-chat-bubble-text">{{ msg.plaintext }}</div>
|
2026-03-17 00:03:08 +00:00
|
|
|
<div class="mesh-chat-bubble-meta">
|
|
|
|
|
<span v-if="msg.encrypted" class="mesh-chat-e2e">E2E</span>
|
|
|
|
|
<span v-if="msg.delivered && msg.direction === 'sent'" class="mesh-chat-ack">✓✓</span>
|
|
|
|
|
<span class="mesh-chat-bubble-time">{{ timeAgo(msg.timestamp) }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Compose bar -->
|
|
|
|
|
<div class="mesh-chat-compose">
|
|
|
|
|
<div v-if="sendError" class="mesh-chat-send-error">{{ sendError }}</div>
|
|
|
|
|
<div class="mesh-chat-compose-row">
|
|
|
|
|
<input
|
|
|
|
|
v-model="messageText"
|
|
|
|
|
class="mesh-chat-input"
|
|
|
|
|
placeholder="Type a message..."
|
|
|
|
|
maxlength="160"
|
|
|
|
|
@keydown.enter.exact.prevent="handleSendMessage"
|
|
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
class="glass-button mesh-chat-send-btn"
|
|
|
|
|
:disabled="!messageText.trim() || mesh.sending"
|
|
|
|
|
@click="handleSendMessage"
|
|
|
|
|
>
|
|
|
|
|
{{ mesh.sending ? '...' : 'Send' }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mesh-chat-compose-meta">
|
|
|
|
|
<span>{{ messageText.length }}/160</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.mesh-view {
|
|
|
|
|
padding: 24px;
|
|
|
|
|
max-width: 1200px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-header-left { flex: 1; }
|
|
|
|
|
|
|
|
|
|
.mesh-title {
|
|
|
|
|
font-size: 1.5rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: rgba(255, 255, 255, 0.95);
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-subtitle {
|
|
|
|
|
color: rgba(255, 255, 255, 0.5);
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
margin: 2px 0 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-subtitle-badge {
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #4ade80;
|
|
|
|
|
background: rgba(74, 222, 128, 0.12);
|
|
|
|
|
padding: 1px 6px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-flasher-btn {
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 0;
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-flasher-sep {
|
|
|
|
|
margin: 0 8px;
|
|
|
|
|
color: rgba(255, 255, 255, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-error {
|
|
|
|
|
color: #ef4444;
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
background: rgba(239, 68, 68, 0.1);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
border: 1px solid rgba(239, 68, 68, 0.2);
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ─── Two-column layout ─── */
|
|
|
|
|
.mesh-columns {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-left {
|
|
|
|
|
width: 380px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
min-height: 0;
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
overflow-y: auto;
|
2026-03-17 00:03:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-right {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
gap: 12px;
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
overflow: hidden;
|
2026-03-17 00:03:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ─── Status card ─── */
|
|
|
|
|
.mesh-status-card { padding: 16px; flex-shrink: 0; }
|
|
|
|
|
|
|
|
|
|
.mesh-status-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-status-indicator {
|
|
|
|
|
width: 8px;
|
|
|
|
|
height: 8px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-status-indicator.connected {
|
|
|
|
|
background: #4ade80;
|
|
|
|
|
box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-status-indicator.disconnected {
|
|
|
|
|
background: rgba(255, 255, 255, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-section-title {
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: rgba(255, 255, 255, 0.9);
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-status-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(3, 1fr);
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-stat {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 1px;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
background: rgba(255, 255, 255, 0.05);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-stat-label {
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.4);
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-stat-value {
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.85);
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.text-green { color: #4ade80; }
|
|
|
|
|
.text-orange { color: #fb923c; }
|
|
|
|
|
.text-muted { color: rgba(255, 255, 255, 0.4); }
|
|
|
|
|
|
|
|
|
|
.mesh-loading, .mesh-empty {
|
|
|
|
|
color: rgba(255, 255, 255, 0.4);
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 16px 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-detected-devices { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
|
|
|
|
|
|
|
|
|
|
.mesh-device-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 6px 8px;
|
|
|
|
|
background: rgba(255, 255, 255, 0.04);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-device-indicator {
|
|
|
|
|
width: 6px;
|
|
|
|
|
height: 6px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: #4ade80;
|
|
|
|
|
box-shadow: 0 0 4px rgba(74, 222, 128, 0.4);
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-device-path {
|
|
|
|
|
font-family: monospace;
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.7);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-17 00:45:37 +00:00
|
|
|
/* ─── Off-grid banner ─── */
|
|
|
|
|
.mesh-offgrid-banner {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
background: rgba(251, 146, 60, 0.1);
|
|
|
|
|
border: 1px solid rgba(251, 146, 60, 0.3);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.mesh-offgrid-active {
|
|
|
|
|
border-color: rgba(251, 146, 60, 0.4) !important;
|
|
|
|
|
color: #fb923c !important;
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-17 00:03:08 +00:00
|
|
|
/* ─── Actions ─── */
|
|
|
|
|
.mesh-actions {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-action-btn {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ─── Peers list ─── */
|
|
|
|
|
.mesh-peers-card {
|
|
|
|
|
padding: 14px;
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peers-card .mesh-section-title {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-list {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.15s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-row:hover {
|
|
|
|
|
background: rgba(255, 255, 255, 0.06);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-row.active {
|
|
|
|
|
background: rgba(251, 146, 60, 0.1);
|
|
|
|
|
border: 1px solid rgba(251, 146, 60, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-avatar {
|
|
|
|
|
width: 36px;
|
|
|
|
|
height: 36px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
background: rgba(255, 255, 255, 0.08);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.6);
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-avatar.archy {
|
|
|
|
|
background: rgba(251, 146, 60, 0.15);
|
|
|
|
|
padding: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-avatar.archy :deep(> div) {
|
|
|
|
|
width: 26px;
|
|
|
|
|
height: 26px;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-avatar.channel {
|
|
|
|
|
background: rgba(59, 130, 246, 0.15);
|
|
|
|
|
color: #3b82f6;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
font-size: 1.1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-channel-badge {
|
|
|
|
|
font-size: 0.6rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: #3b82f6;
|
|
|
|
|
background: rgba(59, 130, 246, 0.12);
|
|
|
|
|
padding: 1px 5px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-count {
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: rgba(255, 255, 255, 0.4);
|
|
|
|
|
background: rgba(255, 255, 255, 0.08);
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
margin-left: 6px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-row.is-channel {
|
|
|
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.04);
|
|
|
|
|
padding-bottom: 12px;
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-info {
|
|
|
|
|
flex: 1;
|
|
|
|
|
min-width: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-name {
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.9);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-archy-badge {
|
|
|
|
|
font-size: 0.6rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: #fb923c;
|
|
|
|
|
background: rgba(251, 146, 60, 0.12);
|
|
|
|
|
padding: 1px 5px;
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-sub {
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
|
|
font-family: monospace;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-peer-signal {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-signal-bars {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
height: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-signal-bar {
|
|
|
|
|
width: 3px;
|
|
|
|
|
border-radius: 1px;
|
|
|
|
|
background: rgba(255, 255, 255, 0.12);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-signal-bar:nth-child(1) { height: 3px; }
|
|
|
|
|
.mesh-signal-bar:nth-child(2) { height: 6px; }
|
|
|
|
|
.mesh-signal-bar:nth-child(3) { height: 10px; }
|
|
|
|
|
.mesh-signal-bar:nth-child(4) { height: 14px; }
|
|
|
|
|
|
|
|
|
|
.mesh-signal-bar.active { background: #4ade80; }
|
|
|
|
|
|
|
|
|
|
.mesh-unread-badge {
|
|
|
|
|
background: #fb923c;
|
|
|
|
|
color: #000;
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
min-width: 18px;
|
|
|
|
|
height: 18px;
|
|
|
|
|
border-radius: 9px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ─── Chat panel ─── */
|
|
|
|
|
.mesh-chat-card {
|
|
|
|
|
padding: 0;
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-empty {
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-empty-icon {
|
|
|
|
|
font-size: 3rem;
|
|
|
|
|
opacity: 0.4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-empty p {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-empty-sub {
|
|
|
|
|
font-size: 0.75rem !important;
|
|
|
|
|
color: rgba(255, 255, 255, 0.2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Chat header */
|
|
|
|
|
.mesh-chat-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
padding: 14px 16px;
|
|
|
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-back {
|
|
|
|
|
background: none;
|
|
|
|
|
border: none;
|
|
|
|
|
color: rgba(255, 255, 255, 0.6);
|
|
|
|
|
font-size: 1.2rem;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
display: none; /* hidden on desktop, shown on mobile */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-header-info { flex: 1; min-width: 0; }
|
|
|
|
|
|
|
|
|
|
.mesh-chat-header-name {
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 0.95rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.9);
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-header-sub {
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
|
|
font-family: monospace;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-header-status {
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-header-time {
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Chat messages */
|
|
|
|
|
.mesh-chat-messages {
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
min-height: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-no-messages {
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
color: rgba(255, 255, 255, 0.25);
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble-wrapper.sent {
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble-wrapper.received {
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble {
|
|
|
|
|
max-width: 75%;
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble.sent {
|
|
|
|
|
background: rgba(251, 146, 60, 0.15);
|
|
|
|
|
border: 1px solid rgba(251, 146, 60, 0.2);
|
|
|
|
|
border-bottom-right-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble.received {
|
|
|
|
|
background: rgba(255, 255, 255, 0.06);
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
|
|
|
border-bottom-left-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble-text {
|
|
|
|
|
color: rgba(255, 255, 255, 0.9);
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble-meta {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-bubble-time {
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-e2e {
|
|
|
|
|
font-size: 0.55rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: #4ade80;
|
|
|
|
|
padding: 0 3px;
|
|
|
|
|
border: 1px solid rgba(74, 222, 128, 0.3);
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-ack {
|
|
|
|
|
font-size: 0.7rem;
|
|
|
|
|
color: #3b82f6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Compose bar */
|
|
|
|
|
.mesh-chat-compose {
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
border-top: 1px solid rgba(255, 255, 255, 0.06);
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-send-error {
|
|
|
|
|
color: #ef4444;
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-compose-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-input {
|
|
|
|
|
flex: 1;
|
|
|
|
|
background: rgba(255, 255, 255, 0.06);
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
color: rgba(255, 255, 255, 0.9);
|
|
|
|
|
padding: 10px 16px;
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
font-family: inherit;
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-input:focus {
|
|
|
|
|
border-color: rgba(251, 146, 60, 0.4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-input::placeholder {
|
|
|
|
|
color: rgba(255, 255, 255, 0.25);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-send-btn {
|
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
background: rgba(251, 146, 60, 0.15);
|
|
|
|
|
border-color: rgba(251, 146, 60, 0.25);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-send-btn:hover:not(:disabled) {
|
|
|
|
|
background: rgba(251, 146, 60, 0.25);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-compose-meta {
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
color: rgba(255, 255, 255, 0.25);
|
|
|
|
|
text-align: right;
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ─── Mobile: keep single column ─── */
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.mesh-view {
|
|
|
|
|
height: auto;
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
padding: 0;
|
2026-03-17 00:03:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-columns {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-left {
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: visible;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-right {
|
|
|
|
|
min-height: 400px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-status-grid {
|
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.mesh-chat-back {
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
}
|
feat: Phase 3 Week 7 — typed message UI, session badges, rich chat cards
Frontend store (mesh.ts):
- Add typed message interfaces: InvoiceData, AlertData, CoordinateData,
SessionStatus, AlertStatus, MeshMessageTypeLabel
- New actions: sendInvoice, sendCoordinate, sendAlert, getSessionStatus,
rotatePrekeys
Mesh.vue UI:
- Typed message rendering in chat bubbles:
- Invoice: orange card with sats amount, memo, bolt11 preview, paid badge
- Alert: red card (emergency/dead_man) or blue (status), signed badge,
GPS link to OpenStreetMap
- Coordinate: blue card with lat/lng, label, OSM map link
- Block header: purple inline with chain icon
- Session badge in chat header: green shield (Double Ratchet),
yellow (static encryption), gray (none)
- Session status fetched on peer selection via mesh.session-status RPC
Mock backend:
- Messages now include message_type and typed_payload fields
- Mix of text, invoice (paid + unpaid), alert (emergency + status),
coordinate, and block_header messages for testing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 02:34:37 +00:00
|
|
|
|
|
|
|
|
/* ─── Session badge ─── */
|
|
|
|
|
.mesh-session-badge {
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
margin-right: 6px;
|
|
|
|
|
opacity: 0.7;
|
|
|
|
|
}
|
|
|
|
|
.session-ratchet { color: #4ade80; opacity: 1; }
|
|
|
|
|
.session-static { color: #fbbf24; }
|
|
|
|
|
.session-none { color: rgba(255,255,255,0.3); }
|
|
|
|
|
|
|
|
|
|
/* ─── Typed message cards ─── */
|
|
|
|
|
.mesh-typed-icon { margin-right: 4px; }
|
|
|
|
|
.mesh-typed-label { font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
|
|
|
|
|
|
|
|
/* Invoice */
|
|
|
|
|
.typed-invoice { border-left: 3px solid #fb923c; }
|
|
|
|
|
.mesh-typed-invoice { padding: 4px 0; }
|
|
|
|
|
.mesh-typed-invoice-header { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; color: #fb923c; font-size: 0.75rem; }
|
|
|
|
|
.mesh-typed-invoice-amount { font-size: 1.1rem; font-weight: 700; color: #fb923c; }
|
|
|
|
|
.mesh-typed-invoice-memo { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 2px; }
|
|
|
|
|
.mesh-typed-invoice-bolt11 { font-size: 0.65rem; color: rgba(255,255,255,0.3); font-family: monospace; margin-top: 4px; word-break: break-all; }
|
|
|
|
|
.mesh-typed-paid { background: rgba(74,222,128,0.2); color: #4ade80; font-size: 0.65rem; padding: 1px 6px; border-radius: 4px; margin-left: auto; }
|
|
|
|
|
|
|
|
|
|
/* Alert */
|
|
|
|
|
.typed-alert { border-left: 3px solid #ef4444; }
|
|
|
|
|
.typed-alert.alert-status { border-left-color: #3b82f6; }
|
|
|
|
|
.mesh-typed-alert { padding: 4px 0; }
|
|
|
|
|
.mesh-typed-alert-header { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 0.75rem; }
|
|
|
|
|
.alert-emergency .mesh-typed-alert-header { color: #ef4444; }
|
|
|
|
|
.alert-dead_man .mesh-typed-alert-header { color: #ef4444; }
|
|
|
|
|
.alert-status .mesh-typed-alert-header { color: #3b82f6; }
|
|
|
|
|
.mesh-typed-alert-message { font-size: 0.85rem; color: rgba(255,255,255,0.9); }
|
|
|
|
|
.mesh-typed-alert-location { display: block; font-size: 0.75rem; color: #3b82f6; margin-top: 4px; text-decoration: underline; }
|
|
|
|
|
.mesh-typed-signed { font-size: 0.6rem; color: #4ade80; border: 1px solid rgba(74,222,128,0.3); padding: 0 4px; border-radius: 3px; margin-left: auto; }
|
|
|
|
|
|
|
|
|
|
/* Coordinate */
|
|
|
|
|
.typed-coordinate { border-left: 3px solid #3b82f6; }
|
|
|
|
|
.mesh-typed-coordinate { padding: 4px 0; }
|
|
|
|
|
.mesh-typed-coordinate-header { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; color: #3b82f6; font-size: 0.75rem; }
|
|
|
|
|
.mesh-typed-coordinate-value { font-size: 0.9rem; font-family: monospace; color: rgba(255,255,255,0.8); }
|
|
|
|
|
.mesh-typed-coordinate-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 2px; }
|
|
|
|
|
.mesh-typed-coordinate-link { display: inline-block; font-size: 0.75rem; color: #3b82f6; margin-top: 4px; text-decoration: underline; }
|
|
|
|
|
|
|
|
|
|
/* Block header */
|
|
|
|
|
.typed-block_header { border-left: 3px solid #a855f7; }
|
|
|
|
|
.mesh-typed-block { display: flex; align-items: center; gap: 4px; color: #a855f7; font-size: 0.8rem; }
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
|
|
|
|
|
/* ─── Tab bar ─── */
|
|
|
|
|
.mesh-tab-bar {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 2px;
|
|
|
|
|
background: rgba(0,0,0,0.3);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
padding: 3px;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
.mesh-tab {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
border: none;
|
|
|
|
|
background: transparent;
|
|
|
|
|
color: rgba(255,255,255,0.5);
|
|
|
|
|
font-size: 0.82rem;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-tab:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.05); }
|
|
|
|
|
.mesh-tab.active { color: #fff; background: rgba(255,255,255,0.1); }
|
|
|
|
|
.mesh-tab-badge {
|
|
|
|
|
font-size: 0.65rem;
|
|
|
|
|
background: rgba(251,146,60,0.2);
|
|
|
|
|
color: #fb923c;
|
|
|
|
|
padding: 1px 5px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
.mesh-tab-badge-alert {
|
|
|
|
|
background: rgba(239,68,68,0.3);
|
|
|
|
|
color: #ef4444;
|
|
|
|
|
animation: pulse-alert 1.5s infinite;
|
|
|
|
|
}
|
|
|
|
|
@keyframes pulse-alert { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
|
|
|
|
|
|
|
|
|
|
/* ─── Panel shared ─── */
|
|
|
|
|
.mesh-panel-title { font-size: 1rem; font-weight: 600; color: rgba(255,255,255,0.9); margin: 0 0 4px; }
|
|
|
|
|
.mesh-panel-sub { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin: 0 0 16px; }
|
|
|
|
|
.mesh-muted { color: rgba(255,255,255,0.4); }
|
|
|
|
|
|
|
|
|
|
/* ─── Bitcoin panel ─── */
|
|
|
|
|
.mesh-bitcoin-panel {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-section {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
background: rgba(0,0,0,0.2);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.06);
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-section-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
|
|
|
|
|
.mesh-bitcoin-height { font-size: 1.1rem; font-weight: 700; color: #fb923c; font-family: monospace; }
|
|
|
|
|
.mesh-bitcoin-input {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
background: rgba(0,0,0,0.3);
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.1);
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
color: rgba(255,255,255,0.9);
|
|
|
|
|
font-size: 0.82rem;
|
|
|
|
|
font-family: monospace;
|
|
|
|
|
resize: vertical;
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-input::placeholder { color: rgba(255,255,255,0.3); }
|
|
|
|
|
.mesh-bitcoin-input:focus { outline: none; border-color: rgba(251,146,60,0.4); }
|
|
|
|
|
.mesh-bitcoin-input-sm { max-width: 200px; }
|
feat: v1.2.0-alpha — E2E encrypted mesh relay, steganography, relay status polling
Phase 5 mesh networking:
- E2E encrypted TX relay (X25519 + ChaCha20-Poly1305) — non-Archy nodes
relay encrypted blobs transparently via Meshcore native routing
- Steganographic encoding modes (WeatherStation, SensorNetwork) — traffic
looks like sensor data on the wire, 0xAA marker, configurable per-node
- Pre-flight Bitcoin Core health check on relay node — specific error codes
(bitcoin_unreachable, bitcoin_syncing, tx_rejected) instead of generic fails
- mesh.relay-status RPC endpoint — frontend polls for relay result every 3s
- On-Chain / Lightning tabs in Off-Grid Bitcoin panel
- Archy Peers vs Mesh Broadcast relay mode selector
- Mesh view fills viewport (no page scroll), internal panel scrolling
- Version bump to 1.2.0-alpha
Also includes: deploy hardening, container fixes, IndeedHub updates,
boot screen, dashboard improvements, MASTER_PLAN task tracking
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 23:56:37 +00:00
|
|
|
.mesh-relay-mode {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
margin: 8px 0;
|
|
|
|
|
}
|
|
|
|
|
.mesh-relay-mode-option {
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.1);
|
|
|
|
|
background: rgba(0,0,0,0.2);
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 0.78rem;
|
|
|
|
|
color: rgba(255,255,255,0.6);
|
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
.mesh-relay-mode-option:hover { border-color: rgba(255,255,255,0.2); }
|
|
|
|
|
.mesh-relay-mode-option.active {
|
|
|
|
|
border-color: rgba(251,146,60,0.4);
|
|
|
|
|
background: rgba(251,146,60,0.08);
|
|
|
|
|
color: rgba(255,255,255,0.9);
|
|
|
|
|
}
|
|
|
|
|
.mesh-relay-mode-option input[type="radio"] { display: none; }
|
|
|
|
|
.mesh-relay-mode-icon { font-size: 1rem; }
|
|
|
|
|
.mesh-relay-mode-option small { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.4); }
|
|
|
|
|
.mesh-send-tabs {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 0;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.1);
|
|
|
|
|
}
|
|
|
|
|
.mesh-send-tab {
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 8px 16px;
|
|
|
|
|
background: rgba(0,0,0,0.2);
|
|
|
|
|
color: rgba(255,255,255,0.5);
|
|
|
|
|
border: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
font-size: 0.82rem;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
transition: all 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
.mesh-send-tab:first-child { border-right: 1px solid rgba(255,255,255,0.1); }
|
|
|
|
|
.mesh-send-tab:hover { color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.03); }
|
|
|
|
|
.mesh-send-tab.active {
|
|
|
|
|
color: #fb923c;
|
|
|
|
|
background: rgba(251,146,60,0.08);
|
|
|
|
|
}
|
feat: Phase 4 — off-grid Bitcoin relay, block headers, dead man's switch
- Typed message dispatch in listener (BlockHeader, TxRelay, LightningRelay, Alert, TxConfirmation)
- Base64 encoding for binary payloads over LoRa (fixes NUL byte truncation)
- Compact block header announcements (88 bytes, fits 160-byte LoRa limit)
- Block header announcer: internet nodes auto-announce new blocks to Archy peers
- TX relay: mesh-only nodes can broadcast transactions via internet-connected peers
- Confirmation tracking: relay node monitors 1/3, 2/3, 3/3 confirmations, sends updates back
- Dead man's switch background task with configurable interval and signed alert broadcast
- 6 new RPC endpoints: relay-tx, block-headers, relay-lightning, deadman-status/configure/checkin
- lnd.create-raw-tx: create signed TX without broadcasting (for mesh relay)
- Web5 wallet: offline detection + "Send via mesh?" prompt with auto relay + confirmation polling
- Mesh.vue: Off-Grid Bitcoin tab, Dead Man tab, Send Bitcoin/Lightning buttons
- TX/Lightning relay sends only to Archy peers (not broadcast to all devices)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:51:56 +00:00
|
|
|
.mesh-block-list { display: flex; flex-direction: column; gap: 4px; }
|
|
|
|
|
.mesh-block-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
background: rgba(0,0,0,0.15);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
font-size: 0.78rem;
|
|
|
|
|
}
|
|
|
|
|
.mesh-block-height { color: #fb923c; font-weight: 600; font-family: monospace; }
|
|
|
|
|
.mesh-block-hash { color: rgba(255,255,255,0.5); font-family: monospace; font-size: 0.72rem; }
|
|
|
|
|
.mesh-relay-result {
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 0.82rem;
|
|
|
|
|
}
|
|
|
|
|
.mesh-relay-result.success { background: rgba(74,222,128,0.1); color: #4ade80; border: 1px solid rgba(74,222,128,0.2); }
|
|
|
|
|
.mesh-relay-result.error { background: rgba(239,68,68,0.1); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
|
|
|
|
|
|
|
|
|
|
/* ─── Dead Man panel ─── */
|
|
|
|
|
.mesh-deadman-panel {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
flex: 1;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-status {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
background: rgba(0,0,0,0.2);
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.06);
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-indicator {
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
letter-spacing: 1px;
|
|
|
|
|
padding: 6px 16px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-indicator.disabled { color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }
|
|
|
|
|
.mesh-deadman-indicator.armed { color: #4ade80; background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.3); }
|
|
|
|
|
.mesh-deadman-indicator.triggered { color: #ef4444; background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); animation: pulse-alert 1.5s infinite; }
|
|
|
|
|
.mesh-deadman-timer { font-size: 1.5rem; font-weight: 700; color: rgba(255,255,255,0.8); font-family: monospace; }
|
|
|
|
|
.mesh-deadman-checkin-btn { padding: 10px 24px; font-size: 0.9rem; font-weight: 600; }
|
|
|
|
|
.mesh-deadman-config {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
padding: 14px;
|
|
|
|
|
background: rgba(0,0,0,0.2);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.06);
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-toggle {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
color: rgba(255,255,255,0.8);
|
|
|
|
|
font-size: 0.85rem;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-toggle input[type="checkbox"] {
|
|
|
|
|
width: 16px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
accent-color: #fb923c;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-field {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-info {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-info-item {
|
|
|
|
|
font-size: 0.75rem;
|
|
|
|
|
color: rgba(255,255,255,0.4);
|
|
|
|
|
background: rgba(255,255,255,0.05);
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-deadman-message {
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
color: rgba(255,255,255,0.5);
|
|
|
|
|
font-style: italic;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 0 12px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-hint {
|
|
|
|
|
font-size: 0.72rem;
|
|
|
|
|
color: rgba(255,255,255,0.4);
|
|
|
|
|
margin: -4px 0 4px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-advanced {
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-advanced summary {
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
color: rgba(255,255,255,0.4);
|
|
|
|
|
}
|
|
|
|
|
.mesh-bitcoin-advanced summary:hover {
|
|
|
|
|
color: rgba(255,255,255,0.6);
|
|
|
|
|
}
|
2026-03-17 00:03:08 +00:00
|
|
|
</style>
|