Skip to content

API documentation of Agoric SDK / Exports / @agoric/zone / ExoZone

Interface: ExoZone ​

@agoric/zone.ExoZone

Table of contents ​

Properties ​

Properties ​

exo ​

• exo: <T>(tag: string, interfaceGuard: undefined | InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }>, methods: T, options?: FarClassOptions<ClassContext<S, M>, any>) => Guarded<T>

create a singleton exo-object instance bound to this zone

Type declaration ​

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

Type parameters ​
NameType
Textends Methods
Parameters ​
NameType
tagstring
interfaceGuardundefined | InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }>
methodsT
options?FarClassOptions<ClassContext<S, M>, any>
Returns ​

Guarded<T>

Defined in ​

packages/base-zone/src/types.js:14


exoClass ​

• exoClass: <I, M>(tag: string, interfaceGuard: undefined | InterfaceGuard<{ [K in string | number | symbol]: MethodGuard }>, init: I, methods: M & ThisType<{ self: Guarded<M> ; state: ReturnType<I> }>, options?: FarClassOptions<ClassContext<S, M>, any>) => (...args: Parameters<I>) => Guarded<M>

create a maker function that can be used to create exo-objects bound to this zone

Type declaration ​

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

Type parameters ​
NameType
Iextends (...args: any[]) => any
Mextends Methods
Parameters ​
NameType
tagstring
interfaceGuardundefined | InterfaceGuard<{ [K in string | number | symbol]: MethodGuard }>
initI
methodsM & ThisType<{ self: Guarded<M> ; state: ReturnType<I> }>
options?FarClassOptions<ClassContext<S, M>, any>
Returns ​

fn

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

Parameters ​
NameType
...argsParameters<I>
Returns ​

Guarded<M>

Defined in ​

packages/base-zone/src/types.js:15


exoClassKit ​

• exoClassKit: <I, F>(tag: string, interfaceGuardKit: undefined | { [K in string | number | symbol]: InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }> }, init: I, methodsKit: F & { [K_1 in string | number | symbol]: ThisType<Object> }, options?: FarClassOptions<KitContext<S, F>, GuardedKit<F>>) => (...args: Parameters<I>) => GuardedKit<F>

create a "kit" maker function that can be used to create a record of exo-objects sharing the same state

Type declaration ​

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

Type parameters ​
NameType
Iextends (...args: any[]) => any
Fextends Record<string, Methods>
Parameters ​
NameType
tagstring
interfaceGuardKitundefined | { [K in string | number | symbol]: InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }> }
initI
methodsKitF & { [K_1 in string | number | symbol]: ThisType<Object> }
options?FarClassOptions<KitContext<S, F>, GuardedKit<F>>
Returns ​

fn

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

Parameters ​
NameType
...argsParameters<I>
Returns ​

GuardedKit<F>

Defined in ​

packages/base-zone/src/types.js:16


makeOnce ​

• makeOnce: <T>(key: string, maker: (key: string) => T) => T

create or retrieve a singleton object bound to this zone

Type declaration ​

▸ <T>(key, maker): T

Type parameters ​
Name
T
Parameters ​
NameType
keystring
maker(key: string) => T
Returns ​

T

Defined in ​

packages/base-zone/src/types.js:17


subZone ​

• subZone: (label: string, options?: StoreOptions) => Zone

create a new Zone that can be passed to untrusted consumers without exposing the storage of the parent zone

Type declaration ​

▸ (label, options?): Zone

Parameters ​
NameType
labelstring
options?StoreOptions
Returns ​

Zone

Defined in ​

packages/base-zone/src/types.js:18