Files
api/docs/api-rx/classes/_index_.rxapi.md
T
2018-10-05 13:48:33 +00:00

2.1 KiB

name: RxApi

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

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

example:

import RxApi from '@polkadot/api';
import WsProvider from '@polkadot/api-provider/ws';

const provider = new WsProvider('http://127.0.0.1:9944');
const rxapi = new RxApi(provider);

Hierarchy

RxApi

Implements

  • object

Constructors

constructor

⊕ new RxApi(provider?: ProviderInterface): RxApi

Defined in index.ts:44

Parameters:

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

Returns: RxApi


Properties

author

● author: RxApiInterface$Section

Defined in index.ts:41


chain

● chain: RxApiInterface$Section

Defined in index.ts:42


state

● state: RxApiInterface$Section

Defined in index.ts:43


system

● system: RxApiInterface$Section

Defined in index.ts:44


Methods

isConnected

▸ isConnected(): BehaviorSubject<boolean>

Defined in index.ts:63

Returns: BehaviorSubject<boolean>