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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openzeppelin/ui-types

v1.5.0

Published

Shared TypeScript type definitions for the OpenZeppelin UI ecosystem.

Downloads

2,853

Readme

@openzeppelin/ui-types

Shared TypeScript type definitions for the OpenZeppelin UI ecosystem.

npm version

Installation

# Using npm
npm install @openzeppelin/ui-types

# Using yarn
yarn add @openzeppelin/ui-types

# Using pnpm
pnpm add @openzeppelin/ui-types

Purpose

This package serves as the single source of truth for all shared types used across the OpenZeppelin UI packages, including:

  • Contract and blockchain related types
  • Form field and layout definitions
  • Adapter interfaces

By centralizing type definitions, we ensure consistency across all packages and eliminate type duplication.

Usage

The package is organized into namespaces for better organization and to prevent naming collisions.

// Import everything
import { adapters, contracts, forms } from '@openzeppelin/ui-types';

// Import specific namespaces
import * as contracts from '@openzeppelin/ui-types';
import * as adapters from '@openzeppelin/ui-types';
import * as forms from '@openzeppelin/ui-types';

// Import specific types from their respective namespaces
import { ContractAdapter } from '@openzeppelin/ui-types';
import { FieldType, FormFieldType } from '@openzeppelin/ui-types';

// Example usage in a function
function validateField(field: forms.FormFieldType): boolean {
  // Implementation
  return true;
}

Package Structure

types/
├── src/
│   ├── adapters/           # Contract adapter interfaces
│   │   ├── base.ts         # Core ContractAdapter interface
│   │   ├── contract-state.ts # Contract state querying capabilities
│   │   └── index.ts        # Re-exports all adapter types
│   ├── common/             # Common types shared across namespaces
│   │   ├── ecosystem.ts    # NetworkEcosystem enum/type
│   │   └── index.ts        # Re-exports common types
│   ├── config/             # Types for runtime application configuration
│   │   └── app-config.ts   # Defines AppRuntimeConfig and related types
│   ├── contracts/          # Contract schema related types
│   │   ├── schema.ts       # ContractSchema, ContractFunction etc.
│   │   └── index.ts        # Re-exports contract types
│   ├── execution/          # Types for transaction execution methods
│   │   ├── eoa.ts
│   │   ├── relayer.ts
│   │   └── ...
│   ├── forms/              # Form field, layout, schema, and validation definitions
│   │   ├── fields.ts       # Base FieldType definitions
│   │   ├── form-field.ts   # FormField definition
│   │   ├── layout.ts       # FormLayout definitions
│   │   ├── schema.ts       # RenderFormSchema, BuilderFormConfig definitions
│   │   ├── validation.ts   # FieldValidation definitions
│   │   ├── values.ts       # FormValues type
│   │   └── index.ts        # Re-exports all form types
│   ├── networks/           # Network configuration types
│   │   ├── config.ts       # Network config interfaces and type guards
│   │   ├── validation.ts   # Network configuration validation utilities
│   │   └── index.ts        # Re-exports all network types
│   ├── transactions/       # Types related to transaction submission status
│   │   ├── status.ts       # TransactionStatus types
│   │   └── index.ts        # Re-exports transaction types
│   └── index.ts            # Main entry point that re-exports all modules
├── package.json
└── tsconfig.json

Type Definitions

Adapter Types (./src/adapters)

Interfaces for blockchain-specific adapters:

  • ContractAdapter: The core interface defining methods for loading contracts, mapping types, querying state, formatting data, validating addresses, handling transactions, and interacting with wallets.
  • AccessControlService: Interface for access control and ownership management operations on contracts.

Config Types (./src/config)

  • AppRuntimeConfig: Defines the shape of the app.config.json file used by exported applications.

Common Types (./src/common)

  • NetworkEcosystem: Enum or type defining supported blockchain ecosystems (e.g., 'evm', 'solana').

Contract Types (./src/contracts)

  • ContractSchema: Interface for contract schema definitions (ABI in EVM).
  • ContractFunction: Interface for function definitions within a contract.
  • ContractParameter: Interface for function parameter definitions.

Form Types (./src/forms)

  • FieldType: Types of form fields (text, number, boolean, address, select, etc.).
  • FormField: Complete definition of a form field including ID, type, label, validation, etc.
  • RenderFormSchema: The schema used by the renderer package.
  • BuilderFormConfig: The configuration used by builder applications.
  • FieldValidation: Validation rules for form fields.
  • FormValues: Type representing the collected data from a form submission.

Network Types (./src/networks)

  • Interfaces for common properties (BaseNetworkConfig) and ecosystem-specific details.
  • The discriminated union type NetworkConfig representing any valid network configuration.
  • Type guard functions (e.g., isEvmNetworkConfig(config)) to safely narrow down the NetworkConfig union type.

Execution Types (./src/execution)

  • Types related to transaction execution strategies, such as EoaExecutionConfig, RelayerExecutionConfig, and RelayerDetails.

Transaction Types (./src/transactions)

  • TransactionStatus: Enum or type defining possible states (Idle, Signing, Broadcasting, PendingConfirmation, Success, Error).
  • TransactionProgress: Interface holding details like transaction hash, error messages, explorer links.

Integration with Other Packages

This package is a dependency for multiple packages in the ecosystem:

  • @openzeppelin/ui-components: Uses types for form field rendering
  • @openzeppelin/ui-renderer: Uses types for form rendering and validation
  • @openzeppelin/ui-utils: Uses types for utility functions

Development

Building

# From the monorepo root
pnpm --filter @openzeppelin/ui-types build

# Or from within the types package directory
pnpm build

Testing

# From the monorepo root
pnpm --filter @openzeppelin/ui-types test

# Or from within the types package directory
pnpm test

License

AGPL-3.0