agentlaunch-sdk 0.1.0
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 +66 -0
- package/README.md +319 -0
- package/dist/agentlaunch.d.ts +138 -0
- package/dist/agentlaunch.d.ts.map +1 -0
- package/dist/agentlaunch.js +85 -0
- package/dist/agentlaunch.js.map +1 -0
- package/dist/agents.d.ts +67 -0
- package/dist/agents.d.ts.map +1 -0
- package/dist/agents.js +106 -0
- package/dist/agents.js.map +1 -0
- package/dist/client.d.ts +67 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +174 -0
- package/dist/client.js.map +1 -0
- package/dist/handoff.d.ts +84 -0
- package/dist/handoff.d.ts.map +1 -0
- package/dist/handoff.js +119 -0
- package/dist/handoff.js.map +1 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/market.d.ts +81 -0
- package/dist/market.d.ts.map +1 -0
- package/dist/market.js +125 -0
- package/dist/market.js.map +1 -0
- package/dist/tokens.d.ts +66 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +86 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types.d.ts +174 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +20 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk
|
|
3
|
+
*
|
|
4
|
+
* TypeScript SDK for the AgentLaunch platform (agent-launch.ai).
|
|
5
|
+
*
|
|
6
|
+
* Enables AI agents and developers to:
|
|
7
|
+
* - Create token records and receive human handoff links
|
|
8
|
+
* - Query token prices, market data, and holder information
|
|
9
|
+
* - Generate pre-filled deploy and trade URLs for human users
|
|
10
|
+
* - Authenticate with Agentverse API keys
|
|
11
|
+
* - List and import Agentverse agents
|
|
12
|
+
*
|
|
13
|
+
* Quick start:
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { tokenize, generateDeployLink } from '@agent-launch/sdk';
|
|
16
|
+
*
|
|
17
|
+
* const { data } = await tokenize({
|
|
18
|
+
* agentAddress: 'agent1qf8xfhsc8hg4g5l0nhtj...',
|
|
19
|
+
* name: 'My Agent Token',
|
|
20
|
+
* chainId: 97,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* const link = generateDeployLink(data.token_id);
|
|
24
|
+
* // Share this link with a human → they connect wallet → token is live
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Authentication:
|
|
28
|
+
* Set AGENTVERSE_API_KEY in your environment, or pass `apiKey` directly
|
|
29
|
+
* to AgentLaunchClient.
|
|
30
|
+
*
|
|
31
|
+
* Platform fee:
|
|
32
|
+
* A 2% fee applies to every buy and sell transaction.
|
|
33
|
+
* This fee goes 100% to the protocol treasury (REVENUE_ACCOUNT).
|
|
34
|
+
* There is no creator fee.
|
|
35
|
+
*/
|
|
36
|
+
// Fluent wrapper class
|
|
37
|
+
export { AgentLaunch } from './agentlaunch.js';
|
|
38
|
+
// Core HTTP client
|
|
39
|
+
export { AgentLaunchClient } from './client.js';
|
|
40
|
+
export { AgentLaunchError } from './types.js';
|
|
41
|
+
// SDK-002: Token operations
|
|
42
|
+
export { tokenize, getToken, listTokens } from './tokens.js';
|
|
43
|
+
// SDK-003: Market operations
|
|
44
|
+
export { getTokenPrice, getTokenHolders, generateTradeLink as generateTradeLinkWithAction, generateTradeLinkFromOptions, } from './market.js';
|
|
45
|
+
// SDK-004: Handoff link generation
|
|
46
|
+
export { generateDeployLink, generateTradeLink, generateBuyLink, generateSellLink, } from './handoff.js';
|
|
47
|
+
// SDK-005: Agent operations
|
|
48
|
+
export { authenticate, getMyAgents, importFromAgentverse } from './agents.js';
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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;AAoBhD,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,GAC7B,MAAM,aAAa,CAAC;AAErB,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
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk — Market operations
|
|
3
|
+
*
|
|
4
|
+
* SDK-003: Price queries, holder data, and trade-link generation.
|
|
5
|
+
*
|
|
6
|
+
* Platform constants (immutable, set by deployed smart contracts):
|
|
7
|
+
* - TARGET_LIQUIDITY = 30,000 FET → auto DEX listing
|
|
8
|
+
* - TOTAL_BUY_TOKENS = 800,000,000
|
|
9
|
+
* - FEE_PERCENTAGE = 2% → 100% to protocol treasury (REVENUE_ACCOUNT)
|
|
10
|
+
* No creator fee.
|
|
11
|
+
*/
|
|
12
|
+
import { AgentLaunchClient } from './client.js';
|
|
13
|
+
import type { HolderListResponse, SingleHolderResponse, TradeAction, TradeLinkOptions } from './types.js';
|
|
14
|
+
/**
|
|
15
|
+
* Get the current bonding-curve price of a token in FET.
|
|
16
|
+
*
|
|
17
|
+
* Fetches the full token details and returns the `price` field. For bulk
|
|
18
|
+
* price fetching use `listTokens()` which returns prices for all tokens
|
|
19
|
+
* in a single request.
|
|
20
|
+
*
|
|
21
|
+
* No authentication required.
|
|
22
|
+
*
|
|
23
|
+
* @returns Current price as a string (preserves decimal precision)
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const price = await getTokenPrice('0xAbCd...');
|
|
28
|
+
* console.log(`Current price: ${price} FET`);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function getTokenPrice(address: string, client?: AgentLaunchClient): Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Get the list of token holders for a deployed token.
|
|
34
|
+
*
|
|
35
|
+
* Useful for implementing token-gated access: check whether a given wallet
|
|
36
|
+
* holds any of a particular agent's token.
|
|
37
|
+
*
|
|
38
|
+
* Pass `holderAddress` to look up a specific wallet instead of the full list.
|
|
39
|
+
*
|
|
40
|
+
* No authentication required.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* // Full holder list
|
|
45
|
+
* const { holders, total } = await getTokenHolders('0xAbCd...');
|
|
46
|
+
*
|
|
47
|
+
* // Single holder lookup (returns null if not a holder)
|
|
48
|
+
* const holder = await getTokenHolders('0xAbCd...', '0xUser...');
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export declare function getTokenHolders(address: string, holderAddress?: string, client?: AgentLaunchClient): Promise<HolderListResponse | SingleHolderResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Generate a pre-filled trade URL for a human to open.
|
|
54
|
+
*
|
|
55
|
+
* The returned URL opens the trade page with the action and amount
|
|
56
|
+
* pre-filled so the user only needs to connect their wallet and confirm.
|
|
57
|
+
*
|
|
58
|
+
* Agents should share this link rather than attempting to sign transactions
|
|
59
|
+
* on behalf of users.
|
|
60
|
+
*
|
|
61
|
+
* @param address Token contract address
|
|
62
|
+
* @param action 'buy' or 'sell'
|
|
63
|
+
* @param amount Optional pre-fill amount (FET for buys, token units for sells)
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const link = generateTradeLink('0xAbCd...', 'buy', 100);
|
|
68
|
+
* // https://agent-launch.ai/trade/0xAbCd...?action=buy&amount=100
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function generateTradeLink(address: string, action: TradeAction, amount?: number | string, client?: AgentLaunchClient): string;
|
|
72
|
+
/**
|
|
73
|
+
* Overload that accepts a TradeLinkOptions object instead of positional args.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* const link = generateTradeLinkFromOptions('0xAbCd...', { action: 'sell', amount: 500 });
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare function generateTradeLinkFromOptions(address: string, options?: TradeLinkOptions, client?: AgentLaunchClient): string;
|
|
81
|
+
//# sourceMappingURL=market.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market.d.ts","sourceRoot":"","sources":["../src/market.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EACjB,MAAM,YAAY,CAAC;AA4BpB;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,MAAM,CAAC,CAGjB;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,aAAa,CAAC,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,kBAAkB,GAAG,oBAAoB,CAAC,CAqBpD;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,WAAW,EACnB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EACxB,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAWR;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,gBAAqB,EAC9B,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAOR"}
|
package/dist/market.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk — Market operations
|
|
3
|
+
*
|
|
4
|
+
* SDK-003: Price queries, holder data, and trade-link generation.
|
|
5
|
+
*
|
|
6
|
+
* Platform constants (immutable, set by deployed smart contracts):
|
|
7
|
+
* - TARGET_LIQUIDITY = 30,000 FET → auto DEX listing
|
|
8
|
+
* - TOTAL_BUY_TOKENS = 800,000,000
|
|
9
|
+
* - FEE_PERCENTAGE = 2% → 100% to protocol treasury (REVENUE_ACCOUNT)
|
|
10
|
+
* No creator fee.
|
|
11
|
+
*/
|
|
12
|
+
import { AgentLaunchClient } from './client.js';
|
|
13
|
+
import { getToken } from './tokens.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
|
+
// getTokenPrice
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
/**
|
|
27
|
+
* Get the current bonding-curve price of a token in FET.
|
|
28
|
+
*
|
|
29
|
+
* Fetches the full token details and returns the `price` field. For bulk
|
|
30
|
+
* price fetching use `listTokens()` which returns prices for all tokens
|
|
31
|
+
* in a single request.
|
|
32
|
+
*
|
|
33
|
+
* No authentication required.
|
|
34
|
+
*
|
|
35
|
+
* @returns Current price as a string (preserves decimal precision)
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const price = await getTokenPrice('0xAbCd...');
|
|
40
|
+
* console.log(`Current price: ${price} FET`);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export async function getTokenPrice(address, client) {
|
|
44
|
+
const token = await getToken(address, client);
|
|
45
|
+
return token.price;
|
|
46
|
+
}
|
|
47
|
+
// ---------------------------------------------------------------------------
|
|
48
|
+
// getTokenHolders
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* Get the list of token holders for a deployed token.
|
|
52
|
+
*
|
|
53
|
+
* Useful for implementing token-gated access: check whether a given wallet
|
|
54
|
+
* holds any of a particular agent's token.
|
|
55
|
+
*
|
|
56
|
+
* Pass `holderAddress` to look up a specific wallet instead of the full list.
|
|
57
|
+
*
|
|
58
|
+
* No authentication required.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* // Full holder list
|
|
63
|
+
* const { holders, total } = await getTokenHolders('0xAbCd...');
|
|
64
|
+
*
|
|
65
|
+
* // Single holder lookup (returns null if not a holder)
|
|
66
|
+
* const holder = await getTokenHolders('0xAbCd...', '0xUser...');
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export async function getTokenHolders(address, holderAddress, client) {
|
|
70
|
+
const c = client ?? defaultClient();
|
|
71
|
+
const params = {};
|
|
72
|
+
if (holderAddress) {
|
|
73
|
+
params['holder'] = holderAddress;
|
|
74
|
+
}
|
|
75
|
+
if (holderAddress) {
|
|
76
|
+
const envelope = await c.get(`/api/agents/token/${encodeURIComponent(address)}/holders`, params);
|
|
77
|
+
return envelope.data;
|
|
78
|
+
}
|
|
79
|
+
const envelope = await c.get(`/api/agents/token/${encodeURIComponent(address)}/holders`, params);
|
|
80
|
+
return envelope.data;
|
|
81
|
+
}
|
|
82
|
+
// ---------------------------------------------------------------------------
|
|
83
|
+
// generateTradeLink
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
/**
|
|
86
|
+
* Generate a pre-filled trade URL for a human to open.
|
|
87
|
+
*
|
|
88
|
+
* The returned URL opens the trade page with the action and amount
|
|
89
|
+
* pre-filled so the user only needs to connect their wallet and confirm.
|
|
90
|
+
*
|
|
91
|
+
* Agents should share this link rather than attempting to sign transactions
|
|
92
|
+
* on behalf of users.
|
|
93
|
+
*
|
|
94
|
+
* @param address Token contract address
|
|
95
|
+
* @param action 'buy' or 'sell'
|
|
96
|
+
* @param amount Optional pre-fill amount (FET for buys, token units for sells)
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const link = generateTradeLink('0xAbCd...', 'buy', 100);
|
|
101
|
+
* // https://agent-launch.ai/trade/0xAbCd...?action=buy&amount=100
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export function generateTradeLink(address, action, amount, client) {
|
|
105
|
+
const baseUrl = client?.baseUrl
|
|
106
|
+
?? process.env['AGENT_LAUNCH_BASE_URL']?.replace(/\/$/, '')
|
|
107
|
+
?? 'https://agent-launch.ai';
|
|
108
|
+
const params = new URLSearchParams({ action });
|
|
109
|
+
if (amount !== undefined && amount !== null) {
|
|
110
|
+
params.set('amount', String(amount));
|
|
111
|
+
}
|
|
112
|
+
return `${baseUrl}/trade/${address}?${params.toString()}`;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Overload that accepts a TradeLinkOptions object instead of positional args.
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```ts
|
|
119
|
+
* const link = generateTradeLinkFromOptions('0xAbCd...', { action: 'sell', amount: 500 });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export function generateTradeLinkFromOptions(address, options = {}, client) {
|
|
123
|
+
return generateTradeLink(address, options.action ?? 'buy', options.amount, client);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=market.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"market.js","sourceRoot":"","sources":["../src/market.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAmBvC,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,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAe,EACf,MAA0B;IAE1B,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC,KAAK,CAAC;AACrB,CAAC;AAED,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,aAAsB,EACtB,MAA0B;IAE1B,MAAM,CAAC,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IAEpC,M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ACtB,OAAO,EACP,OAAO,CAAC,MAAM,IAAI,KAAK,EACvB,OAAO,CAAC,MAAM,EACd,MAAM,CACP,CAAC;AACJ,CAAC"}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk — Token operations
|
|
3
|
+
*
|
|
4
|
+
* SDK-002: Wraps the token-related AgentLaunch API endpoints.
|
|
5
|
+
*
|
|
6
|
+
* All functions accept an optional AgentLaunchClient instance. When omitted
|
|
7
|
+
* a default client is constructed from the AGENTVERSE_API_KEY and
|
|
8
|
+
* AGENT_LAUNCH_BASE_URL environment variables.
|
|
9
|
+
*/
|
|
10
|
+
import { AgentLaunchClient } from './client.js';
|
|
11
|
+
import type { Token, TokenizeParams, TokenizeResponse, TokenListParams, TokenListResponse } from './types.js';
|
|
12
|
+
/** Wrap the raw tokenize response envelope. */
|
|
13
|
+
interface TokenizeEnvelope {
|
|
14
|
+
success: true;
|
|
15
|
+
data: TokenizeResponse;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a pending token record for an Agentverse agent.
|
|
19
|
+
*
|
|
20
|
+
* Only `agentAddress` is required — all other fields default to values
|
|
21
|
+
* fetched from Agentverse agent metadata.
|
|
22
|
+
*
|
|
23
|
+
* On success the returned `handoff_link` is a URL the human must open
|
|
24
|
+
* to complete the on-chain deployment (connect wallet → approve FET → deploy).
|
|
25
|
+
*
|
|
26
|
+
* Requires X-API-Key authentication.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const { data } = await tokenize({
|
|
31
|
+
* agentAddress: 'agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qx...',
|
|
32
|
+
* name: 'My Agent',
|
|
33
|
+
* chainId: 97,
|
|
34
|
+
* });
|
|
35
|
+
* console.log(data.handoff_link); // https://agent-launch.ai/deploy/42
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function tokenize(params: TokenizeParams, client?: AgentLaunchClient): Promise<TokenizeEnvelope>;
|
|
39
|
+
/**
|
|
40
|
+
* Fetch a single token by its deployed contract address.
|
|
41
|
+
*
|
|
42
|
+
* The token must already be deployed (status = "bonding" or "listed").
|
|
43
|
+
* For pending tokens use the token ID instead.
|
|
44
|
+
*
|
|
45
|
+
* No authentication required.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const token = await getToken('0xAbCd...');
|
|
50
|
+
* console.log(token.price, token.market_cap, token.progress);
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function getToken(address: string, client?: AgentLaunchClient): Promise<Token>;
|
|
54
|
+
/**
|
|
55
|
+
* List tokens on the platform with optional filtering and pagination.
|
|
56
|
+
*
|
|
57
|
+
* No authentication required.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const { tokens } = await listTokens({ sortBy: 'market_cap', limit: 10 });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export declare function listTokens(params?: TokenListParams, client?: AgentLaunchClient): Promise<TokenListResponse>;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,+CAA+C;AAC/C,UAAU,gBAAgB;IACxB,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAiBD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,QAAQ,CAC5B,MAAM,EAAE,cAAc,EACtB,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAG3B;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,KAAK,CAAC,CAGhB;AAMD;;;;;;;;;GASG;AACH,wBAAsB,UAAU,CAC9B,MAAM,GAAE,eAAoB,EAC5B,MAAM,CAAC,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC,CAG5B"}
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk — Token operations
|
|
3
|
+
*
|
|
4
|
+
* SDK-002: Wraps the token-related AgentLaunch API endpoints.
|
|
5
|
+
*
|
|
6
|
+
* All functions accept an optional AgentLaunchClient instance. When omitted
|
|
7
|
+
* a default client is constructed from the AGENTVERSE_API_KEY and
|
|
8
|
+
* AGENT_LAUNCH_BASE_URL environment variables.
|
|
9
|
+
*/
|
|
10
|
+
import { AgentLaunchClient } from './client.js';
|
|
11
|
+
// ---------------------------------------------------------------------------
|
|
12
|
+
// Module-level default client (lazy, env-based)
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
function defaultClient() {
|
|
15
|
+
return new AgentLaunchClient({
|
|
16
|
+
apiKey: process.env['AGENTVERSE_API_KEY'] ?? process.env['AGENT_LAUNCH_API_KEY'],
|
|
17
|
+
baseUrl: process.env['AGENT_LAUNCH_BASE_URL'],
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// tokenize
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
/**
|
|
24
|
+
* Create a pending token record for an Agentverse agent.
|
|
25
|
+
*
|
|
26
|
+
* Only `agentAddress` is required — all other fields default to values
|
|
27
|
+
* fetched from Agentverse agent metadata.
|
|
28
|
+
*
|
|
29
|
+
* On success the returned `handoff_link` is a URL the human must open
|
|
30
|
+
* to complete the on-chain deployment (connect wallet → approve FET → deploy).
|
|
31
|
+
*
|
|
32
|
+
* Requires X-API-Key authentication.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const { data } = await tokenize({
|
|
37
|
+
* agentAddress: 'agent1qf8xfhsc8hg4g5l0nhtj5hxxkyd46c64qx...',
|
|
38
|
+
* name: 'My Agent',
|
|
39
|
+
* chainId: 97,
|
|
40
|
+
* });
|
|
41
|
+
* console.log(data.handoff_link); // https://agent-launch.ai/deploy/42
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export async function tokenize(params, client) {
|
|
45
|
+
const c = client ?? defaultClient();
|
|
46
|
+
return c.post('/api/agents/tokenize', params);
|
|
47
|
+
}
|
|
48
|
+
// ---------------------------------------------------------------------------
|
|
49
|
+
// getToken
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
/**
|
|
52
|
+
* Fetch a single token by its deployed contract address.
|
|
53
|
+
*
|
|
54
|
+
* The token must already be deployed (status = "bonding" or "listed").
|
|
55
|
+
* For pending tokens use the token ID instead.
|
|
56
|
+
*
|
|
57
|
+
* No authentication required.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* const token = await getToken('0xAbCd...');
|
|
62
|
+
* console.log(token.price, token.market_cap, token.progress);
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
export async function getToken(address, client) {
|
|
66
|
+
const c = client ?? defaultClient();
|
|
67
|
+
return c.get(`/api/agents/token/${encodeURIComponent(address)}`);
|
|
68
|
+
}
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
// listTokens
|
|
71
|
+
// ---------------------------------------------------------------------------
|
|
72
|
+
/**
|
|
73
|
+
* List tokens on the platform with optional filtering and pagination.
|
|
74
|
+
*
|
|
75
|
+
* No authentication required.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const { tokens } = await listTokens({ sortBy: 'market_cap', limit: 10 });
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export async function listTokens(params = {}, client) {
|
|
83
|
+
const c = client ?? defaultClient();
|
|
84
|
+
return c.get('/api/agents/tokens', params);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAehD,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,WAAW;AACX,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,MAAsB,EACtB,MAA0B;IAE1B,MAAM,CAAC,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,IAAI,CAAmB,sBAAsB,EAAE,MAAM,CAAC,CAAC;AAClE,CAAC;AAED,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,OAAe,EACf,MAA0B;IAE1B,MAAM,CAAC,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,GAAG,CAAQ,qBAAqB,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,SAA0B,EAAE,EAC5B,MAA0B;IAE1B,MAAM,CAAC,GAAG,MAAM,IAAI,aAAa,EAAE,CAAC;IACpC,OAAO,CAAC,CAAC,GAAG,CAAoB,oBAAoB,EAAE,MAA+D,CAAC,CAAC;AACzH,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk — TypeScript types
|
|
3
|
+
*
|
|
4
|
+
* SDK-006: Canonical types for all AgentLaunch API operations.
|
|
5
|
+
*/
|
|
6
|
+
/** Configuration passed to AgentLaunchClient on construction. */
|
|
7
|
+
export interface AgentLaunchConfig {
|
|
8
|
+
/** Agentverse API key used as X-API-Key header on authenticated requests. */
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Base URL for the AgentLaunch platform.
|
|
12
|
+
* @default "https://agent-launch.ai"
|
|
13
|
+
*/
|
|
14
|
+
baseUrl?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum number of retry attempts on HTTP 429 (rate limit) responses.
|
|
17
|
+
* Retries use exponential backoff: 1s, 2s, 4s, …
|
|
18
|
+
* @default 3
|
|
19
|
+
*/
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
}
|
|
22
|
+
/** Typed error thrown by every SDK method on a non-2xx response. */
|
|
23
|
+
export declare class AgentLaunchError extends Error {
|
|
24
|
+
/** HTTP status code returned by the server (0 if network-level failure). */
|
|
25
|
+
readonly status: number;
|
|
26
|
+
/** Original server message when available. */
|
|
27
|
+
readonly serverMessage: string | undefined;
|
|
28
|
+
constructor(message: string, status: number, serverMessage?: string);
|
|
29
|
+
}
|
|
30
|
+
/** Parameters for POST /agents/tokenize */
|
|
31
|
+
export interface TokenizeParams {
|
|
32
|
+
/**
|
|
33
|
+
* Agentverse agent address (agent1q…) or Ethereum address (0x…).
|
|
34
|
+
* Required — this is the agent being tokenized.
|
|
35
|
+
*/
|
|
36
|
+
agentAddress: string;
|
|
37
|
+
/**
|
|
38
|
+
* Token name (max 32 characters).
|
|
39
|
+
* When omitted the platform fetches the name from Agentverse metadata.
|
|
40
|
+
*/
|
|
41
|
+
name?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Token ticker symbol (max 11 characters, auto-uppercased).
|
|
44
|
+
* When omitted the platform derives it from the first 4 characters of name.
|
|
45
|
+
*/
|
|
46
|
+
symbol?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Token description (max 500 characters).
|
|
49
|
+
* When omitted an auto-generated description is used.
|
|
50
|
+
*/
|
|
51
|
+
description?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Token image: a public URL, a base64 data URI (data:image/…), or "auto"
|
|
54
|
+
* to request an auto-generated placeholder.
|
|
55
|
+
*/
|
|
56
|
+
image?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Agentverse-hosted avatar URL (https://agentverse.ai/…).
|
|
59
|
+
* Used when image is "auto" — preferred over the generated placeholder.
|
|
60
|
+
*/
|
|
61
|
+
agentverse_avatar_url?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Chain ID for deployment.
|
|
64
|
+
* Supported values: 56 (BSC Mainnet), 97 (BSC Testnet), 1 (ETH Mainnet), 11155111 (Sepolia).
|
|
65
|
+
* @default 11155111
|
|
66
|
+
*/
|
|
67
|
+
chainId?: number;
|
|
68
|
+
}
|
|
69
|
+
/** Data returned by POST /agents/tokenize */
|
|
70
|
+
export interface TokenizeResponse {
|
|
71
|
+
/** Database ID of the pending token record. Used to build handoff links. */
|
|
72
|
+
token_id: number;
|
|
73
|
+
/** Pre-built URL the human must open to complete on-chain deployment. */
|
|
74
|
+
handoff_link: string;
|
|
75
|
+
name: string;
|
|
76
|
+
symbol: string;
|
|
77
|
+
description: string;
|
|
78
|
+
/** Resolved token image URL. */
|
|
79
|
+
image: string;
|
|
80
|
+
/** "pending_deployment" until on-chain deploy is complete; "deployed" after. */
|
|
81
|
+
status: 'pending_deployment' | 'deployed';
|
|
82
|
+
}
|
|
83
|
+
/** A token as returned in list and detail responses. */
|
|
84
|
+
export interface Token {
|
|
85
|
+
id: number;
|
|
86
|
+
name: string;
|
|
87
|
+
symbol: string;
|
|
88
|
+
/** Contract address — null while the token is pending deployment. */
|
|
89
|
+
address: string | null;
|
|
90
|
+
description: string;
|
|
91
|
+
logo: string;
|
|
92
|
+
/** Deployment status. */
|
|
93
|
+
status: 'pending' | 'bonding' | 'listed';
|
|
94
|
+
/** Current price in FET (string to preserve precision). */
|
|
95
|
+
price: string;
|
|
96
|
+
/** Market cap in FET (string). */
|
|
97
|
+
market_cap: string;
|
|
98
|
+
/** Bonding-curve progress toward 30,000 FET graduation (0–100). */
|
|
99
|
+
progress: number;
|
|
100
|
+
chainId: number;
|
|
101
|
+
creator?: string;
|
|
102
|
+
agentId?: string | null;
|
|
103
|
+
listed: boolean;
|
|
104
|
+
created_at: string;
|
|
105
|
+
}
|
|
106
|
+
/** Query parameters for GET /agents/tokens */
|
|
107
|
+
export interface TokenListParams {
|
|
108
|
+
page?: number;
|
|
109
|
+
limit?: number;
|
|
110
|
+
search?: string;
|
|
111
|
+
categoryId?: number;
|
|
112
|
+
chainId?: number;
|
|
113
|
+
sortBy?: string;
|
|
114
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
115
|
+
}
|
|
116
|
+
/** Response from GET /agents/tokens */
|
|
117
|
+
export interface TokenListResponse {
|
|
118
|
+
tokens: Token[];
|
|
119
|
+
/** Total count matching the query (before pagination). */
|
|
120
|
+
total?: number;
|
|
121
|
+
mainToken?: Token | null;
|
|
122
|
+
}
|
|
123
|
+
/** A single token holder entry. */
|
|
124
|
+
export interface Holder {
|
|
125
|
+
address: string;
|
|
126
|
+
balance: string;
|
|
127
|
+
/** Percentage of total supply held (0–100). */
|
|
128
|
+
percentage?: number;
|
|
129
|
+
}
|
|
130
|
+
/** Response from GET /agents/token/:address/holders */
|
|
131
|
+
export interface HolderListResponse {
|
|
132
|
+
holders: Holder[];
|
|
133
|
+
total: number;
|
|
134
|
+
}
|
|
135
|
+
/** Response when a single holder address is queried. */
|
|
136
|
+
export interface SingleHolderResponse {
|
|
137
|
+
holder: Holder;
|
|
138
|
+
}
|
|
139
|
+
/** 'buy' or 'sell' — used in trade link generation. */
|
|
140
|
+
export type TradeAction = 'buy' | 'sell';
|
|
141
|
+
/** Options for trade link generation. */
|
|
142
|
+
export interface TradeLinkOptions {
|
|
143
|
+
action?: TradeAction;
|
|
144
|
+
/** Pre-fill amount (FET for buys, token units for sells). */
|
|
145
|
+
amount?: number | string;
|
|
146
|
+
}
|
|
147
|
+
/** Response from POST /agents/auth */
|
|
148
|
+
export interface AgentAuthResponse {
|
|
149
|
+
success: true;
|
|
150
|
+
data: {
|
|
151
|
+
token: string;
|
|
152
|
+
expires_in: number;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
/** A single Agentverse agent entry returned by GET /agents/my-agents */
|
|
156
|
+
export interface AgentverseAgent {
|
|
157
|
+
address: string;
|
|
158
|
+
name: string;
|
|
159
|
+
[key: string]: unknown;
|
|
160
|
+
}
|
|
161
|
+
/** Response from GET /agents/my-agents */
|
|
162
|
+
export interface MyAgentsResponse {
|
|
163
|
+
success: true;
|
|
164
|
+
data: {
|
|
165
|
+
agents: AgentverseAgent[];
|
|
166
|
+
count: number;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/** Response from POST /agents/import-agentverse */
|
|
170
|
+
export interface ImportAgentverseResponse {
|
|
171
|
+
agents: AgentverseAgent[];
|
|
172
|
+
count: number;
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","s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UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wDAAwD;AACxD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD,uDAAuD;AACvD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC,yCAAyC;AACzC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAMD,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,wEAAwE;AACxE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,0CAA0C;AAC1C,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE;QACJ,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1B,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,mDAAmD;AACnD,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @agent-launch/sdk — TypeScript types
|
|
3
|
+
*
|
|
4
|
+
* SDK-006: Canonical types for all AgentLaunch API operations.
|
|
5
|
+
*/
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// Error
|
|
8
|
+
// ---------------------------------------------------------------------------
|
|
9
|
+
/** Typed error thrown by every SDK method on a non-2xx response. */
|
|
10
|
+
export class AgentLaunchError extends Error {
|
|
11
|
+
constructor(message, status, serverMessage) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.name = 'AgentLaunchError';
|
|
14
|
+
this.status = status;
|
|
15
|
+
this.serverMessage = serverMessage;
|
|
16
|
+
// Restore prototype chain when targeting older runtimes
|
|
17
|
+
Object.setPrototypeOf(this, AgentLaunchError.prototype);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAuBH,8EAA8E;AAC9E,QAAQ;AACR,8EAA8E;AAE9E,oEAAoE;AACpE,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAMzC,YAAY,OAAe,EAAE,MAAc,EAAE,aAAsB;QACjE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,wDAAwD;QACxD,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC1D,CAAC;CACF"}
|