import { readable, type Readable } from "svelte/store";
import type { VaultInfo } from "upend/types";
import { fetchInfo } from "../lib/api";

export const vaultInfo: Readable<VaultInfo> = readable(undefined, (set) => {
  fetchInfo().then(async (info) => {
    set(info);
  });
});
