API documentation of Agoric SDK / Exports / @agoric/swingset-liveslots / vatDataTypes
Module: vatDataTypes
Table of contents
References
Interfaces
Type Aliases
- Baggage
- DefineKindOptions
- DurableKindHandle
- FunctionsPlusContext
- InterfaceGuardKit
- KindContext
- KindFacet
- KindFacets
- MultiKindContext
- PlusContext
- PrepareKind
- PrepareKindMulti
- VatData
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
Name | Type | Description |
---|---|---|
durable? | boolean | Meaningful 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? | InterfaceGuard | Intended 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? | InterfaceGuardKit | Intended 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? | MapStore | If provided, it describes the shape of all state records of instances of this kind. |
thisfulMethods? | boolean | Intended 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
Name | Type |
---|---|
self | KindFacet <F > |
state | S |
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
Name | Type |
---|---|
facets | KindFacets <B > |
state | S |
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
Name | Type |
---|---|
c | C |
...args | Parameters <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
Name | Type |
---|---|
baggage | Baggage |
tag | string |
init | (...args : P ) => S |
facet | F |
options? | DefineKindOptions <KindContext <S , F >> |
Returns
fn
▸ (...args
): KindFacet
<F
>
Parameters
Name | Type |
---|---|
...args | P |
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
Name | Type |
---|---|
baggage | Baggage |
tag | string |
init | (...args : P ) => S |
behavior | B |
options? | DefineKindOptions <MultiKindContext <S , B >> |
Returns
fn
▸ (...args
): KindFacets
<B
>
Parameters
Name | Type |
---|---|
...args | P |
Returns
KindFacets
<B
>
Defined in
packages/swingset-liveslots/src/vatDataTypes.d.ts:228
VatData
Ƭ VatData: Object
Type declaration
Name | Type | Description |
---|---|---|
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 > | - |
providePromiseWatcher | WatchedPromisesManager ["providePromiseWatcher" ] | - |
watchPromise | WatchedPromisesManager ["watchPromise" ] | - |