@metamask/ocap-kernel
Version:
OCap kernel core components
20 lines • 988 B
text/typescript
import type { KVStore } from "@metamask/kernel-store";
import type { Syscall } from "./types.mjs";
import type { VatSupervisor } from "../VatSupervisor.mjs";
/**
* This returns a function that is provided to liveslots as the 'syscall'
* argument: an object with one method per syscall type. These methods return
* data, or nothing. If the kernel experiences a problem executing the syscall,
* the method will throw, or the kernel will kill the vat, or both.
*
* I should be given a `syscallToManager` function that accepts a
* VatSyscallObject and (synchronously) returns a VatSyscallResult.
*
* @param supervisor - The VatSupervisor for which we're providing syscall services.
* @param kv - A key/value store for holding the vat's persistent state.
*
* @returns a syscall object suitable for use by liveslots.
*/
declare function makeSupervisorSyscall(supervisor: VatSupervisor, kv: KVStore): Syscall;
export { makeSupervisorSyscall };
//# sourceMappingURL=syscall.d.mts.map