npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sv2-wizard

v0.1.1

Published

Standalone deployment wizard component for SRI (Stratum V2 Reference Implementation)

Downloads

214

Readme

Stratum V2 Deployment Wizard

A standalone React component for guiding users through the deployment of SRI (Stratum V2 Reference Implementation) stack.

Features

  • Standalone Component: No dependencies on external layouts or navigation
  • Interactive Wizard: Multi-step guided flow for SRI deployment
  • Multiple Deployment Paths: Supports both full stack and proxy-only deployments
  • Docker & Binary Options: Choose between Docker or manual binary deployment
  • Bitcoin Core Integration: Guides users through Bitcoin Core node setup
  • Configuration Generation: Generates deployment configurations automatically
  • Modular Architecture: Well-organized, maintainable codebase with clear separation of concerns

Installation

npm install sv2-wizard

Usage

Pool Connection Wizard (for miners connecting to pools)

import { PoolConnectionWizard } from "sv2-wizard";

function App() {
  return (
    <div className="min-h-screen bg-background p-8">
      <PoolConnectionWizard 
        onComplete={(finalStepId) => {
          console.log("Wizard completed at step:", finalStepId);
        }}
      />
    </div>
  );
}

Full Stack Wizard (for deploying entire SRI stack)

import { FullStackWizard } from "sv2-wizard";

function App() {
  return (
    <div className="min-h-screen bg-background p-8">
      <FullStackWizard 
        onComplete={(finalStepId) => {
          console.log("Wizard completed at step:", finalStepId);
        }}
      />
    </div>
  );
}

Props

PoolConnectionWizard / FullStackWizard

| Prop | Type | Description | |------|------|-------------| | className | string? | Additional CSS classes for the wizard container | | onComplete | (finalStepId: string) => void? | Callback fired when the wizard completes |

Styling

This component uses Tailwind CSS and expects the following CSS variables to be defined in your theme:

  • --primary - Primary color
  • --primary-foreground - Primary text color
  • --muted - Muted background color
  • --muted-foreground - Muted text color
  • --card - Card background color
  • --card-foreground - Card text color
  • --border - Border color
  • --background - Page background color

Make sure your Tailwind configuration includes these variables or the component may not display correctly.

Dependencies

  • React 18+ or 19+
  • Framer Motion (for animations)
  • Lucide React (for icons)
  • Radix UI components (Select, Slider, Label, Slot)
  • Tailwind CSS

Architecture Overview

Wizard Types

The library provides two main wizards for different deployment scenarios:

1. Full Stack Wizard (FullStackWizard)

Deploys the complete SRI stack locally for running your own mining pool:

  • SRI Pool (always) - The mining pool server
  • Job Declarator Server (JDS) (always) - Connects to Bitcoin Core via RPC
  • Job Declarator Client (JDC) (optional) - Only if user enables JD mode
  • Translator Proxy (always) - Connects miners to the pool

Bitcoin Core Requirements:

  • Required for SRI Pool (to fetch block templates)
  • Required for JDC if JD mode is enabled (to construct custom templates)

2. Pool Connection Wizard (PoolConnectionWizard)

Connects miners to existing Stratum V2 pools using SRI proxy components:

  • Translator Proxy (always) - Connects miners to the selected pool
  • Job Declarator Client (JDC) (optional) - Only if user wants to construct custom templates

Bitcoin Core Requirements:

  • Only required if JDC is used (to construct custom block templates)
  • Not required if using pool's templates

Available Pools

When connecting to existing pools, users can choose from:

  • SRI Community Pool: Available on mainnet & testnet4, supports both JD and non-JD modes
  • Braiins Pool: Available on mainnet only, non-JD mode only (uses pool's templates)
  • Demand Pool: Available on mainnet only, supports both JD and non-JD modes

Configuration System

  • Each SRI application has its own TOML configuration file
  • For Docker deployments, a .env file is generated that populates all app configurations
  • For binary deployments, individual config files are generated and packaged in a zip

Code Structure

The codebase is organized into a modular structure for better maintainability:

src/
├── wizard/                      # Wizard step components
│   ├── forms/                   # Form components (Pool, Client, Translator, User Identity)
│   ├── ui/                      # Reusable UI components (CodeBlock, InfoCard)
│   ├── bitcoin/                 # Bitcoin Core setup components
│   ├── deployment/              # Deployment result components (Docker/Binaries)
│   ├── utils/                   # Utility functions (file download, env generation)
│   ├── types.ts                 # TypeScript types
│   └── constants.ts             # Constants (network socket paths)
│
├── components/ui/wizard-framework/  # Core wizard framework
│   ├── types.ts                 # Framework types (WizardConfig, WizardStep, etc.)
│   ├── utils.ts                 # Framework utilities
│   ├── WizardStepCard.tsx       # Step card renderer
│   ├── Wizard.tsx               # Main wizard orchestrator
│   └── index.ts                 # Public API
│
├── config-templates/            # Configuration template system
│   ├── templates/               # Raw template strings
│   ├── config-builder.ts        # Template builders
│   ├── pools.ts                 # Pool configurations
│   ├── constants.ts             # Default values and utilities
│   └── types.ts                 # Configuration types
│
├── FullStackWizard.tsx          # Full stack wizard definition
└── PoolConnectionWizard.tsx     # Pool connection wizard definition

Key Design Principles

  • Separation of Concerns: Each module has a single, clear responsibility
  • Reusability: Components can be imported and used independently
  • Type Safety: Full TypeScript support with exported types
  • Maintainability: Easy to find, update, and test individual components

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Run the demo playground
npm run demo

You can also build/preview the demo as a static site:

npm run demo:build
npm run demo:preview

Project Structure

Wizard Framework (components/ui/wizard-framework/)

The core framework that orchestrates wizard flows:

  • Wizard.tsx: Main component managing state, navigation, and step transitions
  • WizardStepCard.tsx: Renders different step types (question, instruction, custom, result)
  • types.ts: TypeScript interfaces for wizard configuration
  • utils.ts: Helper functions for icons and styling

Wizard Components (wizard/)

Reusable components for wizard steps:

  • forms/: Configuration forms (Pool, Client, Translator Proxy, User Identity)
  • ui/: Shared UI components (CodeBlock, InfoCard)
  • bitcoin/: Bitcoin Core setup instructions and socket path configuration
  • deployment/: Deployment result displays (Docker and Binaries for both JD and Pool flows)
  • utils/: File download and environment file generation utilities

Configuration Templates (config-templates/)

Modular system for generating configuration files:

  • templates/: Raw TOML template strings
  • config-builder.ts: Functions to build complete configs from templates
  • pools.ts: Predefined pool configurations
  • constants.ts: Default values, authority keys, and utility functions

License

This software is licensed under Apache 2.0 or MIT, at your option.