API documentation of Agoric SDK / Exports / @agoric/vats / index
Module: index
Table of contents
Type Aliases
- Board
- BridgeHandler
- BridgeManager
- MyAddressNameAdmin
- NameAdmin
- NameHub
- NameHubKit
- NameHubUpdateHandler
- NamesByAddressAdmin
- NonPrimitive
- ScopedBridgeManager
Variables
Functions
- makeAgoricNamesAccess
- makeNameHubKit
- makePromiseSpace
- prepareBridgeManager
- prepareMixinMyAddress
- prepareNameHubKit
Type Aliases
Board
Ƭ Board: ReturnType
<ReturnType
<prepareBoardKit
>>["board"
]
Defined in
packages/vats/src/types.d.ts:1
BridgeHandler
Ƭ BridgeHandler: Object
An object that can receive messages from the bridge device
Type declaration
Name | Type | Description |
---|---|---|
fromBridge | (obj : any ) => PromiseVow <void > | - |
Defined in
packages/vats/src/types.d.ts:88
BridgeManager
Ƭ BridgeManager: Object
The object to manage this bridge
Type declaration
Name | Type |
---|---|
register | (bridgeId : string , handler? : ERef <BridgeHandler | undefined >) => ScopedBridgeManager |
Defined in
packages/vats/src/types.d.ts:102
MyAddressNameAdmin
Ƭ MyAddressNameAdmin: NameAdmin
& { getMyAddress
: () => string
}
Defined in
packages/vats/src/types.d.ts:73
NameAdmin
Ƭ NameAdmin: Object
write access to a node in a name hierarchy
Type declaration
Name | Type | Description |
---|---|---|
default | <T>(key : string , newValue : T , newAdmin? : NameAdmin ) => T | - |
delete | (key : string ) => void | - |
lookupAdmin | (...path : string []) => Promise <NameAdmin > | - |
onUpdate | (fn : undefined | NameHubUpdateHandler ) => void | - |
provideChild | (key : string , reserved? : string []) => Promise <NameHubKit > | - |
readonly | () => NameHub | - |
reserve | (key : string ) => Promise <void > | - |
set | (key : string , newValue : unknown , newAdmin? : NameAdmin ) => void | - |
update | (key : string , newValue : unknown , newAdmin? : NameAdmin ) => void | - |
Defined in
packages/vats/src/types.d.ts:28
NameHub
Ƭ NameHub: Object
read-only access to a node in a name hierarchy
NOTE: We need to return arrays, not iterables, because even if marshal could allow passing a remote iterable, there would be an inordinate number of round trips for the contents of even the simplest nameHub.
Type declaration
Name | Type | Description |
---|---|---|
entries | (includeReserved? : boolean ) => [string , unknown ][] | - |
has | (key : string ) => boolean | - |
keys | () => string [] | - |
lookup | (...path : string []) => Promise <any > | - |
values | () => unknown [] | - |
Defined in
packages/vats/src/types.d.ts:12
NameHubKit
Ƭ NameHubKit: Object
a node in a name hierarchy
Type declaration
Name | Type | Description |
---|---|---|
nameAdmin | NameAdmin | write access |
nameHub | NameHub | read access |
Defined in
packages/vats/src/types.d.ts:66
NameHubUpdateHandler
Ƭ NameHubUpdateHandler: Object
Type declaration
Name | Type |
---|---|
write | (entries : [string , unknown ][]) => void |
Defined in
packages/vats/src/types.d.ts:61
NamesByAddressAdmin
Ƭ NamesByAddressAdmin: NameAdmin
& { lookupAdmin
: (addr
: string
) => Promise
<MyAddressNameAdmin
> ; provideChild
: (addr
: string
, reserved?
: string
[]) => Promise
<{ nameAdmin
: MyAddressNameAdmin
; nameHub
: NameHub
}> }
Defined in
packages/vats/src/types.d.ts:76
NonPrimitive
Ƭ NonPrimitive: Object
Index signature
▪ [key: string
]: any
Defined in
packages/vats/src/nameHub.js:91
ScopedBridgeManager
Ƭ ScopedBridgeManager: Object
An object which handles messages for a specific bridge
Type declaration
Name | Type |
---|---|
fromBridge | (obj : any ) => PromiseVow <void > |
initHandler | (handler : ERef <BridgeHandler >) => void |
setHandler | (handler : ERef <BridgeHandler >) => void |
toBridge | (obj : any ) => Promise <any > |
Defined in
packages/vats/src/types.d.ts:94
Variables
BridgeHandlerI
• Const
BridgeHandlerI: InterfaceGuard
<{ fromBridge
: MethodGuard
}>
Defined in
BridgeManagerI
• Const
BridgeManagerI: InterfaceGuard
<{ register
: MethodGuard
}>
Defined in
packages/vats/src/bridge.js:18
BridgeScopedManagerI
• Const
BridgeScopedManagerI: InterfaceGuard
<{ fromBridge
: MethodGuard
; initHandler
: MethodGuard
; setHandler
: MethodGuard
; toBridge
: MethodGuard
}>
Defined in
packages/vats/src/bridge.js:11
NameHubIKit
• Const
NameHubIKit: Object
Type declaration
Name | Type |
---|---|
nameAdmin | InterfaceGuard <{ default : MethodGuard ; delete : MethodGuard ; lookupAdmin : MethodGuard ; onUpdate : MethodGuard ; provideChild : MethodGuard ; readonly : MethodGuard ; reserve : MethodGuard ; set : MethodGuard ; update : MethodGuard }> |
nameHub | InterfaceGuard <{ entries : MethodGuard ; has : MethodGuard ; keys : MethodGuard ; lookup : MethodGuard ; values : MethodGuard }> |
Defined in
packages/vats/src/nameHub.js:19
Functions
makeAgoricNamesAccess
▸ makeAgoricNamesAccess(log?
, reserved?
): Promise
<{ agoricNames
: NameHub
; agoricNamesAdmin
: NameAdmin
; spaces
: WellKnownSpaces
}>
Make the well-known agoricNames namespace so that we can E(home.agoricNames).lookup('issuer', 'IST') and likewise for brand, installation, instance, etc.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
log? | (...data : any []) => void (message? : any , ...optionalParams : any []) => void | undefined | MDN Reference |
reserved | Record <string , Record <string , unknown >> | agoricNamesReserved | a property for each of issuer, brand, etc. with a value whose keys are names to reserve. For static typing and integrating with the bootstrap permit system, return { produce, consume } spaces rather than NameAdmins. |
Returns
Promise
<{ agoricNames
: NameHub
; agoricNamesAdmin
: NameAdmin
; spaces
: WellKnownSpaces
}>
Deprecated
use vat-agoricNames, makeWellKnownSpaces
Defined in
packages/vats/src/core/utils.js:276
makeNameHubKit
▸ makeNameHubKit(): NameHubKit
Make two facets of a node in a name hierarchy: the nameHub is read access and the nameAdmin is write access.
Returns
Defined in
packages/vats/src/nameHub.js:370
makePromiseSpace
▸ makePromiseSpace<T
>(optsOrLog?
): PromiseSpaceOf
<T
, {}, {}>
Make { produce, consume } where for each name, consume[name]
is a promise and produce[name].resolve
resolves it.
Note: repeated resolve()s without an intervening reset() are noops.
Type parameters
Name | Type |
---|---|
T | extends Record <string , unknown > = Record <string , unknown > |
Parameters
Name | Type |
---|---|
optsOrLog? | (...data : any []) => void (message? : any , ...optionalParams : any []) => void | { log?: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; } | undefined; } & ({ hooks?: PromiseSpaceHooks | undefined; } | { store: MapStore<string, any>; }) |
Returns
PromiseSpaceOf
<T
, {}, {}>
Defined in
packages/vats/src/core/promise-space.js:86
prepareBridgeManager
▸ prepareBridgeManager(zone
, D
): (bridgeDevice
: BridgeDevice
) => BridgeManager
Parameters
Name | Type | Description |
---|---|---|
zone | Zone | - |
D | DProxy <any > | The device sender |
Returns
fn
▸ (bridgeDevice
): BridgeManager
Obtain the single manager associated with a bridge device.
Parameters
Name | Type |
---|---|
bridgeDevice | BridgeDevice |
Returns
Defined in
packages/vats/src/bridge.js:89
prepareMixinMyAddress
▸ prepareMixinMyAddress(zone
): (nameAdmin
: NameAdmin
, address
: string
) => Farable
<MyAddressNameAdmin
>
Parameters
Name | Type |
---|---|
zone | Zone |
Returns
fn
▸ (nameAdmin
, address
): Farable
<MyAddressNameAdmin
>
Parameters
Name | Type |
---|---|
nameAdmin | NameAdmin |
address | string |
Returns
Farable
<MyAddressNameAdmin
>
Defined in
packages/vats/src/nameHub.js:47
prepareNameHubKit
▸ prepareNameHubKit(zone
): () => NameHubKit
Make two facets of a node in a name hierarchy: the nameHub is read access and the nameAdmin is write access.
Parameters
Name | Type |
---|---|
zone | Zone |
Returns
fn
▸ (): NameHubKit