liquid-sdk 1.6.2 → 1.6.3
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 +2 -2
- package/package.json +1 -1
- package/skills/deploy-token.md +30 -1
- package/skills/sdk-overview.md +39 -2
package/AGENT_README.md
CHANGED
|
@@ -54,7 +54,7 @@ Requires wallet. Creates the token, pool, locks LP, and optionally buys tokens a
|
|
|
54
54
|
const result = await sdk.deployToken({
|
|
55
55
|
name: "My Token",
|
|
56
56
|
symbol: "MTK",
|
|
57
|
-
image: "
|
|
57
|
+
image: "ipfs://QmYourImageCID", // optional, IPFS recommended
|
|
58
58
|
metadata: '{"description":"A cool token"}', // optional, JSON string
|
|
59
59
|
context: '{"platform":"my-app"}', // optional, tracking/attribution
|
|
60
60
|
|
|
@@ -642,7 +642,7 @@ const sdk = new LiquidSDK({ publicClient, walletClient });
|
|
|
642
642
|
const result = await sdk.deployToken({
|
|
643
643
|
name: "Agent Token",
|
|
644
644
|
symbol: "AGENT",
|
|
645
|
-
image: "
|
|
645
|
+
image: "ipfs://QmYourImageCID",
|
|
646
646
|
metadata: JSON.stringify({ description: "Deployed by an AI agent" }),
|
|
647
647
|
devBuy: {
|
|
648
648
|
ethAmount: parseEther("0.01"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liquid-sdk",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "TypeScript SDK to deploy ERC-20 tokens with Uniswap V4 liquidity on Base — zero API keys, one dependency (viem)",
|
|
5
5
|
"author": "Liquid Protocol",
|
|
6
6
|
"homepage": "https://github.com/Liquid-Protocol-Ops/SDK#readme",
|
package/skills/deploy-token.md
CHANGED
|
@@ -43,13 +43,42 @@ const result = await sdk.deployToken({
|
|
|
43
43
|
|
|
44
44
|
This creates a token with 100 billion supply, a Uniswap V4 pool, locked liquidity, 1% fee on both buys and sells, and sniper auction MEV protection — all with sensible defaults.
|
|
45
45
|
|
|
46
|
+
### Deploy with Image (IPFS recommended)
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
// Pin to IPFS first with your own Pinata key (free: 500MB)
|
|
50
|
+
const form = new FormData();
|
|
51
|
+
form.append("file", imageFile); // PNG/JPEG/WEBP/GIF, 256x256 recommended
|
|
52
|
+
|
|
53
|
+
const pinata = await fetch("https://api.pinata.cloud/pinning/pinFileToIPFS", {
|
|
54
|
+
method: "POST",
|
|
55
|
+
headers: { "Authorization": "Bearer YOUR_PINATA_JWT" },
|
|
56
|
+
body: form,
|
|
57
|
+
}).then(r => r.json());
|
|
58
|
+
|
|
59
|
+
const result = await sdk.deployToken({
|
|
60
|
+
name: "My Token",
|
|
61
|
+
symbol: "MTK",
|
|
62
|
+
image: `ipfs://${pinata.IpfsHash}`, // permanent, decentralized
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Or use any URL directly (less permanent)
|
|
66
|
+
const result2 = await sdk.deployToken({
|
|
67
|
+
name: "My Token",
|
|
68
|
+
symbol: "MTK",
|
|
69
|
+
image: "ipfs://QmYourImageCID",
|
|
70
|
+
});
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Get a Pinata JWT at https://app.pinata.cloud/developers/api-keys.
|
|
74
|
+
|
|
46
75
|
### Deploy with Dev Buy (buy tokens at launch)
|
|
47
76
|
|
|
48
77
|
```typescript
|
|
49
78
|
const result = await sdk.deployToken({
|
|
50
79
|
name: "My Token",
|
|
51
80
|
symbol: "MTK",
|
|
52
|
-
image: "
|
|
81
|
+
image: "ipfs://QmYourImageCID",
|
|
53
82
|
metadata: JSON.stringify({ description: "Launched by an AI agent" }),
|
|
54
83
|
devBuy: {
|
|
55
84
|
ethAmount: parseEther("0.01"), // ETH to spend buying tokens at launch
|
package/skills/sdk-overview.md
CHANGED
|
@@ -44,7 +44,7 @@ These fields define how the token appears in wallets, aggregators, and explorers
|
|
|
44
44
|
const result = await sdk.deployToken({
|
|
45
45
|
name: "My Project Token", // Token name (required)
|
|
46
46
|
symbol: "MPT", // Token symbol (required)
|
|
47
|
-
image: "
|
|
47
|
+
image: "ipfs://QmYourImageCID", // IPFS URI (recommended) or HTTPS URL
|
|
48
48
|
metadata: buildMetadata({ // Rich metadata (JSON, on-chain)
|
|
49
49
|
description: "A community token for builders on Base",
|
|
50
50
|
socialMediaUrls: [
|
|
@@ -77,6 +77,43 @@ await sdk.updateMetadata(tokenAddress, buildMetadata({
|
|
|
77
77
|
}));
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
### Image Upload (IPFS)
|
|
81
|
+
|
|
82
|
+
Token images should be pinned to IPFS for permanence. The `image` field in `deployToken()` accepts any string — use an `ipfs://` URI for permanent storage.
|
|
83
|
+
|
|
84
|
+
**Pin with your own Pinata key:**
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
// 1. Pin image to IPFS via Pinata (your own API key)
|
|
88
|
+
const form = new FormData();
|
|
89
|
+
form.append("file", imageFile); // PNG, JPEG, WEBP, or GIF
|
|
90
|
+
|
|
91
|
+
const res = await fetch("https://api.pinata.cloud/pinning/pinFileToIPFS", {
|
|
92
|
+
method: "POST",
|
|
93
|
+
headers: { "Authorization": "Bearer YOUR_PINATA_JWT" },
|
|
94
|
+
body: form,
|
|
95
|
+
});
|
|
96
|
+
const { IpfsHash } = await res.json();
|
|
97
|
+
const ipfsUri = `ipfs://${IpfsHash}`;
|
|
98
|
+
|
|
99
|
+
// 2. Deploy with IPFS image
|
|
100
|
+
await sdk.deployToken({
|
|
101
|
+
name: "My Token",
|
|
102
|
+
symbol: "MTK",
|
|
103
|
+
image: ipfsUri, // stored on-chain permanently
|
|
104
|
+
});
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Get a Pinata JWT at https://app.pinata.cloud/developers/api-keys (free tier: 500MB).
|
|
108
|
+
|
|
109
|
+
**Recommended:** 256x256 or 512x512 PNG, square. This is the standard size for DexScreener, wallet apps, and token lists.
|
|
110
|
+
|
|
111
|
+
**Accepted formats:** PNG, JPEG, WEBP, GIF.
|
|
112
|
+
|
|
113
|
+
You can also use any `https://` URL — the `image` field accepts any string. But IPFS URIs are preferred because they're permanent and decentralized.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
80
117
|
### Token Metadata Schema
|
|
81
118
|
|
|
82
119
|
Stored in the `tokenMetadata` field of the `TokenCreated` event. Wallets (Rainbow, Coinbase Wallet) and aggregators (Matcha, 0x) read this.
|
|
@@ -278,7 +315,7 @@ Only the token admin can update image and metadata after deployment.
|
|
|
278
315
|
|
|
279
316
|
```typescript
|
|
280
317
|
// Update image
|
|
281
|
-
await sdk.updateImage(tokenAddress, "
|
|
318
|
+
await sdk.updateImage(tokenAddress, "ipfs://QmNewImageCID...");
|
|
282
319
|
|
|
283
320
|
// Update metadata
|
|
284
321
|
await sdk.updateMetadata(tokenAddress, buildMetadata({
|