Skip to content

Latest commit

 

History

History
176 lines (104 loc) · 4.07 KB

README.md

File metadata and controls

176 lines (104 loc) · 4.07 KB

📦 Stability Integration Library

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.

Types

  • Strategy

Enums

  • const enum StrategyShortId
  • enum StrategyState
  • enum BaseStrategy

Constants

  • strategies: {[shortId in StrategyShortId]:Strategy}
  • strategyStateDescription: {[state in StrategyState]: string}

Methods

  • getMerklStrategies()
  • getStrategyShortId(id: string): StrategyShortId|undefined
  • getStrategiesTotals(): {[state in StrategyState]: number}

#️⃣ 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

Enums

  • const enum ChainName
  • const enum ChainStatus

Constants

  • chains: { [chainId: string]: Chain }

Methods

  • getSupportedChainNames(): ChainName[]
  • getChainsTotals(): {[status in ChainStatus]: number}

🌐 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

📌 Addresses

Third-party addresses.

import {almFactories} from '@stabilitydao/stability'

🪙 Assets

Asset addresses, description, website, color.

Types

  • Asset

Constants

  • assets: Asset[]

Methods

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

📜 Tokenlist

import {tokenlist} from '@stabilitydao/stability'

🌉 Bridges

Types

  • Bridge

Enums

  • const enum BridgeName

Constants

  • bridges: Bridge[]

Methods

  • getChainBridges(chainName: ChainName): Bridge[]

👷 Develop

yarn overview
yarn overview-full
yarn test
yarn coverage