agentlaunch-sdk 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.
- package/CHANGELOG.md +1 -1
- package/README.md +101 -21
- package/dist/agentlaunch.d.ts +3 -3
- package/dist/agentlaunch.js +3 -3
- package/dist/agents.d.ts +1 -1
- package/dist/agents.js +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -2
- package/dist/comments.d.ts +56 -0
- package/dist/comments.d.ts.map +1 -0
- package/dist/comments.js +76 -0
- package/dist/comments.js.map +1 -0
- package/dist/handoff.d.ts +1 -1
- package/dist/handoff.js +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/market.d.ts +64 -2
- package/dist/market.d.ts.map +1 -1
- package/dist/market.js +102 -1
- package/dist/market.js.map +1 -1
- package/dist/tokens.d.ts +1 -1
- package/dist/tokens.js +1 -1
- package/dist/types.d.ts +80 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
3
|
+
All notable changes to `agentlaunch-sdk` will be documented in this file.
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# agentlaunch-sdk
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/agentlaunch-sdk)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://nodejs.org)
|
|
6
6
|
|
|
7
7
|
TypeScript SDK for the [AgentLaunch](https://agent-launch.ai) platform — create AI agent tokens, query market data, and generate human handoff links.
|
|
8
8
|
|
|
@@ -11,13 +11,13 @@ No external runtime dependencies. Uses the global `fetch()` available in Node.js
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install
|
|
14
|
+
npm install agentlaunch-sdk
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Quick Start
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
import { tokenize, generateDeployLink } from '
|
|
20
|
+
import { tokenize, generateDeployLink } from 'agentlaunch-sdk';
|
|
21
21
|
|
|
22
22
|
// 1. Create a pending token record
|
|
23
23
|
const { data } = await tokenize({
|
|
@@ -44,7 +44,7 @@ export AGENTVERSE_API_KEY=av-xxxxxxxxxxxxxxxx
|
|
|
44
44
|
**Option 2 — Pass directly to the client:**
|
|
45
45
|
|
|
46
46
|
```typescript
|
|
47
|
-
import { AgentLaunchClient } from '
|
|
47
|
+
import { AgentLaunchClient } from 'agentlaunch-sdk';
|
|
48
48
|
|
|
49
49
|
const client = new AgentLaunchClient({ apiKey: 'av-xxxxxxxxxxxxxxxx' });
|
|
50
50
|
```
|
|
@@ -58,7 +58,7 @@ const client = new AgentLaunchClient({ apiKey: 'av-xxxxxxxxxxxxxxxx' });
|
|
|
58
58
|
Create a pending token record for an Agentverse agent.
|
|
59
59
|
|
|
60
60
|
```typescript
|
|
61
|
-
import { tokenize } from '
|
|
61
|
+
import { tokenize } from 'agentlaunch-sdk';
|
|
62
62
|
|
|
63
63
|
const { data } = await tokenize({
|
|
64
64
|
agentAddress: 'agent1qf8xfhsc8hg4g5l0nhtj...', // required
|
|
@@ -67,6 +67,9 @@ const { data } = await tokenize({
|
|
|
67
67
|
description: 'An AI agent that...', // optional
|
|
68
68
|
image: 'https://example.com/logo.png', // optional — 'auto' for placeholder
|
|
69
69
|
chainId: 97, // optional — default: 11155111 (Sepolia)
|
|
70
|
+
maxWalletAmount: 1, // optional — 0=unlimited, 1=0.5%, 2=1%
|
|
71
|
+
initialBuyAmount: '50', // optional — FET to buy on deploy (max 1000)
|
|
72
|
+
category: 3, // optional — see /tokens/categories
|
|
70
73
|
});
|
|
71
74
|
|
|
72
75
|
console.log(data.token_id); // 42
|
|
@@ -82,12 +85,20 @@ console.log(data.status); // 'pending_deployment'
|
|
|
82
85
|
| Ethereum Mainnet | 1 |
|
|
83
86
|
| Ethereum Sepolia | 11155111 |
|
|
84
87
|
|
|
88
|
+
**Optional TokenizeParams:**
|
|
89
|
+
|
|
90
|
+
| Field | Type | Default | Description |
|
|
91
|
+
|-------|------|---------|-------------|
|
|
92
|
+
| `maxWalletAmount` | `0 \| 1 \| 2` | `0` | Max tokens per wallet: `0`=unlimited, `1`=0.5% (5M), `2`=1% (10M) |
|
|
93
|
+
| `initialBuyAmount` | `string` | — | FET to spend on an initial buy immediately after deploy (max `"1000"`) |
|
|
94
|
+
| `category` | `number` | — | Category ID. Fetch available IDs from `/api/tokens/categories` |
|
|
95
|
+
|
|
85
96
|
#### `getToken(address, client?)`
|
|
86
97
|
|
|
87
98
|
Fetch a single token by its deployed contract address.
|
|
88
99
|
|
|
89
100
|
```typescript
|
|
90
|
-
import { getToken } from '
|
|
101
|
+
import { getToken } from 'agentlaunch-sdk';
|
|
91
102
|
|
|
92
103
|
const token = await getToken('0xAbCd...');
|
|
93
104
|
console.log(token.price); // '0.000012' (FET)
|
|
@@ -101,7 +112,7 @@ console.log(token.listed); // false
|
|
|
101
112
|
List tokens with optional filtering and pagination.
|
|
102
113
|
|
|
103
114
|
```typescript
|
|
104
|
-
import { listTokens } from '
|
|
115
|
+
import { listTokens } from 'agentlaunch-sdk';
|
|
105
116
|
|
|
106
117
|
const { tokens, total } = await listTokens({
|
|
107
118
|
page: 1,
|
|
@@ -113,6 +124,35 @@ const { tokens, total } = await listTokens({
|
|
|
113
124
|
});
|
|
114
125
|
```
|
|
115
126
|
|
|
127
|
+
### Comment Operations
|
|
128
|
+
|
|
129
|
+
#### `getComments(tokenAddress, client?)`
|
|
130
|
+
|
|
131
|
+
Fetch all comments posted on a token's page. No authentication required.
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { getComments } from 'agentlaunch-sdk';
|
|
135
|
+
|
|
136
|
+
const comments = await getComments('0xAbCd...');
|
|
137
|
+
for (const c of comments) {
|
|
138
|
+
console.log(`${c.user?.username ?? 'anon'}: ${c.message}`);
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
#### `postComment(params, client?)`
|
|
143
|
+
|
|
144
|
+
Post a comment on a token page. Requires API key authentication.
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
import { postComment } from 'agentlaunch-sdk';
|
|
148
|
+
|
|
149
|
+
const result = await postComment({
|
|
150
|
+
tokenAddress: '0xAbCd...',
|
|
151
|
+
message: 'Bullish on this agent!',
|
|
152
|
+
});
|
|
153
|
+
console.log(result.id, result.created_at);
|
|
154
|
+
```
|
|
155
|
+
|
|
116
156
|
### Market Operations
|
|
117
157
|
|
|
118
158
|
#### `getTokenPrice(address, client?)`
|
|
@@ -120,18 +160,58 @@ const { tokens, total } = await listTokens({
|
|
|
120
160
|
Get the current bonding-curve price of a token in FET.
|
|
121
161
|
|
|
122
162
|
```typescript
|
|
123
|
-
import { getTokenPrice } from '
|
|
163
|
+
import { getTokenPrice } from 'agentlaunch-sdk';
|
|
124
164
|
|
|
125
165
|
const price = await getTokenPrice('0xAbCd...');
|
|
126
166
|
console.log(`Current price: ${price} FET`);
|
|
127
167
|
```
|
|
128
168
|
|
|
169
|
+
#### `calculateBuy(address, fetAmount, client?)`
|
|
170
|
+
|
|
171
|
+
Simulate a buy and return the estimated token yield, price impact, and fee breakdown. No authentication required.
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
import { calculateBuy } from 'agentlaunch-sdk';
|
|
175
|
+
|
|
176
|
+
const result = await calculateBuy('0xAbCd...', '100');
|
|
177
|
+
console.log(`Tokens received: ${result.tokensReceived}`);
|
|
178
|
+
console.log(`Price per token: ${result.pricePerToken} FET`);
|
|
179
|
+
console.log(`Price impact: ${result.priceImpact}%`);
|
|
180
|
+
console.log(`Protocol fee: ${result.fee} FET`); // 2%, 100% to treasury
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
#### `calculateSell(address, tokenAmount, client?)`
|
|
184
|
+
|
|
185
|
+
Simulate a sell and return the estimated FET proceeds, price impact, and fee breakdown. No authentication required.
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
import { calculateSell } from 'agentlaunch-sdk';
|
|
189
|
+
|
|
190
|
+
const result = await calculateSell('0xAbCd...', '500000');
|
|
191
|
+
console.log(`FET received: ${result.fetReceived}`);
|
|
192
|
+
console.log(`Price impact: ${result.priceImpact}%`);
|
|
193
|
+
console.log(`Protocol fee: ${result.fee} FET`); // 2%, 100% to treasury
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### `getPlatformStats(client?)`
|
|
197
|
+
|
|
198
|
+
Fetch aggregated platform-level statistics. No authentication required.
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import { getPlatformStats } from 'agentlaunch-sdk';
|
|
202
|
+
|
|
203
|
+
const stats = await getPlatformStats();
|
|
204
|
+
console.log(`Total tokens: ${stats.totalTokens}`);
|
|
205
|
+
console.log(`Listed on DEX: ${stats.totalListed}`);
|
|
206
|
+
console.log(`On bonding: ${stats.totalBonding}`);
|
|
207
|
+
```
|
|
208
|
+
|
|
129
209
|
#### `getTokenHolders(address, holderAddress?, client?)`
|
|
130
210
|
|
|
131
211
|
Get the holder list for a token, or look up a specific wallet.
|
|
132
212
|
|
|
133
213
|
```typescript
|
|
134
|
-
import { getTokenHolders } from '
|
|
214
|
+
import { getTokenHolders } from 'agentlaunch-sdk';
|
|
135
215
|
|
|
136
216
|
// Full holder list
|
|
137
217
|
const { holders, total } = await getTokenHolders('0xAbCd...');
|
|
@@ -149,7 +229,7 @@ Agents never hold private keys or sign transactions. All on-chain actions are de
|
|
|
149
229
|
Generate a deploy handoff link for a pending token.
|
|
150
230
|
|
|
151
231
|
```typescript
|
|
152
|
-
import { generateDeployLink } from '
|
|
232
|
+
import { generateDeployLink } from 'agentlaunch-sdk';
|
|
153
233
|
|
|
154
234
|
const link = generateDeployLink(42);
|
|
155
235
|
// https://agent-launch.ai/deploy/42
|
|
@@ -164,7 +244,7 @@ const devLink = generateDeployLink(42, 'https://staging.agent-launch.ai');
|
|
|
164
244
|
Generate a pre-filled trade URL for a human.
|
|
165
245
|
|
|
166
246
|
```typescript
|
|
167
|
-
import { generateTradeLink } from '
|
|
247
|
+
import { generateTradeLink } from 'agentlaunch-sdk';
|
|
168
248
|
|
|
169
249
|
// Basic trade page
|
|
170
250
|
generateTradeLink('0xAbCd...');
|
|
@@ -184,7 +264,7 @@ generateTradeLink('0xAbCd...', { action: 'sell', amount: 500 });
|
|
|
184
264
|
Convenience wrapper for buy links.
|
|
185
265
|
|
|
186
266
|
```typescript
|
|
187
|
-
import { generateBuyLink } from '
|
|
267
|
+
import { generateBuyLink } from 'agentlaunch-sdk';
|
|
188
268
|
|
|
189
269
|
const link = generateBuyLink('0xAbCd...', 100);
|
|
190
270
|
// https://agent-launch.ai/trade/0xAbCd...?action=buy&amount=100
|
|
@@ -195,7 +275,7 @@ const link = generateBuyLink('0xAbCd...', 100);
|
|
|
195
275
|
Convenience wrapper for sell links.
|
|
196
276
|
|
|
197
277
|
```typescript
|
|
198
|
-
import { generateSellLink } from '
|
|
278
|
+
import { generateSellLink } from 'agentlaunch-sdk';
|
|
199
279
|
|
|
200
280
|
const link = generateSellLink('0xAbCd...', 500);
|
|
201
281
|
// https://agent-launch.ai/trade/0xAbCd...?action=sell&amount=500
|
|
@@ -208,7 +288,7 @@ const link = generateSellLink('0xAbCd...', 500);
|
|
|
208
288
|
Exchange an Agentverse API key for a platform JWT.
|
|
209
289
|
|
|
210
290
|
```typescript
|
|
211
|
-
import { authenticate } from '
|
|
291
|
+
import { authenticate } from 'agentlaunch-sdk';
|
|
212
292
|
|
|
213
293
|
const { data } = await authenticate('av-xxxxxxxxxxxxxxxx');
|
|
214
294
|
console.log(data.token); // JWT string
|
|
@@ -220,7 +300,7 @@ console.log(data.expires_in); // seconds until expiry
|
|
|
220
300
|
List the Agentverse agents owned by the caller's API key.
|
|
221
301
|
|
|
222
302
|
```typescript
|
|
223
|
-
import { getMyAgents } from '
|
|
303
|
+
import { getMyAgents } from 'agentlaunch-sdk';
|
|
224
304
|
|
|
225
305
|
const { data } = await getMyAgents();
|
|
226
306
|
console.log(data.agents.map(a => a.address));
|
|
@@ -231,7 +311,7 @@ console.log(data.agents.map(a => a.address));
|
|
|
231
311
|
Fetch all agents belonging to an Agentverse API key.
|
|
232
312
|
|
|
233
313
|
```typescript
|
|
234
|
-
import { importFromAgentverse } from '
|
|
314
|
+
import { importFromAgentverse } from 'agentlaunch-sdk';
|
|
235
315
|
|
|
236
316
|
const { agents, count } = await importFromAgentverse('av-xxxxxxxxxxxxxxxx');
|
|
237
317
|
```
|
|
@@ -241,7 +321,7 @@ const { agents, count } = await importFromAgentverse('av-xxxxxxxxxxxxxxxx');
|
|
|
241
321
|
For a more ergonomic interface, use the `AgentLaunch` class:
|
|
242
322
|
|
|
243
323
|
```typescript
|
|
244
|
-
import { AgentLaunch } from '
|
|
324
|
+
import { AgentLaunch } from 'agentlaunch-sdk';
|
|
245
325
|
|
|
246
326
|
const al = new AgentLaunch({ apiKey: 'av-xxxxxxxxxxxxxxxx' });
|
|
247
327
|
|
|
@@ -269,7 +349,7 @@ const { data: agentsData } = await al.agents.getMyAgents();
|
|
|
269
349
|
The underlying HTTP client. Use directly for advanced scenarios.
|
|
270
350
|
|
|
271
351
|
```typescript
|
|
272
|
-
import { AgentLaunchClient } from '
|
|
352
|
+
import { AgentLaunchClient } from 'agentlaunch-sdk';
|
|
273
353
|
|
|
274
354
|
const client = new AgentLaunchClient({
|
|
275
355
|
apiKey: process.env.AGENTVERSE_API_KEY,
|
|
@@ -289,7 +369,7 @@ const result = await client.post<MyType>('/api/agents/tokenize', body);
|
|
|
289
369
|
All SDK methods throw `AgentLaunchError` on non-2xx responses.
|
|
290
370
|
|
|
291
371
|
```typescript
|
|
292
|
-
import { tokenize, AgentLaunchError } from '
|
|
372
|
+
import { tokenize, AgentLaunchError } from 'agentlaunch-sdk';
|
|
293
373
|
|
|
294
374
|
try {
|
|
295
375
|
const { data } = await tokenize({ agentAddress: 'agent1q...' });
|
package/dist/agentlaunch.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — AgentLaunch fluent wrapper class
|
|
3
3
|
*
|
|
4
4
|
* SDK-006: Provides a namespaced, ergonomic API wrapping all SDK modules.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
|
-
* import { AgentLaunch } from '
|
|
8
|
+
* import { AgentLaunch } from 'agentlaunch-sdk';
|
|
9
9
|
*
|
|
10
10
|
* const al = new AgentLaunch({ apiKey: process.env.AGENTVERSE_API_KEY });
|
|
11
11
|
*
|
|
@@ -106,7 +106,7 @@ export interface AgentsNamespace {
|
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
108
|
* ```ts
|
|
109
|
-
* import { AgentLaunch } from '
|
|
109
|
+
* import { AgentLaunch } from 'agentlaunch-sdk';
|
|
110
110
|
*
|
|
111
111
|
* const al = new AgentLaunch({ apiKey: 'av-xxxxxxxxxxxxxxxx' });
|
|
112
112
|
*
|
package/dist/agentlaunch.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — AgentLaunch fluent wrapper class
|
|
3
3
|
*
|
|
4
4
|
* SDK-006: Provides a namespaced, ergonomic API wrapping all SDK modules.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
7
|
* ```ts
|
|
8
|
-
* import { AgentLaunch } from '
|
|
8
|
+
* import { AgentLaunch } from 'agentlaunch-sdk';
|
|
9
9
|
*
|
|
10
10
|
* const al = new AgentLaunch({ apiKey: process.env.AGENTVERSE_API_KEY });
|
|
11
11
|
*
|
|
@@ -37,7 +37,7 @@ import { authenticate, getMyAgents, importFromAgentverse } from './agents.js';
|
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
39
|
* ```ts
|
|
40
|
-
* import { AgentLaunch } from '
|
|
40
|
+
* import { AgentLaunch } from 'agentlaunch-sdk';
|
|
41
41
|
*
|
|
42
42
|
* const al = new AgentLaunch({ apiKey: 'av-xxxxxxxxxxxxxxxx' });
|
|
43
43
|
*
|
package/dist/agents.d.ts
CHANGED
package/dist/agents.js
CHANGED
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — HTTP client
|
|
3
3
|
*
|
|
4
4
|
* SDK-001: Core fetch wrapper that injects auth headers and provides typed
|
|
5
5
|
* request helpers used by all other SDK modules.
|
|
@@ -24,7 +24,7 @@ import { AgentLaunchConfig } from './types.js';
|
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```ts
|
|
27
|
-
* import { AgentLaunchClient } from '
|
|
27
|
+
* import { AgentLaunchClient } from 'agentlaunch-sdk';
|
|
28
28
|
*
|
|
29
29
|
* const client = new AgentLaunchClient({
|
|
30
30
|
* apiKey: process.env.AGENTVERSE_API_KEY,
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — HTTP client
|
|
3
3
|
*
|
|
4
4
|
* SDK-001: Core fetch wrapper that injects auth headers and provides typed
|
|
5
5
|
* request helpers used by all other SDK modules.
|
|
@@ -46,7 +46,7 @@ function sleep(ms) {
|
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
48
48
|
* ```ts
|
|
49
|
-
* import { AgentLaunchClient } from '
|
|
49
|
+
* import { AgentLaunchClient } from 'agentlaunch-sdk';
|
|
50
50
|
*
|
|
51
51
|
* const client = new AgentLaunchClient({
|
|
52
52
|
* apiKey: process.env.AGENTVERSE_API_KEY,
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agentlaunch-sdk — Comment operations
|
|
3
|
+
*
|
|
4
|
+
* CF-039: Read and post comments attached to token pages.
|
|
5
|
+
*
|
|
6
|
+
* - getComments — public read, no auth required
|
|
7
|
+
* - postComment — requires X-API-Key authentication
|
|
8
|
+
*
|
|
9
|
+
* All functions accept an optional AgentLaunchClient instance. When omitted
|
|
10
|
+
* a default client is constructed from the AGENTVERSE_API_KEY and
|
|
11
|
+
* AGENT_LAUNCH_BASE_URL environment variables.
|
|
12
|
+
*/
|
|
13
|
+
import { AgentLaunchClient } from './client.js';
|
|
14
|
+
import type { Comment, PostCommentParams, PostCommentResponse } from './types.js';
|
|
15
|
+
/**
|
|
16
|
+
* Fetch all comments for a deployed token.
|
|
17
|
+
*
|
|
18
|
+
* Returns the comments in chronological order (oldest first). Comments are
|
|
19
|
+
* visible to anyone — no authentication is required.
|
|
20
|
+
*
|
|
21
|
+
* @param tokenAddress Contract address of the token
|
|
22
|
+
* @param client Optional pre-configured AgentLaunchClient
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import { getComments } from 'agentlaunch-sdk';
|
|
27
|
+
*
|
|
28
|
+
* const comments = await getComments('0xAbCd...');
|
|
29
|
+
* for (const c of comments) {
|
|
30
|
+
* console.log(`${c.user?.username ?? 'anon'}: ${c.message}`);
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function getComments(tokenAddress: string, client?: AgentLaunchClient): Promise<Comment[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Post a comment on a token page.
|
|
37
|
+
*
|
|
38
|
+
* Requires X-API-Key authentication. The comment is attributed to the
|
|
39
|
+
* account associated with the API key.
|
|
40
|
+
*
|
|
41
|
+
* @param params `tokenAddress` and `message` to post
|
|
42
|
+
* @param client Optional pre-configured AgentLaunchClient
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* import { postComment } from 'agentlaunch-sdk';
|
|
47
|
+
*
|
|
48
|
+
* const result = await postComment({
|
|
49
|
+
* tokenAddress: '0xAbCd...',
|
|
50
|
+
* message: 'Bullish on this agent!',
|
|
51
|
+
* });
|
|
52
|
+
* console.log(result.id, result.created_at);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function postComment(params: PostCommentParams, client?: AgentLaunchClient): Promise<PostCommentResponse>;
|
|
56
|
+
//# sourceMappingURL=comments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../src/comments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAiBlF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,WAAW,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,OAAO,EAAE,CAAC,CAGpB;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,mBAAmB,CAAC,CAM9B"}
|
package/dist/comments.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* agentlaunch-sdk — Comment operations
|
|
3
|
+
*
|
|
4
|
+
* CF-039: Read and post comments attached to token pages.
|
|
5
|
+
*
|
|
6
|
+
* - getComments — public read, no auth required
|
|
7
|
+
* - postComment — requires X-API-Key authentication
|
|
8
|
+
*
|
|
9
|
+
* All functions accept an optional AgentLaunchClient instance. When omitted
|
|
10
|
+
* a default client is constructed from the AGENTVERSE_API_KEY and
|
|
11
|
+
* AGENT_LAUNCH_BASE_URL environment variables.
|
|
12
|
+
*/
|
|
13
|
+
import { AgentLaunchClient } from './client.js';
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Module-level default client (lazy, env-based)
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
function defaultClient() {
|
|
18
|
+
return new AgentLaunchClient({
|
|
19
|
+
apiKey: process.env['AGENTVERSE_API_KEY'] ?? process.env['AGENT_LAUNCH_API_KEY'],
|
|
20
|
+
baseUrl: process.env['AGENT_LAUNCH_BASE_URL'],
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// getComments
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
/**
|
|
27
|
+
* Fetch all comments for a deployed token.
|
|
28
|
+
*
|
|
29
|
+
* Returns the comments in chronological order (oldest first). Comments are
|
|
30
|
+
* visible to anyone — no authentication is required.
|
|
31
|
+
*
|
|
32
|
+
* @param tokenAddress Contract address of the token
|
|
33
|
+
* @param client Optional pre-configured AgentLaunchClient
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import { getComments } from 'agentlaunch-sdk';
|
|
38
|
+
*
|
|
39
|
+
* const comments = await getComments('0xAbCd...');
|
|
40
|
+
* for (const c of comments) {
|
|
41
|
+
* console.log(`${c.user?.username ?? 'anon'}: ${c.message}`);
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export async function getComments(tokenAddress, client) {
|
|
46
|
+
const c = client ?? defaultClient();
|
|
47
|
+
return c.get(`/api/comments/${encodeURIComponent(tokenAddress)}`);
|
|
48
|
+
}
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
// postComment
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
/**
|
|
53
|
+
* Post a comment on a token page.
|
|
54
|
+
*
|
|
55
|
+
* Requires X-API-Key authentication. The comment is attributed to the
|
|
56
|
+
* account associated with the API key.
|
|
57
|
+
*
|
|
58
|
+
* @param params `tokenAddress` and `message` to post
|
|
59
|
+
* @param client Optional pre-configured AgentLaunchClient
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* import { postComment } from 'agentlaunch-sdk';
|
|
64
|
+
*
|
|
65
|
+
* const result = await postComment({
|
|
66
|
+
* tokenAddress: '0xAbCd...',
|
|
67
|
+
* message: 'Bullish on this agent!',
|
|
68
|
+
* });
|
|
69
|
+
* console.log(result.id, result.created_at);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export async function postComment(params, client) {
|
|
73
|
+
const c = client ?? defaultClient();
|
|
74
|
+
return c.post(`/api/comments/${encodeURIComponent(params.tokenAddress)}`, { message: params.message });
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=comments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.js","sourceRoot":"","sources":["../src/comments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,8EAA8E;AAC9E,gDAAgD;AAChD,8EAA8E;AAE9E,SAAS,aAAa;IACpB,OAAO,IAAI,iBAAiB,CAAC;QAC3B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;QAChF,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;KAC9C,CAAC,CAAC;AACL,CAAC;AAED,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,YAAoB,EACpB,MAA0B;IAE1B,MAAM,CAAC,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,GAAG,CAAY,iBAAiB,kBAAkB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAyB,EACzB,MAA0B;IAE1B,MAAM,CAAC,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,IAAI,CACX,iBAAiB,kBAAkB,CAAC,MAAM,CAAC,YAAY,CAAC,EAAE,EAC1D,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAC5B,CAAC;AACJ,CAAC"}
|
package/dist/handoff.d.ts
CHANGED
package/dist/handoff.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk
|
|
3
3
|
*
|
|
4
4
|
* TypeScript SDK for the AgentLaunch platform (agent-launch.ai).
|
|
5
5
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Quick start:
|
|
14
14
|
* ```ts
|
|
15
|
-
* import { tokenize, generateDeployLink } from '
|
|
15
|
+
* import { tokenize, generateDeployLink } from 'agentlaunch-sdk';
|
|
16
16
|
*
|
|
17
17
|
* const { data } = await tokenize({
|
|
18
18
|
* agentAddress: 'agent1qf8xfhsc8hg4g5l0nhtj...',
|
|
@@ -36,10 +36,11 @@
|
|
|
36
36
|
export { AgentLaunch } from './agentlaunch.js';
|
|
37
37
|
export type { TokensNamespace, MarketNamespace, HandoffNamespace, AgentsNamespace, } from './agentlaunch.js';
|
|
38
38
|
export { AgentLaunchClient } from './client.js';
|
|
39
|
-
export type { AgentLaunchConfig, TokenizeParams, TokenizeResponse, Token, TokenListParams, TokenListResponse, Holder, HolderListResponse, SingleHolderResponse, TradeAction, TradeLinkOptions, AgentAuthResponse, AgentverseAgent, MyAgentsResponse, ImportAgentverseResponse, } from './types.js';
|
|
39
|
+
export type { AgentLaunchConfig, TokenizeParams, TokenizeResponse, Token, TokenListParams, TokenListResponse, Holder, HolderListResponse, SingleHolderResponse, TradeAction, TradeLinkOptions, AgentAuthResponse, AgentverseAgent, MyAgentsResponse, ImportAgentverseResponse, Comment, PostCommentParams, PostCommentResponse, CalculateBuyResponse, CalculateSellResponse, PlatformStats, } from './types.js';
|
|
40
40
|
export { AgentLaunchError } from './types.js';
|
|
41
41
|
export { tokenize, getToken, listTokens } from './tokens.js';
|
|
42
|
-
export { getTokenPrice, getTokenHolders, generateTradeLink as generateTradeLinkWithAction, generateTradeLinkFromOptions, } from './market.js';
|
|
42
|
+
export { getTokenPrice, getTokenHolders, generateTradeLink as generateTradeLinkWithAction, generateTradeLinkFromOptions, calculateBuy, calculateSell, getPlatformStats, } from './market.js';
|
|
43
|
+
export { getComments, postComment } from './comments.js';
|
|
43
44
|
export { generateDeployLink, generateTradeLink, generateBuyLink, generateSellLink, } from './handoff.js';
|
|
44
45
|
export { authenticate, getMyAgents, importFromAgentverse } from './agents.js';
|
|
45
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,YAAY,EACV,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,KAAK,EACL,eAAe,EACf,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EAExB,OAAO,EACP,iBAAiB,EACjB,mBAAmB,EAEnB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAG7D,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,IAAI,2BAA2B,EAChD,4BAA4B,EAE5B,YAAY,EACZ,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGzD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk
|
|
3
3
|
*
|
|
4
4
|
* TypeScript SDK for the AgentLaunch platform (agent-launch.ai).
|
|
5
5
|
*
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Quick start:
|
|
14
14
|
* ```ts
|
|
15
|
-
* import { tokenize, generateDeployLink } from '
|
|
15
|
+
* import { tokenize, generateDeployLink } from 'agentlaunch-sdk';
|
|
16
16
|
*
|
|
17
17
|
* const { data } = await tokenize({
|
|
18
18
|
* agentAddress: 'agent1qf8xfhsc8hg4g5l0nhtj...',
|
|
@@ -41,7 +41,11 @@ export { AgentLaunchError } from './types.js';
|
|
|
41
41
|
// SDK-002: Token operations
|
|
42
42
|
export { tokenize, getToken, listTokens } from './tokens.js';
|
|
43
43
|
// SDK-003: Market operations
|
|
44
|
-
export { getTokenPrice, getTokenHolders, generateTradeLink as generateTradeLinkWithAction, generateTradeLinkFromOptions,
|
|
44
|
+
export { getTokenPrice, getTokenHolders, generateTradeLink as generateTradeLinkWithAction, generateTradeLinkFromOptions,
|
|
45
|
+
// CF-041/CF-042/CF-043
|
|
46
|
+
calculateBuy, calculateSell, getPlatformStats, } from './market.js';
|
|
47
|
+
// CF-039: Comment operations
|
|
48
|
+
export { getComments, postComment } from './comments.js';
|
|
45
49
|
// SDK-004: Handoff link generation
|
|
46
50
|
export { generateDeployLink, generateTradeLink, generateBuyLink, generateSellLink, } from './handoff.js';
|
|
47
51
|
// SDK-005: Agent operations
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,uBAAuB;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ/C,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,uBAAuB;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ/C,mBAAmB;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA4BhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,4BAA4B;AAC5B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE7D,6BAA6B;AAC7B,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,IAAI,2BAA2B,EAChD,4BAA4B;AAC5B,uBAAuB;AACvB,YAAY,EACZ,aAAa,EACb,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,6BAA6B;AAC7B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEzD,mCAAmC;AACnC,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,4BAA4B;AAC5B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/market.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — Market operations
|
|
3
3
|
*
|
|
4
4
|
* SDK-003: Price queries, holder data, and trade-link generation.
|
|
5
5
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* No creator fee.
|
|
11
11
|
*/
|
|
12
12
|
import { AgentLaunchClient } from './client.js';
|
|
13
|
-
import type { HolderListResponse, SingleHolderResponse, TradeAction, TradeLinkOptions } from './types.js';
|
|
13
|
+
import type { HolderListResponse, SingleHolderResponse, TradeAction, TradeLinkOptions, CalculateBuyResponse, CalculateSellResponse, PlatformStats } from './types.js';
|
|
14
14
|
/**
|
|
15
15
|
* Get the current bonding-curve price of a token in FET.
|
|
16
16
|
*
|
|
@@ -78,4 +78,66 @@ export declare function generateTradeLink(address: string, action: TradeAction,
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
export declare function generateTradeLinkFromOptions(address: string, options?: TradeLinkOptions, client?: AgentLaunchClient): string;
|
|
81
|
+
/**
|
|
82
|
+
* Simulate a buy transaction and return the expected outcome.
|
|
83
|
+
*
|
|
84
|
+
* Useful for displaying price impact and estimated token amounts to users
|
|
85
|
+
* before they confirm a transaction. No authentication required.
|
|
86
|
+
*
|
|
87
|
+
* Note: The 2% trading fee goes 100% to the protocol treasury (REVENUE_ACCOUNT).
|
|
88
|
+
* There is no creator fee.
|
|
89
|
+
*
|
|
90
|
+
* @param address Token contract address
|
|
91
|
+
* @param fetAmount Amount of FET the buyer intends to spend (as a string, e.g. "100")
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* import { calculateBuy } from 'agentlaunch-sdk';
|
|
96
|
+
*
|
|
97
|
+
* const result = await calculateBuy('0xAbCd...', '100');
|
|
98
|
+
* console.log(`You will receive ${result.tokensReceived} tokens`);
|
|
99
|
+
* console.log(`Price impact: ${result.priceImpact}%`);
|
|
100
|
+
* console.log(`Protocol fee: ${result.fee} FET`);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
export declare function calculateBuy(address: string, fetAmount: string, client?: AgentLaunchClient): Promise<CalculateBuyResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Simulate a sell transaction and return the expected outcome.
|
|
106
|
+
*
|
|
107
|
+
* Useful for displaying price impact and estimated FET proceeds to users
|
|
108
|
+
* before they confirm a transaction. No authentication required.
|
|
109
|
+
*
|
|
110
|
+
* Note: The 2% trading fee goes 100% to the protocol treasury (REVENUE_ACCOUNT).
|
|
111
|
+
* There is no creator fee.
|
|
112
|
+
*
|
|
113
|
+
* @param address Token contract address
|
|
114
|
+
* @param tokenAmount Number of tokens the seller intends to sell (as a string)
|
|
115
|
+
*
|
|
116
|
+
* @example
|
|
117
|
+
* ```ts
|
|
118
|
+
* import { calculateSell } from 'agentlaunch-sdk';
|
|
119
|
+
*
|
|
120
|
+
* const result = await calculateSell('0xAbCd...', '500000');
|
|
121
|
+
* console.log(`You will receive ${result.fetReceived} FET`);
|
|
122
|
+
* console.log(`Price impact: ${result.priceImpact}%`);
|
|
123
|
+
* console.log(`Protocol fee: ${result.fee} FET`);
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
export declare function calculateSell(address: string, tokenAmount: string, client?: AgentLaunchClient): Promise<CalculateSellResponse>;
|
|
127
|
+
/**
|
|
128
|
+
* Fetch aggregated platform statistics.
|
|
129
|
+
*
|
|
130
|
+
* Returns counts of all tokens on the platform broken down by status.
|
|
131
|
+
* No authentication required.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* import { getPlatformStats } from 'agentlaunch-sdk';
|
|
136
|
+
*
|
|
137
|
+
* const stats = await getPlatformStats();
|
|
138
|
+
* console.log(`Total tokens: ${stats.totalTokens}`);
|
|
139
|
+
* console.log(`Listed: ${stats.totalListed}, Bonding: ${stats.totalBonding}`);
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
export declare function getPlatformStats(client?: AgentLaunchClient): Promise<PlatformStats>;
|
|
81
143
|
//# sourceMappingURL=market.d.ts.map
|
package/dist/market.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../src/market.ts"],"names":[],"m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,EAAE,iBAAiB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAM/B;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAMhC;AAMD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,aAAa,CAAC,CAqBxB"}
|
package/dist/market.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — Market operations
|
|
3
3
|
*
|
|
4
4
|
* SDK-003: Price queries, holder data, and trade-link generation.
|
|
5
5
|
*
|
|
@@ -122,4 +122,105 @@ export function generateTradeLink(address, action, amount, client) {
|
|
|
122
122
|
export function generateTradeLinkFromOptions(address, options = {}, client) {
|
|
123
123
|
return generateTradeLink(address, options.action ?? 'buy', options.amount, client);
|
|
124
124
|
}
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
// calculateBuy
|
|
127
|
+
// ---------------------------------------------------------------------------
|
|
128
|
+
/**
|
|
129
|
+
* Simulate a buy transaction and return the expected outcome.
|
|
130
|
+
*
|
|
131
|
+
* Useful for displaying price impact and estimated token amounts to users
|
|
132
|
+
* before they confirm a transaction. No authentication required.
|
|
133
|
+
*
|
|
134
|
+
* Note: The 2% trading fee goes 100% to the protocol treasury (REVENUE_ACCOUNT).
|
|
135
|
+
* There is no creator fee.
|
|
136
|
+
*
|
|
137
|
+
* @param address Token contract address
|
|
138
|
+
* @param fetAmount Amount of FET the buyer intends to spend (as a string, e.g. "100")
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* import { calculateBuy } from 'agentlaunch-sdk';
|
|
143
|
+
*
|
|
144
|
+
* const result = await calculateBuy('0xAbCd...', '100');
|
|
145
|
+
* console.log(`You will receive ${result.tokensReceived} tokens`);
|
|
146
|
+
* console.log(`Price impact: ${result.priceImpact}%`);
|
|
147
|
+
* console.log(`Protocol fee: ${result.fee} FET`);
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
export async function calculateBuy(address, fetAmount, client) {
|
|
151
|
+
const c = client ?? defaultClient();
|
|
152
|
+
return c.get('/api/tokens/calculate-buy', {
|
|
153
|
+
address,
|
|
154
|
+
amount: fetAmount,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
// calculateSell
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
/**
|
|
161
|
+
* Simulate a sell transaction and return the expected outcome.
|
|
162
|
+
*
|
|
163
|
+
* Useful for displaying price impact and estimated FET proceeds to users
|
|
164
|
+
* before they confirm a transaction. No authentication required.
|
|
165
|
+
*
|
|
166
|
+
* Note: The 2% trading fee goes 100% to the protocol treasury (REVENUE_ACCOUNT).
|
|
167
|
+
* There is no creator fee.
|
|
168
|
+
*
|
|
169
|
+
* @param address Token contract address
|
|
170
|
+
* @param tokenAmount Number of tokens the seller intends to sell (as a string)
|
|
171
|
+
*
|
|
172
|
+
* @example
|
|
173
|
+
* ```ts
|
|
174
|
+
* import { calculateSell } from 'agentlaunch-sdk';
|
|
175
|
+
*
|
|
176
|
+
* const result = await calculateSell('0xAbCd...', '500000');
|
|
177
|
+
* console.log(`You will receive ${result.fetReceived} FET`);
|
|
178
|
+
* console.log(`Price impact: ${result.priceImpact}%`);
|
|
179
|
+
* console.log(`Protocol fee: ${result.fee} FET`);
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
export async function calculateSell(address, tokenAmount, client) {
|
|
183
|
+
const c = client ?? defaultClient();
|
|
184
|
+
return c.get('/api/tokens/calculate-sell', {
|
|
185
|
+
address,
|
|
186
|
+
amount: tokenAmount,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
// ---------------------------------------------------------------------------
|
|
190
|
+
// getPlatformStats
|
|
191
|
+
// ---------------------------------------------------------------------------
|
|
192
|
+
/**
|
|
193
|
+
* Fetch aggregated platform statistics.
|
|
194
|
+
*
|
|
195
|
+
* Returns counts of all tokens on the platform broken down by status.
|
|
196
|
+
* No authentication required.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```ts
|
|
200
|
+
* import { getPlatformStats } from 'agentlaunch-sdk';
|
|
201
|
+
*
|
|
202
|
+
* const stats = await getPlatformStats();
|
|
203
|
+
* console.log(`Total tokens: ${stats.totalTokens}`);
|
|
204
|
+
* console.log(`Listed: ${stats.totalListed}, Bonding: ${stats.totalBonding}`);
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
export async function getPlatformStats(client) {
|
|
208
|
+
const c = client ?? defaultClient();
|
|
209
|
+
const response = await c.get('/api/agents/tokens', {
|
|
210
|
+
limit: 1,
|
|
211
|
+
});
|
|
212
|
+
const tokens = response.tokens ?? [];
|
|
213
|
+
const total = response.total ?? 0;
|
|
214
|
+
const listed = tokens.filter((t) => t.listed).length;
|
|
215
|
+
const bonding = tokens.filter((t) => !t.listed && t.status === 'bonding').length;
|
|
216
|
+
// When only 1 token is fetched we can't derive accurate listed/bonding
|
|
217
|
+
// counts from the page — the total is the reliable figure. If the
|
|
218
|
+
// caller needs per-status breakdowns they should use listTokens() directly.
|
|
219
|
+
// We compute best-effort counts from all tokens fetched.
|
|
220
|
+
return {
|
|
221
|
+
totalTokens: total,
|
|
222
|
+
totalListed: listed,
|
|
223
|
+
totalBonding: bonding,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
125
226
|
//# sourceMappingURL=market.js.map
|
package/dist/market.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market.js","sourceRoot":"","sources":["../src/market.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EA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C,CAAC,MAAM,CAAC;IAEjF,uEAAuE;IACvE,mEAAmE;IACnE,4EAA4E;IAC5E,yDAAyD;IACzD,OAAO;QACL,WAAW,EAAE,KAAK;QAClB,WAAW,EAAE,MAAM;QACnB,YAAY,EAAE,OAAO;KACtB,CAAC;AACJ,CAAC"}
|
package/dist/tokens.d.ts
CHANGED
package/dist/tokens.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* agentlaunch-sdk — TypeScript types
|
|
3
3
|
*
|
|
4
4
|
* SDK-006: Canonical types for all AgentLaunch API operations.
|
|
5
5
|
*/
|
|
@@ -65,6 +65,21 @@ export interface TokenizeParams {
|
|
|
65
65
|
* @default 11155111
|
|
66
66
|
*/
|
|
67
67
|
chainId?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Max wallet limit: 0=unlimited (default), 1=0.5% (5M tokens), 2=1% (10M tokens).
|
|
70
|
+
* Controls the maximum number of tokens a single wallet may hold.
|
|
71
|
+
*/
|
|
72
|
+
maxWalletAmount?: 0 | 1 | 2;
|
|
73
|
+
/**
|
|
74
|
+
* FET amount to buy immediately after deploy (in FET, not wei). Max 1000.
|
|
75
|
+
* When set, the platform triggers an initial buy transaction on behalf of the
|
|
76
|
+
* deploying wallet immediately after the token goes live.
|
|
77
|
+
*/
|
|
78
|
+
initialBuyAmount?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Category ID for the token. Fetch available categories from /tokens/categories.
|
|
81
|
+
*/
|
|
82
|
+
category?: number;
|
|
68
83
|
}
|
|
69
84
|
/** Data returned by POST /agents/tokenize */
|
|
70
85
|
export interface TokenizeResponse {
|
|
@@ -136,6 +151,70 @@ export interface HolderListResponse {
|
|
|
136
151
|
export interface SingleHolderResponse {
|
|
137
152
|
holder: Holder;
|
|
138
153
|
}
|
|
154
|
+
/** A single comment attached to a token. */
|
|
155
|
+
export interface Comment {
|
|
156
|
+
id: number;
|
|
157
|
+
message: string;
|
|
158
|
+
userId: number;
|
|
159
|
+
tokenId: number;
|
|
160
|
+
created_at: string;
|
|
161
|
+
updated_at: string;
|
|
162
|
+
/** Author details — present when the server expands the user relation. */
|
|
163
|
+
user?: {
|
|
164
|
+
id: number;
|
|
165
|
+
username?: string;
|
|
166
|
+
address?: string;
|
|
167
|
+
avatar?: string;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/** Parameters for POST /comments/:tokenAddress */
|
|
171
|
+
export interface PostCommentParams {
|
|
172
|
+
/** Contract address of the token to comment on. */
|
|
173
|
+
tokenAddress: string;
|
|
174
|
+
/** Comment text body. */
|
|
175
|
+
message: string;
|
|
176
|
+
}
|
|
177
|
+
/** Response from POST /comments/:tokenAddress */
|
|
178
|
+
export interface PostCommentResponse {
|
|
179
|
+
id: number;
|
|
180
|
+
message: string;
|
|
181
|
+
created_at: string;
|
|
182
|
+
}
|
|
183
|
+
/** Response from GET /tokens/calculate-buy */
|
|
184
|
+
export interface CalculateBuyResponse {
|
|
185
|
+
/** Number of tokens the buyer will receive (string to preserve precision). */
|
|
186
|
+
tokensReceived: string;
|
|
187
|
+
/** Effective price per token in FET (string). */
|
|
188
|
+
pricePerToken: string;
|
|
189
|
+
/** Price impact as a percentage (0–100). */
|
|
190
|
+
priceImpact: number;
|
|
191
|
+
/** Protocol fee deducted in FET (2% of spend, 100% to treasury). */
|
|
192
|
+
fee: string;
|
|
193
|
+
/** Net FET amount spent after fee deduction (string). */
|
|
194
|
+
netFetSpent: string;
|
|
195
|
+
}
|
|
196
|
+
/** Response from GET /tokens/calculate-sell */
|
|
197
|
+
export interface CalculateSellResponse {
|
|
198
|
+
/** Amount of FET the seller will receive (string to preserve precision). */
|
|
199
|
+
fetReceived: string;
|
|
200
|
+
/** Effective price per token in FET (string). */
|
|
201
|
+
pricePerToken: string;
|
|
202
|
+
/** Price impact as a percentage (0–100). */
|
|
203
|
+
priceImpact: number;
|
|
204
|
+
/** Protocol fee deducted in FET (2% of proceeds, 100% to treasury). */
|
|
205
|
+
fee: string;
|
|
206
|
+
/** Net FET received after fee deduction (string). */
|
|
207
|
+
netFetReceived: string;
|
|
208
|
+
}
|
|
209
|
+
/** Aggregated platform-level statistics. */
|
|
210
|
+
export interface PlatformStats {
|
|
211
|
+
/** Total number of token records in the database. */
|
|
212
|
+
totalTokens: number;
|
|
213
|
+
/** Number of tokens that have graduated to a DEX listing. */
|
|
214
|
+
totalListed: number;
|
|
215
|
+
/** Number of tokens still trading on the bonding curve. */
|
|
216
|
+
totalBonding: number;
|
|
217
|
+
}
|
|
139
218
|
/** 'buy' or 'sell' — used in trade link generation. */
|
|
140
219
|
export type TradeAction = 'buy' | 'sell';
|
|
141
220
|
/** Options for trade link generation. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,iEAAiE;AACjE,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAMD,oEAAoE;AACpE,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,4EAA4E;IAC5E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM;CAQpE;AAMD,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MA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