"""Silver: raw crypto_pit arrays (close-only daily) -> canonical BarRecords. The bronze .npz stores
only close + quote-volume, so high == low == close (a flat bar) — honest given the source."""
from __future__ import annotations

import numpy as np

from fxhnt.domain.warehouse.bar import BarRecord


def normalize_crypto(symbol: str, day: np.ndarray, close: np.ndarray) -> list[BarRecord]:
    return [BarRecord(symbol=symbol, ts=int(d) * 86_400, close=float(c), high=float(c), low=float(c))
            for d, c in zip(day, close, strict=True)]
