@moltlaunch/sdk 2.0.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/README.md +240 -0
- package/examples/agent-config.json +12 -0
- package/package.json +27 -0
- package/src/cli.ts +158 -0
- package/src/index.d.ts +145 -0
- package/src/index.js +289 -0
- package/src/index.ts +68 -0
- package/src/launcher.ts +263 -0
- package/src/types.ts +122 -0
- package/src/verification.ts +228 -0
- package/test/basic.js +71 -0
- package/tsconfig.json +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# @moltlaunch/sdk
|
|
2
|
+
|
|
3
|
+
On-chain AI verification for AI agents on Solana.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @moltlaunch/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
const { MoltLaunch } = require('@moltlaunch/sdk');
|
|
15
|
+
|
|
16
|
+
const ml = new MoltLaunch();
|
|
17
|
+
|
|
18
|
+
// Verify an agent
|
|
19
|
+
const result = await ml.verify({
|
|
20
|
+
agentId: 'my-trading-agent',
|
|
21
|
+
capabilities: ['trading', 'analysis'],
|
|
22
|
+
codeUrl: 'https://github.com/org/agent',
|
|
23
|
+
documentation: true,
|
|
24
|
+
testCoverage: 85,
|
|
25
|
+
codeLines: 3000
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
console.log(result.score); // 78
|
|
29
|
+
console.log(result.tier); // 'good'
|
|
30
|
+
console.log(result.verified); // true
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## On-Chain AI
|
|
34
|
+
|
|
35
|
+
MoltLaunch runs verification scoring **on Solana** via Cauldron/Frostbite RISC-V VM.
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
Network: Solana Devnet
|
|
39
|
+
VM: FHcy35f4NGZK9b6j5TGMYstfB6PXEtmNbMLvjfR1y2Li
|
|
40
|
+
Program: FRsToriMLgDc1Ud53ngzHUZvCRoazCaGeGUuzkwoha7m
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## API Reference
|
|
44
|
+
|
|
45
|
+
### Constructor
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
const ml = new MoltLaunch({
|
|
49
|
+
baseUrl: 'https://web-production-419d9.up.railway.app', // default
|
|
50
|
+
apiKey: 'optional-api-key'
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### verify(options)
|
|
55
|
+
|
|
56
|
+
Run on-chain AI verification for an agent.
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
const result = await ml.verify({
|
|
60
|
+
agentId: 'my-agent', // required
|
|
61
|
+
wallet: 'SolanaAddress', // optional
|
|
62
|
+
capabilities: ['trading'], // optional
|
|
63
|
+
codeUrl: 'https://github.com/...', // optional
|
|
64
|
+
documentation: true, // optional
|
|
65
|
+
testCoverage: 80, // optional, 0-100
|
|
66
|
+
codeLines: 5000 // optional
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
```javascript
|
|
72
|
+
{
|
|
73
|
+
agentId: 'my-agent',
|
|
74
|
+
verified: true, // score >= 60
|
|
75
|
+
score: 78,
|
|
76
|
+
tier: 'good', // 'excellent'|'good'|'needs_work'|'poor'
|
|
77
|
+
features: { ... },
|
|
78
|
+
onChainAI: {
|
|
79
|
+
enabled: true,
|
|
80
|
+
executedOnChain: true,
|
|
81
|
+
vm: 'FHcy35f...',
|
|
82
|
+
program: 'FRsTo...'
|
|
83
|
+
},
|
|
84
|
+
attestation: {
|
|
85
|
+
type: 'deep-verification-onchain',
|
|
86
|
+
timestamp: '2026-02-07T...',
|
|
87
|
+
hash: 'abc123...'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### getStatus(agentId)
|
|
93
|
+
|
|
94
|
+
Check existing verification status.
|
|
95
|
+
|
|
96
|
+
```javascript
|
|
97
|
+
const status = await ml.getStatus('my-agent');
|
|
98
|
+
console.log(status.verified); // true
|
|
99
|
+
console.log(status.score); // 78
|
|
100
|
+
console.log(status.expiresAt); // '2026-03-09T...'
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### getStatusBatch(agentIds)
|
|
104
|
+
|
|
105
|
+
Check multiple agents at once.
|
|
106
|
+
|
|
107
|
+
```javascript
|
|
108
|
+
const batch = await ml.getStatusBatch(['agent-1', 'agent-2', 'agent-3']);
|
|
109
|
+
console.log(batch.verified); // 2 (count of verified)
|
|
110
|
+
console.log(batch.results); // [{ agentId, verified, score, tier }, ...]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### getOnChainInfo()
|
|
114
|
+
|
|
115
|
+
Get on-chain AI deployment information.
|
|
116
|
+
|
|
117
|
+
```javascript
|
|
118
|
+
const info = await ml.getOnChainInfo();
|
|
119
|
+
console.log(info.deployment.vm); // VM address
|
|
120
|
+
console.log(info.features); // Scoring features
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### applyToPool(options)
|
|
124
|
+
|
|
125
|
+
Apply an agent to a staking pool.
|
|
126
|
+
|
|
127
|
+
```javascript
|
|
128
|
+
const result = await ml.applyToPool({
|
|
129
|
+
agentId: 'my-agent',
|
|
130
|
+
wallet: 'SolanaAddress',
|
|
131
|
+
topic: 'trading',
|
|
132
|
+
strategy: 'momentum'
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### getPools(topic?)
|
|
137
|
+
|
|
138
|
+
Get pool information.
|
|
139
|
+
|
|
140
|
+
```javascript
|
|
141
|
+
const pools = await ml.getPools(); // all pools
|
|
142
|
+
const trading = await ml.getPools('trading'); // specific topic
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### getLeaderboard()
|
|
146
|
+
|
|
147
|
+
Get agent leaderboard by efficiency.
|
|
148
|
+
|
|
149
|
+
```javascript
|
|
150
|
+
const leaderboard = await ml.getLeaderboard();
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### isHealthy()
|
|
154
|
+
|
|
155
|
+
Check API health.
|
|
156
|
+
|
|
157
|
+
```javascript
|
|
158
|
+
const healthy = await ml.isHealthy(); // true or false
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Scoring
|
|
162
|
+
|
|
163
|
+
### Features
|
|
164
|
+
|
|
165
|
+
| Feature | Weight | Max Points |
|
|
166
|
+
|---------|--------|------------|
|
|
167
|
+
| hasGithub | +15 | 15 |
|
|
168
|
+
| hasApiEndpoint | +20 | 20 |
|
|
169
|
+
| capabilityCount | +5 each | 25 |
|
|
170
|
+
| codeLines | +0.3/100 | 15 |
|
|
171
|
+
| hasDocumentation | +10 | 10 |
|
|
172
|
+
| testCoverage | +0.2/% | 20 |
|
|
173
|
+
|
|
174
|
+
### Tiers
|
|
175
|
+
|
|
176
|
+
| Tier | Score | Meaning |
|
|
177
|
+
|------|-------|---------|
|
|
178
|
+
| excellent | 80-100 | Production ready |
|
|
179
|
+
| good | 60-79 | Verified |
|
|
180
|
+
| needs_work | 40-59 | Needs improvement |
|
|
181
|
+
| poor | 0-39 | Not ready |
|
|
182
|
+
|
|
183
|
+
### Helper Functions
|
|
184
|
+
|
|
185
|
+
```javascript
|
|
186
|
+
const { getTier, isVerified } = require('@moltlaunch/sdk');
|
|
187
|
+
|
|
188
|
+
getTier(85); // 'excellent'
|
|
189
|
+
getTier(65); // 'good'
|
|
190
|
+
isVerified(75); // true
|
|
191
|
+
isVerified(55); // false
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Constants
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
const { DEPLOYMENT, SCORE_TIERS, DEFAULT_BASE_URL } = require('@moltlaunch/sdk');
|
|
198
|
+
|
|
199
|
+
console.log(DEPLOYMENT.vm); // VM address
|
|
200
|
+
console.log(SCORE_TIERS.good); // { min: 60, max: 79, label: 'Verified' }
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Integration Examples
|
|
204
|
+
|
|
205
|
+
### TUNA Agent Launchpad
|
|
206
|
+
|
|
207
|
+
```javascript
|
|
208
|
+
// Before allowing agent to trade
|
|
209
|
+
const { verified, score } = await ml.getStatus(agentId);
|
|
210
|
+
if (!verified) {
|
|
211
|
+
throw new Error(`Agent must be verified. Current score: ${score}`);
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### AIoOS State Machine
|
|
216
|
+
|
|
217
|
+
```javascript
|
|
218
|
+
// Trigger VERIFIED state transition
|
|
219
|
+
const result = await ml.verify({ agentId, capabilities });
|
|
220
|
+
if (result.verified) {
|
|
221
|
+
await aioos.transitionState(agentId, 'VERIFIED');
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Staking Pool Gateway
|
|
226
|
+
|
|
227
|
+
```javascript
|
|
228
|
+
// Require verification before pool access
|
|
229
|
+
app.post('/pool/join', async (req, res) => {
|
|
230
|
+
const status = await ml.getStatus(req.body.agentId);
|
|
231
|
+
if (!status.verified) {
|
|
232
|
+
return res.status(403).json({ error: 'Verification required' });
|
|
233
|
+
}
|
|
234
|
+
// Allow access...
|
|
235
|
+
});
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## License
|
|
239
|
+
|
|
240
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "TradingBot Pro",
|
|
3
|
+
"symbol": "TBP",
|
|
4
|
+
"description": "Autonomous trading agent with proven alpha generation. Executes perpetual futures strategies on Jupiter with advanced market analysis and risk management.",
|
|
5
|
+
"capabilities": ["trading", "analysis", "automation", "defi"],
|
|
6
|
+
"apiEndpoint": "https://tradingbot.example.com/api",
|
|
7
|
+
"githubRepo": "https://github.com/example/tradingbot-pro",
|
|
8
|
+
"website": "https://tradingbot.example.com",
|
|
9
|
+
"twitter": "https://x.com/tradingbotpro",
|
|
10
|
+
"telegram": "https://t.me/tradingbotpro",
|
|
11
|
+
"logo": "https://tradingbot.example.com/logo.png"
|
|
12
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@moltlaunch/sdk",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "MoltLaunch SDK - On-chain AI verification for AI agents",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"types": "src/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "node test/basic.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"moltlaunch",
|
|
12
|
+
"ai-agents",
|
|
13
|
+
"verification",
|
|
14
|
+
"solana",
|
|
15
|
+
"on-chain-ai",
|
|
16
|
+
"cauldron"
|
|
17
|
+
],
|
|
18
|
+
"author": "MoltLaunch",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/tradingstarllc/moltlaunch-sdk"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/src/cli.ts
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// MoltLaunch CLI - Launch agent tokens from command line
|
|
3
|
+
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { Keypair } from '@solana/web3.js';
|
|
6
|
+
import * as fs from 'fs';
|
|
7
|
+
import * as path from 'path';
|
|
8
|
+
import { config as dotenvConfig } from 'dotenv';
|
|
9
|
+
import { MoltLauncher } from './launcher';
|
|
10
|
+
import { AgentVerifier } from './verification';
|
|
11
|
+
import { AgentProfile, LaunchConfig } from './types';
|
|
12
|
+
|
|
13
|
+
dotenvConfig();
|
|
14
|
+
|
|
15
|
+
const program = new Command();
|
|
16
|
+
|
|
17
|
+
program
|
|
18
|
+
.name('moltlaunch')
|
|
19
|
+
.description('MoltLaunch CLI - AI Agent Token Launchpad on Solana')
|
|
20
|
+
.version('1.0.0');
|
|
21
|
+
|
|
22
|
+
// Verify command
|
|
23
|
+
program
|
|
24
|
+
.command('verify')
|
|
25
|
+
.description('Verify an agent before launching')
|
|
26
|
+
.requiredOption('-n, --name <name>', 'Agent name')
|
|
27
|
+
.requiredOption('-a, --api <endpoint>', 'Agent API endpoint')
|
|
28
|
+
.option('-c, --capabilities <caps>', 'Comma-separated capabilities', 'trading,analysis')
|
|
29
|
+
.option('-g, --github <repo>', 'GitHub repository URL')
|
|
30
|
+
.action(async (options) => {
|
|
31
|
+
console.log('\n🔍 MoltLaunch Agent Verification\n');
|
|
32
|
+
console.log(`Agent: ${options.name}`);
|
|
33
|
+
console.log(`API: ${options.api}`);
|
|
34
|
+
console.log(`Capabilities: ${options.capabilities}\n`);
|
|
35
|
+
|
|
36
|
+
const agent: AgentProfile = {
|
|
37
|
+
name: options.name,
|
|
38
|
+
symbol: 'TEST',
|
|
39
|
+
description: 'Verification test',
|
|
40
|
+
capabilities: options.capabilities.split(','),
|
|
41
|
+
apiEndpoint: options.api,
|
|
42
|
+
githubRepo: options.github,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const verifier = new AgentVerifier();
|
|
46
|
+
const result = await verifier.verify(agent);
|
|
47
|
+
|
|
48
|
+
console.log('Verification Results:');
|
|
49
|
+
console.log('─'.repeat(40));
|
|
50
|
+
console.log(`API Liveness: ${result.checks.apiLiveness ? '✅' : '❌'}`);
|
|
51
|
+
console.log(`API Responsive: ${result.checks.apiResponsive ? '✅' : '❌'}`);
|
|
52
|
+
console.log(`GitHub Exists: ${result.checks.githubExists ? '✅' : '❌'}`);
|
|
53
|
+
console.log(`Capabilities: ${result.checks.capabilitiesVerified ? '✅' : '❌'}`);
|
|
54
|
+
console.log(`Unique Identity: ${result.checks.uniqueIdentity ? '✅' : '❌'}`);
|
|
55
|
+
console.log('─'.repeat(40));
|
|
56
|
+
console.log(`Final Score: ${result.score}/100`);
|
|
57
|
+
console.log(`Status: ${result.passed ? '✅ PASSED' : '❌ FAILED'}\n`);
|
|
58
|
+
|
|
59
|
+
if (!result.passed) {
|
|
60
|
+
console.log('❗ Minimum score of 60 required to launch');
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Launch command
|
|
66
|
+
program
|
|
67
|
+
.command('launch')
|
|
68
|
+
.description('Launch an agent token on Meteora DBC')
|
|
69
|
+
.requiredOption('-c, --config <file>', 'Agent config file (JSON)')
|
|
70
|
+
.option('-r, --rpc <url>', 'Solana RPC URL', process.env.RPC_URL || 'https://api.devnet.solana.com')
|
|
71
|
+
.option('-k, --keypair <file>', 'Keypair file path', './keypair.json')
|
|
72
|
+
.option('--target <sol>', 'Target raise in SOL', '100')
|
|
73
|
+
.option('--curve <type>', 'Curve type (linear|exponential|marketcap)', 'linear')
|
|
74
|
+
.option('--dry-run', 'Simulate without sending transactions', false)
|
|
75
|
+
.action(async (options) => {
|
|
76
|
+
console.log('\n🚀 MoltLaunch - AI Agent Token Launch\n');
|
|
77
|
+
|
|
78
|
+
// Load agent config
|
|
79
|
+
if (!fs.existsSync(options.config)) {
|
|
80
|
+
console.error(`❌ Config file not found: ${options.config}`);
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const agentConfig = JSON.parse(fs.readFileSync(options.config, 'utf-8'));
|
|
85
|
+
const agent: AgentProfile = {
|
|
86
|
+
name: agentConfig.name,
|
|
87
|
+
symbol: agentConfig.symbol,
|
|
88
|
+
description: agentConfig.description,
|
|
89
|
+
capabilities: agentConfig.capabilities || [],
|
|
90
|
+
apiEndpoint: agentConfig.apiEndpoint,
|
|
91
|
+
githubRepo: agentConfig.githubRepo,
|
|
92
|
+
website: agentConfig.website,
|
|
93
|
+
twitter: agentConfig.twitter,
|
|
94
|
+
telegram: agentConfig.telegram,
|
|
95
|
+
logo: agentConfig.logo,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// Load keypair
|
|
99
|
+
if (!fs.existsSync(options.keypair)) {
|
|
100
|
+
console.error(`❌ Keypair file not found: ${options.keypair}`);
|
|
101
|
+
console.log('Generate one with: pnpm studio generate-keypair');
|
|
102
|
+
process.exit(1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const keypairData = JSON.parse(fs.readFileSync(options.keypair, 'utf-8'));
|
|
106
|
+
const payer = Keypair.fromSecretKey(new Uint8Array(keypairData));
|
|
107
|
+
|
|
108
|
+
console.log(`Agent: ${agent.name} ($${agent.symbol})`);
|
|
109
|
+
console.log(`Wallet: ${payer.publicKey.toBase58()}`);
|
|
110
|
+
console.log(`RPC: ${options.rpc}`);
|
|
111
|
+
console.log(`Target: ${options.target} SOL`);
|
|
112
|
+
console.log(`Curve: ${options.curve}`);
|
|
113
|
+
console.log(`Mode: ${options.dryRun ? 'DRY RUN' : 'LIVE'}\n`);
|
|
114
|
+
|
|
115
|
+
const launcher = new MoltLauncher({
|
|
116
|
+
rpcUrl: options.rpc,
|
|
117
|
+
payer,
|
|
118
|
+
dryRun: options.dryRun,
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
const launchConfig: Partial<LaunchConfig> = {
|
|
122
|
+
targetRaise: parseFloat(options.target),
|
|
123
|
+
curveType: options.curve as 'linear' | 'exponential' | 'marketcap',
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
const result = await launcher.launchAgent(agent, launchConfig);
|
|
128
|
+
|
|
129
|
+
if (result.success) {
|
|
130
|
+
console.log('🎉 Launch successful!\n');
|
|
131
|
+
console.log(`Transaction: ${result.transactionId}`);
|
|
132
|
+
console.log(`Pool Address: ${result.poolAddress}`);
|
|
133
|
+
console.log(`Token Mint: ${result.tokenMint}`);
|
|
134
|
+
console.log(`Config Key: ${result.configKey}`);
|
|
135
|
+
} else {
|
|
136
|
+
console.error(`❌ Launch failed: ${result.error}`);
|
|
137
|
+
process.exit(1);
|
|
138
|
+
}
|
|
139
|
+
} catch (error) {
|
|
140
|
+
console.error('❌ Error:', error);
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// Status command
|
|
146
|
+
program
|
|
147
|
+
.command('status')
|
|
148
|
+
.description('Check launch status')
|
|
149
|
+
.requiredOption('-m, --mint <address>', 'Token mint address')
|
|
150
|
+
.option('-r, --rpc <url>', 'Solana RPC URL', process.env.RPC_URL || 'https://api.devnet.solana.com')
|
|
151
|
+
.action(async (options) => {
|
|
152
|
+
console.log('\n📊 Launch Status\n');
|
|
153
|
+
console.log(`Token: ${options.mint}`);
|
|
154
|
+
console.log('\n⚠️ Status check not yet implemented\n');
|
|
155
|
+
// TODO: Implement status check via DBC program
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
program.parse();
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MoltLaunch SDK Type Definitions
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface MoltLaunchOptions {
|
|
6
|
+
/** API base URL (default: production) */
|
|
7
|
+
baseUrl?: string;
|
|
8
|
+
/** Optional API key for premium features */
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface VerifyOptions {
|
|
13
|
+
/** Unique agent identifier */
|
|
14
|
+
agentId: string;
|
|
15
|
+
/** Solana wallet address */
|
|
16
|
+
wallet?: string;
|
|
17
|
+
/** Agent capabilities */
|
|
18
|
+
capabilities?: string[];
|
|
19
|
+
/** GitHub repository URL */
|
|
20
|
+
codeUrl?: string;
|
|
21
|
+
/** Has documentation */
|
|
22
|
+
documentation?: boolean;
|
|
23
|
+
/** Test coverage percentage (0-100) */
|
|
24
|
+
testCoverage?: number;
|
|
25
|
+
/** Lines of code */
|
|
26
|
+
codeLines?: number;
|
|
27
|
+
/** API endpoint URL */
|
|
28
|
+
apiEndpoint?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface VerificationResult {
|
|
32
|
+
agentId: string;
|
|
33
|
+
verified: boolean;
|
|
34
|
+
score: number;
|
|
35
|
+
tier: 'excellent' | 'good' | 'needs_work' | 'poor';
|
|
36
|
+
features: Record<string, { value: any; points: number }>;
|
|
37
|
+
onChainAI: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
executedOnChain: boolean;
|
|
40
|
+
vm: string;
|
|
41
|
+
program: string;
|
|
42
|
+
};
|
|
43
|
+
attestation: {
|
|
44
|
+
type: string;
|
|
45
|
+
timestamp: string;
|
|
46
|
+
hash: string;
|
|
47
|
+
};
|
|
48
|
+
raw: any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface StatusResult {
|
|
52
|
+
agentId: string;
|
|
53
|
+
verified: boolean;
|
|
54
|
+
score: number | null;
|
|
55
|
+
tier: string | null;
|
|
56
|
+
level: 'excellent' | 'verified' | 'unverified';
|
|
57
|
+
verifiedAt: string | null;
|
|
58
|
+
onChainAI?: {
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
vm: string;
|
|
61
|
+
program: string;
|
|
62
|
+
};
|
|
63
|
+
expiresAt?: string;
|
|
64
|
+
message?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface BatchStatusResult {
|
|
68
|
+
results: Array<{
|
|
69
|
+
agentId: string;
|
|
70
|
+
verified: boolean;
|
|
71
|
+
score: number | null;
|
|
72
|
+
tier: string | null;
|
|
73
|
+
}>;
|
|
74
|
+
count: number;
|
|
75
|
+
verified: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface PoolApplyOptions {
|
|
79
|
+
agentId: string;
|
|
80
|
+
wallet: string;
|
|
81
|
+
topic: string;
|
|
82
|
+
strategy?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface PoolApplyResult {
|
|
86
|
+
success: boolean;
|
|
87
|
+
agentId: string;
|
|
88
|
+
topic: string;
|
|
89
|
+
status: string;
|
|
90
|
+
message?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface OnChainInfo {
|
|
94
|
+
enabled: boolean;
|
|
95
|
+
model: string;
|
|
96
|
+
deployment: {
|
|
97
|
+
vm: string;
|
|
98
|
+
weights: string;
|
|
99
|
+
program: string;
|
|
100
|
+
};
|
|
101
|
+
status: string;
|
|
102
|
+
features: Array<{
|
|
103
|
+
name: string;
|
|
104
|
+
weight: string | number;
|
|
105
|
+
description: string;
|
|
106
|
+
}>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface ScoreTier {
|
|
110
|
+
min: number;
|
|
111
|
+
max: number;
|
|
112
|
+
label: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare const SCORE_TIERS: {
|
|
116
|
+
excellent: ScoreTier;
|
|
117
|
+
good: ScoreTier;
|
|
118
|
+
needs_work: ScoreTier;
|
|
119
|
+
poor: ScoreTier;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export declare const DEPLOYMENT: {
|
|
123
|
+
network: string;
|
|
124
|
+
vm: string;
|
|
125
|
+
weights: string;
|
|
126
|
+
program: string;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export declare const DEFAULT_BASE_URL: string;
|
|
130
|
+
|
|
131
|
+
export declare function getTier(score: number): 'excellent' | 'good' | 'needs_work' | 'poor';
|
|
132
|
+
export declare function isVerified(score: number): boolean;
|
|
133
|
+
|
|
134
|
+
export declare class MoltLaunch {
|
|
135
|
+
constructor(options?: MoltLaunchOptions);
|
|
136
|
+
|
|
137
|
+
getOnChainInfo(): Promise<OnChainInfo>;
|
|
138
|
+
verify(options: VerifyOptions): Promise<VerificationResult>;
|
|
139
|
+
getStatus(agentId: string): Promise<StatusResult>;
|
|
140
|
+
getStatusBatch(agentIds: string[]): Promise<BatchStatusResult>;
|
|
141
|
+
applyToPool(options: PoolApplyOptions): Promise<PoolApplyResult>;
|
|
142
|
+
getPools(topic?: string): Promise<any>;
|
|
143
|
+
getLeaderboard(): Promise<any>;
|
|
144
|
+
isHealthy(): Promise<boolean>;
|
|
145
|
+
}
|