0.13.1 • Published 6 months ago
@dedot/smoldot v0.13.1
@dedot/smoldot
A lightweight wrapper around the smoldot library, providing convenient utilities for using smoldot with Web Workers in browser environments.
Usage
import { DedotClient, SmoldotProvider } from 'dedot';
import { startWithWorker } from 'dedot/smoldot/with-worker';
import SmoldotWorker from 'dedot/smoldot/worker?worker';
// Initialize smoldot with a worker
const smoldot = startWithWorker(new SmoldotWorker());
// Install `@substrate/connect-known-chains` package to get known-chain specs
const { chainSpec } = await import('@substrate/connect-known-chains/polkadot');
// Add a chain
const chain = smoldot.addChain({ chainSpec });
// Create a provider using the smoldot chain
const provider = new SmoldotProvider(chain);
// Initialize DedotClient with the provider
const client = await DedotClient.new(provider);
// Now you can use the client to interact with the blockchainLicense
Apache-2.0
0.13.1
6 months ago
0.13.1-next.9dc93e20.2
6 months ago
0.13.0
6 months ago
0.12.1-next.c7fd0a6c.2
7 months ago
0.12.1-next.f19f185a.2
7 months ago
0.12.0
7 months ago
0.11.1
7 months ago
0.11.1-next.8aea994f.0
7 months ago
0.11.0
7 months ago
0.10.1-next.b29d4eee.6
7 months ago