@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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
//#region node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
2
|
+
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
3
|
+
function normalizeWindowsPath(input = "") {
|
|
4
|
+
if (!input) return input;
|
|
5
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
6
|
+
}
|
|
7
|
+
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
8
|
+
function cwd() {
|
|
9
|
+
if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
|
|
10
|
+
return "/";
|
|
11
|
+
}
|
|
12
|
+
const resolve = function(...arguments_) {
|
|
13
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
14
|
+
let resolvedPath = "";
|
|
15
|
+
let resolvedAbsolute = false;
|
|
16
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
17
|
+
const path = index >= 0 ? arguments_[index] : cwd();
|
|
18
|
+
if (!path || path.length === 0) continue;
|
|
19
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
20
|
+
resolvedAbsolute = isAbsolute(path);
|
|
21
|
+
}
|
|
22
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
|
|
23
|
+
if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
|
|
24
|
+
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
25
|
+
};
|
|
26
|
+
function normalizeString(path, allowAboveRoot) {
|
|
27
|
+
let res = "";
|
|
28
|
+
let lastSegmentLength = 0;
|
|
29
|
+
let lastSlash = -1;
|
|
30
|
+
let dots = 0;
|
|
31
|
+
let char = null;
|
|
32
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
33
|
+
if (index < path.length) char = path[index];
|
|
34
|
+
else if (char === "/") break;
|
|
35
|
+
else char = "/";
|
|
36
|
+
if (char === "/") {
|
|
37
|
+
if (lastSlash === index - 1 || dots === 1);
|
|
38
|
+
else if (dots === 2) {
|
|
39
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
40
|
+
if (res.length > 2) {
|
|
41
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
42
|
+
if (lastSlashIndex === -1) {
|
|
43
|
+
res = "";
|
|
44
|
+
lastSegmentLength = 0;
|
|
45
|
+
} else {
|
|
46
|
+
res = res.slice(0, lastSlashIndex);
|
|
47
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
48
|
+
}
|
|
49
|
+
lastSlash = index;
|
|
50
|
+
dots = 0;
|
|
51
|
+
continue;
|
|
52
|
+
} else if (res.length > 0) {
|
|
53
|
+
res = "";
|
|
54
|
+
lastSegmentLength = 0;
|
|
55
|
+
lastSlash = index;
|
|
56
|
+
dots = 0;
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (allowAboveRoot) {
|
|
61
|
+
res += res.length > 0 ? "/.." : "..";
|
|
62
|
+
lastSegmentLength = 2;
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
66
|
+
else res = path.slice(lastSlash + 1, index);
|
|
67
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
68
|
+
}
|
|
69
|
+
lastSlash = index;
|
|
70
|
+
dots = 0;
|
|
71
|
+
} else if (char === "." && dots !== -1) ++dots;
|
|
72
|
+
else dots = -1;
|
|
73
|
+
}
|
|
74
|
+
return res;
|
|
75
|
+
}
|
|
76
|
+
const isAbsolute = function(p) {
|
|
77
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
//#endregion
|
|
81
|
+
export { resolve };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//#region node_modules/tinyrainbow/dist/index.js
|
|
2
|
+
var d = {
|
|
3
|
+
reset: [0, 0],
|
|
4
|
+
bold: [
|
|
5
|
+
1,
|
|
6
|
+
22,
|
|
7
|
+
"\x1B[22m\x1B[1m"
|
|
8
|
+
],
|
|
9
|
+
dim: [
|
|
10
|
+
2,
|
|
11
|
+
22,
|
|
12
|
+
"\x1B[22m\x1B[2m"
|
|
13
|
+
],
|
|
14
|
+
italic: [3, 23],
|
|
15
|
+
underline: [4, 24],
|
|
16
|
+
inverse: [7, 27],
|
|
17
|
+
hidden: [8, 28],
|
|
18
|
+
strikethrough: [9, 29],
|
|
19
|
+
black: [30, 39],
|
|
20
|
+
red: [31, 39],
|
|
21
|
+
green: [32, 39],
|
|
22
|
+
yellow: [33, 39],
|
|
23
|
+
blue: [34, 39],
|
|
24
|
+
magenta: [35, 39],
|
|
25
|
+
cyan: [36, 39],
|
|
26
|
+
white: [37, 39],
|
|
27
|
+
gray: [90, 39],
|
|
28
|
+
bgBlack: [40, 49],
|
|
29
|
+
bgRed: [41, 49],
|
|
30
|
+
bgGreen: [42, 49],
|
|
31
|
+
bgYellow: [43, 49],
|
|
32
|
+
bgBlue: [44, 49],
|
|
33
|
+
bgMagenta: [45, 49],
|
|
34
|
+
bgCyan: [46, 49],
|
|
35
|
+
bgWhite: [47, 49],
|
|
36
|
+
blackBright: [90, 39],
|
|
37
|
+
redBright: [91, 39],
|
|
38
|
+
greenBright: [92, 39],
|
|
39
|
+
yellowBright: [93, 39],
|
|
40
|
+
blueBright: [94, 39],
|
|
41
|
+
magentaBright: [95, 39],
|
|
42
|
+
cyanBright: [96, 39],
|
|
43
|
+
whiteBright: [97, 39],
|
|
44
|
+
bgBlackBright: [100, 49],
|
|
45
|
+
bgRedBright: [101, 49],
|
|
46
|
+
bgGreenBright: [102, 49],
|
|
47
|
+
bgYellowBright: [103, 49],
|
|
48
|
+
bgBlueBright: [104, 49],
|
|
49
|
+
bgMagentaBright: [105, 49],
|
|
50
|
+
bgCyanBright: [106, 49],
|
|
51
|
+
bgWhiteBright: [107, 49]
|
|
52
|
+
};
|
|
53
|
+
function g(e) {
|
|
54
|
+
return String(e);
|
|
55
|
+
}
|
|
56
|
+
g.open = "";
|
|
57
|
+
g.close = "";
|
|
58
|
+
function h() {
|
|
59
|
+
let e = typeof process != "undefined" ? process : void 0, n = (e == null ? void 0 : e.env) || {}, a = n.FORCE_TTY !== "false", i = (e == null ? void 0 : e.argv) || [];
|
|
60
|
+
return !("NO_COLOR" in n || i.includes("--no-color")) && ("FORCE_COLOR" in n || i.includes("--color") || (e == null ? void 0 : e.platform) === "win32" || a && n.TERM !== "dumb" || "CI" in n) || typeof window != "undefined" && !!window.chrome;
|
|
61
|
+
}
|
|
62
|
+
function f() {
|
|
63
|
+
let e = h(), n = (r, t, u, o) => {
|
|
64
|
+
let l = "", s = 0;
|
|
65
|
+
do
|
|
66
|
+
l += r.substring(s, o) + u, s = o + t.length, o = r.indexOf(t, s);
|
|
67
|
+
while (~o);
|
|
68
|
+
return l + r.substring(s);
|
|
69
|
+
}, a = (r, t, u = r) => {
|
|
70
|
+
let o = (l) => {
|
|
71
|
+
let s = String(l), b = s.indexOf(t, r.length);
|
|
72
|
+
return ~b ? r + n(s, t, u, b) + t : r + s + t;
|
|
73
|
+
};
|
|
74
|
+
return o.open = r, o.close = t, o;
|
|
75
|
+
}, i = { isColorSupported: e }, c = (r) => `\x1B[${r}m`;
|
|
76
|
+
for (let r in d) {
|
|
77
|
+
let t = d[r];
|
|
78
|
+
i[r] = e ? a(c(t[0]), c(t[1]), t[2]) : g;
|
|
79
|
+
}
|
|
80
|
+
return i;
|
|
81
|
+
}
|
|
82
|
+
var C = f();
|
|
83
|
+
|
|
84
|
+
//#endregion
|
|
85
|
+
export { C };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
|
|
2
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
3
|
+
|
|
4
|
+
//#endregion
|
|
5
|
+
export { commonjsGlobal };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
//#region node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js
|
|
2
|
+
const RealDate = Date;
|
|
3
|
+
let now = null;
|
|
4
|
+
var MockDate = class MockDate extends RealDate {
|
|
5
|
+
constructor(y, m, d, h, M, s, ms) {
|
|
6
|
+
super();
|
|
7
|
+
let date;
|
|
8
|
+
switch (arguments.length) {
|
|
9
|
+
case 0:
|
|
10
|
+
if (now !== null) date = new RealDate(now.valueOf());
|
|
11
|
+
else date = new RealDate();
|
|
12
|
+
break;
|
|
13
|
+
case 1:
|
|
14
|
+
date = new RealDate(y);
|
|
15
|
+
break;
|
|
16
|
+
default:
|
|
17
|
+
d = typeof d === "undefined" ? 1 : d;
|
|
18
|
+
h = h || 0;
|
|
19
|
+
M = M || 0;
|
|
20
|
+
s = s || 0;
|
|
21
|
+
ms = ms || 0;
|
|
22
|
+
date = new RealDate(y, m, d, h, M, s, ms);
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
Object.setPrototypeOf(date, MockDate.prototype);
|
|
26
|
+
return date;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
MockDate.UTC = RealDate.UTC;
|
|
30
|
+
MockDate.now = function() {
|
|
31
|
+
return new MockDate().valueOf();
|
|
32
|
+
};
|
|
33
|
+
MockDate.parse = function(dateString) {
|
|
34
|
+
return RealDate.parse(dateString);
|
|
35
|
+
};
|
|
36
|
+
MockDate.toString = function() {
|
|
37
|
+
return RealDate.toString();
|
|
38
|
+
};
|
|
39
|
+
function mockDate(date) {
|
|
40
|
+
const dateObj = new RealDate(date.valueOf());
|
|
41
|
+
if (Number.isNaN(dateObj.getTime())) throw new TypeError(`mockdate: The time set is an invalid date: ${date}`);
|
|
42
|
+
globalThis.Date = MockDate;
|
|
43
|
+
now = dateObj.valueOf();
|
|
44
|
+
}
|
|
45
|
+
function resetDate() {
|
|
46
|
+
globalThis.Date = RealDate;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { RealDate, mockDate, resetDate };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { getSafeTimers } from "../../../@vitest/utils/dist/timers.js";
|
|
2
|
+
|
|
3
|
+
//#region node_modules/vitest/dist/chunks/utils.DvEY5TfP.js
|
|
4
|
+
const NAME_WORKER_STATE = "__vitest_worker__";
|
|
5
|
+
function getWorkerState() {
|
|
6
|
+
const workerState = globalThis[NAME_WORKER_STATE];
|
|
7
|
+
if (!workerState) throw new Error("Vitest failed to access its internal state.\n\nOne of the following is possible:\n- \"vitest\" is imported directly without running \"vitest\" command\n- \"vitest\" is imported inside \"globalSetup\" (to fix this, use \"setupFiles\" instead, because \"globalSetup\" runs in a different context)\n- \"vitest\" is imported inside Vite / Vitest config file\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\n");
|
|
8
|
+
return workerState;
|
|
9
|
+
}
|
|
10
|
+
function isChildProcess() {
|
|
11
|
+
return typeof process !== "undefined" && !!process.send;
|
|
12
|
+
}
|
|
13
|
+
function resetModules(modules, resetMocks = false) {
|
|
14
|
+
const skipPaths = [
|
|
15
|
+
/\/vitest\/dist\//,
|
|
16
|
+
/vitest-virtual-\w+\/dist/,
|
|
17
|
+
/@vitest\/dist/,
|
|
18
|
+
...!resetMocks ? [/^mock:/] : []
|
|
19
|
+
];
|
|
20
|
+
modules.idToModuleMap.forEach((node, path) => {
|
|
21
|
+
if (skipPaths.some((re) => re.test(path))) return;
|
|
22
|
+
node.promise = void 0;
|
|
23
|
+
node.exports = void 0;
|
|
24
|
+
node.evaluated = false;
|
|
25
|
+
node.importers.clear();
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function waitNextTick() {
|
|
29
|
+
const { setTimeout } = getSafeTimers();
|
|
30
|
+
return new Promise((resolve) => setTimeout(resolve, 0));
|
|
31
|
+
}
|
|
32
|
+
async function waitForImportsToResolve() {
|
|
33
|
+
await waitNextTick();
|
|
34
|
+
const state = getWorkerState();
|
|
35
|
+
const promises = [];
|
|
36
|
+
const resolvingCount = state.resolvingModules.size;
|
|
37
|
+
for (const [_, mod] of state.evaluatedModules.idToModuleMap) if (mod.promise && !mod.evaluated) promises.push(mod.promise);
|
|
38
|
+
if (!promises.length && !resolvingCount) return;
|
|
39
|
+
await Promise.allSettled(promises);
|
|
40
|
+
await waitForImportsToResolve();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { getWorkerState, isChildProcess, resetModules, waitForImportsToResolve };
|