Files
api/docs/rpc-rx/classes/_index_.rpcrx.md
T
2018-10-10 18:15:38 +00:00

2.1 KiB

name: RpcRx

summary: The RxJS API is a wrapper around the API.

description: It allows wrapping API components with observables using RxJS.

example:

import RpcRx from '@polkadot/rpc-rx';
import WsProvider from '@polkadot/rpc-provider/ws';

const provider = new WsProvider('http://127.0.0.1:9944');
const api = new RpcRx(provider);

Hierarchy

RpcRx

Implements

  • object

Constructors

constructor

⊕ new RpcRx(provider?: ProviderInterface): RpcRx

Defined in index.ts:46

Parameters:

Param Type Default value Description
Default value provider ProviderInterface new Ws(defaults.WS_URL) An API provider using HTTP or WebSocket

Returns: RpcRx


Properties

author

● author: RxRpcInterface$Section

Defined in index.ts:43


chain

● chain: RxRpcInterface$Section

Defined in index.ts:44


state

● state: RxRpcInterface$Section

Defined in index.ts:45


system

● system: RxRpcInterface$Section

Defined in index.ts:46


Methods

isConnected

▸ isConnected(): BehaviorSubject<boolean>

Defined in index.ts:65

Returns: BehaviorSubject<boolean>