import { API_CONFIG as e } from "../constants/server.constants.mjs";
import { SNAPSHOT_SERVER_URL as t } from "./getServerURL.mjs";
import { httpClient as n } from "../data-structures/http/HttpClient.mjs";
import "../data-structures/http/index.mjs";
//#region libs/shared/common/src/API/fetchCommitmentsCache.ts
var r = async (r) => {
	let { commitments: i, accessTokens: a, nullifiers: o } = await n.get(`${t}${e.ROUTES.getSnapshots(r)}`), [s, c, l] = await Promise.all([
		n.get(i.url).then((e) => ({
			...e,
			...i
		})),
		n.get(a.url).then((e) => ({
			...e,
			...a
		})),
		n.get(o.url).then((e) => ({
			...e,
			...o
		}))
	]);
	return {
		commitments: s,
		accessTokens: c,
		nullifiers: l
	};
};
//#endregion
export { r as fetchSnapshots };
