@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/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
- }