Skip to content

stabilitydao/stability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“¦ Stability Integration Library

GitHub package.json version GitHub package.json version NPM Version GitHub Tag

GitHub code size in bytes npm bundle size NPM Unpacked Size

codecov

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.

what is included

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()
  • 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);
what is included

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.

what is included

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.

what is included

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.

what is included

Types

  • Asset

Constants

  • assets: Asset[]

Methods

  • getAsset(chainId: string, tokenAddress: 0x${string}): Asset|undefined

πŸ“œ Tokenlist

import { tokenlist } from "@stabilitydao/stability";

πŸŒ‰ Bridges

what is included

Types

  • Bridge

Enums

  • const enum BridgeName

Constants

  • bridges: Bridge[]

Methods

  • getChainBridges(chainName: ChainName): Bridge[]

πŸ† Contests

what is included

Types

  • YieldContest
  • Reward

Constants

  • contests: { [contestId: string]: YieldContest }

Enums

  • enum RewardType

πŸ‘· Develop

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 Description
main Production. Accepts only PRs from dev.
dev Accumulator of changes for the release
developer-dev Developer's changes