UNPKG

raiden-ts

Version:

Raiden Light Client Typescript/Javascript SDK

30 lines (29 loc) 1.48 kB
import type { Observable } from 'rxjs'; import type { RaidenAction } from '../../actions'; import type { RaidenState } from '../../state'; import type { RaidenEpicDeps } from '../../types'; import { channelClose } from '../actions'; /** * A ChannelClose action requested by user * Needs to be called on an opened or closing (for retries) channel. * If tx goes through successfuly, stop as ChannelClosed success action will instead be detected * and reacted by channelEventsEpic. * If anything detectable goes wrong, fires a ChannelCloseActionFailed instead * * @param action$ - Observable of channelClose actions * @param state$ - Observable of RaidenStates * @param deps - RaidenEpicDeps members * @returns Observable of channelClose.failure actions */ export declare function channelCloseEpic(action$: Observable<RaidenAction>, state$: Observable<RaidenState>, deps: RaidenEpicDeps): Observable<channelClose.failure>; /** * When detecting a ChannelClosed event, calls updateNonClosingBalanceProof with partner's balance * proof, iff there's any * TODO: do it only if economically viable (and define what that means) * * @param action$ - Observable of channelClose.success|newBlock actions * @param state$ - Observable of RaidenStates * @param deps - RaidenEpicDeps members * @returns Empty observable */ export declare function channelUpdateEpic(action$: Observable<RaidenAction>, state$: Observable<RaidenState>, deps: RaidenEpicDeps): Observable<never>;