Skip to content

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

Module: vatDataTypes

Table of contents

References

Interfaces

Type Aliases

References

MapStore

Re-exports MapStore


Pattern

Re-exports Pattern

Type Aliases

Baggage

Ƭ Baggage: MapStore<string, any>

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:27


DefineKindOptions

Ƭ DefineKindOptions<C>: Object

Grab bag of options that can be provided to defineDurableKind and its siblings. Not all options are meaningful in all contexts. See the doc-comments on each option.

Type parameters

Name
C

Type declaration

NameTypeDescription
durable?booleanMeaningful to makeScalarBigMapStore and its siblings. These maker fuctions will make either virtual or durable stores, depending on this flag. Defaults to off, making virtual but not durable collections. Generally, durable collections are provided with provideDurableMapStore and its sibling, which use this flag internally. If you do not make durable collections by other means, you can consider this as intended for internal use only.
finish?(context: C) => void-
interfaceGuard?InterfaceGuardIntended for internal use only. Only applicable if this is a class kind. A class kit kind should use interfaceGuardKit instead. If an interfaceGuard is provided, then the raw methods passed alongside it are wrapped by a function that first checks that this method's guard pattern is satisfied before calling the raw method. In defineDurableKind and its siblings, this defaults to undefined. Exo classes use this internally to protect their raw class methods using the provided interface. In absence, an exo is protected anyway, while a bare kind is not (detected by !thisfulMethods),
interfaceGuardKit?InterfaceGuardKitIntended for internal use only. Only applicable if this is a class kit kind. A class kind should use interfaceGuard instead. If an interfaceGuardKit is provided, then each member of the interfaceGuardKit is used to guard the corresponding facet of the class kit. In defineDurableKindMulti and its siblings, this defaults to undefined. Exo class kits use this internally to protect their facets. In absence, an exo is protected anyway, while a bare kind is not (detected by !thisfulMethods),
stateShape?MapStoreIf provided, it describes the shape of all state records of instances of this kind.
thisfulMethods?booleanIntended for internal use only. Should the raw methods receive their context argument as their first argument or as their this binding? For defineDurableKind and its siblings (including prepareSingleton), this defaults to off, meaning that their behavior methods receive context as their first argument. prepareExoClass and its siblings (including prepareExo) use this flag internally to indicate that their methods receive context as their this binding.

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:66


DurableKindHandle

Ƭ DurableKindHandle: DurableKindHandleClass

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:59


FunctionsPlusContext

Ƭ FunctionsPlusContext<C, O>: { [K in keyof O]: PlusContext<C, O[K]> }

Type parameters

Name
C
O

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:52


InterfaceGuardKit

Ƭ InterfaceGuardKit: Record<string, InterfaceGuard>

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:21


KindContext

Ƭ KindContext<S, F>: Object

Type parameters

Name
S
F

Type declaration

NameType
selfKindFacet<F>
stateS

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:48


KindFacet

Ƭ KindFacet<O>: { [K in keyof O]: OmitFirstArg<O[K]> }

Type parameters

Name
O

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:40


KindFacets

Ƭ KindFacets<B>: { [FacetKey in keyof B]: KindFacet<B[FacetKey]> }

Type parameters

Name
B

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:44


MultiKindContext

Ƭ MultiKindContext<S, B>: Object

Type parameters

Name
S
B

Type declaration

NameType
facetsKindFacets<B>
stateS

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:49


PlusContext

Ƭ PlusContext<C, M>: (c: C, ...args: Parameters<M>) => ReturnType<M>

Type parameters

Name
C
M

Type declaration

▸ (c, ...args): ReturnType<M>

Parameters
NameType
cC
...argsParameters<M>
Returns

ReturnType<M>

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:51


PrepareKind

Ƭ PrepareKind: <P, S, F>(baggage: Baggage, tag: string, init: (...args: P) => S, facet: F, options?: DefineKindOptions<KindContext<S, F>>) => (...args: P) => KindFacet<F>

Deprecated

Use prepareExoClass instead

Type declaration

▸ <P, S, F>(baggage, tag, init, facet, options?): (...args: P) => KindFacet<F>

Type parameters
Name
P
S
F
Parameters
NameType
baggageBaggage
tagstring
init(...args: P) => S
facetF
options?DefineKindOptions<KindContext<S, F>>
Returns

fn

▸ (...args): KindFacet<F>

Parameters
NameType
...argsP
Returns

KindFacet<F>

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:219


PrepareKindMulti

Ƭ PrepareKindMulti: <P, S, B>(baggage: Baggage, tag: string, init: (...args: P) => S, behavior: B, options?: DefineKindOptions<MultiKindContext<S, B>>) => (...args: P) => KindFacets<B>

Deprecated

Use prepareExoClassKit instead

Type declaration

▸ <P, S, B>(baggage, tag, init, behavior, options?): (...args: P) => KindFacets<B>

Type parameters
Name
P
S
B
Parameters
NameType
baggageBaggage
tagstring
init(...args: P) => S
behaviorB
options?DefineKindOptions<MultiKindContext<S, B>>
Returns

fn

▸ (...args): KindFacets<B>

Parameters
NameType
...argsP
Returns

KindFacets<B>

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:228


VatData

Ƭ VatData: Object

Type declaration

NameTypeDescription
canBeDurable(specimen: unknown) => boolean-
defineDurableKind<P, S, F>(kindHandle: DurableKindHandle, init: (...args: P) => S, facet: F, options?: DefineKindOptions<KindContext<S, F>>) => (...args: P) => KindFacet<F>-
defineDurableKindMulti<P, S, B>(kindHandle: DurableKindHandle, init: (...args: P) => S, behavior: B, options?: DefineKindOptions<MultiKindContext<S, B>>) => (...args: P) => KindFacets<B>-
defineKind<P, S, F>(tag: string, init: (...args: P) => S, facet: F, options?: DefineKindOptions<KindContext<S, F>>) => (...args: P) => KindFacet<F>-
defineKindMulti<P, S, B>(tag: string, init: (...args: P) => S, behavior: B, options?: DefineKindOptions<MultiKindContext<S, B>>) => (...args: P) => KindFacets<B>-
makeKindHandle(descriptionTag: string) => DurableKindHandle-
makeScalarBigMapStore<K, V>(label: string, options?: MapStore) => MapStore<K, V>-
makeScalarBigSetStore<K>(label: string, options?: MapStore) => MapStore<K>-
makeScalarBigWeakMapStore<K, V>(label: string, options?: MapStore) => MapStore<K, V>-
makeScalarBigWeakSetStore<K>(label: string, options?: MapStore) => MapStore<K>-
providePromiseWatcherWatchedPromisesManager["providePromiseWatcher"]-
watchPromiseWatchedPromisesManager["watchPromise"]-

Defined in

packages/swingset-liveslots/src/vatDataTypes.d.ts:139