Skip to content

Commit

Permalink
Merge pull request #17 from stabilitydao/dev
Browse files Browse the repository at this point in the history
0.12.1
  • Loading branch information
a17 authored Sep 16, 2024
2 parents 3f375df + 98def77 commit 9bde3c6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 60 deletions.
109 changes: 50 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -51,7 +96,7 @@ type Deployment = {
* `deployments: {[chainId:string]:Deployment}`
### ⛓️ Networks
### ⛓️ Chains
Blockchains known to the platform and their integration statuses.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 9bde3c6

Please sign in to comment.