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

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