raiden-ts
Version:
Raiden Light Client Typescript/Javascript SDK
26 lines (25 loc) • 1.45 kB
TypeScript
import type { Observable, ObservableInput } from 'rxjs';
import type { RaidenAction } from './actions';
import type { RaidenState } from './state';
import type { Latest, RaidenEpicDeps } from './types';
/**
* This function maps cached/latest relevant values from action$ & state$
*
* @param action$ - Observable of RaidenActions
* @param state$ - Observable of RaidenStates
* @param deps - Epics dependencies, minus 'latest$' & 'config$' (outputs)
* @param deps.defaultConfig - defaultConfig mapping
* @param deps.mediationFeeCalculator - Calculator used to decode/validate config.mediationFees
* @returns latest$ observable
*/
export declare function getLatest$(action$: Observable<RaidenAction>, state$: Observable<RaidenState>, { defaultConfig, mediationFeeCalculator, }: Pick<RaidenEpicDeps, 'defaultConfig' | 'mediationFeeCalculator'>): Observable<Latest>;
declare type RaidenEpic = (action$: Observable<RaidenAction>, state$: Observable<RaidenState>, deps: RaidenEpicDeps) => Observable<RaidenAction>;
/**
* Consumes epics from epics$ and returns a root epic which properly wraps deps.latest$ and
* limits action$ and state$ when raidenShutdown request goes through
*
* @param epics - Observable of raiden epics to compose the root epic
* @returns The rootEpic which properly wires latest$ and limits action$ & state$
*/
export declare function combineRaidenEpics(epics?: ObservableInput<RaidenEpic>): RaidenEpic;
export {};