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
1.2.0
Version published
Weekly downloads
772
15.05%
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 15 Mar 2026

Related posts