1.1.2 • Published 8 months ago

defidata v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

DeFiData

Description

A simple TypeScript library that provides direct access to multiple protocols and standards deployed on various blockchain networks with support for smart contracts.

Features

  • Supports multiple blockchains networks with support for smart contracts.
  • Export multiple classes that provide direct access to various protocols and standards.
  • Utilize the Multicall contract to execute multiple calls in a single transaction, optimizing network usage.

Installation

You can install the DeFiData library via npm:

npm install defidata

Exported Classes

The DeFiData library exports the following classes representind multiple protocols and standards:

Tokens

The Tokens class provides the methods for fetching the information of any token that comply with the ERC-20 standard. It allows you to:

  • Retrieve detailed information about multiple tokens by providing their addresses.
  • Retrieve the balances of multiple tokens for the given holders addresses.
  • Retrieve the allowances of multiple tokens for the given holders and spender addresses.

PinkLock

The PinkLock class provides methods for retrieving token timelocks associated with user addresses and token addresses from different versions of PinkLock's contracts. It allows you to:

  • Retrieve the timelocks associated with multiple user addresses.
  • Retrieve the timelocks associated with multiple token addresses.

UniCrypt

The UniCrypt class provides methods for retrieving tokens timelocks associated with user addresses and token addresses from different versions of UniCrypt's contracts. It allows you to:

  • Retrieve the timelocks associated with multiple user addresses.
  • Retrieve the timelocks associated with multiple token addresses.

Usage

Here's an example of how to use DeFiData library:

// Import the `DeFiData` library
import { DeFiData } from 'defidata';

// Create an instance of `DeFiData`
const defiData = new DeFiData();

// Wait for the library to be ready
await defiData.ready();

// Use the `DeFiData` library...

Documentation

For detailed documentation, including all available methods and their usage, please refer to the documentation.

Supported Networks

These are the currently supported networks:

Network NameNetwork ID
Ethereum1
BNB Smart Chain56

Interesting Links

Contributing

Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue on the GitHub repository.

License

This project is licensed under the MIT License (including all dependencies).

1.1.1

8 months ago

1.1.0

10 months ago

1.1.2

8 months ago

1.0.1

11 months ago

1.0.0

11 months ago