@latticexyz/network
#
@latticexyz/network
#
Table of contents
#
Enumerations
#
Classes
#
Interfaces
#
Type Aliases
Ack CacheStore Clock Config ContractConfig ContractEvent ContractSchemaValueTypes ContractTopics Contracts ContractsConfig ECSCache Input Mappings Network NetworkComponentUpdate NetworkEvent Providers State SyncStateStruct SyncWorkerConfig SystemCall SystemCallTransaction TopicsConfig TxQueue
#
Variables
ContractSchemaValueArrayToElement ContractSchemaValueId GodID SingletonID ack
#
Functions
createBlockNumberStream createCacheStore createContracts createDecode createDecoder createEncoder createFastTxExecutor createFaucetService createFetchSystemCallsFromEvents createFetchWorldEventsInBlockRange createLatestEventStreamRPC createLatestEventStreamService createNetwork createProvider createReconnectingProvider createRelayStream createSigner createSnapshotClient createStreamClient createSyncWorker createSystemExecutor createTopics createTransformWorldEventsFromStream createTxQueue createWorldTopics ensureNetworkIsUp fetchBlock fetchEventsInBlockRange fetchEventsInBlockRangeChunked fetchLogs fetchSnapshot fetchSnapshotChunked fetchStateInBlockRange flattenValue getCacheId getCacheStoreEntries getIndexDBCacheStoreBlockNumber getIndexDbECSCache getRevertReason getSnapshotBlockNumber isNetworkComponentUpdateEvent isSystemCallEvent loadIndexDbCacheStore mergeCacheStores messagePayload normalizeComponentID normalizeEntityID parseSystemCallsFromStreamEvents reduceFetchedState reduceFetchedStateV2 saveCacheStoreToIndexDb storeEvent storeEvents
#
Type Aliases
#
Ack
Ƭ Ack: Object
#
Type declaration
#
Defined in
#
CacheStore
Ƭ CacheStore: ReturnType
<typeof createCacheStore
#
Defined in
#
Clock
Ƭ Clock: Object
#
Type declaration
#
Defined in
#
Config
Ƭ Config: Object
#
Type declaration
#
Defined in
#
ContractConfig
Ƭ ContractConfig: Object
#
Type declaration
#
Defined in
#
ContractEvent
Ƭ ContractEvent<C
>: Object
#
Type parameters
#
Type declaration
#
Defined in
#
ContractSchemaValueTypes
Ƭ ContractSchemaValueTypes: Object
#
Type declaration
#
Defined in
#
ContractTopics
Ƭ ContractTopics: Object
#
Type declaration
#
Defined in
#
Contracts
Ƭ Contracts: Object
#
Index signature
▪ [key: string
]: BaseContract
#
Defined in
#
ContractsConfig
Ƭ ContractsConfig<C
>: { [key in keyof C]: ContractConfig }
#
Type parameters
#
Defined in
#
ECSCache
Ƭ ECSCache: Awaited
<ReturnType
<typeof getIndexDbECSCache
#
Defined in
#
Input
Ƭ Input: Config
Ack
#
Defined in
#
Mappings
Ƭ Mappings<C
>: Object
#
Type parameters
#
Index signature
▪ [hashedContractId: string
]: keyof C
#
Defined in
#
Network
Ƭ Network: Awaited
<ReturnType
<typeof createNetwork
#
Defined in
#
NetworkComponentUpdate
Ƭ NetworkComponentUpdate<C
>: { [key in keyof C]: Object }[keyof C
] & { blockNumber
: number
; entity
: EntityID
; lastEventInTx
: boolean
; logIndex?
: number
; txHash
: string
; txMetadata?
: TxMetadata
}
#
Type parameters
#
Defined in
#
NetworkEvent
Ƭ NetworkEvent<C
>: NetworkComponentUpdate
C
> | SystemCall
C
>
#
Type parameters
#
Defined in
#
Providers
Ƭ Providers: ReturnType
<typeof createProvider
#
Defined in
#
State
Ƭ State: Map
<number
, ComponentValue
>
#
Defined in
#
SyncStateStruct
Ƭ SyncStateStruct: Object
#
Type declaration
#
Defined in
#
SyncWorkerConfig
Ƭ SyncWorkerConfig: Object
#
Type declaration
#
Defined in
#
SystemCall
Ƭ SystemCall<C
>: Object
#
Type parameters
#
Type declaration
#
Defined in
#
SystemCallTransaction
Ƭ SystemCallTransaction: Object
#
Type declaration
#
Defined in
#
TopicsConfig
Ƭ TopicsConfig<C
>: { [ContractType in keyof C]: Object }
#
Type parameters
#
Defined in
#
TxQueue
Ƭ TxQueue<C
>: Cached
<C
>
#
Type parameters
#
Defined in
#
Variables
#
ContractSchemaValueArrayToElement
• Const
ContractSchemaValueArrayToElement: Object
#
Type declaration
#
Defined in
#
ContractSchemaValueId
• Const
ContractSchemaValueId: { [key in ContractSchemaValue]: string }
#
Defined in
#
GodID
• Const
GodID: EntityID
= SingletonID
Deprecated
Import SingletonID instead
#
Defined in
#
SingletonID
• Const
SingletonID: EntityID
#
Defined in
#
ack
• Const
ack: Object
#
Type declaration
#
Defined in
#
Functions
#
createBlockNumberStream
▸ createBlockNumberStream(providers
, options?
): Object
Creates a stream of block numbers based on the block
event of the currently connected provider.
In case initialSync
is provided, this stream will also output a stream of past block numbers to drive replaying events.
#
Parameters
#
Returns
Object
Stream of block numbers based on connected provider's block
event.
#
Defined in
#
createCacheStore
▸ createCacheStore(): Object
#
Returns
Object
#
Defined in
#
createContracts
▸ createContracts<C
>(config:
): Promise
<{ config
: ContractsConfig
C
> ; contracts
: IComputedValue
<C
> }>
Create an object of contracts connected to the currently connected provider.
#
Type parameters
#
Parameters
#
Returns
Promise
<{ config
: ContractsConfig
C
> ; contracts
: IComputedValue
<C
> }>
Object with contracts connected to the currently connected provider.
#
Defined in
#
createDecode
▸ createDecode(worldConfig
, provider
): (componentId
: string
, data
: BytesLike
, componentAddress?
: string
) => Promise
<ComponentValue
>
Create a function to decode raw component values. Fetches component schemas from the contracts and caches them.
#
Parameters
#
Returns
fn
Function to decode raw component values using their contract component id
▸ (componentId
, data
, componentAddress?
): Promise
<ComponentValue
>
#
Parameters
#
Returns
Promise
<ComponentValue
>
#
Defined in
#
createDecoder
▸ createDecoder<D
>(keys
, valueTypes
): (data
: BytesLike
) => D
Construct a decoder function from given keys and valueTypes. The consumer is responsible for providing a type D matching the keys and valueTypes.
#
Type parameters
#
Parameters
#
Returns
fn
Function to decode encoded hex value to component value.
▸ (data
): D
#
Parameters
#
Returns
D
#
Defined in
#
createEncoder
▸ createEncoder<D
>(keys
, valueTypes
): (value
: D
) => string
Creates a function to automatically encode component values given a contract component schema.
#
Type parameters
#
Parameters
#
Returns
fn
Function to encode component values
▸ (value
): string
#
Parameters
#
Returns
string
#
Defined in
#
createFastTxExecutor
▸ createFastTxExecutor(signer
, globalOptions?
): Promise
<{ currentNonce
: Readonly
<{ nonce
: number
}> ; fastTxExecute
: <C, F>(contract
: C
, func
: F
, args
: Parameters
<C
[F
]>, options
: { retryCount?
: number
}) => Promise
<{ hash
: string
; tx
: ReturnType
<C
[F
]> }> ; gasConfig
: Readonly
<{ maxFeePerGas?
: BigNumber
; maxPriorityFeePerGas?
: number
}> ; updateFeePerGas
: (multiplier
: number
) => Promise
<void
> }>
Create a stateful util to execute transactions as fast as possible. Internal state includes the current nonce and the current gas price.
Note: since the signer's nonce is managed in the internal state of this function, using the same signer to send transactions outside of this function or creating multiple instances of this function with the same signer will result in nonce errors.
#
Parameters
#
Returns
Promise
<{ currentNonce
: Readonly
<{ nonce
: number
}> ; fastTxExecute
: <C, F>(contract
: C
, func
: F
, args
: Parameters
<C
[F
]>, options
: { retryCount?
: number
}) => Promise
<{ hash
: string
; tx
: ReturnType
<C
[F
]> }> ; gasConfig
: Readonly
<{ maxFeePerGas?
: BigNumber
; maxPriorityFeePerGas?
: number
}> ; updateFeePerGas
: (multiplier
: number
) => Promise
<void
> }>
#
Defined in
#
createFaucetService
▸ createFaucetService(url
): RawClient
<FromTsProtoServiceDefinition
<typeof FaucetServiceDefinition
>>
Create a FaucetServiceClient
#
Parameters
#
Returns
RawClient
<FromTsProtoServiceDefinition
<typeof FaucetServiceDefinition
>>
FaucetServiceClient
#
Defined in
#
createFetchSystemCallsFromEvents
▸ createFetchSystemCallsFromEvents(provider
): (events
: NetworkComponentUpdate
Components
>[], blockNumber
: number
) => Promise
<SystemCall
Components
>[]>
#
Parameters
#
Returns
fn
▸ (events
, blockNumber
): Promise
<SystemCall
Components
>[]>
#
Parameters
#
Returns
Promise
<SystemCall
Components
>[]>
#
Defined in
#
createFetchWorldEventsInBlockRange
▸ createFetchWorldEventsInBlockRange<C
>(provider
, worldConfig
, batch
, decode
): (from
: number
, to
: number
) => Promise
<NetworkComponentUpdate
C
>[]>
Create a function to fetch World contract events in a given block range.
#
Type parameters
#
Parameters
#
Returns
fn
Function to fetch World contract events in a given block range.
▸ (from
, to
): Promise
<NetworkComponentUpdate
C
>[]>
#
Parameters
#
Returns
Promise
<NetworkComponentUpdate
C
>[]>
#
Defined in
#
createLatestEventStreamRPC
▸ createLatestEventStreamRPC(blockNumber$
, fetchWorldEvents
, boundFetchStoreEvents
, fetchSystemCallsFromEvents?
): Observable
<NetworkEvent
Create a RxJS stream of
Dev
Only use if
#
Parameters
#
Returns
Observable
<NetworkEvent
Stream of
#
Defined in
#
createLatestEventStreamService
▸ createLatestEventStreamService(streamServiceUrl
, worldAddress
, transformWorldEvents
, includeSystemCalls
): Observable
<NetworkEvent
Create a RxJS stream of
#
Parameters
#
Returns
Observable
<NetworkEvent
Stream of
#
Defined in
#
createNetwork
▸ createNetwork(initialConfig
): Promise
<{ blockNumber$
: Observable
<number
> ; clock
: Clock
config
: NetworkConfig
; connected
: IComputedValue
<ConnectionState
> ; connectedAddress
: IComputedValue
<undefined
| string
> ; connectedAddressChecksummed
: IComputedValue
<undefined
| string
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcBatchProvider
| MUDJsonRpcProvider
; ws
: undefined
| WebSocketProvider
}> ; signer
: IComputedValue
<undefined
| Signer
> }>
Set up network.
#
Parameters
#
Returns
Promise
<{ blockNumber$
: Observable
<number
> ; clock
: Clock
config
: NetworkConfig
; connected
: IComputedValue
<ConnectionState
> ; connectedAddress
: IComputedValue
<undefined
| string
> ; connectedAddressChecksummed
: IComputedValue
<undefined
| string
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcBatchProvider
| MUDJsonRpcProvider
; ws
: undefined
| WebSocketProvider
}> ; signer
: IComputedValue
<undefined
| Signer
> }>
Network object
#
Defined in
#
createProvider
▸ createProvider(config
): Object
Create a JsonRpcProvider and WebsocketProvider pair
#
Parameters
#
Returns
Object
Provider pair: { json: JsonRpcProvider, ws: WebSocketProvider }
#
Defined in
#
createReconnectingProvider
▸ createReconnectingProvider(config
): Promise
<{ connected
: IComputedValue
<ConnectionState
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcBatchProvider
| MUDJsonRpcProvider
; ws
: undefined
| WebSocketProvider
}> }>
Creates a
#
Parameters
#
Returns
Promise
<{ connected
: IComputedValue
<ConnectionState
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcBatchProvider
| MUDJsonRpcProvider
; ws
: undefined
| WebSocketProvider
}> }>
Automatically reconnecting
#
Defined in
#
createRelayStream
▸ createRelayStream(signer
, url
, id
): Promise
<{ countConnected
: () => Promise
<number
> ; dispose
: () => void
; event$
: Observable
<{ address
: any
; message
: Message
}> ; ping
: () => Promise
<Identity
> ; push
: (label
: string
, data
: Uint8Array
) => Promise
<void
> ; subscribe
: (label
: string
) => void
; unsubscribe
: (label
: string
) => void
}>
Create a RelayService connection, including event$ and utils
#
Parameters
#
Returns
Promise
<{ countConnected
: () => Promise
<number
> ; dispose
: () => void
; event$
: Observable
<{ address
: any
; message
: Message
}> ; ping
: () => Promise
<Identity
> ; push
: (label
: string
, data
: Uint8Array
) => Promise
<void
> ; subscribe
: (label
: string
) => void
; unsubscribe
: (label
: string
) => void
}>
RelayService connection
#
Defined in
#
createSigner
▸ createSigner(privateKey
, providers
): Wallet
#
Parameters
#
Returns
Wallet
#
Defined in
#
createSnapshotClient
▸ createSnapshotClient(url
): ECSStateSnapshotServiceClient
Create a ECSStateSnapshotServiceClient
#
Parameters
#
Returns
ECSStateSnapshotServiceClient
ECSStateSnapshotServiceClient
#
Defined in
#
createStreamClient
▸ createStreamClient(url
): ECSStreamServiceClient
Create a ECSStreamServiceClient
#
Parameters
#
Returns
ECSStreamServiceClient
ECSStreamServiceClient
#
Defined in
#
createSyncWorker
▸ createSyncWorker<C
>(ack$?
, options?
): Object
Create a new SyncWorker (Sync.worker.ts) to performn contract/client state sync. The main thread and worker communicate via RxJS streams.
#
Type parameters
#
Parameters
#
Returns
Object
Object { ecsEvent$: Stream of network component updates synced by the SyncWorker, config$: RxJS subject to pass in config for the SyncWorker, dispose: function to dispose of the sync worker }
#
Defined in
#
createSystemExecutor
▸ createSystemExecutor<T
>(world
, network
, systems
, interfaces
, gasPrice$
, options?
): Object
Create a system executor object.
The system executor object is an object indexed by available system ids (given in the interfaces object)
with
#
Type parameters
#
Parameters
#
Returns
Object
Systems object to call system contracts.
#
Defined in
#
createTopics
▸ createTopics<C
>(config
): ContractTopics
#
Type parameters
#
Parameters
#
Returns
ContractTopics
#
Defined in
#
createTransformWorldEventsFromStream
▸ createTransformWorldEventsFromStream(decode
): (message
: ECSStreamBlockBundleReply
) => Promise
<NetworkComponentUpdate
Components
>[]>
Create a function to transform World contract events from a stream service response chunk.
#
Parameters
#
Returns
fn
Function to transform World contract events from a stream service.
▸ (message
): Promise
<NetworkComponentUpdate
Components
>[]>
#
Parameters
#
Returns
Promise
<NetworkComponentUpdate
Components
>[]>
#
Defined in
#
createTxQueue
▸ createTxQueue<C
>(computedContracts
, network
, gasPrice$
, options?
): Object
The TxQueue takes care of nonce management, concurrency and caching calls if the contracts are not connected. Cached calls are passed to the queue once the contracts are available.
#
Type parameters
#
Parameters
#
Returns
Object
TxQueue object
#
Defined in
#
createWorldTopics
▸ createWorldTopics(): ContractTopics
Create World contract topics for the ComponentValueSet
and ComponentValueRemoved
events.
#
Returns
ContractTopics
World contract topics for the ComponentValueSet
and ComponentValueRemoved
events.
#
Defined in
#
ensureNetworkIsUp
▸ ensureNetworkIsUp(provider
, wssProvider?
): Promise
<void
>
Await network to be reachable.
#
Parameters
#
Returns
Promise
<void
>
Promise resolving once the network is reachable
#
Defined in
#
fetchBlock
▸ fetchBlock(provider
, requireMinimumBlockNumber?
): Promise
<Block
>
Fetch the latest Ethereum block
#
Parameters
#
Returns
Promise
<Block
>
Promise resolving with the latest Ethereum block
#
Defined in
#
fetchEventsInBlockRange
▸ fetchEventsInBlockRange<C
>(provider
, topics
, startBlockNumber
, endBlockNumber
, contracts
, supportsBatchQueries?
): Promise
<ContractEvent
C
>[]>
Fetch events from block range, ordered by block, transaction index and log index
#
Type parameters
#
Parameters
#
Returns
Promise
<ContractEvent
C
>[]>
Promise resolving with an array of ContractEvents
#
Defined in
#
fetchEventsInBlockRangeChunked
▸ fetchEventsInBlockRangeChunked(fetchWorldEvents
, boundFetchStoreEvents
, fromBlockNumber
, toBlockNumber
, interval?
, setPercentage?
): Promise
<NetworkComponentUpdate
Components
>[]>
Fetch ECS events from contracts in the given block range.
#
Parameters
#
Returns
Promise
<NetworkComponentUpdate
Components
>[]>
Promise resolving with array containing the contract ECS events in the given block range.
#
Defined in
#
fetchLogs
▸ fetchLogs<C
>(provider
, topics
, startBlockNumber
, endBlockNumber
, contracts
, requireMinimumBlockNumber?
): Promise
<Log
[]>
Fetch logs with the given topics from a given block range.
#
Type parameters
#
Parameters
#
Returns
Promise
<Log
[]>
Promise resolving with an array of logs from the specified block range and topics
#
Defined in
#
fetchSnapshot
▸ fetchSnapshot(snapshotClient
, worldAddress
, decode
): Promise
<CacheStore
Load from the remote snapshot service.
Deprecated
this util will be removed in a future version, use fetchSnapshotChunked instead
#
Parameters
#
Returns
Promise
<CacheStore
Promise resolving with
#
Defined in
#
fetchSnapshotChunked
▸ fetchSnapshotChunked(snapshotClient
, worldAddress
, decode
, numChunks?
, setPercentage?
, pruneOptions?
): Promise
<CacheStore
Load from the remote snapshot service in chunks via a stream.
#
Parameters
#
Returns
Promise
<CacheStore
Promise resolving with
#
Defined in
#
fetchStateInBlockRange
▸ fetchStateInBlockRange(fetchWorldEvents
, boundFetchStoreEvents
, fromBlockNumber
, toBlockNumber
, interval?
, setPercentage?
): Promise
<CacheStore
Fetch ECS state from contracts in the given block range.
#
Parameters
#
Returns
Promise
<CacheStore
Promise resolving with
#
Defined in
#
flattenValue
▸ flattenValue<V
>(value
, valueType
): ContractSchemaValueTypes
V
]
#
Type parameters
#
Parameters
#
Returns
ContractSchemaValueTypes
V
]
#
Defined in
#
getCacheId
▸ getCacheId(namespace
, chainId
, worldAddress
): string
#
Parameters
#
Returns
string
#
Defined in
#
getCacheStoreEntries
▸ getCacheStoreEntries<Cm
>(__namedParameters
): IterableIterator
<NetworkComponentUpdate
Cm
>>
#
Type parameters
#
Parameters
#
Returns
IterableIterator
<NetworkComponentUpdate
Cm
>>
#
Defined in
#
getIndexDBCacheStoreBlockNumber
▸ getIndexDBCacheStoreBlockNumber(cache
): Promise
<number
>
#
Parameters
#
Returns
Promise
<number
>
#
Defined in
#
getIndexDbECSCache
▸ getIndexDbECSCache(chainId
, worldAddress
, version?
, idb?
): Promise
<{ db
: IDBDatabase
; entries
: <Store>(store
: Store
) => Promise
<IterableIterator
<[string
, S
[Store
]]>> ; get
: <Store>(store
: Store
, key
: string
) => Promise
<S
[Store
] | undefined
> ; keys
: (store
: StoreKey
<{ BlockNumber
: number
; ComponentValues
: State
Mappings
: string
[] ; Snapshot
: ECSStateReply
}>) => Promise
<IterableIterator
<string
>> ; remove
: (store
: StoreKey
<{ BlockNumber
: number
; ComponentValues
: State
Mappings
: string
[] ; Snapshot
: ECSStateReply
}>, key
: string
) => Promise
<void
> ; set
: <Store>(store
: Store
, key
: string
, value
: { BlockNumber
: number
; ComponentValues
: State
Mappings
: string
[] ; Snapshot
: ECSStateReply
}[Store
], ignoreResult
: boolean
) => undefined
| Promise
<void
> ; values
: <Store>(store
: Store
) => Promise
<IterableIterator
<S
[Store
]>> }>
#
Parameters
#
Returns
Promise
<{ db
: IDBDatabase
; entries
: <Store>(store
: Store
) => Promise
<IterableIterator
<[string
, S
[Store
]]>> ; get
: <Store>(store
: Store
, key
: string
) => Promise
<S
[Store
] | undefined
> ; keys
: (store
: StoreKey
<{ BlockNumber
: number
; ComponentValues
: State
Mappings
: string
[] ; Snapshot
: ECSStateReply
}>) => Promise
<IterableIterator
<string
>> ; remove
: (store
: StoreKey
<{ BlockNumber
: number
; ComponentValues
: State
Mappings
: string
[] ; Snapshot
: ECSStateReply
}>, key
: string
) => Promise
<void
> ; set
: <Store>(store
: Store
, key
: string
, value
: { BlockNumber
: number
; ComponentValues
: State
Mappings
: string
[] ; Snapshot
: ECSStateReply
}[Store
], ignoreResult
: boolean
) => undefined
| Promise
<void
> ; values
: <Store>(store
: Store
) => Promise
<IterableIterator
<S
[Store
]>> }>
#
Defined in
#
getRevertReason
▸ getRevertReason(txHash
, provider
): Promise
<string
>
Get the revert reason from a given transaction hash
#
Parameters
#
Returns
Promise
<string
>
Promise resolving with revert reason string
#
Defined in
#
getSnapshotBlockNumber
▸ getSnapshotBlockNumber(snapshotClient
, worldAddress
): Promise
<number
>
Return the snapshot block number.
#
Parameters
#
Returns
Promise
<number
>
Snapsot block number
#
Defined in
#
isNetworkComponentUpdateEvent
▸ isNetworkComponentUpdateEvent<C
>(e
): e is NetworkComponentUpdate<C>
#
Type parameters
#
Parameters
#
Returns
e is NetworkComponentUpdate<C>
#
Defined in
#
isSystemCallEvent
▸ isSystemCallEvent<C
>(e
): e is SystemCall<C>
#
Type parameters
#
Parameters
#
Returns
e is SystemCall<C>
#
Defined in
#
loadIndexDbCacheStore
▸ loadIndexDbCacheStore(cache
): Promise
<CacheStore
#
Parameters
#
Returns
Promise
<CacheStore
#
Defined in
#
mergeCacheStores
▸ mergeCacheStores(stores
): CacheStore
#
Parameters
#
Returns
CacheStore
#
Defined in
#
messagePayload
▸ messagePayload(msg
): string
#
Parameters
#
Returns
string
#
Defined in
#
normalizeComponentID
▸ normalizeComponentID(componentID
): string
#
Parameters
#
Returns
string
#
Defined in
#
normalizeEntityID
▸ normalizeEntityID(entityID
): EntityID
#
Parameters
#
Returns
EntityID
#
Defined in
#
parseSystemCallsFromStreamEvents
▸ parseSystemCallsFromStreamEvents(events
): SystemCall
Components
>[]
#
Parameters
#
Returns
SystemCall
Components
>[]
#
Defined in
#
reduceFetchedState
▸ reduceFetchedState(response
, cacheStore
, decode
): Promise
<void
>
Reduces a snapshot response by storing corresponding ECS events into the cache store.
Deprecated
this util will be removed in a future version, use reduceFetchedStateV2 instead
#
Parameters
#
Returns
Promise
<void
>
Promise resolving once state is reduced into
#
Defined in
#
reduceFetchedStateV2
▸ reduceFetchedStateV2(response
, cacheStore
, decode
): Promise
<void
>
Reduces a snapshot response by storing corresponding ECS events into the cache store.
#
Parameters
#
Returns
Promise
<void
>
Promise resolving once state is reduced into
#
Defined in
#
saveCacheStoreToIndexDb
▸ saveCacheStoreToIndexDb(cache
, store
): Promise
<void
>
#
Parameters
#
Returns
Promise
<void
>
#
Defined in
#
storeEvent
▸ storeEvent<Cm
>(cacheStore
, __namedParameters
): void
#
Type parameters
#
Parameters
#
Returns
void
#
Defined in
#
storeEvents
▸ storeEvents<Cm
>(cacheStore
, events
): void
#
Type parameters
#
Parameters
#
Returns
void