diff --git a/README.md b/README.md index 1db0eaf..20d0903 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,57 @@ This is library for integrating Stability Platform into Node.js applications. ## 🔌 Usage -Add npm package to your project: +Add npm package to your js/ts project: ```shell 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. + +```typescript +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 + +```typescript +type Strategy = { + id: string + shortId: StrategyShortId + state: StrategyState + contractGithubId: number + color: string + bgColor: string +} +``` + +#### Enums + +* `const enum StrategyShortId` +* `enum StrategyState` + +#### 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. @@ -51,7 +96,7 @@ type Deployment = { * `deployments: {[chainId:string]:Deployment}` -### ⛓️ Networks +### ⛓️ Chains Blockchains known to the platform and their integration statuses. @@ -79,48 +124,16 @@ type Network = { * `getSupportedNetworkIds(): NetworkId[]` * `getNetworksTotals(): {[status in NetworkStatus]: number}` -### 💲 Strategies - -Comprehensive information about platform strategies for managing DeFi assets. Includes developed strategies and those currently in development or awaiting development. - -#### Types - -```typescript -type Strategy = { - id: string - shortId: StrategyShortId - state: StrategyState - contractGithubId: number - color: string - bgColor: string -} -``` - -#### Enums - -* `const enum StrategyShortId` -* `enum StrategyState` - -#### Constants - -* `strategies: {[shortId in StrategyShortId]:Strategy}` -* `strategyStateDescription: {[state in StrategyState]: string}` - -#### Methods - -* `getMerklStrategies()` -* `getStrategyShortId(id: string): StrategyShortId|undefined` -* `getStrategiesTotals(): {[state in StrategyState]: number}` - ### 🌐 Integrations -DeFi organizations, protocols, their integration statuses, usage and other information. +DeFi organizations, protocols, their integration statuses, usage and other information. Each organization has link to image in [stabilitydao/.github](https://github.com/stabilitydao/.github) repo [`assets/` folder](https://github.com/stabilitydao/.github/tree/main/assets). #### Types ```typescript -type DeFiOrganization = { +export type DeFiOrganization = { name: string + img: string website: string protocols: { [protocolId: string]: DeFiProtocol } defiLlama: string @@ -189,28 +202,6 @@ type Asset = { import {tokenlist} from '@stabilitydao/stability' ``` -### 📒 API types - -```typescript -export interface ApiMainReply { - title: string; - network: StabilityNetwork; - platforms: Platforms; - vaults: Vaults; - underlyings: Underlyings; - assetPrices: AssetPrices; - error?: string; -} -``` - -### 🌱 Seed nodes - -List of Stability Network seed nodes. - -```typescript -import {seeds} from '@stabilitydao/stability' -``` - ## 👷 Develop ```shell diff --git a/package.json b/package.json index 41f0ace..d3ba9af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stabilitydao/stability", - "version": "0.12.0", + "version": "0.12.1", "description": "Stability Integration Library", "main": "out/index.js", "types": "out/index.d.ts",