@absol-labs/agent 0.5.0 → 0.7.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.
Files changed (76) hide show
  1. package/README.md +49 -10
  2. package/dist/discovery/registry.d.ts +260 -15
  3. package/dist/discovery/registry.d.ts.map +1 -1
  4. package/dist/discovery/registry.js +174 -31
  5. package/dist/discovery/registry.js.map +1 -1
  6. package/dist/frameworks/agentkit.js +1 -1
  7. package/dist/frameworks/agentkit.js.map +1 -1
  8. package/dist/frameworks/crewai.js +1 -1
  9. package/dist/frameworks/crewai.js.map +1 -1
  10. package/dist/gateway/caller-auth-gateway.d.ts +3 -1
  11. package/dist/gateway/caller-auth-gateway.d.ts.map +1 -1
  12. package/dist/gateway/caller-auth-gateway.js +9 -7
  13. package/dist/gateway/caller-auth-gateway.js.map +1 -1
  14. package/dist/gateway/http-server.d.ts +3 -1
  15. package/dist/gateway/http-server.d.ts.map +1 -1
  16. package/dist/gateway/http-server.js +15 -1
  17. package/dist/gateway/http-server.js.map +1 -1
  18. package/dist/index.d.ts +8 -3
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +8 -3
  21. package/dist/index.js.map +1 -1
  22. package/dist/mcp/server.js +2 -0
  23. package/dist/mcp/server.js.map +1 -1
  24. package/dist/sdk/invoke.d.ts +16 -2
  25. package/dist/sdk/invoke.d.ts.map +1 -1
  26. package/dist/sdk/invoke.js +117 -1
  27. package/dist/sdk/invoke.js.map +1 -1
  28. package/dist/wallet/autonomous-wallet-broker.d.ts +97 -0
  29. package/dist/wallet/autonomous-wallet-broker.d.ts.map +1 -0
  30. package/dist/wallet/autonomous-wallet-broker.js +468 -0
  31. package/dist/wallet/autonomous-wallet-broker.js.map +1 -0
  32. package/dist/wallet/autonomous-wallet-protocol.d.ts +56 -0
  33. package/dist/wallet/autonomous-wallet-protocol.d.ts.map +1 -0
  34. package/dist/wallet/autonomous-wallet-protocol.js +15 -0
  35. package/dist/wallet/autonomous-wallet-protocol.js.map +1 -0
  36. package/dist/wallet/autonomous-wallet.d.ts +106 -0
  37. package/dist/wallet/autonomous-wallet.d.ts.map +1 -0
  38. package/dist/wallet/autonomous-wallet.js +494 -0
  39. package/dist/wallet/autonomous-wallet.js.map +1 -0
  40. package/dist/wallet/privy-broker-server-entry.d.ts +2 -0
  41. package/dist/wallet/privy-broker-server-entry.d.ts.map +1 -0
  42. package/dist/wallet/privy-broker-server-entry.js +8 -0
  43. package/dist/wallet/privy-broker-server-entry.js.map +1 -0
  44. package/dist/wallet/privy-broker-server.d.ts +29 -0
  45. package/dist/wallet/privy-broker-server.d.ts.map +1 -0
  46. package/dist/wallet/privy-broker-server.js +480 -0
  47. package/dist/wallet/privy-broker-server.js.map +1 -0
  48. package/dist/wallet/privy-session-broker.d.ts +109 -0
  49. package/dist/wallet/privy-session-broker.d.ts.map +1 -0
  50. package/dist/wallet/privy-session-broker.js +372 -0
  51. package/dist/wallet/privy-session-broker.js.map +1 -0
  52. package/dist/wallet/privy-session-provider.d.ts +21 -0
  53. package/dist/wallet/privy-session-provider.d.ts.map +1 -0
  54. package/dist/wallet/privy-session-provider.js +94 -0
  55. package/dist/wallet/privy-session-provider.js.map +1 -0
  56. package/dist/wallet/provider.d.ts +51 -2
  57. package/dist/wallet/provider.d.ts.map +1 -1
  58. package/dist/wallet/provider.js +138 -1
  59. package/dist/wallet/provider.js.map +1 -1
  60. package/package.json +4 -2
  61. package/src/discovery/registry.ts +213 -35
  62. package/src/frameworks/agentkit.ts +1 -1
  63. package/src/frameworks/crewai.ts +1 -1
  64. package/src/gateway/caller-auth-gateway.ts +13 -9
  65. package/src/gateway/http-server.ts +18 -1
  66. package/src/index.ts +78 -0
  67. package/src/mcp/server.ts +2 -0
  68. package/src/sdk/invoke.ts +186 -4
  69. package/src/wallet/autonomous-wallet-broker.ts +764 -0
  70. package/src/wallet/autonomous-wallet-protocol.ts +71 -0
  71. package/src/wallet/autonomous-wallet.ts +779 -0
  72. package/src/wallet/privy-broker-server-entry.ts +9 -0
  73. package/src/wallet/privy-broker-server.ts +573 -0
  74. package/src/wallet/privy-session-broker.ts +634 -0
  75. package/src/wallet/privy-session-provider.ts +129 -0
  76. package/src/wallet/provider.ts +260 -3
package/README.md CHANGED
@@ -13,7 +13,7 @@ to the on-chain metered escrow. This layer wraps that client in the guardrails a
13
13
  integration surfaces an agent actually needs: owner-signed spend mandates that gate every
14
14
  fund move, an x402 facilitator that turns a `402` into a verified stream, an MCP server
15
15
  that exposes hire/monitor/reclaim as agent tools, adapters for the major agent frameworks,
16
- Reclaim consumer zkTLS for buyer-side delivery proofs, and non-custodial Coinbase CDP
16
+ Reclaim consumer zkTLS for buyer-side delivery proofs, and non-custodial Coinbase CDP/Privy
17
17
  wallets so Metrik never holds a key.
18
18
 
19
19
  Live on Base Sepolia (chainId `84532`), testnet only. App: [app.metrik.live](https://app.metrik.live).
@@ -27,7 +27,9 @@ pnpm add @absol-labs/agent
27
27
 
28
28
  The package is **ESM-only** (`"type": "module"`) and targets **Node `>=20 <21`**. It ships
29
29
  `@absol-labs/sdk`, `@absol-labs/shared`, `viem`, `zod`, the Reclaim zkTLS SDKs, the
30
- Coinbase CDP SDK, and the MCP SDK as dependencies. The agent-framework packages
30
+ Coinbase CDP SDK, and the MCP SDK as dependencies. The autonomous wallet path also
31
+ installs a prebuilt native OS-keyring binding; it is
32
+ loaded only when that secure-store path is used. The agent-framework packages
31
33
  (`@coinbase/agentkit`, `@elizaos/core`, `@langchain/core`) are **optional peer
32
34
  dependencies** — install only the one you use.
33
35
 
@@ -58,9 +60,23 @@ response it received, bound to its stream context. This is the L2 delivery signa
58
60
  Metrik's verification stack — dispute evidence that complements, and never replaces, the
59
61
  oracle's L1 observations.
60
62
 
61
- **Non-custodial wallets**: `resolveAgentWallet()` accepts either an injected viem signer or
62
- a provisioned Coinbase CDP Server Wallet v2 account. CDP mode uses Coinbase-managed remote
63
- signing, so no private key is ever read or exported.
63
+ **Non-custodial wallets**: `resolveAgentWallet()` accepts an injected viem signer, a
64
+ provisioned Coinbase CDP Server Wallet v2 account, or an authenticated Privy embedded EOA.
65
+ CDP mode uses Coinbase-managed remote signing, while Privy mode adapts the host application's
66
+ authenticated EIP-1193 provider; neither path reads or exports a private key. See
67
+ [`docs/privy-embedded-wallet.md`](./docs/privy-embedded-wallet.md). The Privy adapter does
68
+ not itself authenticate users. The optional scoped-session broker performs unattended
69
+ signing behind a user-approved Privy policy and signed Metrik mandate; its first write can
70
+ request Privy gas sponsorship.
71
+
72
+ For a fresh autonomous agent, the default headless path is
73
+ `provisionMetrikAutonomousWallet()`: it generates a P-256 authorization key locally,
74
+ stores it in the host OS credential manager, and asks the public Metrik broker to create a
75
+ policy-bound Privy EOA owned by that key. No Privy secret, OTP, browser, clipboard, or
76
+ plaintext key file is required, and every later write is signed locally over the exact
77
+ prepared Privy request. See
78
+ [`docs/autonomous-privy-wallet.md`](./docs/autonomous-privy-wallet.md). The authenticated
79
+ user-owned Privy flow remains available as an optional recoverable mode.
64
80
 
65
81
  ## Usage
66
82
 
@@ -271,6 +287,7 @@ await server.listen(8787);
271
287
 
272
288
  Or run the ready-made standalone server from env (`METRIK_GATEWAY_ESCROW_ADDRESS`,
273
289
  `METRIK_GATEWAY_RPC_URL`, `METRIK_GATEWAY_SERVICE_REF`, `METRIK_GATEWAY_UPSTREAM_URL`,
290
+ optional comma-separated `METRIK_GATEWAY_SERVICE_REFS` migration aliases,
274
291
  optional `METRIK_GATEWAY_CHAIN_ID` / `METRIK_GATEWAY_PORT` / `METRIK_GATEWAY_HOST`):
275
292
 
276
293
  ```bash
@@ -289,7 +306,11 @@ directly:
289
306
 
290
307
  ```ts
291
308
  import { privateKeyToAccount } from "viem/accounts";
292
- import { createSdkInvokeStreamReader, invoke } from "@absol-labs/agent";
309
+ import {
310
+ createSdkInvokeStreamReader,
311
+ discoverServices,
312
+ invoke,
313
+ } from "@absol-labs/agent";
293
314
 
294
315
  const buyer = privateKeyToAccount(
295
316
  process.env.METRIK_AGENT_PRIVATE_KEY as `0x${string}`,
@@ -298,6 +319,11 @@ const streamReader = createSdkInvokeStreamReader({
298
319
  escrowAddress: "0x...",
299
320
  rpcUrl: process.env.METRIK_AGENT_RPC_URL!,
300
321
  });
322
+ const { serviceRef } = await streamReader.getStreamV2(streamId);
323
+ const listing = (await discoverServices()).find(
324
+ (service) => service.serviceRef.toLowerCase() === serviceRef.toLowerCase(),
325
+ );
326
+ if (!listing) throw new Error("verified signed listing unavailable");
301
327
 
302
328
  const { response } = await invoke(
303
329
  streamId, // from hireVerifiedService()
@@ -310,7 +336,7 @@ const { response } = await invoke(
310
336
  streamReader,
311
337
  buyer,
312
338
  domain: { chainId: 84532, verifyingContract: "0x..." }, // same escrow as above
313
- serviceBaseUrl: "https://gateway.example.com", // the seller's gateway, not the real upstream
339
+ listing, // verified signature + signed callerAuth.accessUrl; no manual credential/URL
314
340
  },
315
341
  );
316
342
 
@@ -323,30 +349,43 @@ capability scoped to exactly that one `method`+`path` (short expiry, single-use
323
349
  and attaches it as the `x-metrik-capability` header. Use `capabilityFor()` directly if
324
350
  you only need the signed capability without the SDK also performing the `fetch`.
325
351
 
326
- For a T2 (consumer-zkTLS) service, `invokeWithT2DeliveryProof()` attaches the SAME
352
+ For a public T2 (consumer-zkTLS) service, `invokeWithT2DeliveryProof()` attaches the SAME
327
353
  capability to the exact request the buyer's Reclaim attestor proves, so the
328
354
  capability-authorized call IS the delivery evidence - usage and proof become one action:
329
355
 
330
356
  ```ts
331
- import { invokeWithT2DeliveryProof } from "@absol-labs/agent";
357
+ import { discoverServices, invokeWithT2DeliveryProof } from "@absol-labs/agent";
358
+
359
+ const { serviceRef: t2ServiceRef } = await streamReader.getStreamV2(streamId);
360
+ const publicT2Listing = (await discoverServices()).find(
361
+ (service) => service.serviceRef.toLowerCase() === t2ServiceRef.toLowerCase(),
362
+ );
363
+ if (!publicT2Listing || publicT2Listing.access !== "public") {
364
+ throw new Error("verified public T2 listing unavailable");
365
+ }
332
366
 
333
367
  const { t2 } = await invokeWithT2DeliveryProof(streamId, {
334
368
  streamReader,
335
369
  buyer,
336
370
  domain: { chainId: 84532, verifyingContract: "0x..." },
337
371
  request: {
338
- url: "https://gateway.example.com/v1/infer",
372
+ url: "https://public-t2-service.example.com/v1/infer",
339
373
  method: "POST",
340
374
  responseMatches: [{ type: "regex", value: '"result":"(?<result>.*)"' }],
341
375
  nonceInjection: { in: "query", name: "nonce" },
342
376
  },
343
377
  intervalIndex: 0n,
344
378
  nonce: deliveryNonce, // from GET /delivery/nonce
379
+ listing: publicT2Listing,
345
380
  });
346
381
 
347
382
  // t2.body is the exact POST /delivery/proof request payload.
348
383
  ```
349
384
 
385
+ Gated consumer-attested invocation fails closed for now: proof-target pinning does
386
+ not yet distinguish the public oracle origin from a signed access gateway. Gated
387
+ services use output-probe verification until that protocol support exists.
388
+
350
389
  ## Consumer zkTLS (delivery proofs)
351
390
 
352
391
  `ReclaimConsumerProofService` (and `createReclaimConsumerProofServiceFromEnv`) generate a
@@ -1,3 +1,4 @@
1
+ import { type SignedServiceBinding, type SignedServiceDescriptor } from "@absol-labs/shared";
1
2
  /**
2
3
  * Service discovery for the Metrik verified-service marketplace.
3
4
  *
@@ -26,9 +27,14 @@ export interface ServiceListing {
26
27
  readonly serviceRef: `0x${string}`;
27
28
  readonly operator: `0x${string}`;
28
29
  readonly publicUrl: string;
30
+ readonly access: "public" | "gated";
31
+ /** Signed invocation origin; gated listings fail closed if this is absent. */
32
+ readonly accessUrl: string;
33
+ /** The schema-validated and cryptographically verified signed record. */
34
+ readonly signed: SignedServiceBinding | SignedServiceDescriptor;
29
35
  /** Unsigned informational category from the listings row (may be absent). */
30
36
  readonly category: string | null;
31
- /** Optional signed operator-supplied target metadata (e.g. resolver hints). */
37
+ /** Optional unsigned operator-supplied resolver hints; never used for invocation. */
32
38
  readonly targetMetadata?: Record<string, string>;
33
39
  }
34
40
  export interface DiscoverServicesOptions {
@@ -63,12 +69,14 @@ export interface DiscoverServicesOptions {
63
69
  */
64
70
  export declare const DEFAULT_METRIK_REGISTRY_URL = "https://pzvnacjolaipeobmptsb.supabase.co/rest/v1/listings?select=service_ref,operator,public_url,category,signed_binding&order=created_at.desc";
65
71
  /**
66
- * `serviceRef` of the built-in verified demo listing. Kept as a named constant so
72
+ * `serviceRef` of the built-in verified live-data listing. Kept as a named constant so
67
73
  * callers can recognise (and dedupe against) the seeded row.
68
74
  */
69
- export declare const DEMO_SEED_SERVICE_REF: "0x84ef78c5ac9fc084422dc2d3e1ef19623bb05d0d81c097d4da49f9c47ec3ed12";
75
+ export declare const LIVE_DATA_SEED_SERVICE_REF: "0x79e57358e98a35273c1cd9d5f1bf9ae1e0af8705db432eb706459dc4f88b6fe0";
76
+ /** @deprecated Use {@link LIVE_DATA_SEED_SERVICE_REF}. */
77
+ export declare const DEMO_SEED_SERVICE_REF: "0x79e57358e98a35273c1cd9d5f1bf9ae1e0af8705db432eb706459dc4f88b6fe0";
70
78
  /**
71
- * A REAL, operator-signed demo listing row embedded so `discoverServices()` returns
79
+ * A real, operator-signed live-data listing row embedded so `discoverServices()` returns
72
80
  * something hireable with ZERO configuration (no Supabase anon key, no registry URL).
73
81
  *
74
82
  * This is PUBLIC data — a signed {@link https://github.com/Absol-Labs | Metrik}
@@ -79,20 +87,257 @@ export declare const DEMO_SEED_SERVICE_REF: "0x84ef78c5ac9fc084422dc2d3e1ef19623
79
87
  * with any field here and the seed silently drops itself, identically to a bad
80
88
  * registry row. The `category` column is unsigned informational metadata only.
81
89
  */
90
+ export declare const LIVE_DATA_SEED_LISTING: {
91
+ readonly service_ref: "0x79e57358e98a35273c1cd9d5f1bf9ae1e0af8705db432eb706459dc4f88b6fe0";
92
+ readonly operator: "0xB3e162711920dFD8933609019Dc35C73cC1a09F0";
93
+ readonly public_url: "https://livedata.137.23.50.249.sslip.io";
94
+ readonly category: "live-data";
95
+ readonly signed_binding: {
96
+ readonly serviceRef: "0x79e57358e98a35273c1cd9d5f1bf9ae1e0af8705db432eb706459dc4f88b6fe0";
97
+ readonly descriptor: {
98
+ readonly version: 3;
99
+ readonly operator: "0xB3e162711920dFD8933609019Dc35C73cC1a09F0";
100
+ readonly publicUrl: "https://livedata.137.23.50.249.sslip.io";
101
+ readonly issuedAt: 1787772057;
102
+ readonly interface: {
103
+ readonly baseUrl: "https://livedata.137.23.50.249.sslip.io";
104
+ readonly healthPath: "/health";
105
+ readonly endpoints: readonly [{
106
+ readonly name: "health";
107
+ readonly path: "/health";
108
+ readonly method: "GET";
109
+ readonly description: "Liveness probe.";
110
+ }, {
111
+ readonly name: "readiness";
112
+ readonly path: "/readiness";
113
+ readonly method: "GET";
114
+ readonly description: "Non-value dependency readiness backed by the same real BTC cache policy.";
115
+ }, {
116
+ readonly name: "price";
117
+ readonly path: "/price";
118
+ readonly method: "GET";
119
+ readonly description: "Real live crypto spot price (?symbol=BTC|ETH|SOL) from CoinGecko's public API.";
120
+ }];
121
+ readonly authModel: "caller-auth";
122
+ readonly example: {
123
+ readonly endpoint: "price";
124
+ readonly request: {
125
+ readonly symbol: "BTC";
126
+ };
127
+ readonly response: {
128
+ readonly symbol: "BTC";
129
+ readonly source: "coingecko-public-api";
130
+ };
131
+ readonly description: "Real, nondeterministic live price — no re-execution guarantee.";
132
+ };
133
+ readonly expectedStatuses: readonly [200];
134
+ };
135
+ readonly verification: {
136
+ readonly canaries: readonly [{
137
+ readonly path: "/readiness";
138
+ readonly method: "GET";
139
+ readonly matcher: {
140
+ readonly type: "json-field-equals";
141
+ readonly field: "source";
142
+ readonly expected: "coingecko-public-api";
143
+ };
144
+ readonly nonce: {
145
+ readonly inject: {
146
+ readonly in: "query";
147
+ readonly name: "nonce";
148
+ };
149
+ readonly echo: {
150
+ readonly from: "json-path";
151
+ readonly path: "nonce";
152
+ };
153
+ };
154
+ }, {
155
+ readonly path: "/canary";
156
+ readonly method: "GET";
157
+ readonly matcher: {
158
+ readonly type: "includes";
159
+ readonly expected: "metrik-canary:live-data:";
160
+ };
161
+ readonly nonce: {
162
+ readonly inject: {
163
+ readonly in: "query";
164
+ readonly name: "nonce";
165
+ };
166
+ readonly echo: {
167
+ readonly from: "json-path";
168
+ readonly path: "nonce";
169
+ };
170
+ };
171
+ }];
172
+ readonly schema: {
173
+ readonly path: "/readiness?nonce=metrik-schema";
174
+ readonly required: readonly [{
175
+ readonly pointer: "ready";
176
+ readonly type: "boolean";
177
+ }, {
178
+ readonly pointer: "source";
179
+ readonly type: "string";
180
+ readonly nonEmpty: true;
181
+ }, {
182
+ readonly pointer: "fetchedAt";
183
+ readonly type: "string";
184
+ readonly nonEmpty: true;
185
+ }, {
186
+ readonly pointer: "priceAgeMs";
187
+ readonly type: "number";
188
+ }, {
189
+ readonly pointer: "freshness";
190
+ readonly type: "string";
191
+ readonly nonEmpty: true;
192
+ }];
193
+ };
194
+ readonly sla: {
195
+ readonly maxLatencyMs: 5000;
196
+ readonly freshnessSeconds: 60;
197
+ };
198
+ };
199
+ readonly commercial: {
200
+ readonly minRatePerSecond: "100";
201
+ readonly maxRatePerSecond: "10000";
202
+ readonly currency: "USDC";
203
+ readonly slaDescription: "Failed or unproven intervals do not advance verified cumulative entitlement; the stream remains active until buyer close or expiry.";
204
+ readonly refundPolicy: "The buyer reclaims unspent escrow using the latest checkpoint after close/expiry, or the unverified escape path after its grace window.";
205
+ };
206
+ readonly access: "gated";
207
+ readonly callerAuth: {
208
+ readonly mechanism: "on-chain";
209
+ readonly role: "buyer";
210
+ readonly accessUrl: "https://gateway.137.23.50.249.sslip.io";
211
+ };
212
+ };
213
+ readonly signature: "0x2f4d2784eb40b1542517bc19f12534fb2e97da4ade5a3ff56193fcfb97fbef921309f77af3445e336cb07a4379011b080bba700033a098f672b0b2f096197f161b";
214
+ };
215
+ };
216
+ /** @deprecated Use {@link LIVE_DATA_SEED_LISTING}. */
82
217
  export declare const DEMO_SEED_LISTING: {
83
- readonly service_ref: "0x84ef78c5ac9fc084422dc2d3e1ef19623bb05d0d81c097d4da49f9c47ec3ed12";
84
- readonly operator: "0x28ea4eF61ac4cca3ed6a64dBb5b2D4be1aDC9814";
85
- readonly public_url: "https://metrik-demo-service.vercel.app";
86
- readonly category: "demo";
218
+ readonly service_ref: "0x79e57358e98a35273c1cd9d5f1bf9ae1e0af8705db432eb706459dc4f88b6fe0";
219
+ readonly operator: "0xB3e162711920dFD8933609019Dc35C73cC1a09F0";
220
+ readonly public_url: "https://livedata.137.23.50.249.sslip.io";
221
+ readonly category: "live-data";
87
222
  readonly signed_binding: {
88
- readonly serviceRef: "0x84ef78c5ac9fc084422dc2d3e1ef19623bb05d0d81c097d4da49f9c47ec3ed12";
89
- readonly binding: {
90
- readonly version: 2;
91
- readonly operator: "0x28ea4eF61ac4cca3ed6a64dBb5b2D4be1aDC9814";
92
- readonly publicUrl: "https://metrik-demo-service.vercel.app";
93
- readonly issuedAt: 1787500000;
223
+ readonly serviceRef: "0x79e57358e98a35273c1cd9d5f1bf9ae1e0af8705db432eb706459dc4f88b6fe0";
224
+ readonly descriptor: {
225
+ readonly version: 3;
226
+ readonly operator: "0xB3e162711920dFD8933609019Dc35C73cC1a09F0";
227
+ readonly publicUrl: "https://livedata.137.23.50.249.sslip.io";
228
+ readonly issuedAt: 1787772057;
229
+ readonly interface: {
230
+ readonly baseUrl: "https://livedata.137.23.50.249.sslip.io";
231
+ readonly healthPath: "/health";
232
+ readonly endpoints: readonly [{
233
+ readonly name: "health";
234
+ readonly path: "/health";
235
+ readonly method: "GET";
236
+ readonly description: "Liveness probe.";
237
+ }, {
238
+ readonly name: "readiness";
239
+ readonly path: "/readiness";
240
+ readonly method: "GET";
241
+ readonly description: "Non-value dependency readiness backed by the same real BTC cache policy.";
242
+ }, {
243
+ readonly name: "price";
244
+ readonly path: "/price";
245
+ readonly method: "GET";
246
+ readonly description: "Real live crypto spot price (?symbol=BTC|ETH|SOL) from CoinGecko's public API.";
247
+ }];
248
+ readonly authModel: "caller-auth";
249
+ readonly example: {
250
+ readonly endpoint: "price";
251
+ readonly request: {
252
+ readonly symbol: "BTC";
253
+ };
254
+ readonly response: {
255
+ readonly symbol: "BTC";
256
+ readonly source: "coingecko-public-api";
257
+ };
258
+ readonly description: "Real, nondeterministic live price — no re-execution guarantee.";
259
+ };
260
+ readonly expectedStatuses: readonly [200];
261
+ };
262
+ readonly verification: {
263
+ readonly canaries: readonly [{
264
+ readonly path: "/readiness";
265
+ readonly method: "GET";
266
+ readonly matcher: {
267
+ readonly type: "json-field-equals";
268
+ readonly field: "source";
269
+ readonly expected: "coingecko-public-api";
270
+ };
271
+ readonly nonce: {
272
+ readonly inject: {
273
+ readonly in: "query";
274
+ readonly name: "nonce";
275
+ };
276
+ readonly echo: {
277
+ readonly from: "json-path";
278
+ readonly path: "nonce";
279
+ };
280
+ };
281
+ }, {
282
+ readonly path: "/canary";
283
+ readonly method: "GET";
284
+ readonly matcher: {
285
+ readonly type: "includes";
286
+ readonly expected: "metrik-canary:live-data:";
287
+ };
288
+ readonly nonce: {
289
+ readonly inject: {
290
+ readonly in: "query";
291
+ readonly name: "nonce";
292
+ };
293
+ readonly echo: {
294
+ readonly from: "json-path";
295
+ readonly path: "nonce";
296
+ };
297
+ };
298
+ }];
299
+ readonly schema: {
300
+ readonly path: "/readiness?nonce=metrik-schema";
301
+ readonly required: readonly [{
302
+ readonly pointer: "ready";
303
+ readonly type: "boolean";
304
+ }, {
305
+ readonly pointer: "source";
306
+ readonly type: "string";
307
+ readonly nonEmpty: true;
308
+ }, {
309
+ readonly pointer: "fetchedAt";
310
+ readonly type: "string";
311
+ readonly nonEmpty: true;
312
+ }, {
313
+ readonly pointer: "priceAgeMs";
314
+ readonly type: "number";
315
+ }, {
316
+ readonly pointer: "freshness";
317
+ readonly type: "string";
318
+ readonly nonEmpty: true;
319
+ }];
320
+ };
321
+ readonly sla: {
322
+ readonly maxLatencyMs: 5000;
323
+ readonly freshnessSeconds: 60;
324
+ };
325
+ };
326
+ readonly commercial: {
327
+ readonly minRatePerSecond: "100";
328
+ readonly maxRatePerSecond: "10000";
329
+ readonly currency: "USDC";
330
+ readonly slaDescription: "Failed or unproven intervals do not advance verified cumulative entitlement; the stream remains active until buyer close or expiry.";
331
+ readonly refundPolicy: "The buyer reclaims unspent escrow using the latest checkpoint after close/expiry, or the unverified escape path after its grace window.";
332
+ };
333
+ readonly access: "gated";
334
+ readonly callerAuth: {
335
+ readonly mechanism: "on-chain";
336
+ readonly role: "buyer";
337
+ readonly accessUrl: "https://gateway.137.23.50.249.sslip.io";
338
+ };
94
339
  };
95
- readonly signature: "0x17917e96836a63238d0abe70c8c55081c4d694ad43311cdb3ea91dad349827fa6480657be2362e0b7f0524a0ee4ba0c48068255c3423a965392724874d244cd21b";
340
+ readonly signature: "0x2f4d2784eb40b1542517bc19f12534fb2e97da4ade5a3ff56193fcfb97fbef921309f77af3445e336cb07a4379011b080bba700033a098f672b0b2f096197f161b";
96
341
  };
97
342
  };
98
343
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/discovery/registry.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;qEACqE;AACrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,KAAK,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,KAAK,MAAM,EAAE,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,uBAAuB;IACtC;4FACwF;IACxF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;wFAIoF;IACpF,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC;uEACmE;IACnE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,C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