npm package: @lendliq/tokens
Description: Token lists and logos for LendLiq supported chains
Author: LendLiq Team
Latest version: 1.0.3

# @lendliq/tokens

Token lists and logos for LendLiq supported chains.

## Installation

```bash
npm install @lendliq/tokens @lendliq/sdk
# or
yarn add @lendliq/tokens @lendliq/sdk
# or
pnpm add @lendliq/tokens @lendliq/sdk
```

## Usage

```typescript
import {
  BSC_MAINNET,
  BSC_MAINNET_TOKENS,
  BSC_MAINNET_TOKEN_INFOS,
  ChainId,
  getChainTokenList,
  findTokenBySymbol,
} from "@lendliq/tokens";

// Get all tokens for BSC Mainnet
const tokens = BSC_MAINNET.tokens;
console.log(`${tokens.length} tokens available`);

// Get specific token instance
const wbnb = BSC_MAINNET_TOKENS.WBNB;
const usdt = BSC_MAINNET_TOKENS.USDT;

// Get token info with logo
const wbnbInfo = BSC_MAINNET_TOKEN_INFOS.WBNB;
console.log(wbnbInfo.logo);        // "logos/bnb.svg"
console.log(wbnbInfo.coingeckoId); // "binancecoin"

// Get stablecoins
const stables = BSC_MAINNET.stablecoins;
// [USDT, USDC, DAI]

// Get common base tokens (for routing)
const bases = BSC_MAINNET.commonBases;
// [WBNB, USDT, USDC, BTCB, ETH]

// Find token by symbol
const eth = findTokenBySymbol(ChainId.BSC_MAINNET, "ETH");

// Get chain config by ID
const chain = getChainTokenList(56);
```

## Supported Chains

| Chain | Chain ID | Status |
|-------|----------|--------|
| BNB Smart Chain | 56 | ✅ Full support (25 tokens) |
| BNB Smart Chain Testnet | 97 | ✅ Full support (5 tokens) |

## BSC Mainnet Tokens

| Symbol | Name | Address |
|--------|------|---------|
| WBNB | Wrapped BNB | `0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c` |
| BTCB | Bitcoin BEP20 | `0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c` |
| ETH | Ethereum | `0x2170Ed0880ac9A755fd29B2688956BD959F933F8` |
| USDT | Tether USD | `0x55d398326f99059fF775485246999027B3197955` |
| USDC | USD Coin | `0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d` |
| DAI | Dai Stablecoin | `0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3` |
| LINK | Chainlink | `0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD` |
| XRP | XRP | `0x1D2F0da169ceB9fC7B3144628dB156f3F6c60dBE` |
| DOGE | Dogecoin | `0xbA2aE424d960c26247Dd6c32edC70B295c744C43` |
| SOL | Solana | `0x570A5D26f7765Ecb712C0924E4De545B89fD43dF` |
| CAKE | PancakeSwap | `0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82` |
| UNI | Uniswap | `0xBf5140A22578168FD562DCcF235E5D43A02ce9B1` |
| PEPE | Pepe | `0x25d887Ce7a35172C62FeBFD67a1856F20FaEbB00` |
| AVAX | Avalanche | `0x1CE0c2827e2eF14D5C4f29a091d735A204794041` |
| NEAR | NEAR Protocol | `0x1Fa4a73a3F0133f0025378af00236f3aBDEE5D63` |
| ASTR | Astar | `0x566878D1f8af85460E31Da62248B5cDc1BbAF73f` |
| FET | Fetch.ai | `0x031b41e504677879370e9DBcF937283A8691Fa7f` |
| SHIB | Shiba Inu | `0x2859e4544C4bB03966803b044A93563Bd2D0DD4D` |
| DOT | Polkadot | `0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402` |
| AAVE | Aave | `0xfb6115445Bff7b52FeB98650C87f44907E58f802` |
| TON | Toncoin | `0x76A797A59Ba2C17726896976B7B3747BfD1d220f` |
| AXS | Axie Infinity | `0x715D400F88C167884bbCc41C5FeA407ed4D2f8A0` |
| XLM | Stellar | `0x43C934A845205F0b514417d757d7235B8f53f1B9` |
| FIL | Filecoin | `0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153` |
| ARB | Arbitrum | `0xa050FFb3eEb8200eEB7F61ce34FF644420FD3522` |

## BSC Testnet Tokens

| Symbol | Name | Address |
|--------|------|---------|
| WBNB | Wrapped BNB | `0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd` |
| USDT | Tether USD | `0xa9ACB4beE94e99D7507f60173Aad846fAE0b49e1` |
| USDC | USD Coin | `0x3F91C8e8B1cFd05c908AEE8A76262ec3Df61C4D4` |
| ETH | Ethereum | `0xC6978Ec5A8f7292a8D36F3505f055A2d19E1B540` |
| BTCB | Bitcoin BEP20 | `0x82C8796412EaE4dBEB6Df318f3841706e6b98Ed7` |

## Using with @lendliq/router

```typescript
import { PathFinder } from "@lendliq/router";
import { BSC_MAINNET } from "@lendliq/tokens";

// Use commonBases for routing
const pathFinder = await PathFinder.create({
  chainId: 56,
  client,
  v3Factory: "0x...",
  tokens: BSC_MAINNET.commonBases.map(t => t.token),
});
```

## Logos

SVG logos are included in the package under `dist/logos/`. You can access them via:

```typescript
import { BSC_MAINNET_TOKEN_INFOS, getLogoUrl } from "@lendliq/tokens";

// Relative path
const logo = BSC_MAINNET_TOKEN_INFOS.WBNB.logo;
// "logos/bnb.svg"

// With CDN base URL
const logoUrl = getLogoUrl(BSC_MAINNET_TOKEN_INFOS.WBNB, "https://cdn.example.com");
// "https://cdn.example.com/logos/bnb.svg"
```

## Types

```typescript
interface TokenInfo {
  token: Token;           // @lendliq/sdk Token instance
  name: string;           // Full name
  logo: string;           // Logo path
  coingeckoId?: string;   // For price fetching
  isStable?: boolean;     // Is stablecoin
  isWrappedNative?: boolean; // Is wrapped native (e.g., WBNB)
}

interface ChainTokenList {
  chainId: number;
  chainName: string;
  native: { name, symbol, decimals, logo };
  wrappedNative: TokenInfo;
  tokens: TokenInfo[];
  stablecoins: TokenInfo[];
  commonBases: TokenInfo[];
}
```

## License

MIT