This is library for integrating Stability Platform into Node.js applications.
Add npm package to your js/ts project:
yarn add @stabilitydao/stability
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;
Comprehensive information about platform strategies for managing DeFi assets. Includes developed strategies and those currently in development or awaiting development.
Strategy
const enum StrategyShortId
enum StrategyState
enum BaseStrategy
strategies: {[shortId in StrategyShortId]:Strategy}
strategyStateDescription: {[state in StrategyState]: string}
baseStrategyContracts: {[baseStrategy in BaseStrategy]: string}
getMerklStrategies()
getStrategyShortId(id: string): StrategyShortId|undefined
getStrategiesTotals(): {[state in StrategyState]: number}
getStrategyProtocols(shortId: StrategyShortId): DeFiProtocol[]
getChainStrategies(chainName: ChainName): Strategy[]
Core contracts deployment addresses and subgraph API endpoints.
import { deployments } from "@stabilitydao/stability";
console.log("Platform address on Polygon", deployments["137"].core.platform);
Deployment
deployments: {[chainId:string]:Deployment}
Blockchains known to the platform and their integration statuses. Each chain has link to image in stabilitydao/.github repo chains/
folder.
Chain
ChainStatusInfo
const enum ChainName
const enum ChainStatus
chains: { [chainId: string]: Chain }
chainStatusInfo: {[status in ChainStatus]: ChainStatusInfo}
getSupportedChainNames(): ChainName[]
getChainsTotals(): {[status in ChainStatus]: number}
getChainByName(chainName: ChainName): Chain
DeFi organizations, protocols, their integration statuses, usage and other information. Each organization has link to image in stabilitydao/.github repo assets/
folder.
DeFiOrganization
DeFiProtocol
const enum IntegrationStatus
enum DefiCategory
integrations: { [org: string]: DeFiOrganization }
getIntegrationStatus(p: DeFiProtocol): IntegrationStatus
getChainProtocols(chainId: string): DeFiProtocol[]
Third-party addresses.
import { almFactories } from "@stabilitydao/stability";
Asset addresses, description, website, color.
Asset
assets: Asset[]
getAsset(chainId: string, tokenAddress: 0x${string}): Asset|undefined
import { tokenlist } from "@stabilitydao/stability";
Bridge
const enum BridgeName
bridges: Bridge[]
getChainBridges(chainName: ChainName): Bridge[]
YieldContest
Reward
contests: { [contestId: string]: YieldContest }
enum RewardType
yarn overview
yarn overview-full
yarn draw-chains
yarn draw-integrations
yarn contests-maker
yarn test
yarn coverage
yarn prettier . --check
yarn prettier . --write