@valiron/sdk 0.1.1 → 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/dist/index.js CHANGED
@@ -14,145 +14,134 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ValironSDK = void 0;
17
+ exports.ValironClient = exports.ValironSDK = void 0;
18
18
  const clients_1 = require("./clients");
19
19
  /**
20
- * Valiron SDK - Official TypeScript SDK for the Trust Layer for Agentic Economy
20
+ * Valiron SDK – Official TypeScript SDK for the Trust Layer for Agentic Economy
21
21
  *
22
22
  * @example
23
23
  * ```typescript
24
24
  * import { ValironSDK } from '@valiron/sdk';
25
25
  *
26
- * const valiron = new ValironSDK({
27
- * apiKey: 'vln_your_api_key'
28
- * });
26
+ * // Default chain (ethereum)
27
+ * const valiron = new ValironSDK();
29
28
  *
30
- * // Check if agent can access production
31
- * const decision = await valiron.checkAgent('123');
32
- * if (decision.route === 'prod') {
29
+ * // Or set a default chain at construction
30
+ * const monadValiron = new ValironSDK({ chain: 'monad' });
31
+ *
32
+ * // Get full trust profile (identity + reputation + routing)
33
+ * const profile = await valiron.getAgentProfile('25459');
34
+ *
35
+ * // Override chain per-call
36
+ * const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
37
+ *
38
+ * if (profile.routing.finalRoute === 'prod') {
33
39
  * // Allow full production access
34
40
  * }
35
41
  * ```
36
42
  */
37
43
  class ValironSDK {
38
- constructor(config) {
39
- this.trustClient = new clients_1.TrustClient(config);
40
- this.reputationClient = new clients_1.ReputationClient(config);
44
+ constructor(config = {}) {
45
+ this.client = new clients_1.ValironClient(config);
41
46
  }
42
47
  /**
43
- * Check agent routing decision
48
+ * Get the complete trust profile for an ERC-8004 agent.
44
49
  *
45
- * This is the primary method for determining how to route requests from an agent.
46
- * Valiron automatically handles sandbox testing if the agent hasn't been evaluated.
50
+ * Returns on-chain identity, on-chain reputation (feedback count,
51
+ * average score, individual entries), local behavioral reputation
52
+ * (Valiron sandbox metrics), and a hybrid routing decision.
47
53
  *
48
54
  * @param agentId - The ERC-8004 agent ID
49
- * @returns Routing decision with detailed explanation
55
+ * @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
56
+ * @returns Full agent trust profile
50
57
  *
51
58
  * @example
52
59
  * ```typescript
53
- * const result = await valiron.checkAgent('417');
54
- *
55
- * switch (result.route) {
56
- * case 'prod':
57
- * return handleProductionRequest();
58
- * case 'prod_throttled':
59
- * return handleThrottledRequest();
60
- * case 'sandbox':
61
- * case 'sandbox_only':
62
- * return rejectRequest();
63
- * }
64
- * ```
65
- */
66
- async checkAgent(agentId) {
67
- return this.trustClient.checkAgent(agentId);
68
- }
69
- /**
70
- * Check wallet routing decision
60
+ * // Uses default chain
61
+ * const profile = await valiron.getAgentProfile('25459');
71
62
  *
72
- * Legacy method for wallet-based routing. Prefer `checkAgent()` for ERC-8004 agents.
63
+ * // Explicit Monad chain
64
+ * const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
73
65
  *
74
- * @param wallet - The wallet address
75
- * @returns Routing decision
66
+ * console.log(profile.routing.finalRoute); // 'prod'
67
+ * console.log(profile.routing.decision); // human-readable explanation
68
+ * console.log(profile.localReputation?.tier); // 'AAA'
69
+ * console.log(profile.onchainReputation.averageScore); // 92.5
70
+ * ```
76
71
  */
77
- async checkWallet(wallet) {
78
- return this.trustClient.checkWallet(wallet);
72
+ async getAgentProfile(agentId, options) {
73
+ return this.client.getAgentProfile(agentId, options);
79
74
  }
80
75
  /**
81
- * Get complete agent trust profile
76
+ * Convenience helper – get just the routing decision for an agent.
82
77
  *
83
- * Returns comprehensive trust data including on-chain reputation,
84
- * behavioral analysis scores, and routing logic.
78
+ * This calls `getAgentProfile` under the hood and extracts the
79
+ * `routing.finalRoute` field.
85
80
  *
86
81
  * @param agentId - The ERC-8004 agent ID
87
- * @returns Complete agent profile
82
+ * @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
83
+ * @returns The route decision string
88
84
  *
89
85
  * @example
90
86
  * ```typescript
91
- * const profile = await valiron.getAgentProfile('417');
92
- * console.log(`Agent score: ${profile.localReputation?.score}`);
93
- * console.log(`Tier: ${profile.localReputation?.tier}`);
94
- * console.log(`On-chain feedback: ${profile.onchainReputation.count} entries`);
87
+ * const route = await valiron.checkAgent('25459');
88
+ * const monadRoute = await valiron.checkAgent('8348', { chain: 'monad' });
89
+ * if (route === 'prod' || route === 'prod_throttled') {
90
+ * return handleRequest();
91
+ * }
95
92
  * ```
96
93
  */
97
- async getAgentProfile(agentId) {
98
- return this.trustClient.getAgentProfile(agentId);
99
- }
100
- /**
101
- * Get wallet profile
102
- *
103
- * @param wallet - The wallet address
104
- * @returns Wallet profile with routing info
105
- */
106
- async getWalletProfile(wallet) {
107
- return this.trustClient.getWalletProfile(wallet);
94
+ async checkAgent(agentId, options) {
95
+ const profile = await this.client.getAgentProfile(agentId, options);
96
+ return profile.routing.finalRoute;
108
97
  }
109
98
  /**
110
- * Submit feedback about an agent's behavior
99
+ * Get a trust profile by wallet address (reverse lookup).
111
100
  *
112
- * This allows you to report an agent's behavior to Valiron.
113
- * Valiron handles IPFS storage and on-chain submission automatically.
101
+ * If the wallet has an associated agent ID in local state, the full
102
+ * profile (identity + on-chain reputation) is included. Otherwise
103
+ * only local behavioral data is returned.
114
104
  *
115
- * @param params - Feedback parameters
116
- * @returns Submission result with transaction hash
105
+ * @param wallet - Ethereum wallet address
106
+ * @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
107
+ * @returns Wallet trust profile
117
108
  *
118
109
  * @example
119
110
  * ```typescript
120
- * await valiron.submitFeedback({
121
- * agentId: '417',
122
- * score: 95,
123
- * outcome: 'success',
124
- * metadata: {
125
- * taskType: 'data_processing',
126
- * duration: 1234
127
- * }
128
- * });
111
+ * const profile = await valiron.getWalletProfile('0x52ce…');
112
+ * console.log(profile.routing.finalRoute);
129
113
  * ```
130
114
  */
131
- async submitFeedback(params) {
132
- return this.reputationClient.submitFeedback(params);
115
+ async getWalletProfile(wallet, options) {
116
+ return this.client.getWalletProfile(wallet, options);
133
117
  }
134
118
  /**
135
- * Manually trigger sandbox testing
119
+ * Trigger real sandbox testing for an agent.
136
120
  *
137
- * Useful for re-evaluating an agent or testing specific scenarios.
121
+ * Sends a series of test requests against the agent's HTTP endpoint
122
+ * (if registered on-chain) or through the sandbox relay, then computes
123
+ * a Valiron behavioral score and stores the result.
138
124
  *
139
- * @param params - Sandbox test parameters
140
- * @returns Test trigger result
125
+ * @param agentId - The ERC-8004 agent ID
126
+ * @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
127
+ * @returns Sandbox test results including score, tier, and metrics
141
128
  *
142
129
  * @example
143
130
  * ```typescript
144
- * await valiron.triggerSandboxTest({
145
- * agentId: '417',
146
- * behaviorType: 'good'
147
- * });
131
+ * const result = await valiron.triggerSandboxTest('25459');
132
+ * console.log(result.valironScore); // 95
133
+ * console.log(result.tier); // 'AAA'
134
+ * console.log(result.riskLevel); // 'GREEN'
135
+ * console.log(result.testSummary); // { totalRequests, successCount, … }
148
136
  * ```
149
137
  */
150
- async triggerSandboxTest(params) {
151
- return this.reputationClient.triggerSandboxTest(params);
138
+ async triggerSandboxTest(agentId, options) {
139
+ return this.client.triggerSandboxTest(agentId, options);
152
140
  }
153
141
  }
154
142
  exports.ValironSDK = ValironSDK;
155
- // Export everything
143
+ // Re-export everything
156
144
  __exportStar(require("./types"), exports);
157
- __exportStar(require("./clients"), exports);
145
+ var clients_2 = require("./clients");
146
+ Object.defineProperty(exports, "ValironClient", { enumerable: true, get: function () { return clients_2.ValironClient; } });
158
147
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;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],"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
@@ -1,25 +1,46 @@
1
1
  /**
2
2
  * Valiron SDK Types
3
3
  *
4
- * Type definitions for the Valiron Trust Layer API
4
+ * Type definitions for the Valiron Operator API
5
+ * Matches the actual edge-proxy /operator/* endpoints
5
6
  */
6
- export type RouteDecision = 'prod' | 'prod_throttled' | 'sandbox' | 'sandbox_only';
7
- export type RiskLevel = 'GREEN' | 'YELLOW' | 'RED';
8
- export type MoodysRating = 'AAA' | 'AA' | 'A' | 'BAA' | 'BA' | 'B' | 'CAA' | 'CA' | 'C';
9
- export interface OnChainReputation {
10
- feedbackCount: number;
11
- averageScore: number;
12
- agentId?: string;
13
- wallet?: string;
7
+ /** Blockchain networks supported by the Valiron Operator API. */
8
+ export type SupportedChain = "ethereum" | "monad";
9
+ export type RouteDecision = "prod" | "prod_throttled" | "sandbox" | "sandbox_only";
10
+ export type RiskLevel = "GREEN" | "YELLOW" | "RED";
11
+ export type MoodysRating = "AAA" | "AA" | "A" | "BAA" | "BA" | "B" | "CAA" | "CA" | "C";
12
+ export interface AgentIdentity {
13
+ agentId: string;
14
+ wallet: string;
15
+ tokenUri: string;
16
+ name: string;
17
+ image: string;
18
+ description: string;
19
+ /** ERC-8004 endpoints, e.g. { agentWallet: "eip155:1:0x…", api: "https://…" } */
20
+ endpoints: Record<string, string>;
21
+ trustModels: string[];
22
+ /** Any additional metadata from the Agent Registration File */
23
+ [key: string]: unknown;
14
24
  }
15
- export interface LocalReputation {
25
+ export interface FeedbackEntry {
26
+ from: string;
16
27
  score: number;
17
- tier: MoodysRating;
18
- riskLevel: RiskLevel;
19
- graduated?: boolean;
20
- metrics?: BehavioralMetrics;
21
- ipfsCid?: string;
22
- updatedAt?: number;
28
+ tag1: string;
29
+ tag2: string;
30
+ uri: string;
31
+ hash: string;
32
+ blockNumber: string;
33
+ transactionHash: string;
34
+ feedbackIndex?: string;
35
+ indexedTag1?: string;
36
+ endpoint?: string;
37
+ }
38
+ export interface OnchainReputation {
39
+ count: string;
40
+ averageScore: number;
41
+ feedbackEntries: FeedbackEntry[];
42
+ totalFeedback: number;
43
+ error?: string;
23
44
  }
24
45
  export interface BehavioralMetrics {
25
46
  loops?: number;
@@ -28,63 +49,94 @@ export interface BehavioralMetrics {
28
49
  errorRate?: number;
29
50
  averageLatency?: number;
30
51
  burstiness?: number;
52
+ onChainFeedbackCount?: number;
53
+ onChainAverageScore?: number;
31
54
  }
32
- export interface RoutingResponse {
33
- route: RouteDecision;
34
- reason: string;
35
- onChainData?: OnChainReputation;
36
- localReputation?: LocalReputation;
37
- explanation: string;
55
+ export interface LocalReputation {
56
+ exists: boolean;
57
+ score?: number;
58
+ tier?: MoodysRating | string;
59
+ riskLevel?: RiskLevel | string;
60
+ graduated?: boolean;
61
+ metrics?: BehavioralMetrics;
62
+ ipfsCid?: string | null;
63
+ agentId?: string | null;
64
+ lastUpdated?: string | null;
65
+ message?: string;
66
+ error?: string;
38
67
  }
39
- export interface AgentIdentity {
40
- agentId: string;
41
- wallet: string;
42
- name?: string;
43
- description?: string;
44
- image?: string;
45
- endpoints?: string[];
46
- externalUri?: string;
68
+ export interface RoutingSignals {
69
+ onchain: {
70
+ feedbackCount: number;
71
+ averageScore: number;
72
+ threshold: string;
73
+ };
74
+ local: {
75
+ exists: boolean;
76
+ graduated: boolean;
77
+ tier: string;
78
+ riskLevel: string;
79
+ score: number;
80
+ };
47
81
  }
48
- export interface FeedbackEntry {
49
- clientAddress: string;
50
- score: number;
51
- timestamp: number;
52
- tag1?: string;
53
- tag2?: string;
54
- endpoint?: string;
55
- feedbackURI?: string;
56
- feedbackHash?: string;
57
- revoked?: boolean;
58
- response?: string;
82
+ export interface RoutingExplanation {
83
+ finalRoute: RouteDecision;
84
+ decision: string;
85
+ reasons: string[];
86
+ signals: RoutingSignals;
59
87
  }
88
+ /**
89
+ * Response from `GET /operator/agent/:agentId`
90
+ */
60
91
  export interface AgentProfile {
61
92
  agentId: string;
62
93
  identity: AgentIdentity;
63
- onchainReputation: {
64
- count: number;
65
- averageScore: number;
66
- feedbackEntries: FeedbackEntry[];
67
- };
68
- localReputation?: LocalReputation;
69
- routing: {
70
- finalRoute: RouteDecision;
71
- decision: string;
72
- reasons: string[];
73
- signals: {
74
- onChainQualifies: boolean;
75
- hasLocalReputation: boolean;
76
- localRiskLevel?: RiskLevel;
77
- };
78
- };
94
+ onchainReputation: OnchainReputation;
95
+ localReputation: LocalReputation | null;
96
+ routing: RoutingExplanation;
97
+ timestamp: string;
79
98
  }
99
+ /**
100
+ * Response from `GET /operator/wallet/:wallet`
101
+ */
80
102
  export interface WalletProfile {
81
103
  wallet: string;
82
- agentId?: string;
83
- route: RouteDecision;
84
- score?: number;
85
- tier?: MoodysRating;
86
- onChainData?: OnChainReputation;
87
- localReputation?: LocalReputation;
104
+ agentId: string | null;
105
+ identity: AgentIdentity | null;
106
+ onchainReputation: OnchainReputation | null;
107
+ localReputation: LocalReputation | null;
108
+ routing: RoutingExplanation;
109
+ timestamp: string;
110
+ }
111
+ export interface SandboxTestSummary {
112
+ totalRequests: number;
113
+ successCount: number;
114
+ rateLimitCount: number;
115
+ errorCount: number;
116
+ avgLatencyMs: number;
117
+ }
118
+ /**
119
+ * Response from `POST /operator/trigger-sandbox/:agentId`
120
+ */
121
+ export interface SandboxResult {
122
+ ok: boolean;
123
+ agentId: string;
124
+ wallet: string;
125
+ mode: "endpoint-probe" | "sandbox-relay";
126
+ metrics: BehavioralMetrics;
127
+ valironScore: number;
128
+ tier: MoodysRating;
129
+ riskLevel: RiskLevel;
130
+ testSummary: SandboxTestSummary;
131
+ message: string;
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;
88
140
  }
89
141
  export interface ValironConfig {
90
142
  /**
@@ -99,6 +151,11 @@ export interface ValironConfig {
99
151
  * Valiron API endpoint (defaults to production)
100
152
  */
101
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;
102
159
  /**
103
160
  * Request timeout in milliseconds (default: 5000)
104
161
  */
@@ -108,16 +165,6 @@ export interface ValironConfig {
108
165
  */
109
166
  debug?: boolean;
110
167
  }
111
- export interface SubmitFeedbackParams {
112
- agentId: string;
113
- score: number;
114
- outcome: 'success' | 'failure';
115
- metadata?: Record<string, any>;
116
- }
117
- export interface SandboxTestParams {
118
- agentId: string;
119
- behaviorType?: 'good' | 'moderate' | 'bad';
120
- }
121
168
  export declare class ValironError extends Error {
122
169
  code: string;
123
170
  statusCode?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,gBAAgB,GAAG,SAAS,GAAG,cAAc,CAAC;AAEnF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEnD,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,IAAI,GACJ,GAAG,GACH,KAAK,GACL,IAAI,GACJ,GAAG,GACH,KAAK,GACL,IAAI,GACJ,GAAG,CAAC;AAER,MAAM,WAAW,iBAAiB;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,M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B,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 CHANGED
@@ -2,16 +2,18 @@
2
2
  /**
3
3
  * Valiron SDK Types
4
4
  *
5
- * Type definitions for the Valiron Trust Layer API
5
+ * Type definitions for the Valiron Operator API
6
+ * Matches the actual edge-proxy /operator/* endpoints
6
7
  */
7
8
  Object.defineProperty(exports, "__esModule", { value: true });
8
9
  exports.ValironError = void 0;
10
+ // ─── Errors ─────────────────────────────────────────────────────────────────
9
11
  class ValironError extends Error {
10
12
  constructor(message, code, statusCode) {
11
13
  super(message);
12
14
  this.code = code;
13
15
  this.statusCode = statusCode;
14
- this.name = 'ValironError';
16
+ this.name = "ValironError";
15
17
  }
16
18
  }
17
19
  exports.ValironError = ValironError;
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA+IH,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"}
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@valiron/sdk",
3
- "version": "0.1.1",
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",