@plugnet/rpc-rx
Version:
An RxJs wrapper around the Plugnet JS API
16 lines (15 loc) • 711 B
TypeScript
import { Observable } from 'rxjs';
import { ProviderInterface$Emitted } from '@plugnet/rpc-provider/types';
export declare type RpcRxInterface$Method = (...params: Array<any>) => Observable<any>;
export declare type RpcRxInterface$Section = {
[index: string]: RpcRxInterface$Method;
};
export declare type RpcRxInterface$Events = ProviderInterface$Emitted;
export declare type RpcRxInterface = {
readonly author: RpcRxInterface$Section;
readonly chain: RpcRxInterface$Section;
readonly state: RpcRxInterface$Section;
readonly system: RpcRxInterface$Section;
isConnected: () => Observable<boolean>;
on: (type: RpcRxInterface$Events, handler: (...args: Array<any>) => any) => void;
};