@fangorn-network/sdk 2026.9.22-dev → 2026.10.1-9.0-dev

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 (91) hide show
  1. package/README.md +190 -194
  2. package/lib/cli/cli.d.ts +0 -0
  3. package/lib/cli/cli.js +177 -201
  4. package/lib/cli/index.d.ts +3 -91
  5. package/lib/cli/index.js +5 -2
  6. package/lib/config.d.ts +358 -117
  7. package/lib/config.js +43 -23
  8. package/lib/contracts/app-registry/abi.d.ts +1033 -277
  9. package/lib/contracts/app-registry/abi.js +1214 -335
  10. package/lib/contracts/app-registry/index.d.ts +105 -65
  11. package/lib/contracts/app-registry/index.js +182 -175
  12. package/lib/contracts/data-registry/abi.d.ts +166 -187
  13. package/lib/contracts/data-registry/abi.js +207 -237
  14. package/lib/contracts/data-registry/index.d.ts +4 -151
  15. package/lib/contracts/data-registry/index.js +5 -279
  16. package/lib/contracts/index.d.ts +6 -7
  17. package/lib/contracts/index.js +6 -8
  18. package/lib/contracts/logs.d.ts +4 -1
  19. package/lib/contracts/logs.js +9 -2
  20. package/lib/contracts/membership-registry/abi.d.ts +1145 -0
  21. package/lib/contracts/membership-registry/abi.js +1333 -0
  22. package/lib/contracts/membership-registry/index.d.ts +79 -0
  23. package/lib/contracts/membership-registry/index.js +104 -0
  24. package/lib/contracts/types.d.ts +3 -1
  25. package/lib/contracts/types.js +3 -1
  26. package/lib/contracts/write.d.ts +34 -2
  27. package/lib/contracts/write.js +48 -1
  28. package/lib/crypto/encryption.js +4 -4
  29. package/lib/engine/car.d.ts +2 -2
  30. package/lib/engine/car.js +10 -5
  31. package/lib/engine/index.d.ts +99 -143
  32. package/lib/engine/index.js +156 -295
  33. package/lib/engine/records.d.ts +110 -0
  34. package/lib/engine/records.js +165 -0
  35. package/lib/engine/test-helpers.d.ts +7 -14
  36. package/lib/engine/test-helpers.js +7 -18
  37. package/lib/fangorn.d.ts +129 -156
  38. package/lib/fangorn.js +250 -250
  39. package/lib/feed.d.ts +7 -4
  40. package/lib/feed.js +4 -1
  41. package/lib/index.d.ts +9 -9
  42. package/lib/index.js +8 -9
  43. package/lib/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +77 -0
  44. package/lib/node_modules/@vitest/expect/dist/index.js +1414 -0
  45. package/lib/node_modules/@vitest/pretty-format/dist/index.js +858 -0
  46. package/lib/node_modules/@vitest/runner/dist/chunk-tasks.js +51 -0
  47. package/lib/node_modules/@vitest/runner/dist/index.js +1199 -0
  48. package/lib/node_modules/@vitest/runner/dist/utils.js +3 -0
  49. package/lib/node_modules/@vitest/snapshot/dist/index.js +1075 -0
  50. package/lib/node_modules/@vitest/spy/dist/index.js +353 -0
  51. package/lib/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +7 -0
  52. package/lib/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +81 -0
  53. package/lib/node_modules/@vitest/utils/dist/diff.js +1345 -0
  54. package/lib/node_modules/@vitest/utils/dist/display.js +534 -0
  55. package/lib/node_modules/@vitest/utils/dist/error.js +30 -0
  56. package/lib/node_modules/@vitest/utils/dist/helpers.js +118 -0
  57. package/lib/node_modules/@vitest/utils/dist/serialize.js +76 -0
  58. package/lib/node_modules/@vitest/utils/dist/source-map.js +93 -0
  59. package/lib/node_modules/@vitest/utils/dist/timers.js +36 -0
  60. package/lib/node_modules/chai/index.js +2874 -0
  61. package/lib/node_modules/magic-string/dist/magic-string.es.js +939 -0
  62. package/lib/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +81 -0
  63. package/lib/node_modules/tinyrainbow/dist/index.js +85 -0
  64. package/lib/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +5 -0
  65. package/lib/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
  66. package/lib/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +44 -0
  67. package/lib/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +2578 -0
  68. package/lib/providers/storage/signed-url.d.ts +16 -6
  69. package/lib/providers/storage/signed-url.js +20 -8
  70. package/lib/registry.d.ts +116 -0
  71. package/lib/registry.js +182 -0
  72. package/lib/test/mem-registry.d.ts +51 -0
  73. package/lib/test/mem-registry.js +107 -0
  74. package/lib/test/sdk-suite.d.ts +13 -0
  75. package/lib/test/sdk-suite.js +226 -0
  76. package/lib/test/testbed.d.ts +16411 -61
  77. package/lib/test/testbed.js +190 -84
  78. package/lib/types/index.d.ts +13 -11
  79. package/package.json +89 -73
  80. package/lib/contracts/data-registry/test.d.ts +0 -1
  81. package/lib/contracts/data-registry/test.js +0 -1
  82. package/lib/contracts/settlement-registry/abi.d.ts +0 -466
  83. package/lib/contracts/settlement-registry/abi.js +0 -535
  84. package/lib/contracts/settlement-registry/index.d.ts +0 -163
  85. package/lib/contracts/settlement-registry/index.js +0 -264
  86. package/lib/contracts/subscription-registry/abi.d.ts +0 -179
  87. package/lib/contracts/subscription-registry/abi.js +0 -195
  88. package/lib/contracts/subscription-registry/index.d.ts +0 -59
  89. package/lib/contracts/subscription-registry/index.js +0 -116
  90. package/lib/engine/graph.d.ts +0 -70
  91. package/lib/engine/graph.js +0 -73
@@ -1,92 +1,198 @@
1
1
  import { FangornConfig } from "../config.js";
2
+ import { PinataBackend } from "../providers/storage/pinata.js";
3
+ import { APP_REGISTRY_ABI } from "../contracts/app-registry/abi.js";
4
+ import { DATA_REGISTRY_ABI } from "../contracts/data-registry/abi.js";
5
+ import "../contracts/index.js";
2
6
  import { Fangorn } from "../fangorn.js";
7
+ import { MemLedger, MemRegistry } from "./mem-registry.js";
8
+ import { MemStorage } from "../engine/test-helpers.js";
9
+ import { createTestClient, encodeFunctionData, getAddress, http, parseEther, publicActions, walletActions } from "viem";
10
+ import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
11
+ import { spawn, spawnSync } from "node:child_process";
12
+ import { existsSync, readFileSync } from "node:fs";
13
+ import { resolve } from "node:path";
3
14
 
4
15
  //#region src/test/testbed.ts
5
- const TESTBED_APP_TERMS = "0x0000000000000000000000000000000000000000000000000000000000000002";
6
- var TestBed = class TestBed {
7
- constructor(f_list) {
8
- this.f_list = f_list;
9
- }
10
- /**
11
- * @param sks one wallet per publisher in the forest
12
- * @param appName the app namespace to publish under; defaults to the SDK's
13
- * own. Pass an unclaimed name to exercise the AppNotFound path.
14
- */
15
- static init(sks, appName) {
16
- const f_list = [];
17
- sks.forEach((sk) => {
18
- f_list.push(Fangorn.create({
16
+ /** The app every client is accepted into unless told otherwise. */
17
+ const TEST_APP = "test-app";
18
+ function memoryNetwork(Registry = MemRegistry) {
19
+ const ledger = new MemLedger();
20
+ const storage = new MemStorage();
21
+ return {
22
+ name: "memory",
23
+ ledger,
24
+ storage,
25
+ client(app = TEST_APP, sk = generatePrivateKey(), R = Registry) {
26
+ const f = Fangorn.create({
19
27
  privateKey: sk,
20
- config: FangornConfig,
21
- appId: appName,
22
- storage: { pinata: {
23
- jwt: process.env.PINATA_JWT ?? "",
24
- gateway: process.env.PINATA_GATEWAY ?? ""
25
- } }
26
- }));
28
+ appId: app ?? void 0,
29
+ config: {
30
+ ...FangornConfig,
31
+ appRegistryFromBlock: 0n
32
+ },
33
+ storage: { backend: storage },
34
+ registry: new R(privateKeyToAccount(sk).address, ledger)
35
+ });
36
+ const id = f.getAppId();
37
+ if (id) ledger.members.add(`${id}/${f.getAddress().toLowerCase()}`);
38
+ return Promise.resolve(f);
39
+ },
40
+ clock: () => Promise.resolve(ledger.t),
41
+ stop: () => void 0
42
+ };
43
+ }
44
+ /** The contracts checkout. Override with FANGORN_CONTRACTS_DIR. */
45
+ const CONTRACTS = process.env.FANGORN_CONTRACTS_DIR ?? resolve(import.meta.dirname, "../../../contracts/solidity");
46
+ const has = (cmd) => spawnSync(cmd, ["--version"]).status === 0;
47
+ /**
48
+ * Without anvil, forge or the contracts checkout, a chain suite shows as
49
+ * skipped — except in CI, where it has to fail rather than quietly stop testing.
50
+ */
51
+ const skipChain = !(has("anvil") && has("forge") && existsSync(CONTRACTS)) && !process.env.CI;
52
+ /** anvil's first prefunded account: the deployer, and the protocol admin. */
53
+ const ADMIN_KEY = "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
54
+ /** No contract: fees are zero, so the token is never called. */
55
+ const NO_TOKEN = "0x000000000000000000000000000000000000dEaD";
56
+ async function startAnvil(chainId) {
57
+ const anvil = spawn("anvil", [
58
+ "--port",
59
+ "0",
60
+ "--chain-id",
61
+ String(chainId)
62
+ ], { stdio: [
63
+ "ignore",
64
+ "pipe",
65
+ "inherit"
66
+ ] });
67
+ return {
68
+ rpcUrl: await new Promise((res, rej) => {
69
+ let out = "";
70
+ anvil.stdout.on("data", (chunk) => {
71
+ out += chunk.toString();
72
+ const listening = /Listening on (\S+)/.exec(out);
73
+ if (listening) res(`http://${listening[1]}`);
74
+ });
75
+ anvil.once("error", rej);
76
+ anvil.once("exit", (code) => {
77
+ rej(/* @__PURE__ */ new Error(`anvil exited (${String(code)}) before it was listening`));
78
+ });
79
+ }),
80
+ anvil
81
+ };
82
+ }
83
+ function artifact(name) {
84
+ const json = JSON.parse(readFileSync(`${CONTRACTS}/out/${name}.sol/${name}.json`, "utf-8"));
85
+ return {
86
+ abi: json.abi,
87
+ bytecode: json.bytecode.object
88
+ };
89
+ }
90
+ /** Pinata when asked for (E2E_STORAGE=pinata) and configured; memory otherwise. */
91
+ function e2eStorage() {
92
+ if (process.env.E2E_STORAGE !== "pinata") return new MemStorage();
93
+ const { PINATA_JWT: jwt, PINATA_GATEWAY: gateway } = process.env;
94
+ if (!jwt || !gateway) throw new Error("E2E_STORAGE=pinata needs PINATA_JWT and PINATA_GATEWAY");
95
+ return new PinataBackend(jwt, gateway);
96
+ }
97
+ /**
98
+ * A fresh anvil with the contracts deployed from source, each behind its
99
+ * ERC-1967 proxy as Deploy.s.sol does, and wired to each other. Fees are zero.
100
+ * Call `stop` from `afterAll`.
101
+ */
102
+ async function chainNetwork() {
103
+ if (spawnSync("forge", ["build"], {
104
+ cwd: CONTRACTS,
105
+ stdio: "inherit"
106
+ }).status !== 0) throw new Error(`forge build failed in ${CONTRACTS}`);
107
+ const { rpcUrl, anvil } = await startAnvil(FangornConfig.chain.id);
108
+ const chain = createTestClient({
109
+ mode: "anvil",
110
+ chain: FangornConfig.chain,
111
+ transport: http(rpcUrl)
112
+ }).extend(publicActions).extend(walletActions);
113
+ const admin = privateKeyToAccount(ADMIN_KEY);
114
+ const deploy = async (name, args) => {
115
+ const { abi, bytecode } = artifact(name);
116
+ const hash = await chain.deployContract({
117
+ account: admin,
118
+ abi,
119
+ bytecode,
120
+ args
27
121
  });
28
- return new TestBed(f_list);
29
- }
30
- getFangorn(index) {
31
- if (index > this.f_list.length) throw new Error("index out of bounds");
32
- return this.f_list[index];
33
- }
34
- /**
35
- * Claim the configured app namespace, if nobody has yet.
36
- *
37
- * Orthogonal to `register`: an app claims a unique namespace prefix that
38
- * publishers may write under, while a publisher registers for the right to
39
- * write at all. Neither implies the other — one app hosts many publishers,
40
- * and one publisher writes into many apps. Idempotent, and safe when someone
41
- * else already owns it: apps are shared, not per-test.
42
- */
43
- async registerApp(index) {
44
- const registry = this.getFangorn(index).getAppRegistry();
45
- if (await registry.getAppOwner() === "0x0000000000000000000000000000000000000000") {
46
- console.log(`Registering app ${registry.getAppId()} on-chain...`);
47
- await registry.registerApp(TESTBED_APP_TERMS, "https://example.test/terms", 0n);
48
- }
49
- const self = this.getFangorn(index).getAddress();
50
- if (!await registry.isRegisteredForApp(self)) {
51
- console.log(`Joining app ${registry.getAppId()} as ${self}...`);
52
- await registry.registerForApp();
53
- }
54
- }
55
- async register(index) {
56
- const fangorn = this.getFangorn(index);
57
- const accountAddress = fangorn.getAddress();
58
- const registry = fangorn.getDataRegistry();
59
- if (!await registry.isRegistered(accountAddress)) {
60
- console.log("Registering publisher on-chain...");
61
- await registry.register();
62
- }
63
- }
64
- async initRepo(index, name) {
65
- return await this.getFangorn(index).initRepo(name);
66
- }
67
- async upload(index, namespace, payload, name) {
68
- return await this.getFangorn(index).upload(namespace, payload, name);
69
- }
70
- async uploadBatch(index, namespace, vertices, edges = []) {
71
- return this.getFangorn(index).uploadBatch(namespace, vertices, edges);
72
- }
73
- async fetch(index, cid, namespace) {
74
- const fangorn = this.getFangorn(index);
75
- return fangorn.engine.readVertex(cid, fangorn.getAddress(), namespace);
76
- }
77
- /** Owner of the configured app namespace, or the zero address if unclaimed. */
78
- async appOwner(index) {
79
- return this.getFangorn(index).getAppRegistry().getAppOwner();
80
- }
81
- /** The raw on-chain head of one namespace — the slot the CAS actually guards. */
82
- async head(index, namespace) {
83
- const fangorn = this.getFangorn(index);
84
- return fangorn.getDataRegistry().getNamespaceHead(fangorn.getAddress(), namespace);
85
- }
86
- async inspect(index, namespace) {
87
- return this.getFangorn(index).inspectNamespace(namespace);
88
- }
89
- };
122
+ const { contractAddress } = await chain.waitForTransactionReceipt({ hash });
123
+ if (!contractAddress) throw new Error(`${name} did not deploy`);
124
+ return getAddress(contractAddress);
125
+ };
126
+ const proxied = async (name, init) => deploy("ERC1967Proxy", [await deploy(name, []), init]);
127
+ const apps = await proxied("AppRegistry", encodeFunctionData({
128
+ abi: APP_REGISTRY_ABI,
129
+ functionName: "initialize",
130
+ args: [
131
+ admin.address,
132
+ NO_TOKEN,
133
+ 0n,
134
+ 30n * 24n * 3600n
135
+ ]
136
+ }));
137
+ const data = await proxied("DataRegistry", encodeFunctionData({
138
+ abi: DATA_REGISTRY_ABI,
139
+ functionName: "initialize",
140
+ args: [admin.address, apps]
141
+ }));
142
+ await chain.waitForTransactionReceipt({ hash: await chain.writeContract({
143
+ account: admin,
144
+ address: apps,
145
+ abi: APP_REGISTRY_ABI,
146
+ functionName: "setDataRegistry",
147
+ args: [data]
148
+ }) });
149
+ const config = {
150
+ ...FangornConfig,
151
+ rpcUrl,
152
+ appRegistryContractAddress: apps,
153
+ dataRegistryContractAddress: data,
154
+ appRegistryFromBlock: 0n
155
+ };
156
+ const storage = e2eStorage();
157
+ /** A wallet with gas: `sk`, or a new one. */
158
+ const wallet = async (sk = generatePrivateKey()) => {
159
+ await chain.setBalance({
160
+ address: privateKeyToAccount(sk).address,
161
+ value: parseEther("1")
162
+ });
163
+ return sk;
164
+ };
165
+ /** A client and nothing more: no app claimed or accepted into. */
166
+ const raw = async (app, sk) => Fangorn.create({
167
+ privateKey: await wallet(sk),
168
+ config,
169
+ appId: app,
170
+ storage: { backend: storage }
171
+ });
172
+ const owners = /* @__PURE__ */ new Map();
173
+ return {
174
+ name: "chain",
175
+ storage,
176
+ config,
177
+ chain,
178
+ adminKey: ADMIN_KEY,
179
+ wallet,
180
+ raw,
181
+ owner: (app = TEST_APP) => owners.get(app),
182
+ async client(app = TEST_APP, sk) {
183
+ const f = await raw(app ?? void 0, sk);
184
+ if (app === null) return f;
185
+ const owner = owners.get(app);
186
+ if (!owner) {
187
+ await f.getAppRegistry().registerApp();
188
+ owners.set(app, f);
189
+ } else await owner.getAppRegistry().acceptPublisher(f.getAddress());
190
+ return f;
191
+ },
192
+ clock: () => chain.getBlockNumber({ cacheTime: 0 }),
193
+ stop: () => anvil.kill()
194
+ };
195
+ }
90
196
 
91
197
  //#endregion
92
- export { TestBed };
198
+ export { MemLedger, MemRegistry, TEST_APP, chainNetwork, memoryNetwork, skipChain };
@@ -1,21 +1,21 @@
1
1
  import { AppConfig } from "../config.js";
2
- import { DataRegistryClient } from "../contracts/data-registry/index.js";
3
- import { AppRegistryClient } from "../contracts/app-registry/index.js";
4
- import { SettlementRegistryClient } from "../contracts/settlement-registry/index.js";
5
- import { SubscriptionRegistryClient } from "../contracts/subscription-registry/index.js";
2
+ import { Registry } from "../registry.js";
6
3
  import { MetadataStorage } from "../providers/storage/types.js";
7
- import { Hex, WalletClient } from "viem";
4
+ import { Hex, PublicClient, WalletClient } from "viem";
8
5
 
9
6
  //#region src/types/index.d.ts
10
7
  interface FangornContext {
11
8
  config: AppConfig;
12
9
  walletClient: WalletClient;
10
+ publicClient: PublicClient;
13
11
  metadataStorage: MetadataStorage | undefined;
14
- domain: string;
15
- dataRegistry: DataRegistryClient;
16
- appRegistry: AppRegistryClient;
17
- subscriptionRegistry: SubscriptionRegistryClient;
18
- settlementRegistry: SettlementRegistryClient;
12
+ /** Heads, membership, exclusions and logs (WHITEPAPER_1 §3.2). */
13
+ registry: Registry;
14
+ /**
15
+ * The app this client reads and publishes under (the paper's context). Unset,
16
+ * reads are each publisher's latest head, and hosted uploads are refused.
17
+ */
18
+ appId: Hex | undefined;
19
19
  }
20
20
  type StorageConfig = {
21
21
  pinata: {
@@ -27,14 +27,16 @@ type StorageConfig = {
27
27
  workerUrl?: string;
28
28
  gateway?: string;
29
29
  };
30
+ } | {
31
+ backend: MetadataStorage;
30
32
  };
31
33
  interface FangornCreateOptions {
32
34
  storage?: StorageConfig;
33
35
  config?: AppConfig;
34
36
  appId?: string;
35
- domain?: string;
36
37
  privateKey?: Hex;
37
38
  walletClient?: WalletClient;
39
+ registry?: Registry;
38
40
  }
39
41
  //#endregion
40
42
  export { FangornContext, FangornCreateOptions, StorageConfig };
package/package.json CHANGED
@@ -1,74 +1,90 @@
1
1
  {
2
- "name": "@fangorn-network/sdk",
3
- "version": "2026.09.22-dev",
4
- "description": "Git for knowledge graphs",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/fangorn-network/fangorn.git"
8
- },
9
- "bin": {
10
- "fangorn": "lib/cli/cli.js"
11
- },
12
- "license": "MIT",
13
- "type": "module",
14
- "main": "lib/index.js",
15
- "files": [
16
- "lib/"
17
- ],
18
- "lint-staged": {
19
- "*": "prettier --ignore-unknown --write"
20
- },
21
- "devDependencies": {
22
- "@dotenvx/dotenvx": "^1.51.1",
23
- "@eslint/js": "9.39.1",
24
- "@noble/ciphers": "^1.3.0",
25
- "@noble/curves": "^1.2.0",
26
- "@types/node": "24.10.1",
27
- "@vitest/coverage-v8": "4.0.15",
28
- "@vitest/eslint-plugin": "1.5.1",
29
- "eslint": "9.39.1",
30
- "husky": "9.1.7",
31
- "lint-staged": "16.2.7",
32
- "prettier": "3.7.3",
33
- "tsdown": "0.16.8",
34
- "tsx": "^4.21.0",
35
- "typescript": "5.8.3",
36
- "typescript-eslint": "8.48.1",
37
- "vitest": "^4.0.18"
38
- },
39
- "engines": {
40
- "node": ">=20.19.0"
41
- },
42
- "dependencies": {
43
- "@clack/prompts": "^1.0.1",
44
- "@ipld/car": "^5.4.6",
45
- "@ipld/dag-cbor": "^10.0.1",
46
- "@ipld/unixfs": "^3.0.0",
47
- "@noble/ciphers": "^1.3.0",
48
- "@noble/curves": "^1.9.7",
49
- "@noble/hashes": "^2.2.0",
50
- "agent0-sdk": "^1.7.1",
51
- "commander": "^14.0.3",
52
- "dotenv": "^17.2.3",
53
- "multiformats": "^14.0.0",
54
- "pinata": "^2.5.2",
55
- "solc": "^0.8.28",
56
- "viem": "^2.47.1"
57
- },
58
- "overrides": {
59
- "viem": "$viem"
60
- },
61
- "scripts": {
62
- "build": "tsdown",
63
- "format": "prettier . --write",
64
- "lint": "eslint . --max-warnings 0",
65
- "test": "dotenvx run -f .env -- vitest run",
66
- "test:e2e": "dotenvx run -f .env -- vitest run --config vitest.e2e.config.ts",
67
- "tsc": "tsc",
68
- "deploy": "dotenvx run -f .env -- tsx deploy.ts",
69
- "setup:embeddings": "dotenvx run -f .env -- tsx src/test/setup-embeddings-testdata.ts",
70
- "cleanup:embeddings": "dotenvx run -f .env -- tsx src/test/cleanup-embeddings-testdata.ts",
71
- "prepare:cli": "npm run build",
72
- "fangorn": "dotenvx run -f .env -- node dist/src/cli/cli.js"
73
- }
74
- }
2
+ "name": "@fangorn-network/sdk",
3
+ "version": "2026.10.19.0-dev",
4
+ "description": "Git for knowledge graphs",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/fangorn-network/fangorn.git"
8
+ },
9
+ "bin": {
10
+ "fangorn": "lib/cli/cli.js"
11
+ },
12
+ "license": "MIT",
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "files": [
16
+ "lib/"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsdown",
20
+ "format": "prettier . --write",
21
+ "lint": "eslint . --max-warnings 0",
22
+ "prepare": "husky",
23
+ "test": "dotenvx run -f .env -- vitest run",
24
+ "test:e2e": "dotenvx run -f .env -- vitest run --config vitest.e2e.config.ts",
25
+ "test:admin": "vitest run --config vitest.e2e.config.ts src/e2e/admin.e2e.test.ts",
26
+ "test:live": "vitest run --config vitest.e2e.config.ts src/e2e/live.e2e.test.ts",
27
+ "abis": "scripts/gen-abis.sh",
28
+ "tsc": "tsc",
29
+ "deploy": "dotenvx run -f .env -- tsx deploy.ts",
30
+ "setup:embeddings": "dotenvx run -f .env -- tsx src/test/setup-embeddings-testdata.ts",
31
+ "cleanup:embeddings": "dotenvx run -f .env -- tsx src/test/cleanup-embeddings-testdata.ts",
32
+ "prepare:cli": "npm run build",
33
+ "fangorn": "dotenvx run -f .env -- node dist/src/cli/cli.js"
34
+ },
35
+ "lint-staged": {
36
+ "*": "prettier --ignore-unknown --write"
37
+ },
38
+ "devDependencies": {
39
+ "@dotenvx/dotenvx": "^1.51.1",
40
+ "@eslint/js": "9.39.1",
41
+ "@noble/ciphers": "^1.3.0",
42
+ "@noble/curves": "^1.2.0",
43
+ "@types/node": "24.10.1",
44
+ "@vitest/coverage-v8": "4.0.15",
45
+ "@vitest/eslint-plugin": "1.5.1",
46
+ "eslint": "9.39.1",
47
+ "husky": "9.1.7",
48
+ "lint-staged": "16.2.7",
49
+ "prettier": "3.7.3",
50
+ "tsdown": "0.16.8",
51
+ "tsx": "^4.21.0",
52
+ "typescript": "5.8.3",
53
+ "typescript-eslint": "8.48.1",
54
+ "vitest": "^4.0.18"
55
+ },
56
+ "packageManager": "pnpm@10.4.0",
57
+ "engines": {
58
+ "node": ">=20.19.0"
59
+ },
60
+ "dependencies": {
61
+ "@clack/prompts": "^1.0.1",
62
+ "@ipld/car": "^5.4.6",
63
+ "@ipld/dag-cbor": "^10.0.1",
64
+ "@ipld/unixfs": "^3.0.0",
65
+ "@noble/ciphers": "^1.3.0",
66
+ "@noble/curves": "^1.9.7",
67
+ "@noble/hashes": "^2.2.0",
68
+ "agent0-sdk": "^1.7.1",
69
+ "commander": "^14.0.3",
70
+ "dotenv": "^17.2.3",
71
+ "multiformats": "^14.0.0",
72
+ "pinata": "^2.5.2",
73
+ "solc": "^0.8.28",
74
+ "viem": "^2.47.1"
75
+ },
76
+ "overrides": {
77
+ "viem": "$viem"
78
+ },
79
+ "pnpm": {
80
+ "overrides": {
81
+ "write-file-atomic": "7.0.0"
82
+ },
83
+ "peerDependencyRules": {
84
+ "allowedVersions": {
85
+ "viem": ">=2.38.3",
86
+ "ethers": ">=5.7.2"
87
+ }
88
+ }
89
+ }
90
+ }
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };