A powerful object corresponding with a vat that can be used to upgrade it with new code or parameters, terminate it, or be notified when it terminates.

interface VatAdminFacet {
    done: (() => Promise<any>);
    terminateWithFailure: ShutdownWithFailure;
    upgrade: ((bundlecap: any, options?: VatUpgradeOptions) => Promise<VatUpgradeResults>);
}

Properties

done: (() => Promise<any>)

returns a promise that will be fulfilled or rejected when the vat is terminated. If the vat terminates with a failure, the promise will be rejected with the reason. If the vat terminates successfully, the promise will fulfill to the completion value.

terminateWithFailure: ShutdownWithFailure

Terminate the vat with a failure reason.

upgrade: ((bundlecap: any, options?: VatUpgradeOptions) => Promise<VatUpgradeResults>)

Restart the vat with the specified bundle and options. This is a "baggage-style" upgrade, in which the JS memory space is abandoned. The new image is launched with access to 'baggage' and any durable storage reachable from it, and must fulfill all the obligations of the previous incarnation.