# @sudobility/types

> Comprehensive TypeScript types, interfaces, and utilities for Web3 email applications - optimized for AI-assisted development

Latest version **1.9.67** (published 2026-08-27) · BUSL-1.1 license · 0 weekly downloads

## Install

```sh
npm install @sudobility/types
pnpm add @sudobility/types
yarn add @sudobility/types
bun add @sudobility/types
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.9.67 |
| Published | 2026-08-27 |
| First published | 2025-10-12 |
| Weekly downloads | 0 |
| License | BUSL-1.1 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 362.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sudobility |
| Maintainers | johnqh |
| Keywords | typescript, types, interfaces, web3, blockchain, email, ai-optimized, tree-shakeable, zero-dependencies |

## Links

- npm: https://www.npmjs.com/package/@sudobility/types
- Repository: https://github.com/johnqh/types
- Homepage: https://github.com/johnqh/types#readme
- Issues: https://github.com/johnqh/types/issues
- npm.io page: https://npm.io/package/@sudobility/types

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 1.9.67 (latest) — 2026-08-27
- 1.9.66 — 2026-08-20
- 1.9.65 — 2026-08-16
- 1.9.64 — 2026-08-04
- 1.9.62 — 2026-05-07
- 1.9.61 — 2026-03-24
- 1.9.60 — 2026-03-24
- 1.9.59 — 2026-03-19
- 1.9.58 — 2026-03-17
- 1.9.57 — 2026-03-13
- 1.9.56 — 2026-03-13
- 1.9.55 — 2026-02-27
- 1.9.54 — 2026-02-23
- 1.9.53 — 2026-02-23
- 1.9.52 — 2026-02-22
- … 60 more at https://npm.io/package/@sudobility/types/versions

## README

# @sudobility/types

Comprehensive TypeScript type definitions and utilities for Web3 email applications. Zero runtime dependencies, dual module support (ESM + CommonJS).

## Installation

```bash
bun install @sudobility/types
```

No peer dependencies required.

## Usage

### Core Utility Types

```typescript
import { Optional, Result, ValidationResult, BaseResponse, PaginatedResponse } from '@sudobility/types';

const maybeUser: Optional<User> = null;  // T | undefined | null

function doWork(): Result<Data> {
  if (ok) return { success: true, data: result };
  return { success: false, error: { type: 'ValidationError', message: '...' } };
}
```

### Blockchain Types

```typescript
import { isEvmAddress, isSolanaAddress, formatWalletAddress, ChainType } from '@sudobility/types';

isEvmAddress('0x742d35Cc6634C0532925a3b8D2C36B7f12345678');  // true
isSolanaAddress('9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM');  // true
formatWalletAddress('0x742d35Cc6634C0532925a3b8D2C36B7f12345678');  // "0x742d...5678"
```

### Enums

Key enums: `AuthStatus`, `Chain` (60+ chains), `ChainType`, `ConnectionState`, `Theme`, `EmailAction`, `RequestStatus`, `WalletType`, `EntityType`, `EntityRole`, and more.

### Import Paths

```typescript
import { ... } from '@sudobility/types';        // Full library
import { ... } from '@sudobility/types/api';     // Indexer response types
import { ... } from '@sudobility/types/enums';   // Business enums only
```

## Development

```bash
bun install
bun run build          # Build dual ESM + CJS output
bun run dev            # Watch mode
bun test               # Run tests (Vitest)
bun run typecheck      # TypeScript check
bun run lint           # ESLint (flat config)
bun run format         # Prettier
bun run verify         # Full pipeline: typecheck + lint + test + build
```

## Key Exports

- **Types**: `Optional<T>`, `Result<T,E>`, `ValidationResult<T>`, `BaseResponse<T>`, `PaginatedResponse<T>`, `UnifiedError`
- **Enums**: `AuthStatus`, `Chain`, `ChainType`, `ConnectionState`, `Theme`, `EmailAction`, `WalletType`, `EntityType`, `EntityRole`, and more
- **Validators**: `isEvmAddress`, `isSolanaAddress`, `isENSName`, `isSNSName`, `Web3UsernameValidator`, `validateAddress`, `validateAmount`, type guards
- **Formatters**: `formatWalletAddress`, `formatUSDC`, `formatEmailDate`, `formatRelativeTime`, `formatBytes`, `truncate`, `capitalize`, and more
- **Async Helpers**: `safeAsync`, `withLoadingState`, `safeParallel`, `withTimeout`, `withCache`, `debounceAsync`
- **Infrastructure**: `NetworkClient`, `AnalyticsService`, `UINavigationService`

## License

BUSL-1.1

---
_Source: https://npm.io/package/@sudobility/types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
