diff --git a/dashboard.html b/dashboard.html
index 6bb9edd..cbbf7cb 100644
--- a/dashboard.html
+++ b/dashboard.html
@@ -1782,7 +1782,7 @@
return sections;
}
- function PrivacyLab({analysis, tx}) {
+ function PrivacyLab({analysis, tx, labels}) {
const [expanded,setExpanded] = useState(null);
const [showDidactic,setShowDidactic] = useState(null);
const [showReport,setShowReport] = useState(false);
@@ -1898,6 +1898,7 @@
Wallet posible: {wallets.map(w=>w.name||w).join(", ")}
)}
+
@@ -3436,6 +3437,27 @@
const [analysis,setAnalysis]=useState(null);
const [loading,setLoading]=useState(false);
const [err,setErr]=useState(null);
+ const [labels,setLabels]=useState(new Map()); // BIP-329: ref -> label
+ const [showLabelModal,setShowLabelModal]=useState(false);
+ const [labelInfo,setLabelInfo]=useState(null); // {count, file}
+
+ const loadLabels = (file) => {
+ const reader = new FileReader();
+ reader.onload = (e) => {
+ const map = new Map();
+ const lines = e.target.result.split("\n").filter(l => l.trim());
+ for (const line of lines) {
+ try {
+ const obj = JSON.parse(line);
+ if (obj.ref && obj.label) map.set(obj.ref, obj.label);
+ } catch {}
+ }
+ setLabels(map);
+ setLabelInfo({count: map.size, file: file.name});
+ setTimeout(() => setShowLabelModal(false), 50);
+ };
+ reader.readAsText(file);
+ };
const analyze=useCallback(async(q)=>{
q=(q||query).trim(); if(!q)return;
@@ -3460,7 +3482,49 @@
return (
{!base&&
}
-
AUDITORÍA
+
+ AUDITORÍA
+
+
+
+ {showLabelModal&&(
+
+
+
IMPORTAR ETIQUETAS BIP-329
+
+
+
+ Exporta tus etiquetas desde Sparrow: File → Export → Export Labels. El archivo .jsonl se carga en memoria — no sale del navegador.
+
+ {labelInfo&&(
+
+
✓ {labelInfo.file} — {labelInfo.count} etiquetas cargadas
+
+ {[...labels.entries()].map(([ref,lbl])=>(
+
+ {ref.length>20?ref.slice(0,10)+"…"+ref.slice(-8):ref}
+ {lbl}
+
+ ))}
+
+
+ )}
+
+ {labels.size>0&&(
+
+ )}
+
+ )}
ANALIZAR TRANSACCIÓN — introduce un txid
@@ -3486,6 +3550,12 @@
TRANSACCIÓN ANALIZADA
{tx.txid}
+ {labels&&labels.get(tx.txid)&&(
+
+ 🏷
+ {labels.get(tx.txid)}
+
+ )}
{tx.status?.confirmed?#{fmt.num(tx.status.block_height)}:MEMPOOL}
@@ -3498,8 +3568,8 @@
-
-
+
+
)}