@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/README.md
CHANGED
|
@@ -3,361 +3,270 @@
|
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
<strong>
|
|
6
|
+
<strong>Composable Signal Architecture for AI Agent Identity on Solana</strong>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
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://
|
|
11
|
+
<a href="https://youragent.id"><img src="https://img.shields.io/badge/API-live-brightgreen" alt="API" /></a>
|
|
12
12
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="MIT" /></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install @moltlaunch/sdk
|
|
21
|
-
```
|
|
17
|
+
## V3 — Composable Signal Architecture
|
|
22
18
|
|
|
23
|
-
|
|
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.
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|---------|-------------|
|
|
27
|
-
| **Hardware Identity** | Tie agent identity to physical hardware — CPU, TPM, DePIN devices |
|
|
28
|
-
| **Sybil Detection** | Detect duplicate agents sharing the same infrastructure |
|
|
29
|
-
| **Agent Verification** | Score agents 0-100 with on-chain AI |
|
|
30
|
-
| **STARK Proofs** | Prove "score ≥ 60" without revealing the actual score |
|
|
31
|
-
| **Behavioral Scoring** | Track agent behavior over time via execution traces |
|
|
32
|
-
| **On-Chain Anchoring** | Write attestations to Solana (Memo program) |
|
|
33
|
-
| **DePIN Integration** | Link identity to io.net, Akash, Render, Helium, Nosana |
|
|
21
|
+
**Program:** `6AZSAhq4iJTwCfGEVssoa1p3GnBqGkbcQ1iDdP1U1pSb` (Solana Devnet)
|
|
34
22
|
|
|
35
23
|
---
|
|
36
24
|
|
|
37
|
-
##
|
|
25
|
+
## Install
|
|
38
26
|
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const result = await ml.verify({
|
|
45
|
-
agentId: "my-agent",
|
|
46
|
-
capabilities: ["trading"],
|
|
47
|
-
codeUrl: "https://github.com/org/repo"
|
|
48
|
-
});
|
|
27
|
+
```bash
|
|
28
|
+
npm install @moltlaunch/sdk
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Architecture
|
|
49
32
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
+
└──────────────────┘
|
|
53
65
|
```
|
|
54
66
|
|
|
55
67
|
---
|
|
56
68
|
|
|
57
|
-
##
|
|
58
|
-
|
|
59
|
-
The core feature. Tie agent identity to physical hardware so Sybil attacks cost real money.
|
|
69
|
+
## Quick Start
|
|
60
70
|
|
|
61
|
-
###
|
|
71
|
+
### Read Agent Identity (No Wallet Needed)
|
|
62
72
|
|
|
63
73
|
```typescript
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
includeRuntime: true, // Node version, OS
|
|
67
|
-
includeCode: true, // SHA-256 of agent's main file
|
|
68
|
-
includeTPM: true, // TPM endorsement key (if available)
|
|
69
|
-
codeEntry: "./index.js",
|
|
70
|
-
agentId: "my-agent",
|
|
71
|
-
anchor: true // Write to Solana
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
console.log(identity.hash); // "7f04b937d885..."
|
|
75
|
-
console.log(identity.trustLevel); // 3 (hardware-anchored)
|
|
76
|
-
console.log(identity.anchored); // true
|
|
77
|
-
console.log(identity.anchorExplorer); // Solana explorer link
|
|
78
|
-
```
|
|
74
|
+
import { MoltLaunchClient } from "@moltlaunch/sdk";
|
|
75
|
+
import { PublicKey } from "@solana/web3.js";
|
|
79
76
|
|
|
80
|
-
|
|
77
|
+
const client = new MoltLaunchClient(); // defaults to devnet
|
|
81
78
|
|
|
82
|
-
|
|
79
|
+
const agent = await client.getAgentIdentity(
|
|
80
|
+
new PublicKey("AgentWalletPubkey...")
|
|
81
|
+
);
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| 4 | **TPM attestation** | **$200+/mo** |
|
|
91
|
-
| 5 | **DePIN device** | **$500+/mo** |
|
|
92
|
-
|
|
93
|
-
### Check Two Agents for Sybil
|
|
94
|
-
|
|
95
|
-
```typescript
|
|
96
|
-
const result = await ml.checkSybil("agent-1", "agent-2");
|
|
97
|
-
|
|
98
|
-
// {
|
|
99
|
-
// sameIdentity: true,
|
|
100
|
-
// sybilRisk: "HIGH",
|
|
101
|
-
// reason: "Same hardware fingerprint — likely same operator",
|
|
102
|
-
// recommendation: "Do not seat at same table"
|
|
103
|
-
// }
|
|
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}`);
|
|
104
89
|
```
|
|
105
90
|
|
|
106
|
-
###
|
|
91
|
+
### Register an Agent
|
|
107
92
|
|
|
108
93
|
```typescript
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"SuspiciousBot", "FishBot", "NitNancy"
|
|
112
|
-
]);
|
|
113
|
-
|
|
114
|
-
// {
|
|
115
|
-
// safe: false,
|
|
116
|
-
// sybilClusters: [["BluffMaster", "SuspiciousBot"]],
|
|
117
|
-
// flaggedAgents: ["BluffMaster", "SuspiciousBot"],
|
|
118
|
-
// recommendation: "1 Sybil cluster — 2 agents share hardware"
|
|
119
|
-
// }
|
|
120
|
-
```
|
|
94
|
+
import { Keypair } from "@solana/web3.js";
|
|
95
|
+
import { MoltLaunchClient } from "@moltlaunch/sdk";
|
|
121
96
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
await ml.registerDePINDevice({
|
|
126
|
-
provider: "io.net", // or: akash, render, helium, hivemapper, nosana
|
|
127
|
-
deviceId: "device_abc123",
|
|
128
|
-
agentId: "my-agent"
|
|
97
|
+
const wallet = Keypair.generate();
|
|
98
|
+
const client = new MoltLaunchClient({
|
|
99
|
+
wallet: { publicKey: wallet.publicKey, signTransaction: ..., signAllTransactions: ... },
|
|
129
100
|
});
|
|
130
|
-
// Trust level → 5 (highest)
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Identity Report
|
|
134
101
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
// {
|
|
139
|
-
// trustLevel: 3,
|
|
140
|
-
// trustLadder: {
|
|
141
|
-
// level0: { status: "passed" },
|
|
142
|
-
// level1: { status: "passed" },
|
|
143
|
-
// level2: { status: "passed" },
|
|
144
|
-
// level3: { status: "passed", description: "Hardware fingerprint" },
|
|
145
|
-
// level4: { status: "missing", description: "TPM attestation" },
|
|
146
|
-
// level5: { status: "missing", description: "DePIN device" }
|
|
147
|
-
// },
|
|
148
|
-
// sybilResistance: { current: "$100/mo", level: 3, maxLevel: 5 }
|
|
149
|
-
// }
|
|
102
|
+
const txId = await client.registerAgent("my-agent", wallet);
|
|
103
|
+
console.log(`Registered! TX: ${txId}`);
|
|
150
104
|
```
|
|
151
105
|
|
|
152
|
-
|
|
106
|
+
### Submit an Attestation (Authority)
|
|
153
107
|
|
|
154
|
-
|
|
108
|
+
```typescript
|
|
109
|
+
import { MoltLaunchClient, SignalType } from "@moltlaunch/sdk";
|
|
155
110
|
|
|
156
|
-
|
|
111
|
+
const client = new MoltLaunchClient({ wallet: authorityWallet });
|
|
157
112
|
|
|
158
|
-
|
|
113
|
+
// 32-byte attestation hash (e.g. SHA-256 of evidence)
|
|
114
|
+
const attestationHash = new Uint8Array(32);
|
|
115
|
+
crypto.getRandomValues(attestationHash);
|
|
159
116
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
const proof = await ml.generateProof("my-agent", { threshold: 60 });
|
|
117
|
+
// Expires in 30 days
|
|
118
|
+
const expiresAt = Math.floor(Date.now() / 1000) + 30 * 24 * 60 * 60;
|
|
163
119
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
//
|
|
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
|
+
);
|
|
168
127
|
```
|
|
169
128
|
|
|
170
|
-
###
|
|
129
|
+
### Refresh Signals (Permissionless)
|
|
171
130
|
|
|
172
131
|
```typescript
|
|
173
|
-
//
|
|
174
|
-
const
|
|
175
|
-
threshold: 60,
|
|
176
|
-
days: 30
|
|
177
|
-
});
|
|
178
|
-
// Hides individual daily scores
|
|
132
|
+
// Anyone can call this — no authority needed
|
|
133
|
+
const txId = await client.refreshSignals(agentPubkey);
|
|
179
134
|
```
|
|
180
135
|
|
|
181
|
-
###
|
|
136
|
+
### Flag an Agent (Authority)
|
|
182
137
|
|
|
183
138
|
```typescript
|
|
184
|
-
|
|
185
|
-
const
|
|
186
|
-
threshold: 60,
|
|
187
|
-
minStreak: 7
|
|
188
|
-
});
|
|
139
|
+
const reasonHash = new Uint8Array(32); // SHA-256 of reason
|
|
140
|
+
const txId = await client.flagAgent(agentPubkey, reasonHash, authorityKeypair);
|
|
189
141
|
```
|
|
190
142
|
|
|
191
|
-
###
|
|
143
|
+
### Revoke an Attestation
|
|
192
144
|
|
|
193
145
|
```typescript
|
|
194
|
-
|
|
195
|
-
const proof = await ml.generateStabilityProof("my-agent", {
|
|
196
|
-
maxVariance: 100
|
|
197
|
-
});
|
|
146
|
+
const txId = await client.revokeAttestation(agentPubkey, authorityKeypair);
|
|
198
147
|
```
|
|
199
148
|
|
|
200
149
|
---
|
|
201
150
|
|
|
202
|
-
##
|
|
203
|
-
|
|
204
|
-
Submit behavioral data to build continuous reputation.
|
|
205
|
-
|
|
206
|
-
### Submit a Trace
|
|
207
|
-
|
|
208
|
-
```typescript
|
|
209
|
-
const trace = await ml.submitTrace("my-agent", {
|
|
210
|
-
period: {
|
|
211
|
-
start: "2026-02-01T00:00:00Z",
|
|
212
|
-
end: "2026-02-07T23:59:59Z"
|
|
213
|
-
},
|
|
214
|
-
summary: {
|
|
215
|
-
totalActions: 150,
|
|
216
|
-
successRate: 0.92,
|
|
217
|
-
tradesExecuted: 45,
|
|
218
|
-
winRate: 0.73
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
console.log(trace.traceId); // "trace_abc123"
|
|
223
|
-
console.log(trace.commitment); // Merkle root
|
|
224
|
-
console.log(trace.onChainAnchor); // { signature, explorer } (auto-anchored)
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Get Behavioral Score
|
|
151
|
+
## PDA Derivation
|
|
228
152
|
|
|
229
153
|
```typescript
|
|
230
|
-
|
|
231
|
-
|
|
154
|
+
import {
|
|
155
|
+
findConfigPda,
|
|
156
|
+
findAgentPda,
|
|
157
|
+
findAuthorityPda,
|
|
158
|
+
findAttestationPda,
|
|
159
|
+
} from "@moltlaunch/sdk";
|
|
160
|
+
|
|
161
|
+
const [configPda] = findConfigPda();
|
|
162
|
+
const [agentPda] = findAgentPda(walletPubkey);
|
|
163
|
+
const [authorityPda] = findAuthorityPda(authorityPubkey);
|
|
164
|
+
const [attestationPda] = findAttestationPda(agentWallet, authorityPubkey);
|
|
232
165
|
```
|
|
233
166
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
167
|
+
| PDA | Seeds |
|
|
168
|
+
|-----|-------|
|
|
169
|
+
| `ProtocolConfig` | `["moltlaunch"]` |
|
|
170
|
+
| `AgentIdentity` | `["agent", wallet]` |
|
|
171
|
+
| `Authority` | `["authority", pubkey]` |
|
|
172
|
+
| `Attestation` | `["attestation", agent_wallet, authority_pubkey]` |
|
|
240
173
|
|
|
241
174
|
---
|
|
242
175
|
|
|
243
|
-
##
|
|
244
|
-
|
|
245
|
-
### Deep Verification
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
const result = await ml.verify({
|
|
249
|
-
agentId: "my-agent",
|
|
250
|
-
wallet: "SolanaAddress",
|
|
251
|
-
capabilities: ["trading", "analysis"],
|
|
252
|
-
codeUrl: "https://github.com/org/repo",
|
|
253
|
-
documentation: true,
|
|
254
|
-
testCoverage: 85,
|
|
255
|
-
codeLines: 3000
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
// {
|
|
259
|
-
// verified: true,
|
|
260
|
-
// score: 78,
|
|
261
|
-
// tier: "good", // excellent (80+) | good (60+) | needs_work (40+) | poor
|
|
262
|
-
// onChainAI: { enabled: true, executedOnChain: true },
|
|
263
|
-
// attestation: { hash: "abc123...", expiresAt: "2026-03-10" }
|
|
264
|
-
// }
|
|
265
|
-
```
|
|
176
|
+
## On-Chain Types
|
|
266
177
|
|
|
267
|
-
###
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
const canTrade = await ml.checkCapability("agent-id", "trading", 70);
|
|
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 |
|
|
275
185
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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 |
|
|
195
|
+
|
|
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 |
|
|
279
203
|
|
|
280
204
|
---
|
|
281
205
|
|
|
282
|
-
##
|
|
283
|
-
|
|
284
|
-
Verification scoring runs on Solana via Cauldron/Frostbite RISC-V VM.
|
|
206
|
+
## Consumer Integration
|
|
285
207
|
|
|
286
|
-
|
|
287
|
-
Network: Solana Devnet
|
|
288
|
-
VM: FHcy35f4NGZK9b6j5TGMYstfB6PXEtmNbMLvjfR1y2Li
|
|
289
|
-
Program: FRsToriMLgDc1Ud53ngzHUZvCRoazCaGeGUuzkwoha7m
|
|
290
|
-
```
|
|
208
|
+
Any protocol can read agent trust signals to make access decisions:
|
|
291
209
|
|
|
292
210
|
```typescript
|
|
293
|
-
|
|
211
|
+
import { MoltLaunchClient, InfraType } from "@moltlaunch/sdk";
|
|
212
|
+
|
|
213
|
+
const client = new MoltLaunchClient();
|
|
214
|
+
const agent = await client.getAgentIdentity(wallet);
|
|
215
|
+
|
|
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
|
|
222
|
+
}
|
|
294
223
|
```
|
|
295
224
|
|
|
296
225
|
---
|
|
297
226
|
|
|
298
227
|
## API Reference
|
|
299
228
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
|
303
|
-
|
|
304
|
-
| `
|
|
305
|
-
| `
|
|
306
|
-
| `
|
|
307
|
-
| `
|
|
308
|
-
| `
|
|
309
|
-
|
|
|
310
|
-
| `
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
313
|
-
| `
|
|
314
|
-
| `
|
|
315
|
-
| `
|
|
316
|
-
| `
|
|
317
|
-
| `
|
|
318
|
-
|
|
|
319
|
-
| `generateProof(id, opts)` | Threshold proof |
|
|
320
|
-
| `generateConsistencyProof(id, opts)` | Time-series proof |
|
|
321
|
-
| `generateStreakProof(id, opts)` | Consecutive period proof |
|
|
322
|
-
| `generateStabilityProof(id, opts)` | Variance proof |
|
|
323
|
-
| `getProofCost(type)` | Cost estimate |
|
|
324
|
-
| **Traces** | |
|
|
325
|
-
| `submitTrace(id, data)` | Submit behavioral data |
|
|
326
|
-
| `getTraces(id, opts)` | Query trace history |
|
|
327
|
-
| `getBehavioralScore(id)` | Get reputation score |
|
|
328
|
-
| `anchorTrace(traceId)` | Anchor on-chain |
|
|
329
|
-
| **Other** | |
|
|
330
|
-
| `applyToPool(opts)` | Join staking pool |
|
|
331
|
-
| `getPools(topic?)` | Get pool info |
|
|
332
|
-
| `getLeaderboard()` | Agent rankings |
|
|
333
|
-
| `getOnChainInfo()` | On-chain deployment info |
|
|
334
|
-
| `isHealthy()` | API health check |
|
|
335
|
-
| `generateNonce()` | Random nonce for replay protection |
|
|
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 |
|
|
336
248
|
|
|
337
249
|
---
|
|
338
250
|
|
|
339
251
|
## Changelog
|
|
340
252
|
|
|
341
|
-
###
|
|
342
|
-
-
|
|
343
|
-
-
|
|
344
|
-
- `
|
|
345
|
-
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
- `
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
352
|
-
|
|
353
|
-
### v2.
|
|
354
|
-
-
|
|
355
|
-
- Execution traces (submit, score, anchor)
|
|
356
|
-
- Helper methods (`isVerified`, `checkCapability`, `getProofCost`)
|
|
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
|
|
357
267
|
|
|
358
268
|
### v2.0.0
|
|
359
269
|
- On-chain AI verification via Cauldron
|
|
360
|
-
- Batch status checks, pool application
|
|
361
270
|
|
|
362
271
|
### v1.0.0
|
|
363
272
|
- Initial release
|
|
@@ -369,11 +278,11 @@ const info = await ml.getOnChainInfo();
|
|
|
369
278
|
| Resource | URL |
|
|
370
279
|
|----------|-----|
|
|
371
280
|
| npm | https://www.npmjs.com/package/@moltlaunch/sdk |
|
|
372
|
-
|
|
|
373
|
-
| Docs | https://
|
|
374
|
-
|
|
|
375
|
-
|
|
|
376
|
-
| GitHub (
|
|
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 |
|
|
377
286
|
| GitHub (site) | https://github.com/tradingstarllc/moltlaunch-site |
|
|
378
287
|
|
|
379
288
|
---
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MoltLaunch V3 — SDK Client
|
|
3
|
+
*
|
|
4
|
+
* High-level API for interacting with the on-chain Composable Signal Architecture.
|
|
5
|
+
* Program: 6AZSAhq4iJTwCfGEVssoa1p3GnBqGkbcQ1iDdP1U1pSb (devnet)
|
|
6
|
+
*/
|
|
7
|
+
import { Connection, PublicKey, Keypair } from "@solana/web3.js";
|
|
8
|
+
import * as anchor from "@coral-xyz/anchor";
|
|
9
|
+
import { Wallet } from "@coral-xyz/anchor";
|
|
10
|
+
import { AgentIdentity, Attestation, Authority, ProtocolConfig, SignalType, AuthorityType } from "./types";
|
|
11
|
+
export interface MoltLaunchClientOptions {
|
|
12
|
+
/** Solana RPC URL (defaults to devnet) */
|
|
13
|
+
rpcUrl?: string;
|
|
14
|
+
/** Commitment level */
|
|
15
|
+
commitment?: anchor.web3.Commitment;
|
|
16
|
+
/** Wallet / signer (required for write operations) */
|
|
17
|
+
wallet?: Wallet;
|
|
18
|
+
}
|
|
19
|
+
export declare class MoltLaunchClient {
|
|
20
|
+
readonly connection: Connection;
|
|
21
|
+
readonly programId: PublicKey;
|
|
22
|
+
private program;
|
|
23
|
+
private provider;
|
|
24
|
+
constructor(opts?: MoltLaunchClientOptions);
|
|
25
|
+
/** Fetch the singleton ProtocolConfig account */
|
|
26
|
+
getConfig(): Promise<ProtocolConfig>;
|
|
27
|
+
/** Fetch an AgentIdentity by wallet public key */
|
|
28
|
+
getAgentIdentity(wallet: PublicKey): Promise<AgentIdentity>;
|
|
29
|
+
/** Fetch an Authority account */
|
|
30
|
+
getAuthority(pubkey: PublicKey): Promise<Authority>;
|
|
31
|
+
/** Fetch an Attestation account */
|
|
32
|
+
getAttestation(agentWallet: PublicKey, authorityPubkey: PublicKey): Promise<Attestation>;
|
|
33
|
+
/**
|
|
34
|
+
* Register a new agent identity on-chain.
|
|
35
|
+
* Signer = the agent's wallet keypair.
|
|
36
|
+
*/
|
|
37
|
+
registerAgent(name: string, walletKeypair: Keypair): Promise<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Submit an attestation for an agent.
|
|
40
|
+
* Signer = the authority's keypair.
|
|
41
|
+
*/
|
|
42
|
+
submitAttestation(agentWallet: PublicKey, signalType: SignalType, attestationHash: number[] | Uint8Array, expiresAt: number | bigint, authorityKeypair: Keypair, teeQuote?: number[] | Uint8Array | null): Promise<string>;
|
|
43
|
+
/**
|
|
44
|
+
* Revoke an attestation (only the original authority can revoke).
|
|
45
|
+
*/
|
|
46
|
+
revokeAttestation(agentWallet: PublicKey, authorityKeypair: Keypair): Promise<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Refresh an agent's trust signals (permissionless — anyone can call).
|
|
49
|
+
*/
|
|
50
|
+
refreshSignals(agentWallet: PublicKey, signerKeypair?: Keypair): Promise<string>;
|
|
51
|
+
/**
|
|
52
|
+
* Flag an agent (authority-only).
|
|
53
|
+
*/
|
|
54
|
+
flagAgent(agentWallet: PublicKey, reasonHash: number[] | Uint8Array, authorityKeypair: Keypair): Promise<string>;
|
|
55
|
+
/**
|
|
56
|
+
* Unflag an agent (admin-only).
|
|
57
|
+
*/
|
|
58
|
+
unflagAgent(agentWallet: PublicKey, adminKeypair: Keypair): Promise<string>;
|
|
59
|
+
/** Initialize the protocol (admin, one-time) */
|
|
60
|
+
initialize(adminKeypair: Keypair): Promise<string>;
|
|
61
|
+
/** Add an authority (admin-only) */
|
|
62
|
+
addAuthority(authorityPubkey: PublicKey, authorityType: AuthorityType, adminKeypair: Keypair): Promise<string>;
|
|
63
|
+
/** Remove an authority (admin-only) */
|
|
64
|
+
removeAuthority(authorityPubkey: PublicKey, adminKeypair: Keypair): Promise<string>;
|
|
65
|
+
/** Pause / unpause protocol (admin-only) */
|
|
66
|
+
setPaused(paused: boolean, adminKeypair: Keypair): Promise<string>;
|
|
67
|
+
/** Transfer admin to a new pubkey (admin-only) */
|
|
68
|
+
transferAdmin(newAdmin: PublicKey, adminKeypair: Keypair): Promise<string>;
|
|
69
|
+
}
|