# @lido-sdk/constants

> This project is being slowly deprecated and may not receive further updates. Check out [modern Lido SDK](https://github.com/lidofinance/lido-ethereum-sdk/pulls) to access latest functionality. It is actively maintained and is built for interacting with Li

Latest version **3.5.1** (published 2025-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lido-sdk/constants
pnpm add @lido-sdk/constants
yarn add @lido-sdk/constants
bun add @lido-sdk/constants
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.5.1 |
| Published | 2025-03-24 |
| First published | 2021-07-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Maintainers | lidofinance-group, lidofinance-ui |
| Keywords | lido, lido-sdk, lido-js-sdk, lidofinance |

## Links

- npm: https://www.npmjs.com/package/@lido-sdk/constants
- Repository: https://github.com/lidofinance/lido-js-sdk
- Issues: https://github.com/lidofinance/lido-js-sdk/issues
- npm.io page: https://npm.io/package/@lido-sdk/constants

## Dependencies (1)

- [tiny-invariant](https://npm.io/package/tiny-invariant.md) ^1.1.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 3.5.1 (latest) — 2025-03-24
- 3.5.0 — 2025-03-17
- 3.4.0 — 2025-03-17
- 3.3.1 — 2024-09-09
- 3.3.0 — 2024-04-02
- 3.2.1 — 2023-10-05
- 3.2.0 — 2023-10-03
- 3.1.0 — 2023-06-12
- 3.0.0 — 2023-05-03
- 2.0.0 — 2023-04-12
- 1.9.0 — 2023-03-10
- 1.8.1 — 2023-02-15
- 1.8.0 — 2023-02-13
- 1.7.0 — 2023-01-31
- 1.6.1 — 2022-12-21
- … 7 more at https://npm.io/package/@lido-sdk/constants/versions

## README

# ⚠️DEPRECATION WARNING⚠️

This project is being slowly deprecated and may not receive further updates.
Check out [modern Lido SDK](https://github.com/lidofinance/lido-ethereum-sdk/pulls) to access latest functionality. It is actively maintained and is built for interacting with Lido Protocol.

# Constants

Constants for Lido Finance projects.
Part of [Lido JS SDK](https://github.com/lidofinance/lido-js-sdk/#readme)

- [Install](#install)
- [Chains](#chains)
  - [Chains enum](#chains-enum)
  - [Array of chains ids](#array-of-chains-ids)
  - [getChainColor](#getchaincolor)
- [Tokens](#tokens)
  - [Lido tokens enum](#lido-tokens-enum)
  - [getTokenAddress](#gettokenaddress)
- [Aggregator](#aggregator)
  - [getAggregatorAddress](#getaggregatoraddress)
- [WithdrawalQueue](#withdrawalqueue)
  - [getWithdrawalQueueAddress](#getWithdrawalQueueAddress)

## Install

```bash
yarn add @lido-sdk/constants
```

## Chains

[Source](src/chains.ts)

### Chains enum

```ts
import { CHAINS } from '@lido-sdk/constants';

console.log(CHAINS.Mainnet, CHAINS.Hoodi); // 1, 560048
```

### Array of chains ids

```ts
import { CHAINS_IDS } from '@lido-sdk/constants';

console.log(CHAINS_IDS); // [1, 3, 4, 5, 42]
```

### getChainColor

Color getter by chain id

```ts
import { CHAINS, getChainColor } from '@lido-sdk/constants';

const hoodiChainColor = getChainColor(CHAINS.Hoodi);
console.log(hoodiChainColor); // #AA346A
```

## Tokens

[Source](src/tokens.ts)

### Lido tokens enum

```ts
import { TOKENS } from '@lido-sdk/constants';

console.log(TOKENS.WSTETH); // WSTETH
console.log(TOKENS.STETH); // STETH
console.log(TOKENS.LDO); // LDO
```

### getTokenAddress

Getter for Lido token addresses. Returns a contract address or throws an error if the contract is not deployed in the chain.

```ts
import { CHAINS, TOKENS, getTokenAddress } from '@lido-sdk/constants';

const stethAddress = getTokenAddress(CHAINS.Mainnet, TOKENS.STETH);
console.log(stethAddress); // 0xae7ab96520de3a18e5e111b5eaab095312d7fe84
```

## Aggregator

[Source](src/aggregator.ts)

EACAggregatorProxy https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419  
It’s used to get the ETH price

### getAggregatorAddress

```ts
import { CHAINS, getAggregatorAddress } from '@lido-sdk/constants';

const aggregatorAddress = getAggregatorAddress(CHAINS.Mainnet);
console.log(aggregatorAddress); // 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
```

## WithdrawalQueue

WithdrawalQueue contract for LIDO protocol

### getWithdrawalQueueAddress

```ts
import { CHAINS, getWithdrawalQueueAddress } from '@lido-sdk/constants';

const withdrawalQueueAddress = getWithdrawalQueueAddress(CHAINS.Mainnet);
console.log(withdrawalQueueAddress); // 0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1
```

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