import api from '$lib/api'; import { readable, type Readable } from 'svelte/store'; import type { VaultInfo } from '@upnd/upend/types'; import type { VaultOptions } from '@upnd/upend/api'; export const vaultInfo: Readable = readable( undefined as VaultInfo | undefined, (set) => { api.fetchInfo().then(async (info: VaultInfo) => { set(info); }); } ); export const vaultOptions: Readable = readable( undefined as VaultOptions | undefined, (set) => { api.fetchOptions().then(async (options: VaultOptions) => { set(options); }); } );