@stabilitydao/stability v0.37.1
📦 Stability Integration Library
This is library for integrating Stability Platform into Node.js applications.
🔌 Usage
Add npm package to your js/ts project:
yarn add @stabilitydao/stability
📡 API
Up-to-date and pre-processed data for integrations with Stability can be obtained in a single API response, which is always available at any working node of the private p2p network Stability. This library contains addresses of seed nodes.
import axios from "axios";
import { type ApiMainReply, seeds } from "@stabilitydao/stability";
const response = await axios.get(seeds[0]);
const apiReply = response.data as ApiMainReply;
💲 Strategies
Comprehensive information about platform strategies for managing DeFi assets. Includes developed strategies and those currently in development or awaiting development.
Types
Strategy
Enums
const enum StrategyShortId
enum StrategyState
enum BaseStrategy
Constants
strategies: {[shortId in StrategyShortId]:Strategy}
strategyStateDescription: {[state in StrategyState]: string}
baseStrategyContracts: {[baseStrategy in BaseStrategy]: string}
Methods
getMerklStrategies()
getALMStrategies()
getStrategyShortId(id: string): StrategyShortId|undefined
getStrategiesTotals(): {[state in StrategyState]: number}
getStrategyProtocols(shortId: StrategyShortId): DeFiProtocol[]
getChainStrategies(chainName: ChainName): Strategy[]
#️⃣ Deployments
Core contracts deployment addresses and subgraph API endpoints.
import { deployments } from "@stabilitydao/stability";
console.log("Platform address on Polygon", deployments["137"].core.platform);
Types
Deployment
Constants
deployments: {[chainId:string]:Deployment}
⛓️ Chains
Blockchains known to the platform and their integration statuses. Each chain has link to image
in stabilitydao/.github
repo chains/
folder.
Types
Chain
ChainStatusInfo
Enums
const enum ChainName
const enum ChainStatus
Constants
chains: { [chainId: string]: Chain }
chainStatusInfo: {[status in ChainStatus]: ChainStatusInfo}
Methods
getSupportedChainNames(): ChainName[]
getChainsTotals(): {[status in ChainStatus]: number}
getChainByName(chainName: ChainName): Chain
🌐 Integrations
DeFi organizations, protocols, their integration statuses, usage and other information. Each organization has link to
image in stabilitydao/.github
repo assets/
folder.
Types
DeFiOrganization
DeFiProtocol
Enums
const enum IntegrationStatus
enum DefiCategory
Constants
integrations: { [org: string]: DeFiOrganization }
Methods
getIntegrationStatus(p: DeFiProtocol): IntegrationStatus
getChainProtocols(chainId: string): DeFiProtocol[]
📌 Addresses
Third-party addresses.
import { almFactories } from "@stabilitydao/stability";
🪙 Assets
Asset addresses, description, website, color.
Types
Asset
TokenData
Constants
assets: Asset[]
sonicWhitelistedAssets: { [addrLc: 0x${string}]: number; }
Methods
getAsset(chainId: string, tokenAddress: 0x${string}): Asset|undefined
getTokenData(address: 0x${string}): TokenData|undefined
📜 Tokenlist
import { tokenlist } from "@stabilitydao/stability";
🌉 Bridges
Types
Bridge
Enums
const enum BridgeName
Constants
bridges: Bridge[]
Methods
getChainBridges(chainName: ChainName): Bridge[]
🏆 Contests
Types
YieldContest
Reward
Constants
contests: { [contestId: string]: YieldContest }
Enums
enum RewardType
Methods
getContestReward = (contest: YieldContest, rewardType: RewardType): Reward | undefined
getContestGemsReward = (contest: YieldContest): Reward | undefined
Oracles
Types
AssetOracle
Constants
assetOracles: {[chainId: string]: { [assetAddress: 0x${string}]: AssetOracle }; }
vaultOracles: {[chainId: string]: { [vaultAddress: 0x${string}]: 0x${string} }; }
🚦 Risk
Types
IlDetails
Methods
getIL = (strategyShortId: StrategyShortId, specific: string, assets: 0x${string}[]): IlDetails | undefined
👷 Develop
How to
yarn overview
yarn overview-full
yarn draw-chains
yarn draw-integrations
yarn contests-maker
yarn test
yarn coverage
yarn prettier . --check
yarn prettier . --write
Branch structure
Branch | Description |
---|---|
main | Production. Accepts only PRs from dev. |
dev | Accumulator of changes for the release |
developer-dev | Developer's changes |
Commit/PR prefix
Changes | Prefix |
---|---|
Collector | 📦 |
Strategies | 💲 |
Assets, tokenlist | 🪙 |
Sync state, etc | ♻️️ |
Content generators | 🎇 |
Bridge | 🌉 |
Risk | 🚦 |
Prettier | #️⃣ |
Docs | 📙 |
Adapters | 🔌 |
AI | 🤖 |
Chains | ⛓️ |
API | 📡 |
Contests | 🏆 |
2 months ago
2 months ago
4 months ago
4 months ago
4 months ago
6 months ago
6 months ago
8 months ago
9 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
1 month ago
6 months ago
1 month ago
6 months ago
3 months ago
3 months ago
3 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
8 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
2 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
8 months ago
8 months ago
6 months ago
2 months ago
2 months ago
4 months ago
6 months ago
7 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
6 months ago
6 months ago
6 months ago
7 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago