@moltlaunch/sdk 2.4.0 → 3.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 +184 -275
- package/dist/client.d.ts +69 -0
- package/dist/client.js +325 -0
- package/dist/idl/moltlaunch.json +1549 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +63 -0
- package/dist/pda.d.ts +26 -0
- package/dist/pda.js +45 -0
- package/dist/types.d.ts +96 -0
- package/dist/types.js +54 -0
- package/package.json +24 -9
- package/src/idl/moltlaunch.json +1549 -0
- package/examples/agent-config.json +0 -12
- package/src/cli.ts +0 -158
- package/src/index.d.ts +0 -258
- package/src/index.js +0 -1117
- package/src/index.ts +0 -68
- package/src/launcher.ts +0 -263
- package/src/types.ts +0 -122
- package/src/verification.ts +0 -228
- package/test/basic.js +0 -71
- package/tsconfig.json +0 -17
package/test/basic.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Basic SDK tests
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const { MoltLaunch, getTier, isVerified, DEPLOYMENT } = require('../src/index.js');
|
|
6
|
-
|
|
7
|
-
async function runTests() {
|
|
8
|
-
console.log('=== MoltLaunch SDK Tests ===\n');
|
|
9
|
-
|
|
10
|
-
// Test helper functions
|
|
11
|
-
console.log('1. Testing helper functions...');
|
|
12
|
-
console.assert(getTier(85) === 'excellent', 'getTier(85) should be excellent');
|
|
13
|
-
console.assert(getTier(70) === 'good', 'getTier(70) should be good');
|
|
14
|
-
console.assert(getTier(50) === 'needs_work', 'getTier(50) should be needs_work');
|
|
15
|
-
console.assert(getTier(30) === 'poor', 'getTier(30) should be poor');
|
|
16
|
-
console.assert(isVerified(60) === true, 'isVerified(60) should be true');
|
|
17
|
-
console.assert(isVerified(59) === false, 'isVerified(59) should be false');
|
|
18
|
-
console.log(' ✓ Helper functions work correctly\n');
|
|
19
|
-
|
|
20
|
-
// Test constants
|
|
21
|
-
console.log('2. Testing constants...');
|
|
22
|
-
console.assert(DEPLOYMENT.vm, 'DEPLOYMENT.vm should exist');
|
|
23
|
-
console.assert(DEPLOYMENT.program, 'DEPLOYMENT.program should exist');
|
|
24
|
-
console.log(' ✓ Constants are defined\n');
|
|
25
|
-
|
|
26
|
-
// Test API (if available)
|
|
27
|
-
console.log('3. Testing API connection...');
|
|
28
|
-
const ml = new MoltLaunch();
|
|
29
|
-
|
|
30
|
-
try {
|
|
31
|
-
const healthy = await ml.isHealthy();
|
|
32
|
-
console.log(` API healthy: ${healthy}`);
|
|
33
|
-
|
|
34
|
-
if (healthy) {
|
|
35
|
-
// Test on-chain info
|
|
36
|
-
console.log('\n4. Testing getOnChainInfo...');
|
|
37
|
-
const info = await ml.getOnChainInfo();
|
|
38
|
-
console.log(` Model: ${info.model}`);
|
|
39
|
-
console.log(` Status: ${info.status}`);
|
|
40
|
-
console.log(` VM: ${info.deployment?.vm?.substring(0, 20)}...`);
|
|
41
|
-
console.log(' ✓ On-chain info retrieved\n');
|
|
42
|
-
|
|
43
|
-
// Test verification
|
|
44
|
-
console.log('5. Testing verify...');
|
|
45
|
-
const result = await ml.verify({
|
|
46
|
-
agentId: 'sdk-test-agent-' + Date.now(),
|
|
47
|
-
capabilities: ['testing'],
|
|
48
|
-
documentation: true,
|
|
49
|
-
codeLines: 1000,
|
|
50
|
-
testCoverage: 50
|
|
51
|
-
});
|
|
52
|
-
console.log(` Score: ${result.score}`);
|
|
53
|
-
console.log(` Tier: ${result.tier}`);
|
|
54
|
-
console.log(` Verified: ${result.verified}`);
|
|
55
|
-
console.log(` On-chain: ${result.onChainAI?.enabled}`);
|
|
56
|
-
console.log(' ✓ Verification works\n');
|
|
57
|
-
|
|
58
|
-
// Test status
|
|
59
|
-
console.log('6. Testing getStatus...');
|
|
60
|
-
const status = await ml.getStatus(result.agentId);
|
|
61
|
-
console.log(` Cached: ${status.verified}`);
|
|
62
|
-
console.log(' ✓ Status lookup works\n');
|
|
63
|
-
}
|
|
64
|
-
} catch (error) {
|
|
65
|
-
console.log(` ✗ API test failed: ${error.message}\n`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
console.log('=== Tests Complete ===');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
runTests().catch(console.error);
|
package/tsconfig.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"lib": ["ES2022"],
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
"rootDir": "./src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"resolveJsonModule": true
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*"],
|
|
16
|
-
"exclude": ["node_modules", "dist"]
|
|
17
|
-
}
|