UNPKG

@metamask/ocap-kernel

Version:
32 lines 1.31 kB
import type { EndpointId, KRef, VatConfig, VatId, VRef } from "../../types.cjs"; import type { StoreContext, VatCleanupWork } from "../types.cjs"; type VatRecord = { vatID: VatId; vatConfig: VatConfig; }; /** * Get a vat store object that provides functionality for managing vat records. * * @param ctx - The store context. * @returns A vat store object that maps various persistent kernel data */ export declare function getVatMethods(ctx: StoreContext): { deleteEndpoint: (endpointId: EndpointId) => void; getAllVatRecords: () => Generator<VatRecord>; getVatConfig: (vatID: VatId) => VatConfig; setVatConfig: (vatID: VatId, vatConfig: VatConfig) => void; deleteVatConfig: (vatID: VatId) => void; getVatIDs: () => VatId[]; importsKernelSlot: (vatID: VatId, kernelSlot: KRef) => boolean; getImporters: (koid: KRef) => VatId[]; getTerminatedVats: () => VatId[]; markVatAsTerminated: (vatID: VatId) => void; forgetTerminatedVat: (vatID: VatId) => void; isVatTerminated: (vatID: VatId) => boolean; cleanupTerminatedVat: (vatID: VatId) => VatCleanupWork; nextTerminatedVatCleanup: () => boolean; exportFromVat: (vatId: VatId, vref: VRef) => KRef; isVatActive: (vatID: VatId) => boolean; }; export {}; //# sourceMappingURL=vat.d.cts.map