@fangorn-network/sdk 2026.10.21-dev → 2026.10.22-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 (46) hide show
  1. package/README.md +21 -18
  2. package/lib/cli/cli.d.ts +0 -0
  3. package/lib/cli/cli.js +18 -80
  4. package/lib/cli/index.d.ts +2 -2
  5. package/lib/cli/index.js +3 -3
  6. package/lib/config.d.ts +420 -83
  7. package/lib/config.js +13 -5
  8. package/lib/contracts/membership-registry/index.d.ts +1 -1
  9. package/lib/contracts/membership-registry/index.js +1 -1
  10. package/lib/{cli/erc8004.d.ts → erc8004.d.ts} +5 -3
  11. package/lib/{cli/erc8004.js → erc8004.js} +10 -7
  12. package/lib/fangorn.d.ts +21 -3
  13. package/lib/fangorn.js +67 -1
  14. package/lib/index.d.ts +2 -2
  15. package/lib/index.js +2 -2
  16. package/lib/node_modules/{@jridgewell → .pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell}/sourcemap-codec/dist/sourcemap-codec.js +1 -1
  17. package/lib/node_modules/{@vitest → .pnpm/@vitest_expect@4.0.18/node_modules/@vitest}/expect/dist/index.js +8 -8
  18. package/lib/node_modules/{@vitest → .pnpm/@vitest_pretty-format@4.0.18/node_modules/@vitest}/pretty-format/dist/index.js +2 -2
  19. package/lib/node_modules/{@vitest → .pnpm/@vitest_runner@4.0.18/node_modules/@vitest}/runner/dist/chunk-tasks.js +2 -2
  20. package/lib/node_modules/{@vitest → .pnpm/@vitest_runner@4.0.18/node_modules/@vitest}/runner/dist/index.js +4 -4
  21. package/lib/node_modules/{@vitest → .pnpm/@vitest_snapshot@4.0.18/node_modules/@vitest}/snapshot/dist/index.js +4 -4
  22. package/lib/node_modules/{@vitest → .pnpm/@vitest_spy@4.0.18/node_modules/@vitest}/spy/dist/index.js +1 -1
  23. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/chunk-_commonjsHelpers.js +1 -1
  24. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/chunk-pathe.M-eThtNZ.js +1 -1
  25. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/diff.js +3 -3
  26. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/display.js +2 -2
  27. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/error.js +2 -2
  28. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/helpers.js +1 -1
  29. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/serialize.js +1 -1
  30. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/source-map.js +1 -1
  31. package/lib/node_modules/{@vitest → .pnpm/@vitest_utils@4.0.18/node_modules/@vitest}/utils/dist/timers.js +1 -1
  32. package/lib/node_modules/{chai → .pnpm/chai@6.2.2/node_modules/chai}/index.js +1 -1
  33. package/lib/node_modules/{magic-string → .pnpm/magic-string@0.30.21/node_modules/magic-string}/dist/magic-string.es.js +2 -2
  34. package/lib/node_modules/{pathe → .pnpm/pathe@2.0.3/node_modules/pathe}/dist/shared/pathe.M-eThtNZ.js +1 -1
  35. package/lib/node_modules/{tinyrainbow → .pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow}/dist/index.js +1 -1
  36. package/lib/node_modules/{vitest → .pnpm/vitest@4.0.18_@types_node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest}/dist/chunks/_commonjsHelpers.D26ty3Ew.js +1 -1
  37. package/lib/node_modules/{vitest → .pnpm/vitest@4.0.18_@types_node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest}/dist/chunks/date.Bq6ZW5rf.js +1 -1
  38. package/lib/node_modules/{vitest → .pnpm/vitest@4.0.18_@types_node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest}/dist/chunks/utils.DvEY5TfP.js +2 -2
  39. package/lib/node_modules/{vitest → .pnpm/vitest@4.0.18_@types_node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest}/dist/chunks/vi.2VT5v0um.js +11 -11
  40. package/lib/providers/storage/signed-url.d.ts +4 -4
  41. package/lib/providers/storage/signed-url.js +5 -4
  42. package/lib/test/sdk-suite.js +2 -2
  43. package/lib/test/testbed.d.ts +6026 -5649
  44. package/lib/test/testbed.js +5 -1
  45. package/package.json +75 -88
  46. /package/lib/node_modules/{@vitest → .pnpm/@vitest_runner@4.0.18/node_modules/@vitest}/runner/dist/utils.js +0 -0
package/lib/config.js CHANGED
@@ -22,7 +22,7 @@ function toAppId(nameOrId) {
22
22
  if (!name) throw new Error("App name or id must not be blank.");
23
23
  return /^0x[0-9a-fA-F]{64}$/.test(name) ? name : appId(name);
24
24
  }
25
- const FangornConfig = {
25
+ const ArbitrumSepoliaConfig = {
26
26
  dataRegistryContractAddress: "0x72B5f83526F3893aF9f1eE0f32A27218EA09f8aE",
27
27
  appRegistryContractAddress: "0x55e6209ea1833ceD900989a3b3b22466934E04A5",
28
28
  membershipRegistryContractAddress: "0xDF17030Cd65435C86eb043F31DDACa99E819E347",
@@ -31,7 +31,8 @@ const FangornConfig = {
31
31
  rpcUrl: "https://sepolia-rollup.arbitrum.io/rpc",
32
32
  caip2: 421614,
33
33
  ipfsGateway: "https://ipfs.io",
34
- logWindow: 100000n
34
+ logWindow: 100000n,
35
+ signedUrlWorker: "https://pinata-url-provider.fangorn-0be.workers.dev"
35
36
  };
36
37
  const BaseSepoliaConfig = {
37
38
  dataRegistryContractAddress: "0xE9183f768865dd2Cde5f1B71F8446F0Cd798ebe0",
@@ -42,13 +43,20 @@ const BaseSepoliaConfig = {
42
43
  rpcUrl: "https://base-sepolia-rpc.publicnode.com",
43
44
  caip2: 84532,
44
45
  ipfsGateway: "https://ipfs.io",
45
- logWindow: 10000n
46
+ logWindow: 10000n,
47
+ signedUrlWorker: "https://pinata-url-provider-base.fangorn-0be.workers.dev"
46
48
  };
47
49
  /**
50
+ * The default network: what `Fangorn.create` uses without a `config`, and the CLI
51
+ * without `CHAIN_NAME`. Base Sepolia, which runs the contracts this SDK's ABIs are
52
+ * built from.
53
+ */
54
+ const FangornConfig = BaseSepoliaConfig;
55
+ /**
48
56
  * The networks supported by Fangorn, by the name `CHAIN_NAME` takes.
49
57
  */
50
58
  const SupportedNetworks = {
51
- arbitrumSepolia: FangornConfig,
59
+ arbitrumSepolia: ArbitrumSepoliaConfig,
52
60
  baseSepolia: BaseSepoliaConfig
53
61
  };
54
62
  /**
@@ -62,4 +70,4 @@ function getNetwork(name) {
62
70
  }
63
71
 
64
72
  //#endregion
65
- export { BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, getNetwork as default, nonBlank, toAppId };
73
+ export { ArbitrumSepoliaConfig, BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, getNetwork as default, nonBlank, toAppId };
@@ -40,7 +40,7 @@ declare const membershipTokenId: (appId: Hex, holder: Address) => bigint;
40
40
  *
41
41
  * The app owner's half is here (`setPlan`), with the reads every gate needs
42
42
  * (`canRead`, `planOf`, `currentEpoch`) and the two relayed writes (`join`, `claim`),
43
- * which take what a buyer signed and proved, so anyone may submit them; Barliman does.
43
+ * which take what a buyer signed and proved, so anyone may submit them.
44
44
  *
45
45
  * The buyer's half (Semaphore identity, stealth holder, the payment signature, the
46
46
  * group from `Joined` logs, the proof) lives in `@fangorn-network/fetch`: this SDK
@@ -24,7 +24,7 @@ const membershipTokenId = (appId, holder) => BigInt(keccak256(encodeAbiParameter
24
24
  *
25
25
  * The app owner's half is here (`setPlan`), with the reads every gate needs
26
26
  * (`canRead`, `planOf`, `currentEpoch`) and the two relayed writes (`join`, `claim`),
27
- * which take what a buyer signed and proved, so anyone may submit them; Barliman does.
27
+ * which take what a buyer signed and proved, so anyone may submit them.
28
28
  *
29
29
  * The buyer's half (Semaphore identity, stealth holder, the payment signature, the
30
30
  * group from `Joined` logs, the proof) lives in `@fangorn-network/fetch`: this SDK
@@ -1,6 +1,7 @@
1
+ import { MetadataStorage } from "./providers/storage/types.js";
1
2
  import { Address, Chain, Hex, PublicClient, WalletClient } from "viem";
2
3
 
3
- //#region src/cli/erc8004.d.ts
4
+ //#region src/erc8004.d.ts
4
5
  /** The ERC-8004 identity registry by chain id */
5
6
  declare const IDENTITY_REGISTRY: Record<number, Address>;
6
7
  interface AgentCard {
@@ -44,11 +45,12 @@ interface Erc8004Clients {
44
45
  chain: Chain;
45
46
  publicClient: PublicClient;
46
47
  walletClient: WalletClient;
47
- pinataJwt: string;
48
+ storage: Pick<MetadataStorage, "put">;
48
49
  }
50
+ declare function retryNonce<T>(f: () => Promise<T>, tries?: number): Promise<T>;
49
51
  /** Pin `file` and point agent `agentId` at it. */
50
52
  declare function setAgentFile(c: Erc8004Clients, agentId: bigint, file: unknown): Promise<Hex>;
51
53
  /** Mint an agent with no URI yet, and return its id. */
52
54
  declare function mintAgent(c: Erc8004Clients): Promise<bigint>;
53
55
  //#endregion
54
- export { AgentCard, Erc8004Clients, IDENTITY_REGISTRY, agentCardUrl, mcpTools, mintAgent, parseAgentId, registrationFile, setAgentFile };
56
+ export { AgentCard, Erc8004Clients, IDENTITY_REGISTRY, agentCardUrl, mcpTools, mintAgent, parseAgentId, registrationFile, retryNonce, setAgentFile };
@@ -1,7 +1,6 @@
1
1
  import { parseAbi, parseEventLogs } from "viem";
2
- import { PinataSDK } from "pinata";
3
2
 
4
- //#region src/cli/erc8004.ts
3
+ //#region src/erc8004.ts
5
4
  /** The ERC-8004 identity registry by chain id */
6
5
  const IDENTITY_REGISTRY = {
7
6
  84532: "0x8004A818BFB912233c491871b3d84c89A494BD9e",
@@ -93,9 +92,13 @@ function parseAgentId(id, chainId) {
93
92
  if (m[1] && Number(m[1]) !== chainId) throw new Error(`agent ${id} is on chain ${m[1]}, but the CLI is configured for ${String(chainId)}`);
94
93
  return BigInt(m[2]);
95
94
  }
96
- async function pin(jwt, data) {
97
- const file = new File([JSON.stringify(data, null, 2)], "agent-registration.json", { type: "application/json" });
98
- return (await new PinataSDK({ pinataJwt: jwt }).upload.public.file(file)).cid;
95
+ async function retryNonce(f, tries = 4) {
96
+ for (let i = 0;; i++) try {
97
+ return await f();
98
+ } catch (e) {
99
+ if (i >= tries - 1 || !/underpriced|nonce too low|nonce has already been used|already known/i.test(e.message)) throw e;
100
+ await new Promise((ok) => setTimeout(ok, 3e3 * (i + 1)));
101
+ }
99
102
  }
100
103
  function registry(chain) {
101
104
  const address = IDENTITY_REGISTRY[chain.id];
@@ -104,7 +107,7 @@ function registry(chain) {
104
107
  }
105
108
  /** Pin `file` and point agent `agentId` at it. */
106
109
  async function setAgentFile(c, agentId, file) {
107
- const cid = await pin(c.pinataJwt, file);
110
+ const cid = await c.storage.put(file, { name: "agent-registration.json" });
108
111
  const hash = await c.walletClient.writeContract({
109
112
  address: registry(c.chain),
110
113
  abi: ABI,
@@ -137,4 +140,4 @@ async function mintAgent(c) {
137
140
  }
138
141
 
139
142
  //#endregion
140
- export { IDENTITY_REGISTRY, agentCardUrl, mcpTools, mintAgent, parseAgentId, registrationFile, setAgentFile };
143
+ export { IDENTITY_REGISTRY, agentCardUrl, mcpTools, mintAgent, parseAgentId, registrationFile, retryNonce, setAgentFile };
package/lib/fangorn.d.ts CHANGED
@@ -6,10 +6,10 @@ import "./contracts/index.js";
6
6
  import { Registry } from "./registry.js";
7
7
  import { MetadataStorage } from "./providers/storage/types.js";
8
8
  import { CommitDiff, FangornEngine, RecordInput, RepoContents, RepoDiff } from "./engine/index.js";
9
+ import { AgentCard as AgentCard$1 } from "./erc8004.js";
9
10
  import { FangornCreateOptions, StorageConfig } from "./types/index.js";
10
11
  import { AppFeed } from "./feed.js";
11
- import * as viem5646 from "viem";
12
- import { Hex, WalletClient } from "viem";
12
+ import { Hash, Hex, WalletClient } from "viem";
13
13
  import { CID } from "multiformats/cid";
14
14
 
15
15
  //#region src/fangorn.d.ts
@@ -84,7 +84,7 @@ declare class Fangorn {
84
84
  * head still names them as history.
85
85
  */
86
86
  reset(repo: string): Promise<{
87
- txHash: viem5646.Hash;
87
+ txHash: Hash;
88
88
  onChainTip: CID;
89
89
  }>;
90
90
  /** Stage records into one commit on top of `base`. */
@@ -317,6 +317,24 @@ declare class Fangorn {
317
317
  */
318
318
  getAppRegistry(): AppRegistryClient;
319
319
  getMembershipRegistry(): MembershipRegistryClient;
320
+ /**
321
+ * Register the app as an ERC-8004 agent from its card, and point the app at the card
322
+ * (owner only). The registration file is pinned with this client's storage, so a
323
+ * browser wallet on signed-URL storage needs no Pinata JWT.
324
+ *
325
+ * `update` re-files an agent already minted (its token id) from the card as it is
326
+ * now, minting nothing. `skipRegister` only binds the card. A binding that already
327
+ * points at `cardUrl` is left alone.
328
+ */
329
+ registerAgent(cardUrl: string, opts?: {
330
+ mcp?: string;
331
+ update?: bigint;
332
+ skipRegister?: boolean;
333
+ }): Promise<{
334
+ card: AgentCard$1;
335
+ agentId?: bigint;
336
+ txHash?: Hash;
337
+ }>;
320
338
  /** The app this client reads and publishes under, or undefined for none. */
321
339
  getAppId(): Hex | undefined;
322
340
  private requireApp;
package/lib/fangorn.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { FangornConfig, nonBlank, toAppId } from "./config.js";
2
+ import { mcpTools, mintAgent, registrationFile, retryNonce, setAgentFile } from "./erc8004.js";
2
3
  import { SignedUrlBackend } from "./providers/storage/signed-url.js";
3
4
  import { PinataBackend } from "./providers/storage/pinata.js";
4
5
  import { AppRegistryClient } from "./contracts/app-registry/index.js";
@@ -29,7 +30,7 @@ function resolveStorage(storage, walletClient, config, getAppId) {
29
30
  if (!storage) return void 0;
30
31
  if ("backend" in storage) return storage.backend;
31
32
  if ("pinata" in storage) return new PinataBackend(storage.pinata.jwt, storage.pinata.gateway);
32
- if ("signedUrl" in storage) return new SignedUrlBackend(storage.signedUrl.workerUrl, walletSigner(walletClient), storage.signedUrl.gateway ?? config.ipfsGateway, getAppId);
33
+ if ("signedUrl" in storage) return new SignedUrlBackend(nonBlank(storage.signedUrl.workerUrl) ?? config.signedUrlWorker, walletSigner(walletClient), storage.signedUrl.gateway ?? config.ipfsGateway, getAppId);
33
34
  throw new Error(`Invalid storage config: must be { pinata: … }, { signedUrl: … } or { backend: … }, got ${JSON.stringify(storage)}`);
34
35
  }
35
36
  /** The A2A extension a Fangorn app's agent card carries: it names the app the card speaks for. */
@@ -562,6 +563,71 @@ var Fangorn = class Fangorn {
562
563
  this._membership ??= new MembershipRegistryClient(this.ctx.config.membershipRegistryContractAddress, this.ctx.publicClient, this.ctx.walletClient);
563
564
  return this._membership;
564
565
  }
566
+ /**
567
+ * Register the app as an ERC-8004 agent from its card, and point the app at the card
568
+ * (owner only). The registration file is pinned with this client's storage, so a
569
+ * browser wallet on signed-URL storage needs no Pinata JWT.
570
+ *
571
+ * `update` re-files an agent already minted (its token id) from the card as it is
572
+ * now, minting nothing. `skipRegister` only binds the card. A binding that already
573
+ * points at `cardUrl` is left alone.
574
+ */
575
+ async registerAgent(cardUrl, opts = {}) {
576
+ const res = await fetch(cardUrl);
577
+ if (!res.ok) throw new Error(`card at ${cardUrl} returned ${String(res.status)}`);
578
+ const card = await res.json();
579
+ if (!card.name || !card.description) throw new Error("card is missing `name` or `description`");
580
+ const named = {
581
+ ...card,
582
+ name: card.name,
583
+ description: card.description
584
+ };
585
+ let agentId;
586
+ if (!opts.skipRegister) {
587
+ const c = {
588
+ chain: this.ctx.config.chain,
589
+ publicClient: this.ctx.publicClient,
590
+ walletClient: this.ctx.walletClient,
591
+ storage: this.getStorage()
592
+ };
593
+ const chainId = this.ctx.config.caip2;
594
+ const mcp = opts.mcp ? {
595
+ endpoint: opts.mcp,
596
+ tools: await mcpTools(opts.mcp)
597
+ } : void 0;
598
+ const file = (id) => registrationFile({
599
+ cardUrl,
600
+ card: named,
601
+ chainId,
602
+ agentId: id,
603
+ mcp
604
+ });
605
+ const { update } = opts;
606
+ if (update !== void 0) {
607
+ agentId = update;
608
+ await retryNonce(() => setAgentFile(c, update, file(update)));
609
+ } else {
610
+ const id = await mintAgent(c);
611
+ agentId = id;
612
+ try {
613
+ await retryNonce(() => setAgentFile(c, id, file(id)));
614
+ } catch (e) {
615
+ throw Object.assign(/* @__PURE__ */ new Error(`agent ${String(chainId)}:${String(agentId)} was minted but its registration file was not set (${e.message}); finish it with registerAgent(cardUrl, { update: ${String(agentId)}n })`), { agentId });
616
+ }
617
+ }
618
+ }
619
+ const apps = this.getAppRegistry();
620
+ if (await apps.appAgentUri().catch(() => "") === cardUrl) return {
621
+ card: named,
622
+ agentId
623
+ };
624
+ const txHash = await retryNonce(() => apps.setAppAgentUri(cardUrl));
625
+ return {
626
+ card: named,
627
+ agentId,
628
+ txHash
629
+ };
630
+ }
565
631
  /** The app this client reads and publishes under, or undefined for none. */
566
632
  getAppId() {
567
633
  return this.ctx.appId;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AppConfig, BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, nonBlank, toAppId } from "./config.js";
1
+ import { AppConfig, ArbitrumSepoliaConfig, BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, nonBlank, toAppId } from "./config.js";
2
2
  import { APP_REGISTRY_ABI } from "./contracts/app-registry/abi.js";
3
3
  import { PublisherStatus } from "./contracts/types.js";
4
4
  import { PreparedTx } from "./contracts/write.js";
@@ -17,4 +17,4 @@ import { AssetProcessor, BuildAssetGraphOptions, CommitFileGraph, Edge, FileFaca
17
17
  import { PinataBackend } from "./providers/storage/pinata.js";
18
18
  import { DEFAULT_SIGNED_URL_WORKER, SignedUrlBackend, SignedUrlSigner } from "./providers/storage/signed-url.js";
19
19
  import { MAX_UPLOAD_ATTEMPTS, deserialize, fetchRawByCid, isTransientUpload, retrieveByCid, serialize, withUploadRetry } from "./providers/storage/utils.js";
20
- export { APP_REGISTRY_ABI, AccessRequest, AccessSigner, AgentCard, AppAccess, AppAgentLog, AppConfig, AppFeed, AppRegistryClient, AssetProcessor, BaseSepoliaConfig, BuildAssetGraphOptions, ChainRegistry, ChainRegistryConfig, ClaimArgs, CommitFileGraph, DATA_REGISTRY_ABI, DEFAULT_SIGNED_URL_WORKER, DecryptHandleParams, EPOCH_SECONDS, Edge, EncryptAndUploadParams, Exclusion, FANGORN_APP_EXTENSION, Fangorn, FangornConfig, FangornContext, FangornCreateOptions, FileFacade, GADGET_SELF_HKDF_V1, GADGET_WORKER_USDC_V1, Gadget, HandleFieldInput, JoinArgs, LogFilter, MAX_UPLOAD_ATTEMPTS, MEMBERSHIP_REGISTRY_ABI, MembershipPayment, MembershipRegistryClient, PinataBackend, PreparedTx, ProcessorResult, PublisherStatus, Registry, RepoChange, RepoRef, SignedUrlBackend, SignedUrlSigner, StorageConfig, SubscribeOptions, SupportedNetworks, UpdateEntry, Vertex, X25519_PUBKEY_LENGTH, ZERO_HEAD, accessMessageHash, appId, buildAccessRequest, buildAssetGraph, buildMarkdownGraph, covers, decryptHandle, deserialize, encryptAndUpload, epochOf, exclusionId, extractMarkdownLinks, fetchRawByCid, isTransientUpload, joinNonce, membershipScope, membershipTokenId, nonBlank, repoExcluded, repoId, retrieveByCid, seal, sealSelf, serialize, sha256Hex, toAppId, unseal, unsealSelf, withUploadRetry };
20
+ export { APP_REGISTRY_ABI, AccessRequest, AccessSigner, AgentCard, AppAccess, AppAgentLog, AppConfig, AppFeed, AppRegistryClient, ArbitrumSepoliaConfig, AssetProcessor, BaseSepoliaConfig, BuildAssetGraphOptions, ChainRegistry, ChainRegistryConfig, ClaimArgs, CommitFileGraph, DATA_REGISTRY_ABI, DEFAULT_SIGNED_URL_WORKER, DecryptHandleParams, EPOCH_SECONDS, Edge, EncryptAndUploadParams, Exclusion, FANGORN_APP_EXTENSION, Fangorn, FangornConfig, FangornContext, FangornCreateOptions, FileFacade, GADGET_SELF_HKDF_V1, GADGET_WORKER_USDC_V1, Gadget, HandleFieldInput, JoinArgs, LogFilter, MAX_UPLOAD_ATTEMPTS, MEMBERSHIP_REGISTRY_ABI, MembershipPayment, MembershipRegistryClient, PinataBackend, PreparedTx, ProcessorResult, PublisherStatus, Registry, RepoChange, RepoRef, SignedUrlBackend, SignedUrlSigner, StorageConfig, SubscribeOptions, SupportedNetworks, UpdateEntry, Vertex, X25519_PUBKEY_LENGTH, ZERO_HEAD, accessMessageHash, appId, buildAccessRequest, buildAssetGraph, buildMarkdownGraph, covers, decryptHandle, deserialize, encryptAndUpload, epochOf, exclusionId, extractMarkdownLinks, fetchRawByCid, isTransientUpload, joinNonce, membershipScope, membershipTokenId, nonBlank, repoExcluded, repoId, retrieveByCid, seal, sealSelf, serialize, sha256Hex, toAppId, unseal, unsealSelf, withUploadRetry };
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, nonBlank, toAppId } from "./config.js";
1
+ import { ArbitrumSepoliaConfig, BaseSepoliaConfig, FangornConfig, SupportedNetworks, appId, nonBlank, toAppId } from "./config.js";
2
2
  import { DEFAULT_SIGNED_URL_WORKER, SignedUrlBackend } from "./providers/storage/signed-url.js";
3
3
  import { MAX_UPLOAD_ATTEMPTS, deserialize, fetchRawByCid, isTransientUpload, retrieveByCid, serialize, withUploadRetry } from "./providers/storage/utils.js";
4
4
  import { PinataBackend } from "./providers/storage/pinata.js";
@@ -16,4 +16,4 @@ import { FANGORN_APP_EXTENSION, Fangorn } from "./fangorn.js";
16
16
  import { buildAssetGraph, buildMarkdownGraph, extractMarkdownLinks } from "./harness/index.js";
17
17
  import { GADGET_SELF_HKDF_V1, GADGET_WORKER_USDC_V1, X25519_PUBKEY_LENGTH, accessMessageHash, buildAccessRequest, decryptHandle, encryptAndUpload, seal, sealSelf, sha256Hex, unseal, unsealSelf } from "./crypto/encryption.js";
18
18
 
19
- export { APP_REGISTRY_ABI, AppFeed, AppRegistryClient, BaseSepoliaConfig, ChainRegistry, DATA_REGISTRY_ABI, DEFAULT_SIGNED_URL_WORKER, EPOCH_SECONDS, FANGORN_APP_EXTENSION, Fangorn, FangornConfig, GADGET_SELF_HKDF_V1, GADGET_WORKER_USDC_V1, MAX_UPLOAD_ATTEMPTS, MEMBERSHIP_REGISTRY_ABI, MembershipRegistryClient, PinataBackend, PublisherStatus, SignedUrlBackend, SupportedNetworks, X25519_PUBKEY_LENGTH, ZERO_HEAD, accessMessageHash, appId, buildAccessRequest, buildAssetGraph, buildMarkdownGraph, covers, decryptHandle, deserialize, encryptAndUpload, epochOf, exclusionId, extractMarkdownLinks, fetchRawByCid, isTransientUpload, joinNonce, membershipScope, membershipTokenId, nonBlank, repoExcluded, repoId, retrieveByCid, seal, sealSelf, serialize, sha256Hex, toAppId, unseal, unsealSelf, withUploadRetry };
19
+ export { APP_REGISTRY_ABI, AppFeed, AppRegistryClient, ArbitrumSepoliaConfig, BaseSepoliaConfig, ChainRegistry, DATA_REGISTRY_ABI, DEFAULT_SIGNED_URL_WORKER, EPOCH_SECONDS, FANGORN_APP_EXTENSION, Fangorn, FangornConfig, GADGET_SELF_HKDF_V1, GADGET_WORKER_USDC_V1, MAX_UPLOAD_ATTEMPTS, MEMBERSHIP_REGISTRY_ABI, MembershipRegistryClient, PinataBackend, PublisherStatus, SignedUrlBackend, SupportedNetworks, X25519_PUBKEY_LENGTH, ZERO_HEAD, accessMessageHash, appId, buildAccessRequest, buildAssetGraph, buildMarkdownGraph, covers, decryptHandle, deserialize, encryptAndUpload, epochOf, exclusionId, extractMarkdownLinks, fetchRawByCid, isTransientUpload, joinNonce, membershipScope, membershipTokenId, nonBlank, repoExcluded, repoId, retrieveByCid, seal, sealSelf, serialize, sha256Hex, toAppId, unseal, unsealSelf, withUploadRetry };
@@ -1,4 +1,4 @@
1
- //#region node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
1
+ //#region node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
2
2
  var comma = ",".charCodeAt(0);
3
3
  var semicolon = ";".charCodeAt(0);
4
4
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -1,12 +1,12 @@
1
- import { C } from "../../../tinyrainbow/dist/index.js";
2
- import { stringify } from "../../utils/dist/display.js";
3
- import { assertTypes, getType, isObject, noop } from "../../utils/dist/helpers.js";
4
- import { diff, printDiffOrStringify } from "../../utils/dist/diff.js";
5
- import { isMockFunction } from "../../spy/dist/index.js";
6
- import { processError } from "../../utils/dist/error.js";
7
- import { use, utils_exports } from "../../../chai/index.js";
1
+ import { C } from "../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";
2
+ import { stringify } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.js";
3
+ import { assertTypes, getType, isObject, noop } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js";
4
+ import { diff, printDiffOrStringify } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.js";
5
+ import { isMockFunction } from "../../../../../@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.js";
6
+ import { processError } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.js";
7
+ import { use, utils_exports } from "../../../../../chai@6.2.2/node_modules/chai/index.js";
8
8
 
9
- //#region node_modules/@vitest/expect/dist/index.js
9
+ //#region node_modules/.pnpm/@vitest+expect@4.0.18/node_modules/@vitest/expect/dist/index.js
10
10
  const MATCHERS_OBJECT = Symbol.for("matchers-object");
11
11
  const JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object");
12
12
  const GLOBAL_EXPECT = Symbol.for("expect-global");
@@ -1,6 +1,6 @@
1
- import { C } from "../../../tinyrainbow/dist/index.js";
1
+ import { C } from "../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";
2
2
 
3
- //#region node_modules/@vitest/pretty-format/dist/index.js
3
+ //#region node_modules/.pnpm/@vitest+pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.js
4
4
  function _mergeNamespaces(n, m) {
5
5
  m.forEach(function(e) {
6
6
  e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
@@ -1,6 +1,6 @@
1
- import { parseSingleStack } from "../../utils/dist/source-map.js";
1
+ import { parseSingleStack } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.js";
2
2
 
3
- //#region node_modules/@vitest/runner/dist/chunk-tasks.js
3
+ //#region node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.js
4
4
  function createChainable(keys, fn) {
5
5
  function create(context) {
6
6
  const chain$1 = function(...args) {
@@ -1,9 +1,9 @@
1
- import { format, formatRegExp, objDisplay } from "../../utils/dist/display.js";
2
- import { assertTypes, createDefer, isNegativeNaN, isObject, objectAttr, toArray } from "../../utils/dist/helpers.js";
3
- import { getSafeTimers } from "../../utils/dist/timers.js";
1
+ import { format, formatRegExp, objDisplay } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.js";
2
+ import { assertTypes, createDefer, isNegativeNaN, isObject, objectAttr, toArray } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js";
3
+ import { getSafeTimers } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.js";
4
4
  import { createChainable, createTaskName, findTestFileStackTrace } from "./chunk-tasks.js";
5
5
 
6
- //#region node_modules/@vitest/runner/dist/index.js
6
+ //#region node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js
7
7
  var PendingError = class extends Error {
8
8
  code = "VITEST_PENDING";
9
9
  taskId;
@@ -1,7 +1,7 @@
1
- import { format, plugins } from "../../pretty-format/dist/index.js";
2
- import { resolve } from "../../../pathe/dist/shared/pathe.M-eThtNZ.js";
1
+ import { format, plugins } from "../../../../../@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.js";
2
+ import { resolve } from "../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js";
3
3
 
4
- //#region node_modules/@vitest/snapshot/dist/index.js
4
+ //#region node_modules/.pnpm/@vitest+snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.js
5
5
  var comma = ",".charCodeAt(0);
6
6
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
7
7
  var intToChar = new Uint8Array(64);
@@ -420,7 +420,7 @@ function offsetToLineNumber(source, offset) {
420
420
  return line + 1;
421
421
  }
422
422
  async function saveInlineSnapshots(environment, snapshots) {
423
- const MagicString = (await import("../../../magic-string/dist/magic-string.es.js")).default;
423
+ const MagicString = (await import("../../../../../magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js")).default;
424
424
  const files = new Set(snapshots.map((i) => i.file));
425
425
  await Promise.all(Array.from(files).map(async (file) => {
426
426
  const snaps = snapshots.filter((i) => i.file === file);
@@ -1,4 +1,4 @@
1
- //#region node_modules/@vitest/spy/dist/index.js
1
+ //#region node_modules/.pnpm/@vitest+spy@4.0.18/node_modules/@vitest/spy/dist/index.js
2
2
  function isMockFunction(fn$1) {
3
3
  return typeof fn$1 === "function" && "_isMockFunction" in fn$1 && fn$1._isMockFunction === true;
4
4
  }
@@ -1,4 +1,4 @@
1
- //#region node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
1
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js
2
2
  function getDefaultExportFromCjs(x) {
3
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
4
  }
@@ -1,4 +1,4 @@
1
- //#region node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
1
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
2
2
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3
3
  function normalizeWindowsPath(input = "") {
4
4
  if (!input) return input;
@@ -1,10 +1,10 @@
1
- import { C } from "../../../tinyrainbow/dist/index.js";
2
- import { format, plugins } from "../../pretty-format/dist/index.js";
1
+ import { C } from "../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";
2
+ import { format, plugins } from "../../../../../@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.js";
3
3
  import { stringify } from "./display.js";
4
4
  import { deepClone, getOwnProperties, getType } from "./helpers.js";
5
5
  import { getDefaultExportFromCjs } from "./chunk-_commonjsHelpers.js";
6
6
 
7
- //#region node_modules/@vitest/utils/dist/diff.js
7
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/diff.js
8
8
  /**
9
9
  * Diff Match and Patch
10
10
  * Copyright 2018 The diff-match-patch Authors.
@@ -1,6 +1,6 @@
1
- import { format, plugins } from "../../pretty-format/dist/index.js";
1
+ import { format, plugins } from "../../../../../@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.js";
2
2
 
3
- //#region node_modules/@vitest/utils/dist/display.js
3
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/display.js
4
4
  const ansiColors = {
5
5
  bold: ["1", "22"],
6
6
  dim: ["2", "22"],
@@ -1,9 +1,9 @@
1
- import "../../../tinyrainbow/dist/index.js";
1
+ import "../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";
2
2
  import { stringify } from "./display.js";
3
3
  import { printDiffOrStringify } from "./diff.js";
4
4
  import { serializeValue } from "./serialize.js";
5
5
 
6
- //#region node_modules/@vitest/utils/dist/error.js
6
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/error.js
7
7
  function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
8
8
  if (!_err || typeof _err !== "object") return { message: String(_err) };
9
9
  const err = _err;
@@ -1,4 +1,4 @@
1
- //#region node_modules/@vitest/utils/dist/helpers.js
1
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js
2
2
  /**
3
3
  * Get original stacktrace without source map support the most performant way.
4
4
  * - Create only 1 stack frame.
@@ -1,4 +1,4 @@
1
- //#region node_modules/@vitest/utils/dist/serialize.js
1
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/serialize.js
2
2
  const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
3
3
  const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
4
4
  function isImmutable(v) {
@@ -1,6 +1,6 @@
1
1
  import { resolve } from "./chunk-pathe.M-eThtNZ.js";
2
2
 
3
- //#region node_modules/@vitest/utils/dist/source-map.js
3
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/source-map.js
4
4
  var comma = ",".charCodeAt(0);
5
5
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
6
6
  var intToChar = new Uint8Array(64);
@@ -1,4 +1,4 @@
1
- //#region node_modules/@vitest/utils/dist/timers.js
1
+ //#region node_modules/.pnpm/@vitest+utils@4.0.18/node_modules/@vitest/utils/dist/timers.js
2
2
  const SAFE_TIMERS_SYMBOL = Symbol("vitest:SAFE_TIMERS");
3
3
  function getSafeTimers() {
4
4
  const { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
@@ -1,4 +1,4 @@
1
- //#region node_modules/chai/index.js
1
+ //#region node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.js
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
4
4
  enumerable: true,
@@ -1,6 +1,6 @@
1
- import { encode } from "../../@jridgewell/sourcemap-codec/dist/sourcemap-codec.js";
1
+ import { encode } from "../../../../@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js";
2
2
 
3
- //#region node_modules/magic-string/dist/magic-string.es.mjs
3
+ //#region node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs
4
4
  var BitSet = class BitSet {
5
5
  constructor(arg) {
6
6
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -1,4 +1,4 @@
1
- //#region node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
1
+ //#region node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
2
2
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3
3
  function normalizeWindowsPath(input = "") {
4
4
  if (!input) return input;
@@ -1,4 +1,4 @@
1
- //#region node_modules/tinyrainbow/dist/index.js
1
+ //#region node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js
2
2
  var d = {
3
3
  reset: [0, 0],
4
4
  bold: [
@@ -1,4 +1,4 @@
1
- //#region node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
1
+ //#region node_modules/.pnpm/vitest@4.0.18_@types+node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
2
2
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3
3
 
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- //#region node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js
1
+ //#region node_modules/.pnpm/vitest@4.0.18_@types+node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js
2
2
  const RealDate = Date;
3
3
  let now = null;
4
4
  var MockDate = class MockDate extends RealDate {
@@ -1,6 +1,6 @@
1
- import { getSafeTimers } from "../../../@vitest/utils/dist/timers.js";
1
+ import { getSafeTimers } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.js";
2
2
 
3
- //#region node_modules/vitest/dist/chunks/utils.DvEY5TfP.js
3
+ //#region node_modules/.pnpm/vitest@4.0.18_@types+node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js
4
4
  const NAME_WORKER_STATE = "__vitest_worker__";
5
5
  function getWorkerState() {
6
6
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -1,18 +1,18 @@
1
- import { assertTypes, createSimpleStackTrace } from "../../../@vitest/utils/dist/helpers.js";
2
- import { clearAllMocks, fn, isMockFunction, resetAllMocks, restoreAllMocks, spyOn } from "../../../@vitest/spy/dist/index.js";
3
- import { Assertion, assert as assert$1, expect, should as should$1, use, utils_exports } from "../../../chai/index.js";
4
- import { ASYMMETRIC_MATCHERS_OBJECT, GLOBAL_EXPECT, JestAsymmetricMatchers, JestChaiExpect, JestExtend, addCustomEqualityTesters, customMatchers, equals, getState, iterableEquality, setState, subsetEquality } from "../../../@vitest/expect/dist/index.js";
5
- import { delay, getSafeTimers } from "../../../@vitest/utils/dist/timers.js";
6
- import { parseSingleStack } from "../../../@vitest/utils/dist/source-map.js";
7
- import { getNames } from "../../../@vitest/runner/dist/chunk-tasks.js";
8
- import { getCurrentTest } from "../../../@vitest/runner/dist/index.js";
1
+ import { assertTypes, createSimpleStackTrace } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js";
2
+ import { clearAllMocks, fn, isMockFunction, resetAllMocks, restoreAllMocks, spyOn } from "../../../../../@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.js";
3
+ import { Assertion, assert as assert$1, expect, should as should$1, use, utils_exports } from "../../../../../chai@6.2.2/node_modules/chai/index.js";
4
+ import { ASYMMETRIC_MATCHERS_OBJECT, GLOBAL_EXPECT, JestAsymmetricMatchers, JestChaiExpect, JestExtend, addCustomEqualityTesters, customMatchers, equals, getState, iterableEquality, setState, subsetEquality } from "../../../../../@vitest_expect@4.0.18/node_modules/@vitest/expect/dist/index.js";
5
+ import { delay, getSafeTimers } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.js";
6
+ import { parseSingleStack } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.js";
7
+ import { getNames } from "../../../../../@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.js";
8
+ import { getCurrentTest } from "../../../../../@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.js";
9
9
  import { getWorkerState, isChildProcess, resetModules, waitForImportsToResolve } from "./utils.DvEY5TfP.js";
10
- import "../../../@vitest/runner/dist/utils.js";
11
- import { SnapshotClient, addSerializer, stripSnapshotIndentation } from "../../../@vitest/snapshot/dist/index.js";
10
+ import "../../../../../@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/utils.js";
11
+ import { SnapshotClient, addSerializer, stripSnapshotIndentation } from "../../../../../@vitest_snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.js";
12
12
  import { commonjsGlobal } from "./_commonjsHelpers.D26ty3Ew.js";
13
13
  import { RealDate, mockDate, resetDate } from "./date.Bq6ZW5rf.js";
14
14
 
15
- //#region node_modules/vitest/dist/chunks/vi.2VT5v0um.js
15
+ //#region node_modules/.pnpm/vitest@4.0.18_@types+node@24.10.1_jiti@2.6.1_terser@5.51.2_tsx@4.21.0_yaml@2.8.2/node_modules/vitest/dist/chunks/vi.2VT5v0um.js
16
16
  const unsupported = [
17
17
  "matchSnapshot",
18
18
  "toMatchSnapshot",
@@ -4,11 +4,11 @@ import { Hex } from "viem";
4
4
  //#region src/providers/storage/signed-url.d.ts
5
5
 
6
6
  /**
7
- * The hosted pinata-url-provider worker. Used when no worker URL is supplied, so
8
- * callers can upload via signed URLs with zero configuration. Point at your own
9
- * deployment by passing a workerUrl.
7
+ * The hosted worker for the default network (Base Sepolia). Used when neither
8
+ * a worker URL nor the network's config names one. `Fangorn.create` passes the
9
+ * config's `signedUrlWorker`, so a Base client reaches Base's worker.
10
10
  */
11
- declare const DEFAULT_SIGNED_URL_WORKER = "https://pinata-url-provider.fangorn-0be.workers.dev";
11
+ declare const DEFAULT_SIGNED_URL_WORKER: string;
12
12
  /** Just enough of a wallet to run the worker's ownership handshake. */
13
13
  interface SignedUrlSigner {
14
14
  address: Hex;
@@ -1,12 +1,13 @@
1
+ import { FangornConfig } from "../../config.js";
1
2
  import { fetchRawByCid, serialize, withUploadRetry } from "./utils.js";
2
3
 
3
4
  //#region src/providers/storage/signed-url.ts
4
5
  /**
5
- * The hosted pinata-url-provider worker. Used when no worker URL is supplied, so
6
- * callers can upload via signed URLs with zero configuration. Point at your own
7
- * deployment by passing a workerUrl.
6
+ * The hosted worker for the default network (Base Sepolia). Used when neither
7
+ * a worker URL nor the network's config names one. `Fangorn.create` passes the
8
+ * config's `signedUrlWorker`, so a Base client reaches Base's worker.
8
9
  */
9
- const DEFAULT_SIGNED_URL_WORKER = "https://pinata-url-provider.fangorn-0be.workers.dev";
10
+ const DEFAULT_SIGNED_URL_WORKER = FangornConfig.signedUrlWorker;
10
11
  /** A human-readable reason from a worker error response, detail included. */
11
12
  function workerError(r) {
12
13
  const base = r.error ?? "unknown error";