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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@lido-sdk/constants

v3.3.1

Published

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

Downloads

1,668

Readme

⚠️DEPRECATION WARNING⚠️

This project is being slowly deprecated and may not receive further updates. Check out modern Lido SDK 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

Install

yarn add @lido-sdk/constants

Chains

Source

Chains enum

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

console.log(CHAINS.Mainnet, CHAINS.Holesky); // 1, 17000

Array of chains ids

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

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

getChainColor

Color getter by chain id

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

const goerliChainColor = getChainColor(CHAINS.Goerli);
console.log(goerliChainColor); // #3099f2

Tokens

Source

Lido tokens enum

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.

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

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

Aggregator

Source

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

getAggregatorAddress

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

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

WithdrawalQueue

WithdrawalQueue contract for LIDO protocol

getWithdrawalQueueAddress

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

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