Skip to content

codermaybe/BlockChainKit

Repository files navigation

BlockchainKit

BlockchainKit is a desktop interaction toolkit for EVM and Solana workflows. It uses React + Vite for the frontend and Tauri v2 for the desktop shell.

BlockchainKit 是一个面向 EVM 与 Solana 工作流的桌面交互工具箱。前端使用 React + Vite,桌面端使用 Tauri v2。

Repository / 代码仓库:https://github.com/codermaybe/BlockChainKit

Features / 功能

  • EVM balance and data queries: native balance, contract reads, Explorer API, unit conversion

  • EVM wallet workflows: wallet creation, wallet recovery, transfer, chain data

  • EVM advanced tools: transaction history, contract event listener, ERC20 aggregator

  • Generic contract interaction from ABI presets or imported ABI

  • Batch workflows: wallet generation, balance checks, token transfer, multi-chain gas board

  • Solana tools: SOL/SPL balance checks and local vanity address generation

  • Shared capabilities: RPC settings, Explorer API key, task logs, masked sensitive inputs

  • EVM 余额与基础查询:原生余额、合约查询、Explorer API、单位换算

  • EVM 钱包工作流:创建钱包、恢复钱包、转账、基础链数据

  • EVM 进阶工具:交易历史、合约事件监听、ERC20 归集

  • 通用合约交互:基于 ABI 预设或导入 ABI 生成读写面板

  • 批量任务:批量钱包生成、批量余额检查、批量转账、多链 Gas 面板

  • Solana 工具:SOL/SPL 余额查询、本地虚荣地址生成

  • 全局能力:RPC 配置、Explorer API Key、任务日志、敏感输入脱敏

Tech Stack / 技术栈

  • React 18
  • Vite
  • Tauri 2
  • ethers v6
  • @solana/web3.js
  • Ant Design
  • Vitest
  • ESLint

Project Layout / 目录结构

src/
  components/
    kit/                   # App shell, sidebar, topbar, design primitives
                           # 应用框架、侧栏、顶栏、设计基础组件
    features/
      evm/
        advanced/          # Transaction history, event listener, ERC20 aggregator
                           # 交易历史、事件监听、ERC20 归集
        balance/           # EVM balance and Explorer queries
                           # EVM 余额与浏览器 API 查询
        tools/             # EVM utilities such as unit conversion
                           # EVM 小工具,例如单位换算
        wallet/            # Wallet creation, recovery, transfer, chain data
                           # 钱包创建、恢复、转账、链基础数据
      batch/               # Batch wallet, balance, transfer, gas workflows
                           # 批量钱包、余额、转账、Gas 工作流
      solana/              # Solana balance and vanity address tools
                           # Solana 余额与虚荣地址工具
    shared/                # Reusable UI and workflow components
                           # 共享 UI 与工作流组件
  config/                  # Navigation, chains, ABI presets, categories
                           # 导航、链配置、ABI 预设、日志分类
  hooks/                   # Reusable React hooks
                           # 复用 React hooks
  lib/                     # Theme and i18n providers
                           # 主题与国际化 Provider
  services/                # EVM/Solana provider, signer, contract services
                           # EVM/Solana provider、signer、合约服务
  state/                   # App settings and task log state
                           # 全局设置与任务日志状态
  utils/                   # Shared utilities
                           # 通用工具
src-tauri/                 # Tauri config and Rust desktop shell
                           # Tauri 配置与 Rust 桌面壳
scripts/                   # Release and metadata sync scripts
                           # 发版与元数据同步脚本
.github/workflows/         # CI, nightly artifacts, release workflows
                           # CI、夜间构建、正式发布工作流
docs/                      # Architecture and task notes
                           # 架构与任务文档

Requirements / 环境要求

  • Node.js >= 20.19.0
  • npm >= 9
  • Rust stable toolchain
  • Tauri platform dependencies

Linux packaging requires GTK/WebKit dependencies. The GitHub Actions Tauri workflows install the required Ubuntu packages.

Linux 打包需要 GTK/WebKit 依赖。GitHub Actions 中的 Tauri workflow 已包含 Ubuntu 依赖安装步骤。

Local Development / 本地开发

Install dependencies / 安装依赖:

npm install

Start Vite / 启动 Vite:

npm run dev:vite

Start Tauri desktop development mode / 启动 Tauri 桌面开发模式:

npm run tauri:dev

The Vite dev server uses port 9754, matching src-tauri/tauri.conf.json.

Vite 开发端口固定为 9754,与 src-tauri/tauri.conf.json 保持一致。

Verification / 验证

Run the same checks used by CI / 运行与 CI 顺序一致的检查:

npm run verify:ci

verify:ci runs npm ci --ignore-scripts, lint, tests, and the Vite build. It is useful before pushing because it catches lockfile mismatches and static check failures.

verify:ci 会执行 npm ci --ignore-scripts、lint、test 和 Vite build。推送前运行可以提前发现 lockfile 失配与静态检查问题。

Individual commands / 单独命令:

npm run lint
npm test
npm run build:vite

Build desktop bundles / 构建桌面安装包:

npm run tauri:build

CI/CD

GitHub Actions workflows / GitHub Actions 工作流:

  • .github/workflows/ci.yml: lint, tests, and Vite build for pull requests and main/master pushes

  • .github/workflows/tauri-nightly.yml: nightly desktop artifacts from main

  • .github/workflows/tauri-release.yml: official Tauri release from v* tags

  • .github/workflows/ci.yml:PR 与 main/master push 的 lint、test、Vite build

  • .github/workflows/tauri-nightly.ymlmain 分支夜间桌面产物

  • .github/workflows/tauri-release.ymlv* tag 触发正式 Tauri Release

The project uses Husky for a pre-push hook. After npm install, git push runs npm run verify:ci first.

项目使用 Husky 配置 pre-push hook。执行过 npm install 后,git push 会先运行 npm run verify:ci

Versioning and Releases / 版本与发版

The canonical version is package.json. Running npm version triggers scripts/sync-version.js, which synchronizes:

  • src-tauri/tauri.conf.json
  • src-tauri/Cargo.toml
  • src-tauri/Cargo.lock
  • src-tauri/src/main.rs

版本号以 package.json 为准。执行 npm version 会触发 scripts/sync-version.js,同步以下文件:

  • src-tauri/tauri.conf.json
  • src-tauri/Cargo.toml
  • src-tauri/Cargo.lock
  • src-tauri/src/main.rs

Patch release / 发补丁版本:

npm version patch

Minor release / 发次版本:

npm version minor

npm version updates package.json and package-lock.json, synchronizes Tauri/Rust metadata, creates the version commit and v* tag, then postversion pushes commits and tags. Pushing the tag triggers the BlockchainKit Release workflow.

npm version 会更新 package.jsonpackage-lock.json,同步 Tauri/Rust 元数据,创建版本 commit 和 v* tag,然后由 postversion 推送 commit 与 tag。推送 tag 后会触发 BlockchainKit Release workflow。

Security Rules / 安全约束

  • Private keys and mnemonic phrases must not be written to localStorage, logs, URLs, version snapshots, or default CSV exports

  • Sensitive values are masked by default; high-risk reveal actions require explicit user confirmation

  • EVM signer creation is centralized in services/evm/signerFactory.js

  • Feature components should compose services/hooks/shared components instead of scattering provider, signer, or ABI logic

  • 私钥与助记词不得写入 localStorage、日志、URL、版本快照或默认 CSV 导出

  • 敏感信息默认脱敏,高风险显形需要用户确认

  • EVM signer 创建集中在 services/evm/signerFactory.js

  • 功能组件通过 services/hooks/shared 组合业务,避免散落 provider、signer、ABI 逻辑

About

A desktop toolkit for EVM & Solana blockchain interaction. Features include wallet management, balance & contract queries, multi-chain gas monitoring, bulk operations, and transaction analysis. Built with React + Vite + Tauri v2. 一个 EVM 与 Solana 区块链交互的桌面工具箱。包含钱包管理、余额与合约查询、多链 Gas 监控、批量操作和交易分析功能。采用 React + Vite + Tauri v2 构建。

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages