Files
api/docs/rpc-rx/classes/_index_.rpcrx.md
T
2019-01-03 16:58:35 +00:00

2.5 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(providerOrRpc?: * Rpc | ProviderInterface*): RpcRx

Defined in index.ts:45

Parameters:

Name Type
Optional providerOrRpc Rpc | ProviderInterface

Returns: RpcRx


Properties

author

● author: RpcRxInterface$Section

Defined in index.ts:42


chain

● chain: RpcRxInterface$Section

Defined in index.ts:43


state

● state: RpcRxInterface$Section

Defined in index.ts:44


system

● system: RpcRxInterface$Section

Defined in index.ts:45


Methods

isConnected

▸ isConnected(): BehaviorSubject<boolean>

Defined in index.ts:66

Returns: BehaviorSubject<boolean>


on

▸ on(type: RpcRxInterface$Events, handler: function): void

Defined in index.ts:70

Parameters:

Name Type
type RpcRxInterface$Events
handler function

Returns: void