import { fetchAddresses } from "../lib/mockData"; import type { AddressSummary } from "../lib/models"; export const addressesTitle = "Addresses"; export function renderAddressesPage(): string { return ` Address Lookup Live address data from the AITBC coordinator API. Address Search Searching will be enabled after integrating the coordinator/blockchain node endpoints. Recent Activity Address Balance Tx Count Last Active Loading addresses… `; } export async function initAddressesPage(): Promise { const tbody = document.querySelector( "#addresses-table-body", ); if (!tbody) { return; } const addresses = await fetchAddresses(); if (!addresses || addresses.length === 0) { tbody.innerHTML = ` No addresses available. `; return; } tbody.innerHTML = addresses.map(renderAddressRow).join(""); } function renderAddressRow(address: AddressSummary): string { return ` ${address.address} ${address.balance} ${address.txCount} ${new Date(address.lastActive).toLocaleString()} `; }
Live address data from the AITBC coordinator API.
Searching will be enabled after integrating the coordinator/blockchain node endpoints.
${address.address}