npm package: @fuul/protocol-abis
Description: TypeScript package for Fuul Protocol ABIs and TypeChain types.
Author: Fuul
Latest version: 4.1.0

# @fuul/protocol-abis

TypeScript package for Fuul Protocol ABIs and TypeChain types.

Supports both Protocol v1 and v2, with modular imports for each version.

## Installation

```bash
npm install @fuul/protocol-abis ethers@^6
```

## Usage

### Default Import (v1 - Backward Compatible)

The root import exports v1 for backward compatibility with existing code:

```typescript
import { FuulFactoryAbi, FuulManagerAbi, FuulProjectAbi } from '@fuul/protocol-abis'
import { FuulFactoryFactory } from '@fuul/protocol-abis'

// Use with wagmi/viem
const { write } = useContractWrite({
  address: '0x...',
  abi: FuulProjectAbi,
  functionName: 'depositFungibleToken',
})

// Use with ethers
const factory = FuulFactoryFactory.connect(address, signer)
```

### Protocol v1 (Explicit)

```typescript
import { FuulFactoryAbi, FuulFactoryFactory } from '@fuul/protocol-abis/v1'
// or
import { FuulFactoryAbi, FuulFactoryFactory } from '@fuul/protocol-abis/evm/v1'
```

### Protocol v2

```typescript
import {
  FuulFactoryAbi,
  FuulManagerAbi,
  FuulProjectAbi,
  IFuulKYCValidatorAbi
} from '@fuul/protocol-abis/v2'
// or
import { FuulFactoryAbi } from '@fuul/protocol-abis/evm/v2'
```

## Available Exports

### v1 (`@fuul/protocol-abis` or `@fuul/protocol-abis/v1`)

| Export | Description |
|--------|-------------|
| `FuulFactoryAbi` | Factory contract ABI |
| `FuulManagerAbi` | Manager contract ABI |
| `FuulProjectAbi` | Project contract ABI |
| `FuulFactoryTypes` | TypeChain types for Factory |
| `FuulManagerTypes` | TypeChain types for Manager |
| `FuulProjectTypes` | TypeChain types for Project |
| `FuulFactoryFactory` | ethers Factory class |
| `FuulManagerFactory` | ethers Factory class |
| `FuulProjectFactory` | ethers Factory class |

### v2 (`@fuul/protocol-abis/v2`)

**ABIs:**
| Export | Description |
|--------|-------------|
| `FuulFactoryAbi` | Factory contract ABI |
| `FuulManagerAbi` | Manager contract ABI |
| `FuulProjectAbi` | Project contract ABI |
| `IFuulFactoryAbi` | Factory interface ABI |
| `IFuulManagerAbi` | Manager interface ABI |
| `IFuulProjectAbi` | Project interface ABI |
| `IFuulKYCValidatorAbi` | KYC Validator interface ABI |
| `MockFuulKYCValidatorAbi` | Mock KYC Validator ABI |

**Types & Factories:**
| Export | Description |
|--------|-------------|
| `FuulFactoryTypes`, `FuulFactoryFactory` | Factory types & factory |
| `FuulManagerTypes`, `FuulManagerFactory` | Manager types & factory |
| `FuulProjectTypes`, `FuulProjectFactory` | Project types & factory |
| `IFuulFactoryTypes`, `IFuulFactoryFactory` | Factory interface types & factory |
| `IFuulManagerTypes`, `IFuulManagerFactory` | Manager interface types & factory |
| `IFuulProjectTypes`, `IFuulProjectFactory` | Project interface types & factory |
| `IFuulKYCValidatorTypes`, `IFuulKYCValidatorFactory` | KYC Validator types & factory |
| `MockFuulKYCValidatorTypes`, `MockFuulKYCValidatorFactory` | Mock KYC Validator types & factory |

## Requirements

- Node.js 16+
- `ethers@^6.6.0` (peer dependency, only needed for v1 TypeChain factories)

## Development

```bash
# Install dependencies
npm install

# Build the package
npm run build

# Run linting
npm run lint
```