Sign In

@dedot/smoldot

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dedot/smoldot

Smodot Wrapper

Source
npmnpm
Version
0.16.0
Version published
Weekly downloads
652
-19.01%
Maintainers
1
Weekly downloads
 
Created
Source

@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 blockchain

License

Apache-2.0

FAQs

Package last updated on 08 Sep 2025

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