@moltlaunch/sdk 2.3.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 +222 -387
- 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 -948
- 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/README.md
CHANGED
|
@@ -1,462 +1,297 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">@moltlaunch/sdk</h1>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>Composable Signal Architecture for AI Agent Identity on Solana</strong>
|
|
7
|
+
</p>
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/@moltlaunch/sdk"><img src="https://img.shields.io/npm/v/@moltlaunch/sdk" alt="npm" /></a>
|
|
11
|
+
<a href="https://youragent.id"><img src="https://img.shields.io/badge/API-live-brightgreen" alt="API" /></a>
|
|
12
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT" /></a>
|
|
13
|
+
</p>
|
|
6
14
|
|
|
7
|
-
|
|
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
|
-
```
|
|
15
|
+
---
|
|
144
16
|
|
|
145
|
-
|
|
17
|
+
## V3 — Composable Signal Architecture
|
|
146
18
|
|
|
147
|
-
|
|
19
|
+
MoltLaunch V3 replaces centralized scoring with **on-chain composable signals**. Multiple independent authorities submit attestations about an agent's infrastructure, economic stake, and hardware binding. Trust scores are derived permissionlessly from these attestations.
|
|
148
20
|
|
|
149
|
-
|
|
150
|
-
const leaderboard = await ml.getLeaderboard();
|
|
151
|
-
```
|
|
21
|
+
**Program:** `6AZSAhq4iJTwCfGEVssoa1p3GnBqGkbcQ1iDdP1U1pSb` (Solana Devnet)
|
|
152
22
|
|
|
153
|
-
|
|
23
|
+
---
|
|
154
24
|
|
|
155
|
-
|
|
25
|
+
## Install
|
|
156
26
|
|
|
157
|
-
```
|
|
158
|
-
|
|
27
|
+
```bash
|
|
28
|
+
npm install @moltlaunch/sdk
|
|
159
29
|
```
|
|
160
30
|
|
|
161
|
-
##
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
31
|
+
## Architecture
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
┌─────────────────┐
|
|
35
|
+
│ ProtocolConfig │
|
|
36
|
+
│ (singleton) │
|
|
37
|
+
└────────┬────────┘
|
|
38
|
+
│
|
|
39
|
+
┌──────────────────┼──────────────────┐
|
|
40
|
+
▼ ▼ ▼
|
|
41
|
+
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
|
|
42
|
+
│ Authority A │ │ Authority B │ │ Authority C │
|
|
43
|
+
│ (Single) │ │ (Oracle) │ │ (NCN) │
|
|
44
|
+
└──────┬───────┘ └──────┬───────┘ └──────┬───────┘
|
|
45
|
+
│ │ │
|
|
46
|
+
▼ ▼ ▼
|
|
47
|
+
┌─────────────────────────────────────────────────┐
|
|
48
|
+
│ Attestation Layer │
|
|
49
|
+
│ (one per agent × authority pair) │
|
|
50
|
+
│ signal_type · hash · tee_quote · expires_at │
|
|
51
|
+
└──────────────────────┬──────────────────────────┘
|
|
52
|
+
│
|
|
53
|
+
▼
|
|
54
|
+
┌──────────────────┐
|
|
55
|
+
│ AgentIdentity │
|
|
56
|
+
│ (signal hub) │
|
|
57
|
+
│ │
|
|
58
|
+
│ trust_score │
|
|
59
|
+
│ infra_type │
|
|
60
|
+
│ economic_stake │
|
|
61
|
+
│ hardware_bind │
|
|
62
|
+
│ attestation_cnt │
|
|
63
|
+
│ is_flagged │
|
|
64
|
+
└──────────────────┘
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
182
68
|
|
|
183
|
-
|
|
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
|
|
69
|
+
## Quick Start
|
|
195
70
|
|
|
196
|
-
|
|
197
|
-
const { DEPLOYMENT, SCORE_TIERS, DEFAULT_BASE_URL } = require('@moltlaunch/sdk');
|
|
71
|
+
### Read Agent Identity (No Wallet Needed)
|
|
198
72
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
73
|
+
```typescript
|
|
74
|
+
import { MoltLaunchClient } from "@moltlaunch/sdk";
|
|
75
|
+
import { PublicKey } from "@solana/web3.js";
|
|
202
76
|
|
|
203
|
-
|
|
77
|
+
const client = new MoltLaunchClient(); // defaults to devnet
|
|
204
78
|
|
|
205
|
-
|
|
79
|
+
const agent = await client.getAgentIdentity(
|
|
80
|
+
new PublicKey("AgentWalletPubkey...")
|
|
81
|
+
);
|
|
206
82
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
83
|
+
console.log(`Trust Score: ${agent.trustScore}/100`);
|
|
84
|
+
console.log(`Infra Type: ${agent.infraType}`);
|
|
85
|
+
console.log(`Attestations: ${agent.attestationCount}`);
|
|
86
|
+
console.log(`Flagged: ${agent.isFlagged}`);
|
|
87
|
+
console.log(`Economic Stake: ${agent.hasEconomicStake}`);
|
|
88
|
+
console.log(`Hardware Binding: ${agent.hasHardwareBinding}`);
|
|
213
89
|
```
|
|
214
90
|
|
|
215
|
-
###
|
|
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
|
-
```
|
|
91
|
+
### Register an Agent
|
|
224
92
|
|
|
225
|
-
|
|
93
|
+
```typescript
|
|
94
|
+
import { Keypair } from "@solana/web3.js";
|
|
95
|
+
import { MoltLaunchClient } from "@moltlaunch/sdk";
|
|
226
96
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
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...
|
|
97
|
+
const wallet = Keypair.generate();
|
|
98
|
+
const client = new MoltLaunchClient({
|
|
99
|
+
wallet: { publicKey: wallet.publicKey, signTransaction: ..., signAllTransactions: ... },
|
|
235
100
|
});
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
## STARK Proofs (v2.1+)
|
|
239
|
-
|
|
240
|
-
Privacy-preserving proofs that prove properties without revealing exact values.
|
|
241
101
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
Generate a threshold proof: proves "score >= X" without revealing exact score.
|
|
245
|
-
|
|
246
|
-
```javascript
|
|
247
|
-
const proof = await ml.generateProof('my-agent', { threshold: 60 });
|
|
248
|
-
|
|
249
|
-
console.log(proof.valid); // true
|
|
250
|
-
console.log(proof.claim); // "Score >= 60"
|
|
251
|
-
console.log(proof.proof.commitment); // cryptographic commitment
|
|
252
|
-
// Verifier knows: agent passed 60
|
|
253
|
-
// Verifier doesn't know: actual score (could be 61 or 99)
|
|
102
|
+
const txId = await client.registerAgent("my-agent", wallet);
|
|
103
|
+
console.log(`Registered! TX: ${txId}`);
|
|
254
104
|
```
|
|
255
105
|
|
|
256
|
-
###
|
|
106
|
+
### Submit an Attestation (Authority)
|
|
257
107
|
|
|
258
|
-
|
|
108
|
+
```typescript
|
|
109
|
+
import { MoltLaunchClient, SignalType } from "@moltlaunch/sdk";
|
|
259
110
|
|
|
260
|
-
|
|
261
|
-
const proof = await ml.generateConsistencyProof('my-agent', {
|
|
262
|
-
threshold: 60,
|
|
263
|
-
days: 30
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
console.log(proof.periodCount); // 30
|
|
267
|
-
console.log(proof.timeRange); // { start: '...', end: '...' }
|
|
268
|
-
console.log(proof.valid); // true if ALL periods met threshold
|
|
269
|
-
```
|
|
111
|
+
const client = new MoltLaunchClient({ wallet: authorityWallet });
|
|
270
112
|
|
|
271
|
-
|
|
113
|
+
// 32-byte attestation hash (e.g. SHA-256 of evidence)
|
|
114
|
+
const attestationHash = new Uint8Array(32);
|
|
115
|
+
crypto.getRandomValues(attestationHash);
|
|
272
116
|
|
|
273
|
-
|
|
117
|
+
// Expires in 30 days
|
|
118
|
+
const expiresAt = Math.floor(Date.now() / 1000) + 30 * 24 * 60 * 60;
|
|
274
119
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
// Without revealing actual streak length
|
|
120
|
+
const txId = await client.submitAttestation(
|
|
121
|
+
agentPubkey, // agent's wallet pubkey
|
|
122
|
+
SignalType.InfraCloud, // signal type
|
|
123
|
+
attestationHash, // 32-byte hash
|
|
124
|
+
expiresAt, // unix timestamp
|
|
125
|
+
authorityKeypair, // authority signs
|
|
126
|
+
);
|
|
283
127
|
```
|
|
284
128
|
|
|
285
|
-
###
|
|
129
|
+
### Refresh Signals (Permissionless)
|
|
286
130
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
const proof = await ml.generateStabilityProof('my-agent', {
|
|
291
|
-
maxVariance: 100
|
|
292
|
-
});
|
|
293
|
-
|
|
294
|
-
// Proves consistent performance without volatility
|
|
295
|
-
// Without revealing actual variance
|
|
131
|
+
```typescript
|
|
132
|
+
// Anyone can call this — no authority needed
|
|
133
|
+
const txId = await client.refreshSignals(agentPubkey);
|
|
296
134
|
```
|
|
297
135
|
|
|
298
|
-
###
|
|
136
|
+
### Flag an Agent (Authority)
|
|
299
137
|
|
|
300
|
-
```
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
console.log(cost.estimatedCost); // '$0.002'
|
|
138
|
+
```typescript
|
|
139
|
+
const reasonHash = new Uint8Array(32); // SHA-256 of reason
|
|
140
|
+
const txId = await client.flagAgent(agentPubkey, reasonHash, authorityKeypair);
|
|
304
141
|
```
|
|
305
142
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
Submit and query behavioral traces for continuous reputation.
|
|
309
|
-
|
|
310
|
-
### submitTrace(agentId, data)
|
|
311
|
-
|
|
312
|
-
Submit execution data for behavioral scoring.
|
|
313
|
-
|
|
314
|
-
```javascript
|
|
315
|
-
const trace = await ml.submitTrace('my-agent', {
|
|
316
|
-
period: {
|
|
317
|
-
start: '2026-02-01T00:00:00Z',
|
|
318
|
-
end: '2026-02-07T23:59:59Z'
|
|
319
|
-
},
|
|
320
|
-
summary: {
|
|
321
|
-
totalActions: 150,
|
|
322
|
-
successRate: 0.92,
|
|
323
|
-
errorRate: 0.03,
|
|
324
|
-
avgResponseTime: 120,
|
|
325
|
-
// Domain-specific metrics
|
|
326
|
-
tradesExecuted: 45,
|
|
327
|
-
winRate: 0.73
|
|
328
|
-
}
|
|
329
|
-
});
|
|
143
|
+
### Revoke an Attestation
|
|
330
144
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
console.log(trace.behavioralScore); // +15 points
|
|
145
|
+
```typescript
|
|
146
|
+
const txId = await client.revokeAttestation(agentPubkey, authorityKeypair);
|
|
334
147
|
```
|
|
335
148
|
|
|
336
|
-
|
|
149
|
+
---
|
|
337
150
|
|
|
338
|
-
|
|
151
|
+
## PDA Derivation
|
|
339
152
|
|
|
340
|
-
```
|
|
341
|
-
|
|
153
|
+
```typescript
|
|
154
|
+
import {
|
|
155
|
+
findConfigPda,
|
|
156
|
+
findAgentPda,
|
|
157
|
+
findAuthorityPda,
|
|
158
|
+
findAttestationPda,
|
|
159
|
+
} from "@moltlaunch/sdk";
|
|
342
160
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
161
|
+
const [configPda] = findConfigPda();
|
|
162
|
+
const [agentPda] = findAgentPda(walletPubkey);
|
|
163
|
+
const [authorityPda] = findAuthorityPda(authorityPubkey);
|
|
164
|
+
const [attestationPda] = findAttestationPda(agentWallet, authorityPubkey);
|
|
346
165
|
```
|
|
347
166
|
|
|
348
|
-
|
|
167
|
+
| PDA | Seeds |
|
|
168
|
+
|-----|-------|
|
|
169
|
+
| `ProtocolConfig` | `["moltlaunch"]` |
|
|
170
|
+
| `AgentIdentity` | `["agent", wallet]` |
|
|
171
|
+
| `Authority` | `["authority", pubkey]` |
|
|
172
|
+
| `Attestation` | `["attestation", agent_wallet, authority_pubkey]` |
|
|
349
173
|
|
|
350
|
-
|
|
174
|
+
---
|
|
351
175
|
|
|
352
|
-
|
|
353
|
-
const anchor = await ml.anchorTrace('trace_abc123');
|
|
176
|
+
## On-Chain Types
|
|
354
177
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
178
|
+
### InfraType
|
|
179
|
+
| Variant | Description |
|
|
180
|
+
|---------|-------------|
|
|
181
|
+
| `Unknown` | No infrastructure attestation yet |
|
|
182
|
+
| `Cloud` | Standard cloud infrastructure |
|
|
183
|
+
| `TEE` | Trusted Execution Environment |
|
|
184
|
+
| `DePIN` | Decentralized Physical Infrastructure |
|
|
359
185
|
|
|
360
|
-
|
|
186
|
+
### SignalType
|
|
187
|
+
| Variant | Description |
|
|
188
|
+
|---------|-------------|
|
|
189
|
+
| `InfraCloud` | Cloud infrastructure attestation |
|
|
190
|
+
| `InfraTEE` | TEE attestation (with optional quote) |
|
|
191
|
+
| `InfraDePIN` | DePIN device attestation |
|
|
192
|
+
| `EconomicStake` | Economic stake verification |
|
|
193
|
+
| `HardwareBinding` | Hardware binding attestation |
|
|
194
|
+
| `General` | General-purpose attestation |
|
|
361
195
|
|
|
362
|
-
###
|
|
196
|
+
### AuthorityType
|
|
197
|
+
| Variant | Description |
|
|
198
|
+
|---------|-------------|
|
|
199
|
+
| `Single` | Single-signer authority |
|
|
200
|
+
| `MultisigMember` | Member of a multisig |
|
|
201
|
+
| `OracleOperator` | Oracle-based operator |
|
|
202
|
+
| `NCNValidator` | Jito NCN validator |
|
|
363
203
|
|
|
364
|
-
|
|
204
|
+
---
|
|
365
205
|
|
|
366
|
-
|
|
367
|
-
if (await ml.isVerified('suspicious-agent')) {
|
|
368
|
-
allowAccess();
|
|
369
|
-
}
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
### checkCapability(agentId, capability, minScore)
|
|
206
|
+
## Consumer Integration
|
|
373
207
|
|
|
374
|
-
|
|
208
|
+
Any protocol can read agent trust signals to make access decisions:
|
|
375
209
|
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
const canEscrow = await ml.checkCapability('my-agent', 'escrow', 70);
|
|
210
|
+
```typescript
|
|
211
|
+
import { MoltLaunchClient, InfraType } from "@moltlaunch/sdk";
|
|
379
212
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
383
|
-
```
|
|
213
|
+
const client = new MoltLaunchClient();
|
|
214
|
+
const agent = await client.getAgentIdentity(wallet);
|
|
384
215
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
async function beforeEscrow(agentId, amount) {
|
|
393
|
-
const status = await ml.getStatus(agentId);
|
|
394
|
-
|
|
395
|
-
if (!status.verified) {
|
|
396
|
-
throw new Error('Agent not verified');
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
// Tiered limits based on score
|
|
400
|
-
const limit = status.tier === 'excellent' ? 10000
|
|
401
|
-
: status.tier === 'good' ? 5000
|
|
402
|
-
: 1000;
|
|
403
|
-
|
|
404
|
-
if (amount > limit) {
|
|
405
|
-
throw new Error(`Amount ${amount} exceeds limit ${limit} for tier ${status.tier}`);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
return true;
|
|
216
|
+
if (agent.infraType === InfraType.TEE && agent.hasEconomicStake) {
|
|
217
|
+
grantFlashLoan(); // High trust — TEE + economic skin in the game
|
|
218
|
+
} else if (agent.trustScore >= 30) {
|
|
219
|
+
grantBasicAccess(); // Medium trust — at least one attestation
|
|
220
|
+
} else {
|
|
221
|
+
deny(); // Unverified — no attestations
|
|
409
222
|
}
|
|
410
223
|
```
|
|
411
224
|
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
```javascript
|
|
415
|
-
// Prove capability without revealing edge
|
|
416
|
-
const proof = await ml.generateProof('my-trading-bot', { threshold: 70 });
|
|
225
|
+
---
|
|
417
226
|
|
|
418
|
-
|
|
419
|
-
// But can't see if you scored 71 or 95
|
|
420
|
-
console.log(proof.claim); // "Score >= 70"
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
### Consistency Requirements (Poker)
|
|
424
|
-
|
|
425
|
-
```javascript
|
|
426
|
-
// Prove maintained performance over time
|
|
427
|
-
const consistency = await ml.generateConsistencyProof('poker-bot', {
|
|
428
|
-
threshold: 60,
|
|
429
|
-
days: 30
|
|
430
|
-
});
|
|
227
|
+
## API Reference
|
|
431
228
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
229
|
+
### MoltLaunchClient
|
|
230
|
+
|
|
231
|
+
| Method | Description | Signer |
|
|
232
|
+
|--------|-------------|--------|
|
|
233
|
+
| `getConfig()` | Fetch protocol config | — |
|
|
234
|
+
| `getAgentIdentity(wallet)` | Fetch agent signal hub | — |
|
|
235
|
+
| `getAuthority(pubkey)` | Fetch authority account | — |
|
|
236
|
+
| `getAttestation(agent, authority)` | Fetch attestation | — |
|
|
237
|
+
| `registerAgent(name, keypair)` | Register new agent | Agent wallet |
|
|
238
|
+
| `submitAttestation(...)` | Submit attestation | Authority |
|
|
239
|
+
| `revokeAttestation(agent, authority)` | Revoke attestation | Authority |
|
|
240
|
+
| `refreshSignals(agent)` | Refresh trust score | Anyone |
|
|
241
|
+
| `flagAgent(agent, reason, authority)` | Flag an agent | Authority |
|
|
242
|
+
| `unflagAgent(agent, admin)` | Unflag an agent | Admin |
|
|
243
|
+
| `initialize(admin)` | Initialize protocol | Admin |
|
|
244
|
+
| `addAuthority(pubkey, type, admin)` | Add authority | Admin |
|
|
245
|
+
| `removeAuthority(pubkey, admin)` | Remove authority | Admin |
|
|
246
|
+
| `setPaused(paused, admin)` | Pause/unpause | Admin |
|
|
247
|
+
| `transferAdmin(newAdmin, admin)` | Transfer admin | Admin |
|
|
248
|
+
|
|
249
|
+
---
|
|
437
250
|
|
|
438
251
|
## Changelog
|
|
439
252
|
|
|
440
|
-
###
|
|
441
|
-
-
|
|
442
|
-
-
|
|
443
|
-
-
|
|
444
|
-
-
|
|
445
|
-
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
448
|
-
-
|
|
449
|
-
-
|
|
450
|
-
-
|
|
253
|
+
### v3.0.0 (Current)
|
|
254
|
+
- **Complete rewrite** for Composable Signal Architecture
|
|
255
|
+
- On-chain program at `6AZSAhq4iJTwCfGEVssoa1p3GnBqGkbcQ1iDdP1U1pSb`
|
|
256
|
+
- `registerAgent()` — creates AgentIdentity PDA
|
|
257
|
+
- `submitAttestation()` — authority submits attestation with signal type
|
|
258
|
+
- `revokeAttestation()` — authority revokes own attestation
|
|
259
|
+
- `refreshSignals()` — permissionless trust score refresh
|
|
260
|
+
- `flagAgent()` / `unflagAgent()` — authority/admin flagging
|
|
261
|
+
- PDA derivation helpers
|
|
262
|
+
- Full TypeScript types matching on-chain enums
|
|
263
|
+
- Bundled IDL for Anchor integration
|
|
264
|
+
|
|
265
|
+
### v2.4.0
|
|
266
|
+
- TPM challenge-response, DePIN registration
|
|
451
267
|
|
|
452
268
|
### v2.0.0
|
|
453
269
|
- On-chain AI verification via Cauldron
|
|
454
|
-
- Batch status checks
|
|
455
|
-
- Pool application API
|
|
456
270
|
|
|
457
271
|
### v1.0.0
|
|
458
272
|
- Initial release
|
|
459
273
|
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## Links
|
|
277
|
+
|
|
278
|
+
| Resource | URL |
|
|
279
|
+
|----------|-----|
|
|
280
|
+
| npm | https://www.npmjs.com/package/@moltlaunch/sdk |
|
|
281
|
+
| Demo | https://youragent.id/demo.html |
|
|
282
|
+
| Docs | https://youragent.id/docs.html |
|
|
283
|
+
| Explorer | https://explorer.solana.com/address/6AZSAhq4iJTwCfGEVssoa1p3GnBqGkbcQ1iDdP1U1pSb?cluster=devnet |
|
|
284
|
+
| GitHub (program) | https://github.com/tradingstarllc/moltlaunch |
|
|
285
|
+
| GitHub (SDK) | https://github.com/tradingstarllc/moltlaunch-sdk |
|
|
286
|
+
| GitHub (site) | https://github.com/tradingstarllc/moltlaunch-site |
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
460
290
|
## License
|
|
461
291
|
|
|
462
292
|
MIT
|
|
293
|
+
|
|
294
|
+
<p align="center">
|
|
295
|
+
<strong>Built by an AI agent for AI agents</strong><br>
|
|
296
|
+
<a href="https://www.colosseum.org/">Colosseum Agent Hackathon 2026</a>
|
|
297
|
+
</p>
|