Skip to content

API documentation of Agoric SDK / Exports / @agoric/swingset-liveslots / index

Module: index

Table of contents

References

Type Aliases

Variables

Functions

References

Baggage

Re-exports Baggage


DefineKindOptions

Re-exports DefineKindOptions


DurableKindHandle

Re-exports DurableKindHandle


FunctionsPlusContext

Re-exports FunctionsPlusContext


InterfaceGuardKit

Re-exports InterfaceGuardKit


KindContext

Re-exports KindContext


KindFacet

Re-exports KindFacet


KindFacets

Re-exports KindFacets


LiveSlotsOptions

Re-exports LiveSlotsOptions


Message

Re-exports Message


MeterConsumption

Re-exports MeterConsumption


MeterControl

Re-exports MeterControl


MultiKindContext

Re-exports MultiKindContext


PickFacet

Re-exports PickFacet


PlusContext

Re-exports PlusContext


PrepareKind

Re-exports PrepareKind


PrepareKindMulti

Re-exports PrepareKindMulti


PromiseWatcher

Re-exports PromiseWatcher


SwingSetCapData

Re-exports SwingSetCapData


VatData

Re-exports VatData


VatDeliveryBringOutYourDead

Re-exports VatDeliveryBringOutYourDead


VatDeliveryChangeVatOptions

Re-exports VatDeliveryChangeVatOptions


VatDeliveryDropExports

Re-exports VatDeliveryDropExports


VatDeliveryMessage

Re-exports VatDeliveryMessage


VatDeliveryNotify

Re-exports VatDeliveryNotify


VatDeliveryObject

Re-exports VatDeliveryObject


VatDeliveryResult

Re-exports VatDeliveryResult


VatDeliveryRetireExports

Re-exports VatDeliveryRetireExports


VatDeliveryRetireImports

Re-exports VatDeliveryRetireImports


VatDeliveryStartVat

Re-exports VatDeliveryStartVat


VatDeliveryStopVat

Re-exports VatDeliveryStopVat


VatOneResolution

Re-exports VatOneResolution


VatSyscallAbandonExports

Re-exports VatSyscallAbandonExports


VatSyscallCallNow

Re-exports VatSyscallCallNow


VatSyscallDropImports

Re-exports VatSyscallDropImports


VatSyscallExit

Re-exports VatSyscallExit


VatSyscallHandler

Re-exports VatSyscallHandler


VatSyscallObject

Re-exports VatSyscallObject


VatSyscallResolve

Re-exports VatSyscallResolve


VatSyscallResult

Re-exports VatSyscallResult


VatSyscallResultError

Re-exports VatSyscallResultError


VatSyscallResultOk

Re-exports VatSyscallResultOk


VatSyscallRetireExports

Re-exports VatSyscallRetireExports


VatSyscallRetireImports

Re-exports VatSyscallRetireImports


VatSyscallSend

Re-exports VatSyscallSend


VatSyscallSubscribe

Re-exports VatSyscallSubscribe


VatSyscallVatstoreDelete

Re-exports VatSyscallVatstoreDelete


VatSyscallVatstoreGet

Re-exports VatSyscallVatstoreGet


VatSyscallVatstoreGetNextKey

Re-exports VatSyscallVatstoreGetNextKey


VatSyscallVatstoreSet

Re-exports VatSyscallVatstoreSet

Type Aliases

Pattern

Ƭ Pattern: Passable

Patterns are Passable arbitrarily-nested pass-by-copy containers (CopyArray, CopyRecord, CopySet, CopyBag, CopyMap) in which every non-container leaf is either a Key or a Matcher, or such leaves in isolation with no container.

A Pattern acts as a declarative total predicate over Passables, where each Passable is either matched or not matched by it. Every Key is also a Pattern that matches only "itself", i.e., Keys that are keyEQ to it according to the key distributed equality semantics.

Patterns cannot contain promises or errors, as these do not have useful distributed equality or matching semantics. Likewise, no Pattern can distinguish among promises, or distinguish among errors. Patterns also cannot contain any CopyTaggeds except for those recognized as CopySets, CopyBags, CopyMaps, or Matchers.

Be aware that we may recognize more CopyTaggeds over time, including CopyTaggeds recognized as Patterns.

Whether a Passable is matched by a given Pattern is location independent. If a given Passable and Pattern are passed to another location, the Passable will be matched by the Pattern there iff the Passable is matched by the Pattern here.

Patterns are often used in a type-like manner, to represent the category of Passables that the Pattern is intended* to match. To keep this distinction clear, we often use the suffix "Shape" rather than "Pattern" to avoid confusion when the Pattern itself represents some category of Pattern. For example, an "AmountShape" represents the category of Amounts. And "AmountPatternShape" represents the category of Patterns over Amounts.

  • We say "intended" above because Patterns, in order to be declarative and Passable, cannot have the generality of predicates written in a Turing-universal programming language. Rather, to represent the category of things intended to be a Foo, a FooShape should reliably accept all Foos and reject only non-Foos. However, a FooShape may also accept non-Foos that "look like" or "have the same shape as" genuine Foos. An accurate predicate for e.g. input validation would need to supplement the Pattern check with code to detect the residual cases. We hope the "Shape" metaphor helps remind us of this type-like imprecision of Patterns.

Defined in

node_modules/@endo/patterns/src/types.d.ts:79

Variables

MapStore

MapStore: any

Functions

insistMessage

insistMessage(message): asserts message is Message

Assert function to ensure that something expected to be a message object actually is. A message object should have a .method property that's a string, a .args property that's a capdata object, and optionally a .result property that, if present, must be a string.

Parameters

NameTypeDescription
messageanyThe object to be tested

Returns

asserts message is Message

Throws

if, upon inspection, the parameter does not satisfy the above criteria.

Defined in

packages/swingset-liveslots/src/message.js:25


insistVatDeliveryObject

insistVatDeliveryObject(vdo): asserts vdo is VatDeliveryObject

Parameters

NameType
vdounknown

Returns

asserts vdo is VatDeliveryObject

Defined in

packages/swingset-liveslots/src/message.js:38


insistVatDeliveryResult

insistVatDeliveryResult(vdr): asserts vdr is VatDeliveryResult

Parameters

NameType
vdrunknown

Returns

asserts vdr is VatDeliveryResult

Defined in

packages/swingset-liveslots/src/message.js:98


insistVatSyscallObject

insistVatSyscallObject(vso): asserts vso is VatSyscallObject

Parameters

NameType
vsounknown

Returns

asserts vso is VatSyscallObject

Defined in

packages/swingset-liveslots/src/message.js:120


insistVatSyscallResult

insistVatSyscallResult(vsr): asserts vsr is VatSyscallResult

Parameters

NameType
vsrunknown

Returns

asserts vsr is VatSyscallResult

Defined in

packages/swingset-liveslots/src/message.js:200


makeLiveSlots

makeLiveSlots(syscall, forVatID?, vatPowers?, liveSlotsOptions, gcTools, liveSlotsConsole?, buildVatNamespace?): any

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

NameTypeDefault valueDescription
syscallanyundefinedKernel syscall interface that the vat will have access to
forVatIDany'unknown'Vat ID label, for use in debug diagostics
vatPowersanyundefined-
liveSlotsOptionsLiveSlotsOptionsundefined-
gcToolsanyundefined
liveSlotsConsole?Pick<Console, "error" | "info" | "debug" | "log" | "warn">console-
buildVatNamespace?anyundefined-

Returns

any

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.

Defined in

packages/swingset-liveslots/src/liveslots.js:1668


makeMarshaller

makeMarshaller(syscall, gcTools, vatID?): Object

Parameters

NameTypeDefault value
syscallanyundefined
gcToolsanyundefined
vatIDstring'forVatID'

Returns

Object

NameType
many

Defined in

packages/swingset-liveslots/src/liveslots.js:1695