@qidao/sdk 5.3.32-beta.5 → 5.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.modern.mjs.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/src/constants.d.ts +12 -2
- package/dist/src/vaultInfo.d.ts +130 -2
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -1 +1,59 @@
|
|
|
1
|
-
# QiDao SDK
|
|
1
|
+
# QiDao SDK
|
|
2
|
+
|
|
3
|
+
An SDK for building applications on top of QiDao Protocol — the protocol behind MAI, a decentralized stablecoin backed by collateralized debt positions (CDPs).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @qidao/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- **Multi-chain support** — Ethereum, Polygon, Arbitrum, Base, Linea, Scroll, Optimism, Fantom, Avalanche, and 20+ other networks
|
|
14
|
+
- **Vault information** — Access vault addresses, collateral types, and parameters across all supported chains
|
|
15
|
+
- **Typed contracts** — TypeChain-generated contract bindings for ethers.js v5
|
|
16
|
+
- **Token utilities** — Token entities with decimal handling, currency abstractions, and fraction math
|
|
17
|
+
- **Zapper addresses** — Pre-configured zapper contracts for streamlined vault interactions
|
|
18
|
+
- **PSM support** — Peg Stability Module addresses and configurations
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { ChainId, VAULT_INFO, Token } from '@qidao/sdk'
|
|
24
|
+
|
|
25
|
+
// Get vault info for a specific chain
|
|
26
|
+
const polygonVaults = VAULT_INFO[ChainId.MATIC]
|
|
27
|
+
|
|
28
|
+
// Work with tokens
|
|
29
|
+
const token = new Token(ChainId.MATIC, '0x...', 18, 'MAI', 'Mai Stablecoin')
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Supported Networks
|
|
33
|
+
|
|
34
|
+
| Network | Chain ID |
|
|
35
|
+
|---------|----------|
|
|
36
|
+
| Ethereum | 1 |
|
|
37
|
+
| Polygon | 137 |
|
|
38
|
+
| Arbitrum | 42161 |
|
|
39
|
+
| Optimism | 10 |
|
|
40
|
+
| Base | 8453 |
|
|
41
|
+
| Linea | 59144 |
|
|
42
|
+
| Scroll | 534352 |
|
|
43
|
+
| Fantom | 250 |
|
|
44
|
+
| Avalanche | 43114 |
|
|
45
|
+
| Gnosis | 100 |
|
|
46
|
+
|
|
47
|
+
...and many more. See `ChainId` enum for the full list.
|
|
48
|
+
|
|
49
|
+
## Peer Dependencies
|
|
50
|
+
|
|
51
|
+
This SDK requires ethers.js v5:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install ethers@5.7.0 @ethersproject/address @ethersproject/contracts @ethersproject/providers
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|