example: ```javascript import Api from '@polkadot/api'; import WsProvider from '@polkadot/api-provider/ws';
const provider = new WsProvider('http://127.0.0.1:9944'); const api = new Api(provider); ```
Hierarchy
Api
Implements
object
Constructors
constructor
⊕ new Api(provider: ProviderInterface): Api
Defined in index.ts:37
constructor: Default constructor for the Api Object
Parameters:
| Param | Type | Description |
|---|---|---|
| provider | ProviderInterface |
An API provider using HTTP or WebSocket |
Returns: Api
Properties
author
● author: ApiInterface$Section
Defined in index.ts:34
chain
● chain: ApiInterface$Section
Defined in index.ts:35
state
● state: ApiInterface$Section
Defined in index.ts:36
system
● system: ApiInterface$Section
Defined in index.ts:37