API documentation of Agoric SDK / Exports / @agoric/swingset-vat / VatAdminFacet
Interface: VatAdminFacet
@agoric/swingset-vat.VatAdminFacet
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.
Table of contents
Properties
Properties
done
• 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.
Type declaration
▸ (): Promise
<any
>
Returns
Promise
<any
>
Defined in
packages/SwingSet/src/types-external.js:339
terminateWithFailure
• terminateWithFailure: ShutdownWithFailure
Terminate the vat with a failure reason.
Defined in
packages/SwingSet/src/types-external.js:344
upgrade
• 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.
Type declaration
▸ (bundlecap
, options?
): Promise
<VatUpgradeResults
>
Parameters
Name | Type |
---|---|
bundlecap | any |
options? | VatUpgradeOptions |
Returns
Promise
<VatUpgradeResults
>