• Instantiate the liveslots layer for a new vat and then populate the vat with a new root object and its initial associated object graph, if any.

    Parameters

    • syscall: any

      Kernel syscall interface that the vat will have access to

    • forVatID: any = 'unknown'

      Vat ID label, for use in debug diagostics

    • vatPowers: any = ...
    • liveSlotsOptions: LiveSlotsOptions
    • gcTools: any

      { WeakRef, FinalizationRegistry, waitUntilQuiescent }

    • OptionalliveSlotsConsole: Pick<Console,
          | "error"
          | "info"
          | "debug"
          | "log"
          | "warn"> = console
    • OptionalbuildVatNamespace: any

    Returns any

    { dispatch }

    setBuildRootObject should be called, once, with a function that will create a root object for the new vat The caller provided buildRootObject function produces and returns the new vat's root object:

    buildRootObject(vatPowers, vatParameters)

    Within the vat, import { E } from '@endo/eventual-send' will provide the E wrapper. For any object x, E(x) returns a proxy object that converts any method invocation into a corresponding eventual send to x. That is, E(x).foo(arg1, arg2) is equivalent to x~.foo(arg1, arg2)

    If x is the presence in this vat of a remote object (that is, an object outside the vat), this will result in a message send out of the vat via the kernel syscall interface.

    In the same vein, if x is the presence in this vat of a kernel device, vatPowers.D(x) returns a proxy such that a method invocation on it is translated into the corresponding immediate invocation of the device (using, once again, the kernel syscall interface). D(x).foo(args) will perform an immediate syscall.callNow on the device node.