A simple TypeScript library that provides direct access to multiple protocols and standards deployed on various blockchain networks with support for smart contracts.
- 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.
You can install the DeFiData
library via npm:
npm install defidata
The DeFiData
library exports the following classes representind multiple protocols and standards:
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.
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.
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.
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...
For detailed documentation, including all available methods and their usage, please refer to the documentation.
These are the currently supported networks:
Network Name | Network ID |
---|---|
Ethereum | 1 |
BNB Smart Chain | 56 |
- https://docs.pancakeswap.finance/developers/smart-contracts/pancakeswap-exchange/v2-contracts
- https://docs.sushi.com/docs/Products/Classic%20AMM/Deployment%20Addresses
- https://apeswap.gitbook.io/apeswap-finance/where-dev/smart-contracts
- https://github.com/indexed-finance/multicall
- https://destiner.io/blog/post/deployless-multicall/
Contributions are welcome! If you have any bug reports, feature requests, or suggestions, please open an issue on the GitHub repository.
This project is licensed under the MIT License (including all dependencies).