Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@substrate/smoldot-provider

Package Overview
Dependencies
Maintainers
12
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/smoldot-provider

PolkadotJS provider for smoldot wasm light client

latest
Source
npmnpm
Version
0.0.1
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. 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.

FAQs

Package last updated on 09 Mar 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