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 testsyarn build
to build @substrate-connectyarn lint
to run linter for @substrate-connect