liquid-sdk 1.5.6 → 1.5.9
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/AGENT_README.md +1 -1
- package/CHANGELOG.md +1 -1
- package/README.md +39 -39
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/skills/bid-in-auction.md +3 -3
- package/skills/deploy-token.md +2 -2
package/AGENT_README.md
CHANGED
|
@@ -519,7 +519,7 @@ When calling `deployToken`, all fields except `name` and `symbol` are optional.
|
|
|
519
519
|
| `tickLower` | `[-230400, -198600, -168600]` | 3-tranche Liquid default |
|
|
520
520
|
| `tickUpper` | `[-198600, -168600, -122600]` | 3-tranche Liquid default |
|
|
521
521
|
| `positionBps` | `[4000, 5000, 1000]` | 40% / 50% / 10% |
|
|
522
|
-
| `mevModule` | `ADDRESSES.SNIPER_AUCTION_V2` | 80%→40% over
|
|
522
|
+
| `mevModule` | `ADDRESSES.SNIPER_AUCTION_V2` | 80%→40% over 20s |
|
|
523
523
|
| `extensions` | `[]` | No extensions |
|
|
524
524
|
|
|
525
525
|
---
|
package/CHANGELOG.md
CHANGED
|
@@ -37,7 +37,7 @@ All notable changes to `liquid-sdk` will be documented in this file.
|
|
|
37
37
|
### Changed
|
|
38
38
|
- Default hook switched to `HOOK_STATIC_FEE_V2` with proper two-layer pool data encoding
|
|
39
39
|
- Default positions changed from single full-range to 3-tranche Liquid preset
|
|
40
|
-
- Default MEV module switched to `SNIPER_AUCTION_V2` with 80%→40% decay over
|
|
40
|
+
- Default MEV module switched to `SNIPER_AUCTION_V2` with 80%→40% decay over 20s
|
|
41
41
|
|
|
42
42
|
## [1.0.0] - 2025-02-15
|
|
43
43
|
|
package/README.md
CHANGED
|
@@ -2,13 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
TypeScript SDK for the Liquid Protocol token launcher on Base. Deploy tokens, manage pools, and claim fees using [viem](https://viem.sh).
|
|
4
4
|
|
|
5
|
+
## Agent Skills
|
|
6
|
+
|
|
7
|
+
The SDK ships with **agent skill files** — self-contained markdown guides that AI agents can load into their context to autonomously interact with Liquid Protocol on Base.
|
|
8
|
+
|
|
9
|
+
| Skill | File | What it teaches |
|
|
10
|
+
|-------|------|-----------------|
|
|
11
|
+
| **Deploy Token** | `skills/deploy-token.md` | Full deployment workflows — minimal deploy, dev buy, custom fees, custom positions, reward splits, validation rules |
|
|
12
|
+
| **Bid in Auction** | `skills/bid-in-auction.md` | MEV sniper auction — WETH handling, gas price encoding, block timing, automated sniper example |
|
|
13
|
+
| **Index Tokens** | `skills/index-tokens.md` | Token discovery — bulk queries, single lookup, pagination, real-time monitoring, data enrichment |
|
|
14
|
+
|
|
15
|
+
### Using Skills with Your Agent
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
# Python — load a skill into your agent's context
|
|
19
|
+
with open("node_modules/liquid-sdk/skills/deploy-token.md") as f:
|
|
20
|
+
agent.system_prompt += f.read()
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// TypeScript — read skill for an MCP server or agent framework
|
|
25
|
+
import { readFileSync } from "fs";
|
|
26
|
+
const skill = readFileSync("node_modules/liquid-sdk/skills/bid-in-auction.md", "utf-8");
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
For Claude Code, reference skills in your `CLAUDE.md`:
|
|
30
|
+
```
|
|
31
|
+
For token deployment, follow the instructions in node_modules/liquid-sdk/skills/deploy-token.md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Additional Agent Docs
|
|
35
|
+
|
|
36
|
+
| File | Purpose |
|
|
37
|
+
|------|---------|
|
|
38
|
+
| `AGENT_README.md` | Complete API reference with every method, type, and default (700+ lines) |
|
|
39
|
+
| `llms.txt` | Compact summary for LLM context windows |
|
|
40
|
+
| `CLAUDE.md` | Agent guide with architecture, defaults, and invariants |
|
|
41
|
+
|
|
5
42
|
## Installation
|
|
6
43
|
|
|
7
44
|
```bash
|
|
8
45
|
npm install liquid-sdk viem
|
|
9
46
|
```
|
|
10
47
|
|
|
11
|
-
> **Defaults**: Static 1% fee (both buy and sell), 5-position Liquid layout, Sniper Auction MEV (80%→40% over
|
|
48
|
+
> **Defaults**: Static 1% fee (both buy and sell), 5-position Liquid layout, Sniper Auction MEV (80%→40% over 20s, 5 rounds), tick spacing 200, starting tick -230400 (~10 ETH market cap). All fees converted to ETH before distribution.
|
|
12
49
|
|
|
13
50
|
### Default Liquidity Positions
|
|
14
51
|
|
|
@@ -163,7 +200,7 @@ console.log("Locker:", info.deployment.locker);
|
|
|
163
200
|
const rewards = await liquid.getTokenRewards(tokenAddress);
|
|
164
201
|
await liquid.collectRewards(tokenAddress);
|
|
165
202
|
|
|
166
|
-
// Fee claims
|
|
203
|
+
// Fee claims (all fees converted to ETH by default)
|
|
167
204
|
const claimable = await liquid.getFeesToClaim(ownerAddress, tokenAddress);
|
|
168
205
|
await liquid.claimFees(ownerAddress, tokenAddress);
|
|
169
206
|
```
|
|
@@ -176,43 +213,6 @@ const claimable = await liquid.getVaultClaimable(tokenAddress);
|
|
|
176
213
|
await liquid.claimVault(tokenAddress);
|
|
177
214
|
```
|
|
178
215
|
|
|
179
|
-
## Agent Skills
|
|
180
|
-
|
|
181
|
-
The SDK ships with **agent skill files** — self-contained markdown guides that AI agents can load into their context to autonomously use the SDK. Find them in `node_modules/liquid-sdk/skills/` after install.
|
|
182
|
-
|
|
183
|
-
| Skill | File | What it teaches |
|
|
184
|
-
|-------|------|-----------------|
|
|
185
|
-
| **Deploy Token** | `skills/deploy-token.md` | Full deployment workflows — minimal deploy, dev buy, custom fees, custom positions, reward splits, validation rules |
|
|
186
|
-
| **Bid in Auction** | `skills/bid-in-auction.md` | MEV sniper auction — WETH handling, gas price encoding, block timing, automated sniper example |
|
|
187
|
-
| **Index Tokens** | `skills/index-tokens.md` | Token discovery — bulk queries, single lookup, pagination, real-time monitoring, data enrichment |
|
|
188
|
-
|
|
189
|
-
### Using Skills with Your Agent
|
|
190
|
-
|
|
191
|
-
```python
|
|
192
|
-
# Python — load a skill into your agent's context
|
|
193
|
-
with open("node_modules/liquid-sdk/skills/deploy-token.md") as f:
|
|
194
|
-
agent.system_prompt += f.read()
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
```typescript
|
|
198
|
-
// TypeScript — read skill for an MCP server or agent framework
|
|
199
|
-
import { readFileSync } from "fs";
|
|
200
|
-
const skill = readFileSync("node_modules/liquid-sdk/skills/bid-in-auction.md", "utf-8");
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
For Claude Code, reference skills in your `CLAUDE.md`:
|
|
204
|
-
```
|
|
205
|
-
For token deployment, follow the instructions in node_modules/liquid-sdk/skills/deploy-token.md
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### Additional Agent Docs
|
|
209
|
-
|
|
210
|
-
| File | Purpose |
|
|
211
|
-
|------|---------|
|
|
212
|
-
| `AGENT_README.md` | Complete API reference with every method, type, and default (700+ lines) |
|
|
213
|
-
| `llms.txt` | Compact summary for LLM context windows |
|
|
214
|
-
| `CLAUDE.md` | Agent guide with architecture, defaults, and invariants |
|
|
215
|
-
|
|
216
216
|
## Constants & ABIs
|
|
217
217
|
|
|
218
218
|
All production addresses, fee parameters, and contract ABIs are exported:
|
package/dist/index.d.mts
CHANGED
|
@@ -89,7 +89,7 @@ interface DeployTokenParams {
|
|
|
89
89
|
lockerData?: Hex;
|
|
90
90
|
/** MEV module address. Defaults to SNIPER_AUCTION_V2 */
|
|
91
91
|
mevModule?: Address;
|
|
92
|
-
/** MEV module data. Defaults to 80%→40% decay over
|
|
92
|
+
/** MEV module data. Defaults to 80%→40% decay over 20s */
|
|
93
93
|
mevModuleData?: Hex;
|
|
94
94
|
/** Extension configs (vault, airdrop, etc.) */
|
|
95
95
|
extensions?: ExtensionConfig[];
|
|
@@ -430,7 +430,7 @@ declare const POOL_POSITIONS: {
|
|
|
430
430
|
* Liquid protocol defaults.
|
|
431
431
|
*
|
|
432
432
|
* - Hook: Static fee V2, 1% on both buys and sells
|
|
433
|
-
* - MEV: Sniper Auction V2 — 80% → 40% decaying over
|
|
433
|
+
* - MEV: Sniper Auction V2 — 80% → 40% decaying over 20 seconds
|
|
434
434
|
* - Tick spacing: 200
|
|
435
435
|
* - Starting tick: -230400 (≈10 ETH market cap)
|
|
436
436
|
* - Positions: 3-tranche Liquid default (40/50/10)
|
|
@@ -451,8 +451,8 @@ declare const DEFAULTS: {
|
|
|
451
451
|
readonly SNIPER_STARTING_FEE: 800000;
|
|
452
452
|
/** Sniper auction ending fee: 40% (400,000 uniBps) */
|
|
453
453
|
readonly SNIPER_ENDING_FEE: 400000;
|
|
454
|
-
/** Sniper auction decay period:
|
|
455
|
-
readonly SNIPER_SECONDS_TO_DECAY:
|
|
454
|
+
/** Sniper auction decay period: 20 seconds */
|
|
455
|
+
readonly SNIPER_SECONDS_TO_DECAY: 20;
|
|
456
456
|
};
|
|
457
457
|
declare const DEFAULT_CHAIN: {
|
|
458
458
|
blockExplorers: {
|
|
@@ -2388,11 +2388,11 @@ interface SniperAuctionConfig {
|
|
|
2388
2388
|
*
|
|
2389
2389
|
* @example
|
|
2390
2390
|
* ```ts
|
|
2391
|
-
* // 80% → 40% over
|
|
2391
|
+
* // 80% → 40% over 20 seconds (default)
|
|
2392
2392
|
* const mevData = encodeSniperAuctionData({
|
|
2393
2393
|
* startingFee: 800_000,
|
|
2394
2394
|
* endingFee: 400_000,
|
|
2395
|
-
* secondsToDecay:
|
|
2395
|
+
* secondsToDecay: 20,
|
|
2396
2396
|
* });
|
|
2397
2397
|
* ```
|
|
2398
2398
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ interface DeployTokenParams {
|
|
|
89
89
|
lockerData?: Hex;
|
|
90
90
|
/** MEV module address. Defaults to SNIPER_AUCTION_V2 */
|
|
91
91
|
mevModule?: Address;
|
|
92
|
-
/** MEV module data. Defaults to 80%→40% decay over
|
|
92
|
+
/** MEV module data. Defaults to 80%→40% decay over 20s */
|
|
93
93
|
mevModuleData?: Hex;
|
|
94
94
|
/** Extension configs (vault, airdrop, etc.) */
|
|
95
95
|
extensions?: ExtensionConfig[];
|
|
@@ -430,7 +430,7 @@ declare const POOL_POSITIONS: {
|
|
|
430
430
|
* Liquid protocol defaults.
|
|
431
431
|
*
|
|
432
432
|
* - Hook: Static fee V2, 1% on both buys and sells
|
|
433
|
-
* - MEV: Sniper Auction V2 — 80% → 40% decaying over
|
|
433
|
+
* - MEV: Sniper Auction V2 — 80% → 40% decaying over 20 seconds
|
|
434
434
|
* - Tick spacing: 200
|
|
435
435
|
* - Starting tick: -230400 (≈10 ETH market cap)
|
|
436
436
|
* - Positions: 3-tranche Liquid default (40/50/10)
|
|
@@ -451,8 +451,8 @@ declare const DEFAULTS: {
|
|
|
451
451
|
readonly SNIPER_STARTING_FEE: 800000;
|
|
452
452
|
/** Sniper auction ending fee: 40% (400,000 uniBps) */
|
|
453
453
|
readonly SNIPER_ENDING_FEE: 400000;
|
|
454
|
-
/** Sniper auction decay period:
|
|
455
|
-
readonly SNIPER_SECONDS_TO_DECAY:
|
|
454
|
+
/** Sniper auction decay period: 20 seconds */
|
|
455
|
+
readonly SNIPER_SECONDS_TO_DECAY: 20;
|
|
456
456
|
};
|
|
457
457
|
declare const DEFAULT_CHAIN: {
|
|
458
458
|
blockExplorers: {
|
|
@@ -2388,11 +2388,11 @@ interface SniperAuctionConfig {
|
|
|
2388
2388
|
*
|
|
2389
2389
|
* @example
|
|
2390
2390
|
* ```ts
|
|
2391
|
-
* // 80% → 40% over
|
|
2391
|
+
* // 80% → 40% over 20 seconds (default)
|
|
2392
2392
|
* const mevData = encodeSniperAuctionData({
|
|
2393
2393
|
* startingFee: 800_000,
|
|
2394
2394
|
* endingFee: 400_000,
|
|
2395
|
-
* secondsToDecay:
|
|
2395
|
+
* secondsToDecay: 20,
|
|
2396
2396
|
* });
|
|
2397
2397
|
* ```
|
|
2398
2398
|
*/
|
package/dist/index.js
CHANGED
|
@@ -174,8 +174,8 @@ var DEFAULTS = {
|
|
|
174
174
|
SNIPER_STARTING_FEE: 8e5,
|
|
175
175
|
/** Sniper auction ending fee: 40% (400,000 uniBps) */
|
|
176
176
|
SNIPER_ENDING_FEE: 4e5,
|
|
177
|
-
/** Sniper auction decay period:
|
|
178
|
-
SNIPER_SECONDS_TO_DECAY:
|
|
177
|
+
/** Sniper auction decay period: 20 seconds */
|
|
178
|
+
SNIPER_SECONDS_TO_DECAY: 20
|
|
179
179
|
};
|
|
180
180
|
var DEFAULT_CHAIN = import_chains.base;
|
|
181
181
|
var DEFAULT_CHAIN_ID = 8453;
|