from typing import List
from typing import Dict


def generate_currency_endowments(
    agent_addresses: List[str], currency_ids: List[str], money_endowment: int
) -> Dict[str, Dict[str, int]]:
    """
    Compute the initial money amounts for each agent.

    :param agent_addresses: addresses of the agents.
    :param currency_ids: the currency ids.
    :param money_endowment: money endowment per agent.
    :return: the nested dict of currency endowments
    """
    currency_endowment = {currency_id: money_endowment for currency_id in currency_ids}
    return {agent_addr: currency_endowment for agent_addr in agent_addresses}