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:46
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:43
chain
● chain: RxApiInterface$Section
Defined in index.ts:44
state
● state: RxApiInterface$Section
Defined in index.ts:45
system
● system: RxApiInterface$Section
Defined in index.ts:46
Methods
isConnected
▸ isConnected(): BehaviorSubject<boolean>
Defined in index.ts:65
Returns: BehaviorSubject<boolean>