@fangorn-network/sdk 2026.4.7 → 2026.4.15

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 (61) hide show
  1. package/README.md +137 -150
  2. package/lib/cli/cli.js +134 -226
  3. package/lib/cli/index.d.ts +170 -170
  4. package/lib/config.d.ts +260 -257
  5. package/lib/config.js +7 -5
  6. package/lib/fangorn.d.ts +3 -20
  7. package/lib/fangorn.js +15 -52
  8. package/lib/index.d.ts +3 -7
  9. package/lib/index.js +4 -7
  10. package/lib/modules/encryption/aes.d.ts +3 -3
  11. package/lib/modules/encryption/index.d.ts +1 -28
  12. package/lib/modules/encryption/index.js +1 -3
  13. package/lib/modules/encryption/types.d.ts +1 -48
  14. package/lib/providers/storage/index.d.ts +4 -21
  15. package/lib/providers/storage/index.js +3 -2
  16. package/lib/providers/storage/pinata.d.ts +14 -0
  17. package/lib/providers/storage/pinata.js +32 -0
  18. package/lib/providers/storage/types.d.ts +37 -0
  19. package/lib/providers/storage/utils.d.ts +12 -0
  20. package/lib/providers/storage/utils.js +50 -0
  21. package/lib/registries/datasource-registry/abi.d.ts +116 -43
  22. package/lib/registries/datasource-registry/abi.js +190 -12
  23. package/lib/registries/datasource-registry/index.d.ts +12 -6
  24. package/lib/registries/datasource-registry/index.js +96 -20
  25. package/lib/registries/index.js +1 -1
  26. package/lib/registries/schema-registry/abi.d.ts +157 -66
  27. package/lib/registries/schema-registry/abi.js +242 -15
  28. package/lib/registries/schema-registry/index.d.ts +8 -3
  29. package/lib/registries/schema-registry/index.js +82 -17
  30. package/lib/registries/settlement-registry/abi.d.ts +199 -145
  31. package/lib/registries/settlement-registry/abi.js +331 -25
  32. package/lib/registries/settlement-registry/index.d.ts +36 -39
  33. package/lib/registries/settlement-registry/index.js +125 -91
  34. package/lib/registries/settlement-registry/types.d.ts +6 -3
  35. package/lib/roles/consumer/index.d.ts +17 -42
  36. package/lib/roles/consumer/index.js +87 -58
  37. package/lib/roles/consumer/types.d.ts +15 -34
  38. package/lib/roles/publisher/index.d.ts +22 -40
  39. package/lib/roles/publisher/index.js +69 -113
  40. package/lib/roles/publisher/types.d.ts +40 -41
  41. package/lib/roles/schema/index.d.ts +4 -30
  42. package/lib/roles/schema/index.js +7 -60
  43. package/lib/roles/schema/types.d.ts +16 -2
  44. package/lib/test/testbed.d.ts +12 -36
  45. package/lib/test/testbed.js +35 -68
  46. package/lib/types/index.d.ts +14 -57
  47. package/package.json +1 -6
  48. package/lib/modules/encryption/lit.d.ts +0 -21
  49. package/lib/modules/encryption/lit.js +0 -127
  50. package/lib/modules/gadgets/index.d.ts +0 -2
  51. package/lib/modules/gadgets/index.js +0 -1
  52. package/lib/modules/gadgets/settledGadget.d.ts +0 -31
  53. package/lib/modules/gadgets/settledGadget.js +0 -75
  54. package/lib/modules/gadgets/types.d.ts +0 -27
  55. package/lib/providers/storage/pinata/index.d.ts +0 -13
  56. package/lib/providers/storage/pinata/index.js +0 -41
  57. package/lib/providers/storage/storacha/index.d.ts +0 -13
  58. package/lib/providers/storage/storacha/index.js +0 -49
  59. package/lib/providers/storage/storacha/readOnly.d.ts +0 -8
  60. package/lib/providers/storage/storacha/readOnly.js +0 -16
  61. /package/lib/{modules/gadgets → providers/storage}/types.js +0 -0
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Fangorn SDK
2
2
 
3
- Intent-bound encrypted data for the agentic web.
3
+ Programmable access control for the agentic web.
4
4
 
5
- Fangorn lets you publish data encrypted under programmable access conditions — called **gadgets** — so it can only be decrypted by a party that satisfies them. Data is organized by **schemas**, enabling agent-based discovery across any number of publishers.
5
+ Fangorn lets you publish data under programmable access conditions. Access is enforced on-chain through settlement verification, so your content is only retrievable by those who have provably paid for it. Data is organized by schemas, enabling agent-based discovery across any number of publishers.
6
+ Content is stored in your own storage backend (Cloudflare R2, IPFS, or any compatible future backend). The Fangorn protocol coordinates access without ever touching your content directly.
6
7
 
7
8
  ## Supported Networks
8
9
 
@@ -27,28 +28,30 @@ npm i -g @fangorn-network/sdk
27
28
  fangorn init
28
29
  ```
29
30
 
30
- - `fangorn init` prompts for a wallet private key, Pinata JWT, Pinata gateway URL, and default chain. Config is written to `~/.fangorn/config.json`.
31
- - You can also configure via environment variables instead of `fangorn init`:
31
+ `fangorn init` prompts for:
32
+ - Wallet private key
33
+ - Pinata JWT + gateway URL (for schema/manifest storage)
34
+ - Fangorn access worker URL (for content retrieval)
35
+ - Default chain
36
+
37
+ Config is written to `~/.fangorn/config.json`.
38
+
39
+ You can also configure via environment variables:
32
40
 
33
41
  ```sh
34
42
  DELEGATOR_ETH_PRIVATE_KEY=0x...
35
- # if you use pinata over storacha
36
43
  PINATA_JWT=...
37
44
  PINATA_GATEWAY=https://your-gateway.mypinata.cloud
38
- # else email for storacha
39
- STORACHA_EMAIL=...
45
+ WORKER_URL=https://your-worker.workers.dev
40
46
  CHAIN_NAME=arbitrumSepolia
41
47
  ```
42
48
 
43
49
  ### Register a Schema
44
50
 
45
51
  ```sh
46
- # Registers an ERC-8004 agent identity and a schema
52
+ # Register a schema on-chain
47
53
  fangorn schema register <name>
48
54
 
49
- # Skip agent registration
50
- fangorn schema register <name> --skip-erc
51
-
52
55
  # Fetch a registered schema by name
53
56
  fangorn schema get schema.name.v1
54
57
  ```
@@ -56,40 +59,50 @@ fangorn schema get schema.name.v1
56
59
  ### Publish Data
57
60
 
58
61
  ```sh
59
- # Encrypt and publish files under a schema, priced at 1 USDC unit
60
- fangorn publish upload file.ext -s schema.name.v1 -p 1
61
-
62
- # List your manifest entries for a schema
63
- fangorn publish list -s schema.name.v1
62
+ # Publish records under a schema, priced at 1 USDC unit
63
+ fangorn publish upload records.json -s schema.name.v1 -p 1
64
64
 
65
65
  # Inspect a specific entry
66
66
  fangorn publish entry track1 -s schema.name.v1
67
67
  ```
68
68
 
69
+ Records are JSON files containing `PublishRecord` objects. Handle fields point to content already uploaded to your storage backend:
70
+
71
+ ```json
72
+ {
73
+ "name": "track1",
74
+ "fields": {
75
+ "title": "Locura",
76
+ "artist": "Alice",
77
+ "audio": { "@type": "handle", "uri": "r2://my-dir/locura.mp3" }
78
+ }
79
+ }
80
+ ```
81
+
69
82
  > A price of `1` equals the smallest USDC unit (0.000001 USDC).
70
83
 
71
84
  ### Consume Data
72
85
 
73
- The consumer flow is three phases: **purchase => claim => decrypt**.
86
+ The consumer flow is three phases: **purchase → claim → fetch**.
74
87
 
75
88
  ```sh
76
- # Phase 1: pay and join the sempaphore group group
77
- fangorn consume purchase <owner> <tag> \
89
+ # Phase 1: pay and join the Semaphore group
90
+ fangorn consume purchase <owner> <name> \
78
91
  -s schema.name.v1 \
79
92
  --burner-key 0x... \
80
93
  --amount 1 \
81
94
  --usdc 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
82
95
 
83
- # Save the identity string printed by purchase — required for the next steps.
96
+ # Save the identity string printed by purchase — required for claim.
84
97
 
85
98
  # Phase 2: prove membership and claim access (generates a Groth16 ZK proof)
86
- fangorn consume claim <owner> <tag> \
99
+ fangorn consume claim <owner> <name> \
87
100
  -s schema.name.v1 \
88
101
  --identity '<identity-string>' \
89
102
  --stealth <stealth-address>
90
103
 
91
- # Phase 3: decrypt a specific field
92
- fangorn consume decrypt <owner> <tag> \
104
+ # Phase 3: fetch content via the access worker
105
+ fangorn consume fetch <owner> <name> \
93
106
  -s schema.name.v1 \
94
107
  -f audio \
95
108
  --nullifier <nullifier> \
@@ -115,7 +128,7 @@ import { Fangorn, FangornConfig } from "@fangorn-network/sdk";
115
128
  const fangorn = await Fangorn.create({
116
129
  privateKey: "0x...",
117
130
  storage: { pinata: { jwt: "...", gateway: "https://your-gateway.mypinata.cloud" } },
118
- encryption: { lit: true },
131
+ workerUrl: "https://your-worker.workers.dev",
119
132
  config: FangornConfig.ArbitrumSepolia,
120
133
  domain: "localhost",
121
134
  });
@@ -123,107 +136,82 @@ const fangorn = await Fangorn.create({
123
136
 
124
137
  **Storage options:**
125
138
 
126
- | Config | Mode |
127
- | ---------------------------------- | ------------ |
128
- | `{ pinata: { jwt, gateway } }` | Read + write |
129
- | `{ storacha: { email } }` | Read + write |
130
- | `{ storacha: { readOnly: true } }` | Read only |
139
+ | Config | Mode |
140
+ | ------------------------------ | ------------ |
141
+ | `{ pinata: { jwt, gateway } }` | Read + write |
142
+ | undefined | Read only |
143
+
144
+ Storage is used for schemas and manifests only. Content itself lives in your storage backend (R2 etc.) and is never handled by the SDK directly.
131
145
 
132
146
  ### Schemas
133
147
 
134
- A `SchemaDefinition` is a JSON object where each field declares its type. Fields marked `@type: "encrypted"` are automatically encrypted by the SDK at publish time. All other fields are stored in plaintext. The `gadget` hint on an encrypted field tells the SDK which access condition to apply.
148
+ A `SchemaDefinition` is a JSON object where each field declares its type. Fields marked `@type: "handle"` point to content in an external storage backend — access is enforced by the Fangorn access worker. All other fields are stored inline in the manifest and are publicly readable.
135
149
 
136
150
  ```ts
137
- // Define a schema
138
151
  const definition: SchemaDefinition = {
139
152
  title: { "@type": "string" },
140
153
  artist: { "@type": "string" },
141
- audio: { "@type": "encrypted", gadget: "settled" }, // field-level encryption
142
- cover: { "@type": "file" }, // plaintext
154
+ audio: { "@type": "handle" }, // content lives in R2, access-controlled by worker
143
155
  };
144
156
 
145
- // Register an ERC-8004 agent identity
146
- const { agentId } = await fangorn.schema.registerAgent({
147
- name: "schema.agent.name.v1",
148
- description: "Music streaming data source agent",
149
- });
150
-
151
157
  // Register the schema on-chain
152
158
  const { schemaId, schemaCid } = await fangorn.schema.register({
153
159
  name: "schema.name.v1",
154
160
  definition,
155
- agentId,
161
+ agentId: "",
156
162
  });
157
163
 
158
164
  // Fetch a schema by name
159
165
  const schema = await fangorn.schema.get("schema.name.v1");
160
166
  ```
161
167
 
162
- When a record conforming to this schema is published, Fangorn encrypts each `@type: "encrypted"` field and replaces its value with a ciphertext handle and a gadget descriptor:
163
-
164
- ```json
165
- // Input record
166
- {
167
- "tag": "track1",
168
- "fields": {
169
- "title": "Cassini Division",
170
- "artist": "Arca",
171
- "audio": { "data": "<bytes>", "fileType": "audio/mp3" }
172
- }
173
- }
174
-
175
- // Stored manifest entry (audio field encrypted)
176
- {
177
- "tag": "track1",
178
- "fields": {
179
- "title": "Cassini Division",
180
- "artist": "Arca",
181
- "audio": {
182
- "@type": "encrypted",
183
- "handle": {
184
- "cid": "bafkrei...",
185
- "gateway": "your-gateway.mypinata.cloud"
186
- },
187
- "gadgetDescriptor": {
188
- "type": "settled",
189
- "description": "Settlement-gated: SettlementRegistry.isSettled(resourceId, caller)",
190
- "params": {
191
- "resourceId": "0xce16c0...",
192
- "settlementRegistryAddress": "0x4536881306ee355c2f18ae81658771c4488139a3",
193
- "chainName": "arbitrumSepolia"
194
- }
195
- }
196
- }
197
- }
198
- }
199
- ```
200
-
201
- The `gadgetDescriptor` is human- and agent-readable: it describes exactly what a consumer must do to unlock the field. Plaintext fields (`title`, `artist`) remain directly readable in the manifest without any purchase flow.
202
-
203
168
  ### Publishing
204
169
 
205
- Each upload encrypts files via the gadget returned by `gadgetFactory`, pins the manifest to IPFS, and commits the new CID on-chain. Subsequent uploads merge with the existing manifest unless `overwrite` is set.
170
+ Upload content to your R2 bucket out-of-band (via Cloudflare dashboard, wrangler CLI, or your own tooling), then publish a manifest pointing at it. The SDK stores the manifest on IPFS and commits the CID on-chain.
206
171
 
207
172
  ```ts
208
- import { SettledGadget } from "@fangorn-network/sdk/gadgets";
209
- import { SettlementRegistry } from "@fangorn-network/sdk/registries";
210
-
211
- const owner = fangorn.getAddress();
212
-
213
- // Default gadget = payment settled
214
173
  await fangorn.publisher.upload(
215
174
  {
216
175
  records: [
217
- { tag: "track1", field: "audio", data: audioBytes, extension: ".mp3", fileType: "audio/mpeg" },
218
- { tag: "track1", field: "cover", data: imageBytes, extension: ".png", fileType: "image/png" },
176
+ {
177
+ name: "track1",
178
+ fields: {
179
+ title: "Locura",
180
+ artist: "Alice",
181
+ audio: { "@type": "handle", uri: "r2://my-dir/locura.mp3" },
182
+ },
183
+ },
219
184
  ],
220
- schemaName: 'schema.name.v1'
221
- gateway: "https://your-gateway.mypinata.cloud",
185
+ schemaName: "schema.name.v1",
222
186
  },
223
187
  1n, // price in smallest USDC units
224
188
  );
225
189
  ```
226
190
 
191
+ The manifest stored on-chain looks like:
192
+
193
+ ```json
194
+ {
195
+ "version": 2,
196
+ "schemaId": "0x...",
197
+ "entries": [
198
+ {
199
+ "name": "track1",
200
+ "fields": {
201
+ "title": "Locura",
202
+ "artist": "Alice",
203
+ "audio": {
204
+ "@type": "handle",
205
+ "uri": "r2://my-dir/locura.mp3"
206
+ }
207
+ }
208
+ }
209
+ ]
210
+ }
211
+ ```
212
+
213
+ Plain fields (`title`, `artist`) are readable by anyone directly from the manifest. Handle fields require a valid on-chain settlement to retrieve via the access worker.
214
+
227
215
  ### Consuming
228
216
 
229
217
  #### Phase 1: Purchase
@@ -233,9 +221,8 @@ import { Identity } from "@semaphore-protocol/identity";
233
221
 
234
222
  const identity = new Identity();
235
223
 
236
- // Sign ERC-3009 authorization with the burner wallet
237
224
  const preparedRegister = await fangorn.consumer.prepareRegister({
238
- burnerPrivateKey: "0x...",
225
+ walletClient,
239
226
  paymentRecipient: ownerAddress,
240
227
  amount: 1n,
241
228
  usdcAddress: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
@@ -243,76 +230,80 @@ const preparedRegister = await fangorn.consumer.prepareRegister({
243
230
  usdcDomainVersion: "2",
244
231
  });
245
232
 
246
- // Submit payment and join the Semaphore group
247
233
  const { txHash } = await fangorn.consumer.register({
248
234
  owner: ownerAddress,
249
235
  schemaId,
250
- tag: "track1",
236
+ name: "track1",
251
237
  identityCommitment: identity.commitment,
252
238
  relayerPrivateKey: "0x...",
253
239
  preparedRegister,
254
240
  });
255
241
 
256
- // Save identity.export(). Required for Phase 2 and 3
242
+ // Save identity.export() — required for Phase 2
257
243
  ```
258
244
 
259
245
  #### Phase 2: Claim
260
246
 
261
247
  ```ts
262
- // Generate Groth16 ZK proof of group membership
263
248
  const preparedSettle = await fangorn.consumer.prepareSettle({
264
- resourceId: SettlementRegistry.deriveResourceId(ownerAddress, schemaId, "track1"),
249
+ resourceId: DataSourceRegistry.resourceIdLocal(ownerAddress, schemaId, "track1"),
265
250
  identity,
266
251
  stealthAddress: "0x...",
267
252
  });
268
253
 
269
- // Submit the proof and trigger the hook call (if configured)
270
254
  const { txHash, nullifier } = await fangorn.consumer.claim({
271
255
  owner: ownerAddress,
272
256
  schemaId,
273
- tag: "track1",
257
+ name: "track1",
274
258
  relayerPrivateKey: "0x...",
275
259
  preparedSettle,
276
260
  });
277
261
 
278
- // Store nullifier. required for Phase 3.
262
+ // Save nullifier — required for Phase 3
279
263
  ```
280
264
 
281
- #### Phase 3: Decrypt
265
+ #### Phase 3: Fetch
282
266
 
283
267
  ```ts
284
268
  import { createWalletClient, http } from "viem";
285
269
  import { privateKeyToAccount } from "viem/accounts";
286
270
  import { arbitrumSepolia } from "viem/chains";
287
271
 
288
- const walletClient = createWalletClient({
272
+ const stealthWalletClient = createWalletClient({
289
273
  account: privateKeyToAccount(stealthPrivateKey),
290
274
  chain: arbitrumSepolia,
291
275
  transport: http(rpcUrl),
292
276
  });
293
277
 
294
- const plaintext = await fangorn.consumer.decrypt({
295
- owner: ownerAddress,
296
- walletClient,
278
+ const { data, contentType } = await fangorn.consumer.fetchField(
279
+ ownerAddress,
297
280
  schemaId,
298
- nullifierHash: nullifier,
299
- tag: "track1",
300
- field: "audio",
301
- identity,
302
- });
281
+ "track1",
282
+ "audio",
283
+ nullifier.toString(),
284
+ stealthWalletClient,
285
+ );
303
286
  ```
304
287
 
305
- ### Gadgets
288
+ The consumer signs `{ nullifier, resourceId, objectKey, timestamp }` with their stealth key. The access worker verifies the signature, checks `is_settled()` on-chain, and proxies the content bytes directly from R2. The content URL is never exposed to the client.
289
+
290
+ ---
291
+
292
+ ## Access Worker
306
293
 
307
- Gadgets define the access control condition baked into encryption. Built-in gadgets:
294
+ The Fangorn access worker is a Cloudflare Worker that gates R2 content behind on-chain settlement verification. Publishers deploy their own worker, with one worker per R2 bucket.
308
295
 
309
- | Gadget | Condition |
310
- | --------------- | --------------------------------------------------- |
311
- | `SettledGadget` | Caller must complete a USDC payment + ZK claim flow |
296
+ ### How it works
312
297
 
313
- More coming soon ;)
298
+ 1. Consumer signs `{ nullifier, resourceId, objectKey, timestamp }` with their stealth address private key
299
+ 2. Worker recovers the stealth address from the signature
300
+ 3. Worker calls `is_settled(stealthAddress, resourceId)` on the Settlement Registry
301
+ 4. If settled → bytes proxied directly from R2
302
+ 5. If not → 401
314
303
 
315
- See the [gadgets](./src/modules/gadgets/README.md) docs for details on implementing your own gadgets.
304
+ The worker is stateless, open-source, and has no logging. Its only capability is verifying settlement and proxying bytes. The content URL is never exposed to the consumer.
305
+
306
+ See the [fangorn-access-worker](https://github.com/fangorn-network/webworker) repo for deployment instructions.
316
307
 
317
308
  ---
318
309
 
@@ -322,9 +313,9 @@ See the [gadgets](./src/modules/gadgets/README.md) docs for details on implement
322
313
 
323
314
  | Contract | Address |
324
315
  | ------------------- | -------------------------------------------- |
325
- | DataSource Registry | `0x3941c7d50caa56f7f676554bc4e78d77aaf27ebb` |
326
- | Schema Registry | `0x49ab3d52b997e63ad56c91178df48263fd80b2dc` |
327
- | Settlement Registry | `0x4536881306ee355c2f18ae81658771c4488139a3` |
316
+ | DataSource Registry | `0xdb82c131a9d51f6e7695e744bb2bd7774cbb224c` |
317
+ | Schema Registry | `0x35b67934f9c75bfef6ff3f4d61ff406d81420066` |
318
+ | Settlement Registry | `0x6aff8212e126ed3232958fd228bc58a202b8f590` |
328
319
 
329
320
  ---
330
321
 
@@ -338,8 +329,6 @@ pnpm test
338
329
 
339
330
  ### E2E Tests
340
331
 
341
- Copy the example env and fill in values:
342
-
343
332
  ```sh
344
333
  cp env.example .env
345
334
  pnpm test:e2e
@@ -347,36 +336,34 @@ pnpm test:e2e
347
336
 
348
337
  Required variables:
349
338
 
350
- | Variable | Description |
351
- | --------------------------- | ----------------------------------------- |
352
- | `DELEGATOR_ETH_PRIVATE_KEY` | Publisher private key (needs testnet ETH) |
353
- | `DELEGATEE_ETH_PRIVATE_KEY` | Consumer private key |
354
- | `PINATA_JWT` | Pinata API JWT |
355
- | `PINATA_GATEWAY` | Pinata gateway URL |
356
- | `CHAIN_NAME` | `arbitrumSepolia` |
357
- | `CAIP2` | `421614` |
358
- | `CHAIN_RPC_URL` | RPC endpoint |
359
- | `USDC_CONTRACT_ADDRESS` | USDC contract address |
360
- | `DS_REGISTRY_ADDR` | DataSourceRegistry address |
361
- | `SCHEMA_REGISTRY_ADDR` | SchemaRegistry address |
362
- | `SETTLEMENT_TRACKER_ADDR` | SettlementTracker address |
363
-
364
- Sample `.env` for Arbitrum Sepolia:
339
+ | Variable | Description |
340
+ | ------------------------------ | ----------------------------------------- |
341
+ | `DELEGATOR_ETH_PRIVATE_KEY` | Publisher private key (needs testnet ETH) |
342
+ | `DELEGATEE_ETH_PRIVATE_KEY` | Consumer private key |
343
+ | `PINATA_JWT` | Pinata API JWT |
344
+ | `PINATA_GATEWAY` | Pinata gateway URL |
345
+ | `WORKER_URL` | Access worker URL (optional for Phase 3) |
346
+ | `CHAIN_NAME` | `arbitrumSepolia` |
347
+ | `CAIP2` | `421614` |
348
+ | `RPC_URL` | RPC endpoint |
349
+ | `USDC_ADDRESS` | USDC contract address |
350
+ | `DATA_SOURCE_REGISTRY_ADDRESS` | DataSourceRegistry address |
351
+ | `SCHEMA_REGISTRY_ADDRESS` | SchemaRegistry address |
352
+ | `SETTLEMENT_REGISTRY_ADDRESS` | SettlementRegistry address |
353
+
354
+ Phase 3 tests are skipped unless `WORKER_URL` is set. Run the access worker locally with `wrangler dev --local` and set `WORKER_URL=http://localhost:8787` to enable them.
365
355
 
366
- ```sh
367
- CHAIN_NAME=arbitrumSepolia
368
- CAIP2=421614
369
- CHAIN_RPC_URL=https://sepolia-rollup.arbitrum.io/rpc
370
- USDC_CONTRACT_ADDRESS=0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
371
- DS_REGISTRY_ADDR=0x6fb3579bfd504cce85b923db335dfc096d912478
372
- SCHEMA_REGISTRY_ADDR=0x49ab3d52b997e63ad56c91178df48263fd80b2dc
373
- SETTLEMENT_TRACKER_ADDR=0x7c6ae9eb3398234eb69b2f3acfae69065505ff69
374
- ```
356
+ ---
357
+
358
+ ## Limitations / Future Work
375
359
 
376
- E2E tests deploy any contracts not defined in `.env`, register a test schema, publish manifests, and verify the full purchase → claim → decrypt cycle end-to-end.
360
+ - Schema validation is client-side only — no on-chain enforcement.
361
+ - The access worker is a trusted component. Future versions will replace it with a TEE or protocol-native verification layer.
362
+ - One worker per R2 bucket. Multi-bucket support is planned.
363
+ - Purchase ledger is in-memory only. Persistent ledger backed by IPFS is in progress.
377
364
 
378
365
  ---
379
366
 
380
367
  ## License
381
368
 
382
- MIT
369
+ MITSonnet 4.6Claude is AI and can make mistakes. Please double-check responses.