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
| Name | Type |
|---|---|
T | extends Methods |
Parameters
| Name | Type |
|---|---|
tag | string |
interfaceGuard | undefined | InterfaceGuard<{ [M in string | number | symbol]: MethodGuard }> |
methods | T |
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
| Name | Type |
|---|---|
I | extends (...args: any[]) => any |
M | extends Methods |
Parameters
| Name | Type |
|---|---|
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> |
Returns
fn
▸ (...args): Guarded<M>
Parameters
| Name | Type |
|---|---|
...args | Parameters<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
| Name | Type |
|---|---|
I | extends (...args: any[]) => any |
F | extends Record<string, Methods> |
Parameters
| Name | Type |
|---|---|
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>> |
Returns
fn
▸ (...args): GuardedKit<F>
Parameters
| Name | Type |
|---|---|
...args | Parameters<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
| Name | Type |
|---|---|
key | string |
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
| Name | Type |
|---|---|
label | string |
options? | StoreOptions |