2.0 KiB
2.0 KiB
An RxJs wrapper around the api. 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:40
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:37
chain
● chain: RxApiInterface$Section
Defined in index.ts:38
state
● state: RxApiInterface$Section
Defined in index.ts:39
system
● system: RxApiInterface$Section
Defined in index.ts:40
Methods
isConnected
▸ isConnected(): BehaviorSubject<boolean>
Defined in index.ts:59
Returns: BehaviorSubject<boolean>