@fangorn-network/sdk 2026.8.18-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.
- package/README.md +191 -195
- package/lib/cli/cli.d.ts +0 -0
- package/lib/cli/cli.js +198 -164
- package/lib/cli/index.d.ts +3 -91
- package/lib/cli/index.js +5 -2
- package/lib/config.d.ts +349 -433
- package/lib/config.js +41 -28
- package/lib/contracts/app-registry/abi.d.ts +1064 -265
- package/lib/contracts/app-registry/abi.js +1233 -308
- package/lib/contracts/app-registry/index.d.ts +123 -102
- package/lib/contracts/app-registry/index.js +200 -198
- package/lib/contracts/data-registry/abi.d.ts +166 -187
- package/lib/contracts/data-registry/abi.js +207 -237
- package/lib/contracts/data-registry/index.d.ts +4 -160
- package/lib/contracts/data-registry/index.js +5 -294
- package/lib/contracts/index.d.ts +6 -7
- package/lib/contracts/index.js +6 -8
- package/lib/contracts/logs.d.ts +21 -0
- package/lib/contracts/logs.js +32 -0
- package/lib/contracts/membership-registry/abi.d.ts +1145 -0
- package/lib/contracts/membership-registry/abi.js +1333 -0
- package/lib/contracts/membership-registry/index.d.ts +79 -0
- package/lib/contracts/membership-registry/index.js +104 -0
- package/lib/contracts/types.d.ts +3 -1
- package/lib/contracts/types.js +3 -1
- package/lib/contracts/write.d.ts +34 -2
- package/lib/contracts/write.js +48 -1
- package/lib/crypto/encryption.js +4 -4
- package/lib/engine/car.d.ts +2 -2
- package/lib/engine/car.js +10 -5
- package/lib/engine/index.d.ts +99 -143
- package/lib/engine/index.js +156 -295
- package/lib/engine/records.d.ts +110 -0
- package/lib/engine/records.js +165 -0
- package/lib/engine/test-helpers.d.ts +7 -14
- package/lib/engine/test-helpers.js +7 -18
- package/lib/fangorn.d.ts +163 -155
- package/lib/fangorn.js +284 -248
- package/lib/feed.d.ts +7 -4
- package/lib/feed.js +4 -1
- package/lib/index.d.ts +9 -9
- package/lib/index.js +9 -10
- package/lib/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +77 -0
- package/lib/node_modules/@vitest/expect/dist/index.js +1414 -0
- package/lib/node_modules/@vitest/pretty-format/dist/index.js +858 -0
- package/lib/node_modules/@vitest/runner/dist/chunk-tasks.js +51 -0
- package/lib/node_modules/@vitest/runner/dist/index.js +1199 -0
- package/lib/node_modules/@vitest/runner/dist/utils.js +3 -0
- package/lib/node_modules/@vitest/snapshot/dist/index.js +1075 -0
- package/lib/node_modules/@vitest/spy/dist/index.js +353 -0
- package/lib/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +7 -0
- package/lib/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +81 -0
- package/lib/node_modules/@vitest/utils/dist/diff.js +1345 -0
- package/lib/node_modules/@vitest/utils/dist/display.js +534 -0
- package/lib/node_modules/@vitest/utils/dist/error.js +30 -0
- package/lib/node_modules/@vitest/utils/dist/helpers.js +118 -0
- package/lib/node_modules/@vitest/utils/dist/serialize.js +76 -0
- package/lib/node_modules/@vitest/utils/dist/source-map.js +93 -0
- package/lib/node_modules/@vitest/utils/dist/timers.js +36 -0
- package/lib/node_modules/chai/index.js +2874 -0
- package/lib/node_modules/magic-string/dist/magic-string.es.js +939 -0
- package/lib/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +81 -0
- package/lib/node_modules/tinyrainbow/dist/index.js +85 -0
- package/lib/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +5 -0
- package/lib/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +50 -0
- package/lib/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js +44 -0
- package/lib/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +2578 -0
- package/lib/providers/storage/signed-url.d.ts +16 -6
- package/lib/providers/storage/signed-url.js +20 -8
- package/lib/registry.d.ts +116 -0
- package/lib/registry.js +182 -0
- package/lib/test/mem-registry.d.ts +51 -0
- package/lib/test/mem-registry.js +107 -0
- package/lib/test/sdk-suite.d.ts +13 -0
- package/lib/test/sdk-suite.js +226 -0
- package/lib/test/testbed.d.ts +16411 -61
- package/lib/test/testbed.js +190 -84
- package/lib/types/index.d.ts +13 -11
- package/package.json +89 -72
- package/lib/contracts/data-registry/test.d.ts +0 -1
- package/lib/contracts/data-registry/test.js +0 -1
- package/lib/contracts/settlement-registry/abi.d.ts +0 -466
- package/lib/contracts/settlement-registry/abi.js +0 -535
- package/lib/contracts/settlement-registry/index.d.ts +0 -163
- package/lib/contracts/settlement-registry/index.js +0 -264
- package/lib/contracts/subscription-registry/abi.d.ts +0 -179
- package/lib/contracts/subscription-registry/abi.js +0 -195
- package/lib/contracts/subscription-registry/index.d.ts +0 -59
- package/lib/contracts/subscription-registry/index.js +0 -116
- package/lib/engine/graph.d.ts +0 -70
- package/lib/engine/graph.js +0 -73
package/lib/test/testbed.js
CHANGED
|
@@ -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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
async
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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 {
|
|
198
|
+
export { MemLedger, MemRegistry, TEST_APP, chainNetwork, memoryNetwork, skipChain };
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { AppConfig } from "../config.js";
|
|
2
|
-
import {
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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,73 +1,90 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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 { };
|