@valiron/sdk 0.2.0 → 0.3.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 +49 -7
- package/dist/clients.d.ts +7 -4
- package/dist/clients.d.ts.map +1 -1
- package/dist/clients.js +17 -8
- package/dist/clients.js.map +1 -1
- package/dist/index.d.ts +21 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -8
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +9 -8
package/README.md
CHANGED
|
@@ -21,14 +21,18 @@ import { ValironSDK } from '@valiron/sdk';
|
|
|
21
21
|
|
|
22
22
|
const valiron = new ValironSDK();
|
|
23
23
|
|
|
24
|
-
// Quick routing check
|
|
24
|
+
// Quick routing check (defaults to Ethereum)
|
|
25
25
|
const route = await valiron.checkAgent('25459');
|
|
26
26
|
if (route === 'prod') {
|
|
27
27
|
// Allow full production access
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
const
|
|
30
|
+
// Query a Monad agent — per-call override
|
|
31
|
+
const monadRoute = await valiron.checkAgent('8348', { chain: 'monad' });
|
|
32
|
+
|
|
33
|
+
// Or set the default chain at construction
|
|
34
|
+
const monadValiron = new ValironSDK({ chain: 'monad' });
|
|
35
|
+
const profile = await monadValiron.getAgentProfile('8348');
|
|
32
36
|
console.log(profile.routing.finalRoute); // 'prod'
|
|
33
37
|
console.log(profile.localReputation?.tier); // 'AAA'
|
|
34
38
|
console.log(profile.onchainReputation.averageScore); // 92.5
|
|
@@ -76,28 +80,35 @@ new ValironSDK(config?: ValironConfig)
|
|
|
76
80
|
|--------|------|---------|-------------|
|
|
77
81
|
| `apiKey` | `string` | — | API key (reserved for future use) |
|
|
78
82
|
| `endpoint` | `string` | `https://valiron-edge-proxy.onrender.com` | API endpoint URL |
|
|
83
|
+
| `chain` | `'ethereum' \| 'monad'` | `undefined` (server default) | Default blockchain network for all calls |
|
|
79
84
|
| `timeout` | `number` | `5000` | Request timeout (ms) |
|
|
80
85
|
| `debug` | `boolean` | `false` | Enable debug logging |
|
|
81
86
|
|
|
82
87
|
---
|
|
83
88
|
|
|
84
|
-
### `checkAgent(agentId): Promise<RouteDecision>`
|
|
89
|
+
### `checkAgent(agentId, options?): Promise<RouteDecision>`
|
|
85
90
|
|
|
86
91
|
Quick routing check — returns just the route decision string.
|
|
87
92
|
|
|
88
93
|
```typescript
|
|
89
94
|
const route = await valiron.checkAgent('25459');
|
|
90
95
|
// route: 'prod' | 'prod_throttled' | 'sandbox' | 'sandbox_only'
|
|
96
|
+
|
|
97
|
+
// With chain override
|
|
98
|
+
const monadRoute = await valiron.checkAgent('8348', { chain: 'monad' });
|
|
91
99
|
```
|
|
92
100
|
|
|
93
101
|
---
|
|
94
102
|
|
|
95
|
-
### `getAgentProfile(agentId): Promise<AgentProfile>`
|
|
103
|
+
### `getAgentProfile(agentId, options?): Promise<AgentProfile>`
|
|
96
104
|
|
|
97
105
|
Full trust profile combining on-chain identity, reputation, behavioral data, and routing.
|
|
98
106
|
|
|
99
107
|
```typescript
|
|
100
108
|
const profile = await valiron.getAgentProfile('25459');
|
|
109
|
+
|
|
110
|
+
// Query a Monad agent
|
|
111
|
+
const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
101
112
|
```
|
|
102
113
|
|
|
103
114
|
**Response shape:**
|
|
@@ -144,18 +155,21 @@ const profile = await valiron.getAgentProfile('25459');
|
|
|
144
155
|
|
|
145
156
|
---
|
|
146
157
|
|
|
147
|
-
### `getWalletProfile(wallet): Promise<WalletProfile>`
|
|
158
|
+
### `getWalletProfile(wallet, options?): Promise<WalletProfile>`
|
|
148
159
|
|
|
149
160
|
Reverse-lookup a wallet address to get its trust profile.
|
|
150
161
|
|
|
151
162
|
```typescript
|
|
152
163
|
const profile = await valiron.getWalletProfile('0x52ce…');
|
|
153
164
|
console.log(profile.routing.finalRoute);
|
|
165
|
+
|
|
166
|
+
// With chain override
|
|
167
|
+
const monadProfile = await valiron.getWalletProfile('0xABC…', { chain: 'monad' });
|
|
154
168
|
```
|
|
155
169
|
|
|
156
170
|
---
|
|
157
171
|
|
|
158
|
-
### `triggerSandboxTest(agentId): Promise<SandboxResult>`
|
|
172
|
+
### `triggerSandboxTest(agentId, options?): Promise<SandboxResult>`
|
|
159
173
|
|
|
160
174
|
Run real sandbox tests against an agent and compute a Valiron score.
|
|
161
175
|
|
|
@@ -171,6 +185,32 @@ console.log(result.testSummary);
|
|
|
171
185
|
|
|
172
186
|
---
|
|
173
187
|
|
|
188
|
+
## Multichain Support
|
|
189
|
+
|
|
190
|
+
Valiron supports multiple blockchain networks. Set the chain globally or per-call:
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
// Option A: Set default chain at construction
|
|
194
|
+
const valiron = new ValironSDK({ chain: 'monad' });
|
|
195
|
+
await valiron.getAgentProfile('8348'); // Uses Monad
|
|
196
|
+
|
|
197
|
+
// Option B: Override per-call (takes precedence over constructor default)
|
|
198
|
+
const valiron2 = new ValironSDK(); // No default chain
|
|
199
|
+
await valiron2.getAgentProfile('8348', { chain: 'monad' }); // Monad
|
|
200
|
+
await valiron2.getAgentProfile('25459', { chain: 'ethereum' }); // Ethereum
|
|
201
|
+
await valiron2.getAgentProfile('25459'); // Server default (ethereum)
|
|
202
|
+
|
|
203
|
+
// Option C: Both (per-call overrides constructor)
|
|
204
|
+
const valiron3 = new ValironSDK({ chain: 'ethereum' });
|
|
205
|
+
await valiron3.getAgentProfile('8348', { chain: 'monad' }); // Monad override
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Supported chains:** `ethereum`, `monad`
|
|
209
|
+
|
|
210
|
+
All SDK methods accept an optional `CallOptions` object with a `chain` field.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
174
214
|
## Integration Examples
|
|
175
215
|
|
|
176
216
|
### Express.js Middleware
|
|
@@ -270,6 +310,8 @@ The SDK is fully typed. Import types as needed:
|
|
|
270
310
|
```typescript
|
|
271
311
|
import {
|
|
272
312
|
ValironSDK,
|
|
313
|
+
SupportedChain,
|
|
314
|
+
CallOptions,
|
|
273
315
|
RouteDecision,
|
|
274
316
|
MoodysRating,
|
|
275
317
|
RiskLevel,
|
package/dist/clients.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValironConfig, AgentProfile, WalletProfile, SandboxResult } from "./types";
|
|
1
|
+
import { ValironConfig, AgentProfile, WalletProfile, SandboxResult, CallOptions } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* HTTP client for the Valiron Operator API.
|
|
4
4
|
*
|
|
@@ -8,9 +8,12 @@ import { ValironConfig, AgentProfile, WalletProfile, SandboxResult } from "./typ
|
|
|
8
8
|
export declare class ValironClient {
|
|
9
9
|
private endpoint;
|
|
10
10
|
private apiKey?;
|
|
11
|
+
private defaultChain?;
|
|
11
12
|
private timeout;
|
|
12
13
|
private debug;
|
|
13
14
|
constructor(config?: ValironConfig);
|
|
15
|
+
/** Resolve the effective chain: per-call override > constructor default > undefined (server default). */
|
|
16
|
+
private resolveChain;
|
|
14
17
|
/**
|
|
15
18
|
* Get the complete trust profile for an agent.
|
|
16
19
|
*
|
|
@@ -19,13 +22,13 @@ export declare class ValironClient {
|
|
|
19
22
|
*
|
|
20
23
|
* `GET /operator/agent/:agentId`
|
|
21
24
|
*/
|
|
22
|
-
getAgentProfile(agentId: string): Promise<AgentProfile>;
|
|
25
|
+
getAgentProfile(agentId: string, options?: CallOptions): Promise<AgentProfile>;
|
|
23
26
|
/**
|
|
24
27
|
* Get a trust profile by wallet address (reverse lookup).
|
|
25
28
|
*
|
|
26
29
|
* `GET /operator/wallet/:wallet`
|
|
27
30
|
*/
|
|
28
|
-
getWalletProfile(wallet: string): Promise<WalletProfile>;
|
|
31
|
+
getWalletProfile(wallet: string, options?: CallOptions): Promise<WalletProfile>;
|
|
29
32
|
/**
|
|
30
33
|
* Trigger real sandbox testing for an agent.
|
|
31
34
|
*
|
|
@@ -35,7 +38,7 @@ export declare class ValironClient {
|
|
|
35
38
|
*
|
|
36
39
|
* `POST /operator/trigger-sandbox/:agentId`
|
|
37
40
|
*/
|
|
38
|
-
triggerSandboxTest(agentId: string): Promise<SandboxResult>;
|
|
41
|
+
triggerSandboxTest(agentId: string, options?: CallOptions): Promise<SandboxResult>;
|
|
39
42
|
private buildHeaders;
|
|
40
43
|
private get;
|
|
41
44
|
private post;
|
package/dist/clients.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,
|
|
1
|
+
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EAGZ,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,YAAY,CAAC,CAAiB;IACtC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAU;gBAEX,MAAM,GAAE,aAAkB;IAWtC,yGAAyG;IACzG,OAAO,CAAC,YAAY;IAIpB;;;;;;;OAOG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAIpF;;;;OAIG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAIrF;;;;;;;;OAQG;IACG,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAMxF,OAAO,CAAC,YAAY;YAUN,GAAG;YAkDH,IAAI;CAkDnB"}
|
package/dist/clients.js
CHANGED
|
@@ -13,10 +13,15 @@ class ValironClient {
|
|
|
13
13
|
this.endpoint =
|
|
14
14
|
config.endpoint || "https://valiron-edge-proxy.onrender.com";
|
|
15
15
|
this.apiKey = config.apiKey;
|
|
16
|
+
this.defaultChain = config.chain;
|
|
16
17
|
this.timeout = config.timeout || 5000;
|
|
17
18
|
this.debug = config.debug || false;
|
|
18
19
|
}
|
|
19
20
|
// ─── Public API ─────────────────────────────────────────────────────────
|
|
21
|
+
/** Resolve the effective chain: per-call override > constructor default > undefined (server default). */
|
|
22
|
+
resolveChain(options) {
|
|
23
|
+
return options?.chain ?? this.defaultChain;
|
|
24
|
+
}
|
|
20
25
|
/**
|
|
21
26
|
* Get the complete trust profile for an agent.
|
|
22
27
|
*
|
|
@@ -25,16 +30,16 @@ class ValironClient {
|
|
|
25
30
|
*
|
|
26
31
|
* `GET /operator/agent/:agentId`
|
|
27
32
|
*/
|
|
28
|
-
async getAgentProfile(agentId) {
|
|
29
|
-
return this.get(`/operator/agent/${agentId}
|
|
33
|
+
async getAgentProfile(agentId, options) {
|
|
34
|
+
return this.get(`/operator/agent/${agentId}`, this.resolveChain(options));
|
|
30
35
|
}
|
|
31
36
|
/**
|
|
32
37
|
* Get a trust profile by wallet address (reverse lookup).
|
|
33
38
|
*
|
|
34
39
|
* `GET /operator/wallet/:wallet`
|
|
35
40
|
*/
|
|
36
|
-
async getWalletProfile(wallet) {
|
|
37
|
-
return this.get(`/operator/wallet/${wallet}
|
|
41
|
+
async getWalletProfile(wallet, options) {
|
|
42
|
+
return this.get(`/operator/wallet/${wallet}`, this.resolveChain(options));
|
|
38
43
|
}
|
|
39
44
|
/**
|
|
40
45
|
* Trigger real sandbox testing for an agent.
|
|
@@ -45,8 +50,8 @@ class ValironClient {
|
|
|
45
50
|
*
|
|
46
51
|
* `POST /operator/trigger-sandbox/:agentId`
|
|
47
52
|
*/
|
|
48
|
-
async triggerSandboxTest(agentId) {
|
|
49
|
-
return this.post(`/operator/trigger-sandbox/${agentId}
|
|
53
|
+
async triggerSandboxTest(agentId, options) {
|
|
54
|
+
return this.post(`/operator/trigger-sandbox/${agentId}`, undefined, this.resolveChain(options));
|
|
50
55
|
}
|
|
51
56
|
// ─── HTTP helpers ───────────────────────────────────────────────────────
|
|
52
57
|
buildHeaders() {
|
|
@@ -58,8 +63,10 @@ class ValironClient {
|
|
|
58
63
|
}
|
|
59
64
|
return headers;
|
|
60
65
|
}
|
|
61
|
-
async get(path) {
|
|
66
|
+
async get(path, chain) {
|
|
62
67
|
const url = new URL(path, this.endpoint);
|
|
68
|
+
if (chain)
|
|
69
|
+
url.searchParams.set("chain", chain);
|
|
63
70
|
if (this.debug) {
|
|
64
71
|
console.log(`[Valiron SDK] GET ${url.toString()}`);
|
|
65
72
|
}
|
|
@@ -93,8 +100,10 @@ class ValironClient {
|
|
|
93
100
|
throw new types_1.ValironError(error.message || "Network error", "NETWORK_ERROR");
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
|
-
async post(path, body) {
|
|
103
|
+
async post(path, body, chain) {
|
|
97
104
|
const url = new URL(path, this.endpoint);
|
|
105
|
+
if (chain)
|
|
106
|
+
url.searchParams.set("chain", chain);
|
|
98
107
|
if (this.debug) {
|
|
99
108
|
console.log(`[Valiron SDK] POST ${url.toString()}`, body);
|
|
100
109
|
}
|
package/dist/clients.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":";;;AAAA,mCAQiB;AAEjB;;;;;GAKG;AACH,MAAa,aAAa;IAOxB,YAAY,SAAwB,EAAE;QACpC,IAAI,CAAC,QAAQ;YACX,M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 -1,4 +1,4 @@
|
|
|
1
|
-
import { ValironConfig, AgentProfile, WalletProfile, SandboxResult, RouteDecision } from "./types";
|
|
1
|
+
import { ValironConfig, CallOptions, AgentProfile, WalletProfile, SandboxResult, RouteDecision } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Valiron SDK – Official TypeScript SDK for the Trust Layer for Agentic Economy
|
|
4
4
|
*
|
|
@@ -6,11 +6,18 @@ import { ValironConfig, AgentProfile, WalletProfile, SandboxResult, RouteDecisio
|
|
|
6
6
|
* ```typescript
|
|
7
7
|
* import { ValironSDK } from '@valiron/sdk';
|
|
8
8
|
*
|
|
9
|
+
* // Default chain (ethereum)
|
|
9
10
|
* const valiron = new ValironSDK();
|
|
10
11
|
*
|
|
12
|
+
* // Or set a default chain at construction
|
|
13
|
+
* const monadValiron = new ValironSDK({ chain: 'monad' });
|
|
14
|
+
*
|
|
11
15
|
* // Get full trust profile (identity + reputation + routing)
|
|
12
16
|
* const profile = await valiron.getAgentProfile('25459');
|
|
13
17
|
*
|
|
18
|
+
* // Override chain per-call
|
|
19
|
+
* const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
20
|
+
*
|
|
14
21
|
* if (profile.routing.finalRoute === 'prod') {
|
|
15
22
|
* // Allow full production access
|
|
16
23
|
* }
|
|
@@ -27,19 +34,24 @@ export declare class ValironSDK {
|
|
|
27
34
|
* (Valiron sandbox metrics), and a hybrid routing decision.
|
|
28
35
|
*
|
|
29
36
|
* @param agentId - The ERC-8004 agent ID
|
|
37
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
30
38
|
* @returns Full agent trust profile
|
|
31
39
|
*
|
|
32
40
|
* @example
|
|
33
41
|
* ```typescript
|
|
42
|
+
* // Uses default chain
|
|
34
43
|
* const profile = await valiron.getAgentProfile('25459');
|
|
35
44
|
*
|
|
45
|
+
* // Explicit Monad chain
|
|
46
|
+
* const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
47
|
+
*
|
|
36
48
|
* console.log(profile.routing.finalRoute); // 'prod'
|
|
37
49
|
* console.log(profile.routing.decision); // human-readable explanation
|
|
38
50
|
* console.log(profile.localReputation?.tier); // 'AAA'
|
|
39
51
|
* console.log(profile.onchainReputation.averageScore); // 92.5
|
|
40
52
|
* ```
|
|
41
53
|
*/
|
|
42
|
-
getAgentProfile(agentId: string): Promise<AgentProfile>;
|
|
54
|
+
getAgentProfile(agentId: string, options?: CallOptions): Promise<AgentProfile>;
|
|
43
55
|
/**
|
|
44
56
|
* Convenience helper – get just the routing decision for an agent.
|
|
45
57
|
*
|
|
@@ -47,17 +59,19 @@ export declare class ValironSDK {
|
|
|
47
59
|
* `routing.finalRoute` field.
|
|
48
60
|
*
|
|
49
61
|
* @param agentId - The ERC-8004 agent ID
|
|
62
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
50
63
|
* @returns The route decision string
|
|
51
64
|
*
|
|
52
65
|
* @example
|
|
53
66
|
* ```typescript
|
|
54
67
|
* const route = await valiron.checkAgent('25459');
|
|
68
|
+
* const monadRoute = await valiron.checkAgent('8348', { chain: 'monad' });
|
|
55
69
|
* if (route === 'prod' || route === 'prod_throttled') {
|
|
56
70
|
* return handleRequest();
|
|
57
71
|
* }
|
|
58
72
|
* ```
|
|
59
73
|
*/
|
|
60
|
-
checkAgent(agentId: string): Promise<RouteDecision>;
|
|
74
|
+
checkAgent(agentId: string, options?: CallOptions): Promise<RouteDecision>;
|
|
61
75
|
/**
|
|
62
76
|
* Get a trust profile by wallet address (reverse lookup).
|
|
63
77
|
*
|
|
@@ -66,6 +80,7 @@ export declare class ValironSDK {
|
|
|
66
80
|
* only local behavioral data is returned.
|
|
67
81
|
*
|
|
68
82
|
* @param wallet - Ethereum wallet address
|
|
83
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
69
84
|
* @returns Wallet trust profile
|
|
70
85
|
*
|
|
71
86
|
* @example
|
|
@@ -74,7 +89,7 @@ export declare class ValironSDK {
|
|
|
74
89
|
* console.log(profile.routing.finalRoute);
|
|
75
90
|
* ```
|
|
76
91
|
*/
|
|
77
|
-
getWalletProfile(wallet: string): Promise<WalletProfile>;
|
|
92
|
+
getWalletProfile(wallet: string, options?: CallOptions): Promise<WalletProfile>;
|
|
78
93
|
/**
|
|
79
94
|
* Trigger real sandbox testing for an agent.
|
|
80
95
|
*
|
|
@@ -83,6 +98,7 @@ export declare class ValironSDK {
|
|
|
83
98
|
* a Valiron behavioral score and stores the result.
|
|
84
99
|
*
|
|
85
100
|
* @param agentId - The ERC-8004 agent ID
|
|
101
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
86
102
|
* @returns Sandbox test results including score, tier, and metrics
|
|
87
103
|
*
|
|
88
104
|
* @example
|
|
@@ -94,7 +110,7 @@ export declare class ValironSDK {
|
|
|
94
110
|
* console.log(result.testSummary); // { totalRequests, successCount, … }
|
|
95
111
|
* ```
|
|
96
112
|
*/
|
|
97
|
-
triggerSandboxTest(agentId: string): Promise<SandboxResult>;
|
|
113
|
+
triggerSandboxTest(agentId: string, options?: CallOptions): Promise<SandboxResult>;
|
|
98
114
|
}
|
|
99
115
|
export * from "./types";
|
|
100
116
|
export { ValironClient } from "./clients";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAgB;gBAElB,MAAM,GAAE,aAAkB;IAItC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC;IAIpF;;;;;;;;;;;;;;;;;;OAkBG;IACG,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAKhF;;;;;;;;;;;;;;;;OAgBG;IACG,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;IAIrF;;;;;;;;;;;;;;;;;;;OAmBG;IACG,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC;CAGzF;AAGD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -23,11 +23,18 @@ const clients_1 = require("./clients");
|
|
|
23
23
|
* ```typescript
|
|
24
24
|
* import { ValironSDK } from '@valiron/sdk';
|
|
25
25
|
*
|
|
26
|
+
* // Default chain (ethereum)
|
|
26
27
|
* const valiron = new ValironSDK();
|
|
27
28
|
*
|
|
29
|
+
* // Or set a default chain at construction
|
|
30
|
+
* const monadValiron = new ValironSDK({ chain: 'monad' });
|
|
31
|
+
*
|
|
28
32
|
* // Get full trust profile (identity + reputation + routing)
|
|
29
33
|
* const profile = await valiron.getAgentProfile('25459');
|
|
30
34
|
*
|
|
35
|
+
* // Override chain per-call
|
|
36
|
+
* const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
37
|
+
*
|
|
31
38
|
* if (profile.routing.finalRoute === 'prod') {
|
|
32
39
|
* // Allow full production access
|
|
33
40
|
* }
|
|
@@ -45,20 +52,25 @@ class ValironSDK {
|
|
|
45
52
|
* (Valiron sandbox metrics), and a hybrid routing decision.
|
|
46
53
|
*
|
|
47
54
|
* @param agentId - The ERC-8004 agent ID
|
|
55
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
48
56
|
* @returns Full agent trust profile
|
|
49
57
|
*
|
|
50
58
|
* @example
|
|
51
59
|
* ```typescript
|
|
60
|
+
* // Uses default chain
|
|
52
61
|
* const profile = await valiron.getAgentProfile('25459');
|
|
53
62
|
*
|
|
63
|
+
* // Explicit Monad chain
|
|
64
|
+
* const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
65
|
+
*
|
|
54
66
|
* console.log(profile.routing.finalRoute); // 'prod'
|
|
55
67
|
* console.log(profile.routing.decision); // human-readable explanation
|
|
56
68
|
* console.log(profile.localReputation?.tier); // 'AAA'
|
|
57
69
|
* console.log(profile.onchainReputation.averageScore); // 92.5
|
|
58
70
|
* ```
|
|
59
71
|
*/
|
|
60
|
-
async getAgentProfile(agentId) {
|
|
61
|
-
return this.client.getAgentProfile(agentId);
|
|
72
|
+
async getAgentProfile(agentId, options) {
|
|
73
|
+
return this.client.getAgentProfile(agentId, options);
|
|
62
74
|
}
|
|
63
75
|
/**
|
|
64
76
|
* Convenience helper – get just the routing decision for an agent.
|
|
@@ -67,18 +79,20 @@ class ValironSDK {
|
|
|
67
79
|
* `routing.finalRoute` field.
|
|
68
80
|
*
|
|
69
81
|
* @param agentId - The ERC-8004 agent ID
|
|
82
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
70
83
|
* @returns The route decision string
|
|
71
84
|
*
|
|
72
85
|
* @example
|
|
73
86
|
* ```typescript
|
|
74
87
|
* const route = await valiron.checkAgent('25459');
|
|
88
|
+
* const monadRoute = await valiron.checkAgent('8348', { chain: 'monad' });
|
|
75
89
|
* if (route === 'prod' || route === 'prod_throttled') {
|
|
76
90
|
* return handleRequest();
|
|
77
91
|
* }
|
|
78
92
|
* ```
|
|
79
93
|
*/
|
|
80
|
-
async checkAgent(agentId) {
|
|
81
|
-
const profile = await this.client.getAgentProfile(agentId);
|
|
94
|
+
async checkAgent(agentId, options) {
|
|
95
|
+
const profile = await this.client.getAgentProfile(agentId, options);
|
|
82
96
|
return profile.routing.finalRoute;
|
|
83
97
|
}
|
|
84
98
|
/**
|
|
@@ -89,6 +103,7 @@ class ValironSDK {
|
|
|
89
103
|
* only local behavioral data is returned.
|
|
90
104
|
*
|
|
91
105
|
* @param wallet - Ethereum wallet address
|
|
106
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
92
107
|
* @returns Wallet trust profile
|
|
93
108
|
*
|
|
94
109
|
* @example
|
|
@@ -97,8 +112,8 @@ class ValironSDK {
|
|
|
97
112
|
* console.log(profile.routing.finalRoute);
|
|
98
113
|
* ```
|
|
99
114
|
*/
|
|
100
|
-
async getWalletProfile(wallet) {
|
|
101
|
-
return this.client.getWalletProfile(wallet);
|
|
115
|
+
async getWalletProfile(wallet, options) {
|
|
116
|
+
return this.client.getWalletProfile(wallet, options);
|
|
102
117
|
}
|
|
103
118
|
/**
|
|
104
119
|
* Trigger real sandbox testing for an agent.
|
|
@@ -108,6 +123,7 @@ class ValironSDK {
|
|
|
108
123
|
* a Valiron behavioral score and stores the result.
|
|
109
124
|
*
|
|
110
125
|
* @param agentId - The ERC-8004 agent ID
|
|
126
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
111
127
|
* @returns Sandbox test results including score, tier, and metrics
|
|
112
128
|
*
|
|
113
129
|
* @example
|
|
@@ -119,8 +135,8 @@ class ValironSDK {
|
|
|
119
135
|
* console.log(result.testSummary); // { totalRequests, successCount, … }
|
|
120
136
|
* ```
|
|
121
137
|
*/
|
|
122
|
-
async triggerSandboxTest(agentId) {
|
|
123
|
-
return this.client.triggerSandboxTest(agentId);
|
|
138
|
+
async triggerSandboxTest(agentId, options) {
|
|
139
|
+
return this.client.triggerSandboxTest(agentId, options);
|
|
124
140
|
}
|
|
125
141
|
}
|
|
126
142
|
exports.ValironSDK = ValironSDK;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA0C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA0C;AAU1C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,UAAU;IAGrB,YAAY,SAAwB,EAAE;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,eAAe,CAAC,OAAe,EAAE,OAAqB;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,OAAqB;QACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,gBAAgB,CAAC,MAAc,EAAE,OAAqB;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe,EAAE,OAAqB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAxGD,gCAwGC;AAED,uBAAuB;AACvB,0CAAwB;AACxB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Type definitions for the Valiron Operator API
|
|
5
5
|
* Matches the actual edge-proxy /operator/* endpoints
|
|
6
6
|
*/
|
|
7
|
+
/** Blockchain networks supported by the Valiron Operator API. */
|
|
8
|
+
export type SupportedChain = "ethereum" | "monad";
|
|
7
9
|
export type RouteDecision = "prod" | "prod_throttled" | "sandbox" | "sandbox_only";
|
|
8
10
|
export type RiskLevel = "GREEN" | "YELLOW" | "RED";
|
|
9
11
|
export type MoodysRating = "AAA" | "AA" | "A" | "BAA" | "BA" | "B" | "CAA" | "CA" | "C";
|
|
@@ -128,6 +130,14 @@ export interface SandboxResult {
|
|
|
128
130
|
testSummary: SandboxTestSummary;
|
|
129
131
|
message: string;
|
|
130
132
|
}
|
|
133
|
+
/** Options that can be passed to individual SDK method calls. */
|
|
134
|
+
export interface CallOptions {
|
|
135
|
+
/**
|
|
136
|
+
* Override the blockchain network for this call.
|
|
137
|
+
* Takes precedence over the default chain set in the constructor.
|
|
138
|
+
*/
|
|
139
|
+
chain?: SupportedChain;
|
|
140
|
+
}
|
|
131
141
|
export interface ValironConfig {
|
|
132
142
|
/**
|
|
133
143
|
* Your Valiron API key.
|
|
@@ -141,6 +151,11 @@ export interface ValironConfig {
|
|
|
141
151
|
* Valiron API endpoint (defaults to production)
|
|
142
152
|
*/
|
|
143
153
|
endpoint?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Default blockchain network (defaults to "ethereum").
|
|
156
|
+
* Can be overridden per-call via the `options` parameter.
|
|
157
|
+
*/
|
|
158
|
+
chain?: SupportedChain;
|
|
144
159
|
/**
|
|
145
160
|
* Request timeout in milliseconds (default: 5000)
|
|
146
161
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-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AAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,GAAG,eAAe,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAID,MAAM,WAAW,aAAa;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,MAAM;IACZ,UAAU,CAAC,EAAE,MAAM;gBAF1B,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,YAAA;CAK7B"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuNH,+EAA+E;AAE/E,MAAa,YAAa,SAAQ,KAAK;IACrC,YACE,OAAe,EACR,IAAY,EACZ,UAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AATD,oCASC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valiron/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Official TypeScript SDK for Valiron - Trust Layer for Agentic Economy",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=18.0.0"
|
|
9
9
|
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"test": "node test/validate.mjs && node test/validate-examples.mjs",
|
|
14
|
+
"prepublishOnly": "pnpm build"
|
|
15
|
+
},
|
|
10
16
|
"keywords": [
|
|
11
17
|
"valiron",
|
|
12
18
|
"ai-agents",
|
|
@@ -31,10 +37,5 @@
|
|
|
31
37
|
"files": [
|
|
32
38
|
"dist",
|
|
33
39
|
"README.md"
|
|
34
|
-
]
|
|
35
|
-
|
|
36
|
-
"build": "tsc",
|
|
37
|
-
"dev": "tsc --watch",
|
|
38
|
-
"test": "node test/validate.mjs && node test/validate-examples.mjs"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
40
|
+
]
|
|
41
|
+
}
|