export type KeyCategories = "exoClass" | "exoClassKit" | "exo" | "store" | "zone"; export type KeyMakers = Record string[]>; /** * A bag of methods for creating defensible objects and * collections with the same allocation semantics (ephemeral, persistent, etc) */ export type Zone = ExoZone & Stores; export type ExoZone = { /** * create a singleton exo-object instance bound to this zone */ exo: typeof makeExo; /** * create a maker function that can be used to create exo-objects bound to this zone */ exoClass: typeof defineExoClass; /** * create a "kit" maker function that can be used to create a record of exo-objects sharing the same state */ exoClassKit: typeof defineExoClassKit; /** * create or retrieve a singleton object bound to this zone */ makeOnce: (key: string, maker: (key: string) => T) => T; /** * create a new Zone that can be passed to untrusted consumers without exposing the storage of the parent zone */ subZone: (label: string, options?: StoreOptions) => Zone; /** * register a promise watcher created by this zone */ watchPromise: typeof watchPromise; }; export type Stores = { /** * obtain store providers which are detached (the stores are anonymous rather than bound to `label` in the zone) */ detached: () => Stores; /** * return true if the specimen can be stored in the zone, whether as exo-object state or in a store */ isStorable: (specimen: unknown) => boolean; /** * provide a Map-like store named `label` in the zone */ mapStore: (label: string, options?: StoreOptions) => MapStore; /** * provide a Set-like store named `label` in the zone */ setStore: (label: string, options?: StoreOptions) => SetStore; /** * provide a WeakMap-like store named `label` in the zone */ weakMapStore: (label: string, options?: StoreOptions) => WeakMapStore; /** * provide a WeakSet-like store named `label` in the zone */ weakSetStore: (label: string, options?: StoreOptions) => WeakSetStore; }; import { makeExo } from '@endo/exo'; import { defineExoClass } from '@endo/exo'; import { defineExoClassKit } from '@endo/exo'; import type { StoreOptions } from '@agoric/store'; import { watchPromise } from './watch-promise.js'; import type { MapStore } from '@agoric/store'; import type { SetStore } from '@agoric/store'; import type { WeakMapStore } from '@agoric/store'; import type { WeakSetStore } from '@agoric/store'; //# sourceMappingURL=types.d.ts.map