raiden-ts
Version:
Raiden Light Client Typescript/Javascript SDK
33 lines (32 loc) • 1.59 kB
TypeScript
import type { Observable } from 'rxjs';
import type { RaidenAction } from '../../actions';
import type { RaidenState } from '../../state';
import type { RaidenEpicDeps } from '../../types';
import { matrixSetup } from '../actions';
/**
* Initialize matrix transport
* The matrix client instance will be outputed to RaidenEpicDeps.matrix$ AsyncSubject
* The setup info (including credentials, for persistence) will be the matrixSetup output action
*
* @param action$ - Observable of RaidenActions
* @param state$ - Observable of RaidenStates
* @param deps - RaidenEpicDeps members
* @param deps.address - Our address
* @param deps.signer - Signer instance
* @param deps.matrix$ - MatrixClient async subject
* @param deps.latest$ - Latest observable
* @param deps.config$ - Config observable
* @param deps.init$ - Init$ tasks subject
* @returns Observable of matrixSetup generated by initializing matrix client
*/
export declare function initMatrixEpic(action$: Observable<RaidenAction>, {}: Observable<RaidenState>, deps: RaidenEpicDeps): Observable<matrixSetup>;
/**
* Calls matrix.stopClient when raiden is shutting down, i.e. action$ completes
*
* @param action$ - Observable of matrixSetup actions
* @param state$ - Observable of RaidenStates
* @param deps - RaidenEpicDeps members
* @param deps.matrix$ - MatrixClient async subject
* @returns Empty observable (whole side-effect on matrix instance)
*/
export declare function matrixShutdownEpic(action$: Observable<RaidenAction>, {}: Observable<RaidenState>, { matrix$ }: RaidenEpicDeps): Observable<RaidenAction>;