@livedigital/client 3.14.0 → 3.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ interface ChannelStateConsistencyCheckResultsParams {
2
+ missingPeers: string[];
3
+ missingProducers: string[];
4
+ producersWithInconsistentState: string[];
5
+ }
6
+ declare class ChannelStateConsistencyCheckResult {
7
+ readonly missingPeers: string[];
8
+ readonly missingProducers: string[];
9
+ readonly producersWithInconsistentState: string[];
10
+ constructor(params: ChannelStateConsistencyCheckResultsParams);
11
+ hasInconsistencyCases(): boolean;
12
+ }
13
+ export default ChannelStateConsistencyCheckResult;
@@ -0,0 +1,24 @@
1
+ import { ChannelState } from '../../../types/channelStateSyncronizer';
2
+ import ChannelStateConsistencyCheckResult from './ChannelStateConsistencyCheckResult';
3
+ interface ChannelStateConsistencyCheckerParams {
4
+ localState: ChannelState;
5
+ remoteState: ChannelState;
6
+ ignoreIds: string[];
7
+ }
8
+ declare class ChannelStateConsistencyChecker {
9
+ private readonly localState;
10
+ private readonly remoteState;
11
+ private readonly ignoreIds;
12
+ private missingPeers;
13
+ private missingProducers;
14
+ private producersWithInconsistentState;
15
+ constructor(params: ChannelStateConsistencyCheckerParams);
16
+ check(): ChannelStateConsistencyCheckResult;
17
+ getMissingPeers(): string[];
18
+ getMissingProducers(): string[];
19
+ getProducersWithInconsistentState(): string[];
20
+ private findLocalPeerById;
21
+ private findLocalProducerById;
22
+ private resetPreviousCheckResults;
23
+ }
24
+ export default ChannelStateConsistencyChecker;
@@ -0,0 +1,29 @@
1
+ /// <reference types="node" />
2
+ import { LogMessageHandler } from '../../../types/common';
3
+ import Engine from '../../index';
4
+ declare class ChannelStateSyncEventHandler {
5
+ #private;
6
+ private readonly engine;
7
+ private readonly logger;
8
+ constructor(params: {
9
+ engine: Engine;
10
+ onLogMessage?: LogMessageHandler;
11
+ });
12
+ handle(payload: Buffer): Promise<void>;
13
+ private handleChannelStateEvent;
14
+ private getLastInconsistencyCheckResult;
15
+ private handleConfirmedInconsistencyResult;
16
+ private getConfirmedInconsistencyResult;
17
+ private collectProbableInconsistencyCases;
18
+ private resetLastProbableInconsistencyCheckResults;
19
+ private rotateLastProbableInconsistencyCheckResults;
20
+ private isReachedMaxCheckRetries;
21
+ private getConfirmedMissingPeers;
22
+ private getConfirmedMissingProducers;
23
+ private getConfirmedProducersWithInconsistencState;
24
+ private parseChannelStateSyncEventPayload;
25
+ private getAllConfirmedInconsistentEntityIds;
26
+ private getLocalState;
27
+ private getIsConnectionActive;
28
+ }
29
+ export default ChannelStateSyncEventHandler;