fix: use raw SSE with local matching, bulk polling, block-based confirmations, and multi-tx support

This commit is contained in:
2026-03-19 00:04:46 +04:00
parent d02b27bc16
commit 81f1e1585e
4 changed files with 251 additions and 132 deletions
+11
View File
@@ -15,6 +15,17 @@ export async function getAddressInfo(address: string): Promise<any> {
return res.json();
}
/** Bulk address lookup — POST /address with { terms: [...] } */
export async function getAddressInfoBulk(addresses: string[]): Promise<Record<string, any>> {
if (addresses.length === 0) return {};
const res = await fetch(`${API}/address`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ terms: addresses }),
});
return res.json();
}
export function getQrUrl(text: string): string {
return `${API}/invoice/qr/${encodeURIComponent(text)}`;
}