example: 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:32

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:29


chain

● chain: ApiInterface$Section

Defined in index.ts:30


state

● state: ApiInterface$Section

Defined in index.ts:31


system

● system: ApiInterface$Section

Defined in index.ts:32


results matching ""

    No results matching ""