Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@openzeppelin/contracts-ui-builder-utils

Package Overview
Dependencies
Maintainers
9
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openzeppelin/contracts-ui-builder-utils

Shared, framework-agnostic utility functions for the OpenZeppelin Contracts UI Builder.

latest
legacy
Source
npmnpm
Version
0.9.0
Version published
Weekly downloads
370
-68.51%
Maintainers
9
Weekly downloads
 
Created
Source

@openzeppelin/contracts-ui-builder-utils

This package provides a set of shared, framework-agnostic utility functions used across the entire UI Builder ecosystem.

Purpose

The goal of this package is to centralize common logic that is not tied to any specific blockchain adapter or UI framework (like React). This prevents code duplication and ensures that core functionalities like logging, configuration management, and ID generation are consistent everywhere.

Key Exports

  • AppConfigService: A singleton service responsible for loading and providing runtime configuration. It can load settings from Vite environment variables (for the builder app) or a public/app.config.json file (for exported apps), allowing for flexible configuration of RPC URLs, API keys, and other parameters.
  • logger: A pre-configured singleton logger for consistent, leveled logging across all packages. It can be enabled, disabled, or have its level changed globally.
  • generateId: A utility for generating unique IDs, used for form fields and other components.
  • cn: A utility (a wrapper around clsx and tailwind-merge) for conditionally joining CSS class names, essential for building dynamic and themeable UI components with Tailwind CSS.
  • Type Guards and Helpers: Various other small, reusable functions like getDefaultValueForType.

Package Structure

utils/
├── src/
│   ├── config/                 # Configuration management
│   ├── logger/                 # Logging utilities
│   ├── ui/                     # UI utility functions
│   ├── validation/             # Validation and type utilities
│   ├── constants/              # Shared constants
│   └── index.ts                # Main package exports
├── package.json                # Package configuration
├── tsconfig.json               # TypeScript configuration
├── tsup.config.ts              # Build configuration
├── vitest.config.ts            # Test configuration
└── README.md                   # This documentation

Installation

This package is a core part of the monorepo and is automatically linked via pnpm workspaces. For external use, it would be installed from the project's package registry.

pnpm add @openzeppelin/contracts-ui-builder-utils

Keywords

utils

FAQs

Package last updated on 23 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