Files
api/docs/rpc-rx/classes/_index_.rpcrx.md
T
2018-10-30 16:28:19 +00:00

2.2 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:44

Parameters:

Param Type
Optional providerOrRpc Rpc | ProviderInterface

Returns: RpcRx


Properties

author

● author: RpcRxInterface$Section

Defined in index.ts:41


chain

● chain: RpcRxInterface$Section

Defined in index.ts:42


state

● state: RpcRxInterface$Section

Defined in index.ts:43


system

● system: RpcRxInterface$Section

Defined in index.ts:44


Methods

isConnected

▸ isConnected(): BehaviorSubject<boolean>

Defined in index.ts:65

Returns: BehaviorSubject<boolean>


on

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

Defined in index.ts:69

Parameters:

Param Type
type RpcRxInterface$Events
handler function

Returns: void