moltlaunch 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +44 -65
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -41,11 +41,11 @@ Returns:
41
41
  | `moltlaunch wallet` | Show wallet address and balance |
42
42
  | `moltlaunch wallet --show-key` | Show wallet with private key |
43
43
  | `moltlaunch status` | List all launched tokens |
44
- | `moltlaunch claim` | Claim accumulated fees |
44
+ | `moltlaunch claim` | Claim accumulated trading fees |
45
45
 
46
46
  All commands support `--json` for structured output.
47
47
 
48
- ## State Diagram
48
+ ## How It Works
49
49
 
50
50
  ```
51
51
  npx moltlaunch --name "X" --symbol "X" --image ./logo.png
@@ -58,7 +58,6 @@ npx moltlaunch --name "X" --symbol "X" --image ./logo.png
58
58
 
59
59
  ├─ 3. Submit gasless launch
60
60
  │ POST web2-api.flaunch.gg/api/v1/base/launch-memecoin
61
- │ body: { name, symbol, description, imageIpfs, creatorAddress, revenueManagerAddress }
62
61
  │ → returns jobId
63
62
 
64
63
  ├─ 4. Poll for deployment (2s intervals, 120s timeout)
@@ -71,73 +70,50 @@ npx moltlaunch --name "X" --symbol "X" --image ./logo.png
71
70
  └─ 6. Output result (human-readable or --json)
72
71
  ```
73
72
 
74
- ## Fee Architecture
73
+ ## Fee Model
75
74
 
76
- Every token launched through moltlaunch has our Revenue Manager attached. Flaunch uses a **waterfall fee model** — each tier takes a percentage of what remains, not of the total.
75
+ Tokens launched through moltlaunch are immediately tradeable on Flaunch. Every trade generates fees distributed through Flaunch's [waterfall model](https://docs.flaunch.gg/general/for-builders/developer-resources/hooks/fee-distributor) — each tier takes a percentage of what remains before passing it down.
77
76
 
78
77
  ```
79
78
  Trade executes on Uniswap V4 (Base)
80
79
 
81
- ├─ Swap Fee (1% base, up to 50% during high volume)
80
+ ├─ Swap Fee (1% base, dynamic up to 50% during high volume)
82
81
  │ │
83
- │ ├─ Referrer Fee (5% of swap fee)
84
- │ │ └─ Only if a referrer address was passed in the swap
82
+ │ ├─ Referrer Fee (5%)
83
+ │ │ └─ Paid to referrer if one was set on the trade
85
84
  │ │
86
- │ ├─ Protocol Fee (10% of remainder after referrer) ◄── OUR REVENUE
87
- │ │ └─ Sent to PositionManager escrow for 0x160e...
85
+ │ ├─ Protocol Fee (10%)
86
+ │ │ └─ Paid to the moltlaunch revenue manager
88
87
  │ │
89
- │ ├─ Creator Fee (80% of remainder after protocol) ◄── AGENT'S REVENUE
90
- │ │ └─ Sent to PositionManager escrow for agent's creatorAddress
88
+ │ ├─ Creator Fee (80%)
89
+ │ │ └─ Paid to the token creator (your wallet)
91
90
  │ │
92
91
  │ └─ BidWall (100% of remainder)
93
- │ └─ Automated buybacks / token liquidity
92
+ │ └─ Automated buybacks supporting token liquidity
94
93
  ```
95
94
 
96
- ### Concrete numbers per 1 ETH trade (no referrer, 1% swap fee)
95
+ ### Example: 1 ETH trade, no referrer, 1% swap fee
97
96
 
98
- | Tier | Rate | Amount | Recipient |
99
- |------|------|--------|-----------|
100
- | Swap fee | 1% of trade | 0.01 ETH | (distributed below) |
101
- | Referrer | 5% of 0.01 | 0 (no referrer) | — |
102
- | **Protocol (us)** | **10% of 0.01** | **0.001 ETH** | **RM recipient** |
103
- | Creator | 80% of 0.009 | 0.0072 ETH | creatorAddress |
104
- | BidWall | 100% of rest | 0.0018 ETH | Token liquidity |
97
+ | Tier | Rate | Amount |
98
+ |------|------|--------|
99
+ | Swap fee | 1% of trade | 0.01 ETH |
100
+ | Referrer | 5% of fee | 0 (no referrer) |
101
+ | Protocol | 10% of remainder | 0.001 ETH |
102
+ | **Creator (you)** | **80% of remainder** | **0.0072 ETH** |
103
+ | BidWall | Rest | 0.0018 ETH |
105
104
 
106
- The swap fee is dynamic (`DynamicFeeCalculatorV2`): 1% baseline, scales linearly with volume up to 50%, decays over a 1-hour rolling window. Tokens trade heaviest at launch that's when fees are highest.
105
+ The swap fee is dynamic 1% baseline, scaling with volume up to 50%, decaying over a 1-hour window. Tokens trade heaviest at launch, which is when creator fees are highest.
107
106
 
108
107
  ### Claiming fees
109
108
 
110
- Fees accumulate in escrow on the Flaunch **PositionManager** contract, not on the Revenue Manager itself. The RM only tells the fee distributor where to route protocol fees.
109
+ Fees accumulate in escrow on the Flaunch PositionManager. Withdraw anytime:
111
110
 
111
+ ```bash
112
+ moltlaunch claim # withdraw to your wallet
113
+ moltlaunch claim --json # structured output
112
114
  ```
113
- moltlaunch claim
114
-
115
- ├─ Check balance: PositionManager.balances(walletAddress)
116
-
117
- ├─ If > 0: PositionManager.withdrawFees(walletAddress, true)
118
- │ └─ unwrap=true converts flETH → native ETH
119
-
120
- └─ Requires ETH for gas (claim is an on-chain transaction)
121
- ```
122
-
123
- ## Key Contracts (Base Mainnet)
124
-
125
- | Contract | Address | Role |
126
- |----------|---------|------|
127
- | Revenue Manager | `0x3Bc08524d9DaaDEC9d1Af87818d809611F0fD669` | Our RM — 10% protocol fee, recipient `0x160e...` |
128
- | PositionManager | `0x51Bba15255406Cfe7099a42183302640ba7dAFDC` | Fee escrow — `balances()`, `withdrawFees()` |
129
- | Flaunch | `0x6A53F8b799bE11a2A3264eF0bfF183dCB12d9571` | Token factory |
130
115
 
131
- ## API Endpoints
132
-
133
- | Endpoint | Method | Purpose |
134
- |----------|--------|---------|
135
- | `/api/v1/upload-image` | POST | Upload image to IPFS |
136
- | `/api/v1/{network}/launch-memecoin` | POST | Gasless token launch |
137
- | `/api/v1/launch-status/{jobId}` | GET | Poll launch status |
138
- | `/api/v1/{network}/create-revenue-manager` | POST | Create new RM (one-time) |
139
-
140
- Base URL: `https://web2-api.flaunch.gg`
116
+ Requires ETH in your wallet for gas (claiming is an on-chain transaction).
141
117
 
142
118
  ## Exit Codes
143
119
 
@@ -153,6 +129,7 @@ Base URL: `https://web2-api.flaunch.gg`
153
129
 
154
130
  ## Agent Integration
155
131
 
132
+ ### Python
156
133
  ```python
157
134
  import subprocess, json
158
135
 
@@ -168,23 +145,21 @@ if result.returncode == 0:
168
145
  flaunch_url = data["flaunch"]
169
146
  ```
170
147
 
171
- ## Project Structure
148
+ ### Node.js
149
+ ```javascript
150
+ import { execSync } from "child_process";
172
151
 
152
+ const raw = execSync(
153
+ 'npx moltlaunch --name "AgentCoin" --symbol "AGT" --description "Launched by AI" --image ./logo.png --json',
154
+ { encoding: "utf-8" }
155
+ );
156
+ const { tokenAddress, flaunch } = JSON.parse(raw);
173
157
  ```
174
- src/
175
- ├── index.ts # CLI entry point (commander)
176
- ├── types.ts # Shared interfaces (wallet, launch, API responses)
177
- ├── commands/
178
- │ ├── launch.ts # Main flow: wallet upload launch poll → save
179
- │ ├── claim.ts # Withdraw fees from PositionManager escrow
180
- │ ├── status.ts # List launched tokens from local history
181
- │ └── wallet.ts # Show wallet address, balance, private key
182
- └── lib/
183
- ├── config.ts # Constants: RM address, PM address, API base, chains
184
- ├── flaunch-api.ts # Flaunch Web2 API client (upload, launch, poll)
185
- ├── wallet.ts # Generate/load/save wallet and launch records
186
- ├── output.ts # JSON vs human-readable formatting
187
- └── errors.ts # Typed errors with exit codes
158
+
159
+ ### Shell
160
+ ```bash
161
+ OUTPUT=$(npx moltlaunch --name "AgentCoin" --symbol "AGT" --description "test" --image ./logo.png --json)
162
+ [ $? -eq 0 ] && echo "$OUTPUT" | jq -r '.tokenAddress'
188
163
  ```
189
164
 
190
165
  ## Development
@@ -194,3 +169,7 @@ npm install
194
169
  npm run build
195
170
  npx . # test locally
196
171
  ```
172
+
173
+ ## License
174
+
175
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moltlaunch",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "CLI for AI agents to launch tokens on Base via Flaunch",
5
5
  "type": "module",
6
6
  "bin": {