@qidao/sdk
v5.3.37
Published
π An SDK for building applications on top of QiDao Protocol.
Downloads
130
Maintainers
Readme
QiDao SDK
An SDK for building applications on top of QiDao Protocol β the protocol behind MAI, a decentralized stablecoin backed by collateralized debt positions (CDPs).
Installation
npm install @qidao/sdkFeatures
- Multi-chain support β Ethereum, Polygon, Arbitrum, Base, Linea, Scroll, Optimism, Fantom, Avalanche, and 20+ other networks
- Vault information β Access vault addresses, collateral types, and parameters across all supported chains
- Typed contracts β TypeChain-generated contract bindings for ethers.js v5
- Token utilities β Token entities with decimal handling, currency abstractions, and fraction math
- Zapper addresses β Pre-configured zapper contracts for streamlined vault interactions
- PSM support β Peg Stability Module addresses and configurations
Usage
import { ChainId, VAULT_INFO, Token } from '@qidao/sdk'
// Get vault info for a specific chain
const polygonVaults = VAULT_INFO[ChainId.MATIC]
// Work with tokens
const token = new Token(ChainId.MATIC, '0x...', 18, 'MAI', 'Mai Stablecoin')Supported Networks
| Network | Chain ID | |---------|----------| | Ethereum | 1 | | Polygon | 137 | | Arbitrum | 42161 | | Optimism | 10 | | Base | 8453 | | Linea | 59144 | | Scroll | 534352 | | Fantom | 250 | | Avalanche | 43114 | | Gnosis | 100 |
...and many more. See ChainId enum for the full list.
Peer Dependencies
This SDK requires ethers.js v5:
npm install [email protected] @ethersproject/address @ethersproject/contracts @ethersproject/providersLicense
MIT
