UNPKG

raiden-ts

Version:

Raiden Light Client Typescript/Javascript SDK

35 lines (34 loc) 1.94 kB
import type { Observable } from 'rxjs'; import type { RaidenAction } from '../../actions'; import { messageServiceSend } from '../../messages/actions'; import type { RaidenState } from '../../state'; import type { RaidenEpicDeps } from '../../types'; import { msBalanceProofSent } from '../actions'; /** * Handle balanceProof change from partner (received transfers) and request monitoring from MS * * @param action$ - Observable of channelDeposit.success actions * @param state$ - Observable of RaidenStates * @param deps - Epics dependencies * @returns Observable of messageServiceSend.request actions */ export declare function msMonitorRequestEpic({}: Observable<RaidenAction>, state$: Observable<RaidenState>, deps: RaidenEpicDeps): Observable<messageServiceSend.request>; /** * Monitors MonitoringService contract and fires events when an MS sent a BP in our behalf. * * When this epic is subscribed (startup), it fetches events since 'provider.resetEventsBlock', * which is set to latest monitored block, so on startup we always pick up events that were fired * while offline, and keep monitoring while online, although it isn't probable that MS would quick * in while we're online, since [[channelUpdateEpic]] would update the channel ourselves. * * @param action$ - Observable of RaidenActions * @param state$ - Observable of RaidenStates * @param deps - Epics dependencies * @param deps.provider - Provider instance * @param deps.monitoringServiceContract - MonitoringService contract instance * @param deps.address - Our address * @param deps.config$ - Config observable * @param deps.init$ - Subject of initial sync tasks * @returns Observable of msBalanceProofSent actions */ export declare function msMonitorNewBPEpic(action$: Observable<RaidenAction>, state$: Observable<RaidenState>, { provider, monitoringServiceContract, address, config$, init$ }: RaidenEpicDeps): Observable<msBalanceProofSent>;