@substrate/smoldot-provider
@substrate/smoldot-provider
npm i @substrate/smoldot-provider
Deprecated!
Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
@substrate/smoldot-provider

@substrate/smoldot-provider

Run Wasm Light Clients of any Substrate based chain directly in your browser.

by paritytech

0.0.1 (see all)License:GPL-3.0-onlyTypeScript:Built-In
npm i @substrate/smoldot-provider
Readme

Polkadot JS Provider for Smoldot Light Client

This is a prototype for using @polkadot/api with the smoldot WASM light client. It is not published to npm.

Usage

import { ApiPromise } from '@polkadot/api';
import westend_specs as chainSpec from './examples/westend_specs';
import { SmoldotProvider } from './';

const provider = new SmoldotProvider(chainSpec());
await provider.connect();
const api = await ApiPromise.create({ provider });

See the examples for examples of how to interact with the API.

Testing

  • yarn test to run the unit tests
  • yarn examples to run the integration tests

The examples are automated ports of the samples from the getting started guide.

No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate