Skip to content

Endo API documentation - v0.2.0 / Exports / @endo/exo

Module: @endo/exo

Table of contents

Variables

Functions

Variables

GET_INTERFACE_GUARD

Const GET_INTERFACE_GUARD: "__getInterfaceGuard__"

The name of the automatically added default meta-method for obtaining an exo's interface, if it has one.

Intended to be similar to GET_METHOD_NAMES from @endo/pass-style.

TODO Name to be bikeshed. Perhaps even whether it is a string or symbol to be bikeshed. See https://github.com/endojs/endo/pull/1809#discussion_r1388052454

TODO Beware that an exo's interface can change across an upgrade, so remotes that cache it can become stale.

Defined in

src/get-interface.js:16

Functions

defineExoClass

defineExoClass<I, M>(tag, interfaceGuard, init, methods, options?): (...args: Parameters<I>) => Guarded<M>

Type parameters

NameTypeDescription
Iextends (...args: any[]) => anyinit function
Mextends Methodsmethods

Parameters

NameType
tagstring
interfaceGuardundefined | InterfaceGuard<{ [K in string | number | symbol]: MethodGuard }>
initI
methodsM & ThisType<{ self: Guarded<M> ; state: ReturnType<I> }>
options?FarClassOptions<ClassContext<ReturnType<I>, M>, any>

Returns

fn

▸ (...args): Guarded<M>

Parameters
NameType
...argsParameters<I>
Returns

Guarded<M>

Defined in

src/exo-makers.js:174


defineExoClassKit

defineExoClassKit<I, F>(tag, interfaceGuardKit, init, methodsKit, options?): (...args: Parameters<I>) => GuardedKit<F>

Type parameters

NameTypeDescription
Iextends (...args: any[]) => anyinit function
Fextends Record<string, Methods>facet methods

Parameters

NameType
tagstring
interfaceGuardKitundefined | { [K in string | number | symbol]: InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }> }
initI
methodsKitF & { [K in string | number | symbol]: ThisType<Object> }
options?FarClassOptions<KitContext<ReturnType<I>, GuardedKit<F>>, GuardedKit<F>>

Returns

fn

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

Parameters
NameType
...argsParameters<I>
Returns

GuardedKit<F>

Defined in

src/exo-makers.js:251


initEmpty

initEmpty(): Object

When calling defineDurableKind and its siblings, used as the init function argument to indicate that the state record of the (virtual/durable) instances of the kind/exoClass should be empty, and that the returned maker function should have zero parameters.

Returns

Object

Defined in

src/exo-makers.js:43


makeExo

makeExo<T>(tag, interfaceGuard, methods, options?): Guarded<T>

Type parameters

NameType
Textends Methods

Parameters

NameTypeDefault valueDescription
tagstringundefined-
interfaceGuardundefined | InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }>undefinedCAVEAT: static typing does not yet support callWhen transformation
methodsTundefined-
options?FarClassOptions<ClassContext<{}, T>, any>undefined-

Returns

Guarded<T>

Defined in

src/exo-makers.js:348