Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@substrate/connect

Package Overview
Dependencies
Maintainers
12
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/connect

Substrate-connect to Smoldot clients. Using either substrate extension with predefined clients or an internal smoldot client based on chainSpecs provided.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
12
Created
Source

Polkadot JS Provider for Smoldot Light Client

This is a prototype for using @polkadot/api with the smoldot WASM light client either by passing chainspecs or using the extension by predefined chains (e.g. westend, kusama).

Detector check existence of substrate extension. If it is installed and activated then smoldot clients of extension will be used. If not, a new smoldot client will start and sync with given chainspecs.

Usage

import { Detector }  from '@substrate/connect';
import substrateChainSpec from './substrateChainSpec.json';

const chainSpec =  JSON.stringify(substrateChainSpec);
const detect = new Detector('my cool unstoppable app');

const api = await detect.connect('westend', chainSpec());

Scripts

  • yarn test to run the unit tests
  • yarn build to build @substrate-connect
  • yarn lint to run linter for @substrate-connect

FAQs

Package last updated on 08 Apr 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc