open-index/open-npm huggingface dataset:
npm package: @stabilitydao/stability
Description: Stability DAO Library
Author: stabilitydao
Latest version: 0.61.3

# 📦 Stability DAO Library

![GitHub package.json version](https://img.shields.io/github/package-json/v/stabilitydao/stability/main)
![GitHub package.json version](https://img.shields.io/github/package-json/v/stabilitydao/stability/dev)
![NPM Version](https://img.shields.io/npm/v/%40stabilitydao%2Fstability?label=NPM%20version)
![GitHub Tag](https://img.shields.io/github/v/tag/stabilitydao/stability)

![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/stabilitydao/stability?label=code%20size)
![npm bundle size](https://img.shields.io/bundlephobia/min/%40stabilitydao%2Fstability?label=NPM%20bundle%20size)
![NPM Unpacked Size](https://img.shields.io/npm/unpacked-size/%40stabilitydao%2Fstability?label=NPM%20unpacked%20size)

[![codecov](https://codecov.io/github/stabilitydao/stability/graph/badge.svg?token=V0JV1WOGMM)](https://codecov.io/github/stabilitydao/stability)

This is library for integrating Stability DAO into Node.js applications.

## 🔌 Usage

Add this package to your project:

```shell
yarn add @stabilitydao/stability
```

and use it

```javascript
import { strategies } from "@stabilitydao/stability";
console.log(`Strategies: ${Object.keys(strategies).join(", ")}`);
```

## 👷 Develop

### How to

```shell
yarn overview
yarn test
yarn coverage
yarn prettier . --write
```

### Commit and PR prefix

- 📜 DeFi Strategies
- ⛓️ Chains
- 🏦 Lending
- 📦 New version
- 📚 Knowledge (🪙 assets, 🌐 protocols, ⛓️ chains)
- 🔨 Types, refactor, formatter
- ♻️ Update data (DAOs, strats, integrations, etc)
- 🏛️ DAO
- 🧑‍🎓 Docs
- ✨ Epic
- 🤖 Agents
- 📡 API
- 🧺 Products
- 🎇 Content generator
npm package: @stabilityprotocol/config
Description: The Config Package contains essential configurations for different blockchain networks within the Stability ecosystem. It's designed to provide a clean, dependency-free set of data that can be easily imported and utilized across various parts of your appl
Latest version: 1.4.0


# Config

The Config Package contains essential configurations for different blockchain networks within the Stability ecosystem. It's designed to provide a clean, dependency-free set of data that can be easily imported and utilized across various parts of your application when interfacing with blockchain operations.

#### Key Components:

- **`Blockchains` Enum**: This enumeration defines the available blockchain networks within the Stability ecosystem, such as the Stability Testnet and the Global Trust Network (GTN). Each network is represented as an enum member, providing a clear and type-safe way of referencing these networks throughout your code.

- **`networks` Object**: This is the core of the file, containing detailed configurations for each blockchain network defined in the `Blockchains` enum. Each network's configuration includes:
  - `id`: The chainID for the network. 
  - `name`: The human-readable name of the network.
  - `nativeCurrency`: Information about the network's native currency, including its name, symbol, and decimal precision. Stability-utilizing networks eschew native cryptocurrencies, maintaining these values solely for EVM compatibility.
  - `rpcUrls`: RPC URLs for accessing the network. It includes both default and public endpoints.
  - `blockExplorers`: URLs to the network's block explorer websites, providing a way to view transactions and blocks on the network.
  - `contracts`: Addresses and other relevant information about smart contracts deployed on the network, such as the Multicall3 contract.
  - `logoUri`: The URI to a logo representing the network, useful for UI purposes.

#### Usage:

The `index.ts` configurations can be imported into various parts of your application, allowing you to use these settings independently of other dependencies. This modularity enhances your codebase's maintainability and scalability.

For instance, when your application components need to interact with these networks via the `viem` library, these configurations facilitate the dynamic establishment of network connections, clients, and other blockchain-centric operations.

For those seeking a pre-configured solution that incorporates `viem` and `ethers`, the Stability Team offers a ready-to-use `provider` package. This `provider` package, in turn, depends on the `config` package for its underlying configurations.

## Installation

To install the package, run the following command in your project directory:

```bash
npm i @stabilityprotocol/config
```

## License

This library is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
npm package: @stabilityprotocol/provider
Description: The Stability Provider Package offers developers a convenient way to integrate with the Stability Testnet and the Global Trust Network (GTN) using the `ethers.js` and `viem` library. This provider simplifies the process of creating `ethers.js` providers a
Latest version: 1.4.0


# Provider

The Stability Provider Package offers developers a convenient way to integrate with the Stability Testnet and the Global Trust Network (GTN) using the `ethers.js` and `viem` library. This provider simplifies the process of creating `ethers.js` providers and `viem` configurations by automatically configuring them with the correct network settings.

For more information on Stability, an open-source blockchain technology without cryptocurrency dependencies, please visit the [Stability Protocol](https://stabilityprotocol.com/).

## Prerequisites

- Ethers.js and/or Viem
- Node.js
- An API Key from the [Stability Protocol](https://portal.stabilityprotocol.com/), available for free.

## Installation

To install the package, run the following command in your project directory:

```bash
npm i @stabilityprotocol/provider
```

## Usage

### Ethers.js

Here is a quick example using TypeScript and ts-node to get you started. In this example, we are connecting to the Global Trust Network (GTN).

```ts
import { StabilityGtnRpcProviderEthers } from "@stabilityprotocol/provider";

const gtnProvider = new StabilityGtnRpcProviderEthers("your_api_key"); // Sign up to get an API key at https://portal.stabilityprotocol.com

async function printCurrentBlockNumber(provider: StabilityGtnRpcProviderEthers) {
  const blockNumber = await provider.getBlockNumber();
  console.log(`Current Block Number: ${blockNumber}`);
}

printCurrentBlockNumber(gtnProvider);
```

### Viem

Below is a quick example using TypeScript and ts-node to get you started. In this example, we are connecting to the Global Trust Network.

```ts
import { createStabilityGtnClientViem } from "@stabilityprotocol/provider";

const YOUR_API_KEY = "134...."; // Sign up to get an API key at https://portal.stabilityprotocol.com

const client = createStabilityGtnClientViem(YOUR_API_KEY);

async function printCurrentBlockNumber() {
  const blockNumber = await client.getBlockNumber();
  console.log(`Current Block Number: ${blockNumber}`);
}

printCurrentBlockNumber();

## License

This library is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.