Socket
Socket
Sign inDemoInstall

@polkadot/api-provider

Package Overview
Dependencies
9
Maintainers
1
Versions
238
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @polkadot/api-provider

Transport providers for the API


Version published
Weekly downloads
43
decreased by-72.61%
Maintainers
1
Install size
14.9 MB
Created
Weekly downloads
 

Readme

Source

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);

Keywords

FAQs

Last updated on 10 Oct 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc