open-index/open-npm huggingface dataset:
npm package: @kondor-ai/address-book
Description: A package that provides chain configurations, contract addresses, and RPC URLs for various blockchain networks.
Latest version: 0.0.5

# @kondor-ai/address-book

A package that provides chain configurations, contract addresses, and RPC URLs for various blockchain networks.

## Overview

This package extends the chain configurations from [viem](https://viem.sh/) with additional contract addresses and RPC URLs. It supports the following networks:

- Arbitrum
- Avalanche
- Base
- Ethereum
- Optimism
- Polygon

Each chain configuration includes:
- Standard chain properties from viem
- Custom RPC URLs including DRPC endpoints
- Contract addresses for common protocols like Aave V3 Pool, USDC, and USDT

## Installation

```bash
npm install @kondor-ai/address-book
# or
yarn add @kondor-ai/address-book
# or
pnpm add @kondor-ai/address-book
```

## Usage

```typescript
import { arbitrum, ethereum, getPublicRpcUrl, getAuthenticatedRpcUrl } from '@kondor-ai/address-book';

// Access chain configurations
console.log(arbitrum.id); // 42161
console.log(ethereum.contracts.usdc.address); // 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

// Get RPC URLs
const publicRpcUrl = getPublicRpcUrl(arbitrum);
const authenticatedRpcUrl = getAuthenticatedRpcUrl(arbitrum);
```

## Environment Variables

This package requires the following environment variables to be set:

```bash
# For Block Explorers Authenticated API
ARBISCAN_API_KEY: ${ARBISCAN_API_KEY}
BASESCAN_API_KEY: ${BASESCAN_API_KEY}
ETHERSCAN_API_KEY: ${ETHERSCAN_API_KEY}
OPTIMISM_EXPLORER_API_KEY: ${OPTIMISM_EXPLORER_API_KEY}
POLYGONSCAN_API_KEY: ${POLYGONSCAN_API_KEY}
SNOWTRACE_API_KEY: ${SNOWTRACE_API_KEY}

# For Authenticated RPC URL
DRPC_API_KEY={DRPC_API_KEY}
```

## API

### Chain Configurations

Each chain configuration extends the viem Chain type with additional properties:

- `rpcUrls`: Includes both default and DRPC endpoints
- `contracts`: Contains addresses for various contracts on the chain

### Utility Functions

- `getPublicRpcUrl(chain)`: Returns the default public RPC URL for a chain
- `getAuthenticatedRpcUrl(chain)`: Returns the authenticated DRPC URL for a chain

## License

MIT