@polkadot/api-provider
TypeScript icon, indicating that this package has built-in type declarations

0.30.45 • Public • Published

polkadotjs isc style npm travis maintainability coverage dependency devDependency

@polkadot/api-provider

Generic transport providers to handle the transport of method calls to and from Polkadot clients from applications interacting with it. Generally, unless you are operating at a low-level and taking care of encoding and decoding of parameters/results, it won't be directly used. API interfaces building on top these providers can support various transports with the same underlying interfaces.

Usage

Installation -

npm install --save @polkadot/api-provider

Initialisation -

import WsProvider from '@polkadot/api-provider/ws';

const provider = new WsProvider('http://127.0.0.1:9944');
const version = await provider.send('client_version', []);

console.log('clientVersion', version);

Readme

Keywords

Package Sidebar

Install

npm i @polkadot/api-provider

Weekly Downloads

53

Version

0.30.45

License

ISC

Unpacked Size

84 kB

Total Files

81

Last publish

Collaborators

  • polkadotjs
  • jacogr