1.21.1 • Published 1 year ago
@knine-sdk/constants v1.21.1
Constants
Constants for K9 Finance projects.
Install
yarn add @knine-sdk/constantsChains
Chains enum
import { CHAINS } from '@knine-sdk/constants';
console.log(CHAINS.Mainnet, CHAINS.Sepolia); // 1, 17000Array of chains ids
import { CHAINS_IDS } from '@knine-sdk/constants';
console.log(CHAINS_IDS); // [1, 3, 4, 5, 42]getChainColor
Color getter by chain id
import { CHAINS, getChainColor } from '@knine-sdk/constants';
const goerliChainColor = getChainColor(CHAINS.Goerli);
console.log(goerliChainColor); // #3099f2Tokens
Tokens enum
import { TOKENS } from '@knine-sdk/constants';
console.log(TOKENS.BONE); // STETH
console.log(TOKENS.KNBONE); // LDOgetTokenAddress
Getter for Knine token addresses. Returns a contract address or throws an error if the contract is not deployed in the chain.
import { CHAINS, TOKENS, getTokenAddress } from '@knine-sdk/constants';
const stethAddress = getTokenAddress(CHAINS.Mainnet, TOKENS.STETH);
console.log(stethAddress); // 0xae7ab96520de3a18e5e111b5eaab095312d7fe84Aggregator
EACAggregatorProxy https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
It’s used to get the ETH price
getAggregatorAddress
import { CHAINS, getAggregatorAddress } from '@knine-sdk/constants';
const aggregatorAddress = getAggregatorAddress(CHAINS.Mainnet);
console.log(aggregatorAddress); // 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419WithdrawalQueue
WithdrawalQueue contract for KNINE protocol
getWithdrawalQueueAddress
import { CHAINS, getWithdrawalQueueAddress } from '@knine-sdk/constants';
const withdrawalQueueAddress = getWithdrawalQueueAddress(CHAINS.Mainnet);
console.log(withdrawalQueueAddress); // 0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B11.21.1
1 year ago
1.21.0
1 year ago
1.20.0
1 year ago
1.19.0
2 years ago
1.18.0
2 years ago
1.17.0
2 years ago
1.16.0
2 years ago
1.15.0
2 years ago
1.14.0
2 years ago
1.13.1
2 years ago
1.13.0
2 years ago
1.12.1
2 years ago
1.12.0
2 years ago
1.11.0
2 years ago
1.10.0
2 years ago
1.9.0
2 years ago
1.8.0
2 years ago
1.7.0
2 years ago
1.6.0
2 years ago
1.5.0
2 years ago
1.4.0
2 years ago
1.3.0
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.0.0-semantic-release
2 years ago