@metamask/ocap-kernel
Version:
OCap kernel core components
20 lines • 1.01 kB
text/typescript
import type { EndpointId, KRef, ERef } from "../../types.mjs";
import type { StoreContext } from "../types.mjs";
/**
* Get the c-list methods that provide functionality for managing c-lists.
*
* @param ctx - The store context.
* @returns The c-list store.
*/
export declare function getCListMethods(ctx: StoreContext): {
addCListEntry: (endpointId: EndpointId, kref: KRef, eref: ERef) => void;
hasCListEntry: (endpointId: EndpointId, slot: string) => boolean;
deleteCListEntry: (endpointId: EndpointId, kref: KRef, eref: ERef) => void;
allocateErefForKref: (endpointId: EndpointId, kref: KRef) => ERef;
erefToKref: (endpointId: EndpointId, eref: ERef) => KRef | undefined;
krefToEref: (endpointId: EndpointId, kref: KRef) => ERef | undefined;
forgetEref: (endpointId: EndpointId, eref: ERef) => void;
forgetKref: (endpointId: EndpointId, kref: KRef) => void;
krefsToExistingErefs: (endpointId: EndpointId, krefs: KRef[]) => ERef[];
};
//# sourceMappingURL=clist.d.mts.map