@pkcprotocol/pkc-js 0.0.88 → 0.0.89

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 (48) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/generated-version.d.ts +1 -1
  3. package/dist/browser/generated-version.js +1 -1
  4. package/dist/browser/helia/helia-for-pkc.d.ts +2 -0
  5. package/dist/browser/helia/helia-for-pkc.js +158 -55
  6. package/dist/browser/helia/helia-for-pkc.js.map +1 -1
  7. package/dist/browser/helia/libp2pjsClient.d.ts +1 -1
  8. package/dist/browser/helia/lru-blockstore.d.ts +9 -8
  9. package/dist/browser/helia/lru-blockstore.js.map +1 -1
  10. package/dist/browser/helia/types.d.ts +10 -10
  11. package/dist/browser/rpc/src/schema.d.ts +148 -22
  12. package/dist/browser/runtime/node/community/local-community/cleanup.js +31 -1
  13. package/dist/browser/runtime/node/community/local-community/cleanup.js.map +1 -1
  14. package/dist/browser/schema.d.ts +8 -6
  15. package/dist/browser/schema.js +8 -1
  16. package/dist/browser/schema.js.map +1 -1
  17. package/dist/browser/test/test-util.js +3 -1
  18. package/dist/browser/test/test-util.js.map +1 -1
  19. package/dist/bundled/bundle-manifest.json +165 -146
  20. package/dist/bundled/chunks/{helia-for-pkc-CgG0H5g2.js → helia-for-pkc-BKXOmklx.js} +70 -39
  21. package/dist/bundled/chunks/{local-community-rFE0QOdJ.js → local-community-C7tTEYDD.js} +1 -1
  22. package/dist/bundled/chunks/{local-community-6_MVz1cc.js → local-community-D5fzgPCr.js} +32 -3
  23. package/dist/bundled/chunks/{node-BjSTVzbx.js → node-C9RpmtmM.js} +5 -5
  24. package/dist/bundled/chunks/{rpc-local-community-Bu6Wp-tO.js → rpc-local-community-Dq00OHRf.js} +432 -6
  25. package/dist/bundled/chunks/{schema-By3Sh-uW.js → schema-bDrzx9EZ.js} +3 -3
  26. package/dist/bundled/chunks/{src-WLgFbUwZ.js → src-629pKfxo.js} +2731 -415
  27. package/dist/bundled/chunks/{src-B2CwDTfy.js → src-Dz9wtvrK.js} +18 -18
  28. package/dist/bundled/chunks/{util-BxLdjyTF.js → util-DuJcVQ7Y.js} +1 -1
  29. package/dist/bundled/index.js +1 -1
  30. package/dist/bundled/rpc/src/index.js +4 -4
  31. package/dist/node/generated-version.d.ts +1 -1
  32. package/dist/node/generated-version.js +1 -1
  33. package/dist/node/helia/helia-for-pkc.d.ts +2 -0
  34. package/dist/node/helia/helia-for-pkc.js +158 -55
  35. package/dist/node/helia/helia-for-pkc.js.map +1 -1
  36. package/dist/node/helia/libp2pjsClient.d.ts +1 -1
  37. package/dist/node/helia/lru-blockstore.d.ts +9 -8
  38. package/dist/node/helia/lru-blockstore.js.map +1 -1
  39. package/dist/node/helia/types.d.ts +10 -10
  40. package/dist/node/rpc/src/schema.d.ts +148 -22
  41. package/dist/node/runtime/node/community/local-community/cleanup.js +31 -1
  42. package/dist/node/runtime/node/community/local-community/cleanup.js.map +1 -1
  43. package/dist/node/schema.d.ts +8 -6
  44. package/dist/node/schema.js +8 -1
  45. package/dist/node/schema.js.map +1 -1
  46. package/dist/node/test/test-util.js +3 -1
  47. package/dist/node/test/test-util.js.map +1 -1
  48. package/package.json +17 -16
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, Sr as logger_default, br as PKCError } from "./schema-By3Sh-uW.js";
3
- import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-BxLdjyTF.js";
2
+ import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, Sr as logger_default, br as PKCError } from "./schema-bDrzx9EZ.js";
3
+ import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-DuJcVQ7Y.js";
4
4
  import { t as map } from "./src-Cpx2Sts8.js";
5
5
  import { t as parallelBatch } from "./src-DKntVmyX.js";
6
6
  import { fileURLToPath } from "node:url";
@@ -12,24 +12,25 @@ import { peerIdFromString } from "@libp2p/peer-id";
12
12
  import * as Digest from "multiformats/hashes/digest";
13
13
  import { base32, base32upper } from "multiformats/bases/base32";
14
14
  import { EventEmitter as EventEmitter$1 } from "events";
15
- import { createHelia, libp2pDefaults } from "helia";
16
- import { ipns } from "@helia/ipns";
15
+ import { createHeliaLight } from "helia";
16
+ import { libp2pDefaults, withLibp2p } from "@helia/libp2p";
17
+ import { withBitswap } from "@helia/bitswap";
18
+ import { ipns, pubSubIPNSRouting } from "@helia/ipns";
17
19
  import { multihashToIPNSRoutingKey, unmarshalIPNSRecord } from "ipns";
18
20
  import { ipnsValidator } from "ipns/validator";
19
21
  import { gossipsub } from "@libp2p/gossipsub";
20
22
  import { identify } from "@libp2p/identify";
21
- import { bitswap } from "@helia/block-brokers";
23
+ import { sha512 } from "multiformats/hashes/sha2";
22
24
  import { MemoryBlockstore } from "blockstore-core";
23
25
  import * as raw from "multiformats/codecs/raw";
24
26
  import { delegatedRoutingV1HttpApiClientContentRouting } from "@helia/delegated-routing-v1-http-api-client";
25
27
  import { NotFoundError } from "@libp2p/interface";
26
28
  import { unixfs } from "@helia/unixfs";
27
29
  import { fetch } from "@libp2p/fetch";
28
- import { pubsub } from "@helia/ipns/routing";
29
30
  //#region dist/node/runtime/node/libp2p-extra-transports.js
30
31
  const extraLibp2pTransports = [];
31
32
  //#endregion
32
- //#region node_modules/blockstore-fs/node_modules/interface-store/dist/src/errors.js
33
+ //#region node_modules/interface-store/dist/src/errors.js
33
34
  var OpenFailedError = class OpenFailedError extends Error {
34
35
  static name = "OpenFailedError";
35
36
  name = OpenFailedError.name;
@@ -5916,27 +5917,22 @@ async function* glob(dir, pattern, options = {}) {
5916
5917
  function defaultTranslate(signal) {
5917
5918
  return signal.reason;
5918
5919
  }
5919
- /**
5920
- * Race a promise against an abort signal
5921
- */
5922
- async function raceSignal(promise, signal, opts) {
5923
- if (signal == null) return promise;
5920
+ function raceSignal(promise, signal, opts) {
5921
+ if (signal == null || promise == null) return promise;
5924
5922
  const translateError = opts?.translateError ?? defaultTranslate;
5925
5923
  if (signal.aborted) {
5926
5924
  promise.catch(() => {});
5927
5925
  return Promise.reject(translateError(signal));
5928
5926
  }
5929
5927
  let listener;
5930
- try {
5931
- return await Promise.race([promise, new Promise((resolve, reject) => {
5932
- listener = () => {
5933
- reject(translateError(signal));
5934
- };
5935
- signal.addEventListener("abort", listener);
5936
- })]);
5937
- } finally {
5928
+ return Promise.race([promise, new Promise((resolve, reject) => {
5929
+ listener = () => {
5930
+ reject(translateError(signal));
5931
+ };
5932
+ signal.addEventListener("abort", listener);
5933
+ })]).finally(() => {
5938
5934
  if (listener != null) signal.removeEventListener("abort", listener);
5939
- }
5935
+ });
5940
5936
  }
5941
5937
  //#endregion
5942
5938
  //#region node_modules/steno/lib/index.js
@@ -6497,6 +6493,12 @@ function getDelegatedRoutingFields(routers) {
6497
6493
  }
6498
6494
  return routersObj;
6499
6495
  }
6496
+ function ipnsRouterTag(router) {
6497
+ return String(router);
6498
+ }
6499
+ function isLocalStoreIpnsRouter(router) {
6500
+ return ipnsRouterTag(router) === "LocalStoreRouting()";
6501
+ }
6500
6502
  async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6501
6503
  if (!pkcOptions.httpRoutersOptions?.length) throw Error("You need to have pkc.httpRouterOptions to set up helia");
6502
6504
  const existingClient = libp2pJsClients[pkcOptions.key];
@@ -6510,9 +6512,10 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6510
6512
  client.countOfUsesOfInstance++;
6511
6513
  return client;
6512
6514
  }
6515
+ let startedHelia;
6516
+ let closeBlockstore = async () => {};
6513
6517
  creatingLibp2pJsClients[pkcOptions.key] = (async () => {
6514
6518
  let lruBlockstore;
6515
- let closeBlockstore = async () => {};
6516
6519
  if (!pkcOptions.heliaOptions?.blockstore) {
6517
6520
  const { blockstore: childBlockstore, persistent, defaultMaxBytes, close } = await createBlockstoreForLibp2pJsClient({
6518
6521
  dataPath: pkcOptions.dataPath,
@@ -6542,12 +6545,17 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6542
6545
  }
6543
6546
  },
6544
6547
  blockstore: lruBlockstore,
6545
- blockBrokers: [bitswap()],
6546
- start: false,
6547
6548
  ...pkcOptions.heliaOptions
6548
6549
  };
6549
- const helia = await createHelia(mergedHeliaInit);
6550
- helia.routing.routers = helia.routing.routers.filter((r) => r.constructor.name !== "HTTPGatewayRouter");
6550
+ const { libp2p: mergedLibp2pInit, bitswap: bitswapInit, blockBrokers: callerBlockBrokers, ...heliaLightInit } = mergedHeliaInit;
6551
+ const heliaWithLibp2p = withLibp2p(createHeliaLight({
6552
+ ...heliaLightInit,
6553
+ blockBrokers: callerBlockBrokers,
6554
+ hashers: [sha512, ...heliaLightInit.hashers ?? []]
6555
+ }), mergedLibp2pInit ?? {});
6556
+ const helia = callerBlockBrokers === void 0 ? withBitswap(heliaWithLibp2p, bitswapInit) : heliaWithLibp2p;
6557
+ startedHelia = helia;
6558
+ await helia.start();
6551
6559
  log("Initialized libp2pjs helia with key", pkcOptions.key, "peer id", helia.libp2p.peerId.toString());
6552
6560
  const pubsubEventHandler = new EventEmitter$1();
6553
6561
  helia.libp2p.services.pubsub.addEventListener("message", (evt) => {
@@ -6560,10 +6568,6 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6560
6568
  pubsubEventHandler.emit(evt.detail.topic, msgFormatted);
6561
6569
  });
6562
6570
  const heliaFs = unixfs(helia);
6563
- const asHeliaCatCid = (ipfsPathOrCid) => {
6564
- CID.parse(ipfsPathOrCid.split("/")[0]);
6565
- return ipfsPathOrCid;
6566
- };
6567
6571
  const MAX_BITSWAP_SESSION_SEED_PEERS = 3;
6568
6572
  const getBitswapSessionSeedPeers = (scopeIpnsPubsubTopic) => {
6569
6573
  const pubsub = helia.libp2p.services.pubsub;
@@ -6616,10 +6620,12 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6616
6620
  }, ms);
6617
6621
  signal.addEventListener("abort", onAbort, { once: true });
6618
6622
  });
6619
- const ipnsPubsubRouter = pubsub(helia);
6620
- const ipnsPubsubLocalStore = ipnsPubsubRouter.localStore;
6623
+ const ipnsPubsubRouter = pubSubIPNSRouting(helia);
6621
6624
  const ipnsNameResolver = ipns(helia, { routers: [ipnsPubsubRouter] });
6622
- ipnsNameResolver.routers = ipnsNameResolver.routers.filter((r) => r?.constructor?.name !== "LocalStoreRouting");
6625
+ for (let i = ipnsNameResolver.routers.length - 1; i >= 0; i--) if (isLocalStoreIpnsRouter(ipnsNameResolver.routers[i])) ipnsNameResolver.routers.splice(i, 1);
6626
+ ipnsNameResolver.start?.();
6627
+ await ipnsPubsubRouter.start?.();
6628
+ const ipnsPubsubLocalStore = ipnsPubsubRouter.localStore;
6623
6629
  const WARMUP_MAX_PEERS = 4;
6624
6630
  const warmupPromisesByTopic = /* @__PURE__ */ new Map();
6625
6631
  const warmupForTopic = (topic, options) => {
@@ -6758,7 +6764,9 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6758
6764
  } },
6759
6765
  cat(ipfsPath, options) {
6760
6766
  throwIfHeliaIsStoppingOrStopped();
6761
- const rootCid = CID.parse(ipfsPath.split("/")[0]);
6767
+ const [rootCidString, ...ipfsSubPathSegments] = ipfsPath.split("/");
6768
+ const rootCid = CID.parse(rootCidString);
6769
+ const ipfsSubPath = ipfsSubPathSegments.length > 0 ? ipfsSubPathSegments.join("/") : void 0;
6762
6770
  const timeoutMs = parseKuboStyleTimeoutMs(options?.timeout);
6763
6771
  const { bitswapSessionSeedScopeIpnsPubsubTopic, ...unixfsCatOptions } = options ?? {};
6764
6772
  return (async function* () {
@@ -6773,7 +6781,7 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6773
6781
  })), timeoutMs) : void 0;
6774
6782
  try {
6775
6783
  for (let attempt = 0;; attempt++) {
6776
- const session = helia.blockstore.createSession(rootCid, { providers: getBitswapSessionSeedPeers(bitswapSessionSeedScopeIpnsPubsubTopic) });
6784
+ const session = helia.blockstore.createSession(rootCid, { providers: getBitswapSessionSeedPeers(bitswapSessionSeedScopeIpnsPubsubTopic).map((peerId) => peerId.toCID()) });
6777
6785
  const sessionGet = session.get.bind(session);
6778
6786
  const fallbackGet = helia.blockstore.get.bind(helia.blockstore);
6779
6787
  session.get = (blockCid, blockGetOptions) => fetchBlockWithStalledSessionFailover({
@@ -6786,8 +6794,9 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6786
6794
  });
6787
6795
  let yieldedAnyBytes = false;
6788
6796
  try {
6789
- const catIterable = unixfs({ blockstore: session }).cat(asHeliaCatCid(ipfsPath), {
6797
+ const catIterable = unixfs({ blockstore: session }).cat(rootCid, {
6790
6798
  ...unixfsCatOptions,
6799
+ path: ipfsSubPath,
6791
6800
  signal: controller.signal
6792
6801
  });
6793
6802
  for await (const chunk of catIterable) {
@@ -6859,7 +6868,7 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6859
6868
  if (typeof lifecycle.stop === "function") try {
6860
6869
  await lifecycle.stop();
6861
6870
  } catch (e) {
6862
- log.error("Error stopping IPNS router", router?.constructor?.name, e);
6871
+ log.error("Error stopping IPNS router", ipnsRouterTag(router), e);
6863
6872
  }
6864
6873
  }
6865
6874
  for (const topic of helia.libp2p.services.pubsub.getTopics()) helia.libp2p.services.pubsub.unsubscribe(topic);
@@ -6898,11 +6907,33 @@ async function createLibp2pJsClientOrUseExistingOne(pkcOptions) {
6898
6907
  libp2pJsClientsOptions: pkcOptions,
6899
6908
  key: pkcOptions.key
6900
6909
  });
6901
- await helia.start();
6902
6910
  log("Helia/libp2p-js started with key", pkcOptions.key, "and peer id", helia.libp2p.peerId.toString());
6903
6911
  libp2pJsClients[pkcOptions.key] = client;
6904
6912
  return client;
6905
- })();
6913
+ })().catch(async (creationError) => {
6914
+ if (startedHelia) {
6915
+ let connections = [];
6916
+ try {
6917
+ connections = startedHelia.libp2p.getConnections();
6918
+ } catch {}
6919
+ for (const connection of connections) try {
6920
+ connection.abort(/* @__PURE__ */ new Error("pkc-js libp2p instance failed to initialize"));
6921
+ } catch (e) {
6922
+ log.error("Error aborting libp2p connection during failed initialization", e);
6923
+ }
6924
+ try {
6925
+ await startedHelia.stop();
6926
+ } catch (e) {
6927
+ log.error("Error stopping helia after failed initialization", e);
6928
+ }
6929
+ }
6930
+ try {
6931
+ await closeBlockstore();
6932
+ } catch (e) {
6933
+ log.error("Error closing blockstore after failed initialization", e);
6934
+ }
6935
+ throw creationError;
6936
+ });
6906
6937
  const createdClientPromise = creatingLibp2pJsClients[pkcOptions.key];
6907
6938
  if (!createdClientPromise) throw new Error("Missing creation promise after initialization");
6908
6939
  try {
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-6_MVz1cc.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-D5fzgPCr.js";
2
2
  export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as pubsubTopicToDhtKey, $n as n$4, Bn as CommentEditReservedFields, C as contentContainsMarkdownAudio, Ct as findStartedCommunity, F as getIpnsRecordInLocalKuboNode, Fr as ZodError, Ft as untrackStartedCommunity, G as isLinkOfAudio, Hn as CommentEditsTableRowSchema, Ht as CommunityEditPublicationPubsubReservedFields, J as isLinkOfVideo, Jt as CommentModerationReservedFields, K as isLinkOfImage, Kn as AuthorReservedFields, L as hideClassPrivateProps, Lt as untrackUpdatingCommunity, M as genToArray, Mn as CommentsTableRowSchema, Mt as trackStartedCommunity, N as getEquivalentCommunityAddresses, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Pt as trackUpdatingCommunity, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditPubsubMessagePublicationSchema, Rt as require_sha256, S as calculateStringSizeSameAsIpfsAddCidV0, Sn as CommentPubsubMessageReservedFields, Sr as logger_default, St as findCommunityInRegistry, T as contentContainsMarkdownVideos, Tt as findUpdatingCommunity, W as isLinkOfAnimatedImage, Xt as CommentModerationsTableRowSchema, Y as isLinkValid, _t as statMfsPathSafely, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, at as removeMfsFilesSafely, b as areEquivalentCommunityAddresses, br as PKCError, cr as t$4, d as DecryptedChallengeRequestSchema, dr as t$5, dt as retryKuboBlockPutPinAndProvidePubsubTopic, er as t$8, fr as t$3, gn as VotePubsubReservedFields, gt as sleepUntilTimeoutOrAbort, hn as VotePubsubMessagePublicationSchema, ir as e, it as removeBlocksFromKuboNode, jn as CommentUpdateTableRowSchema, jt as syncCommunityRegistryEntry, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, mr as require_retry, nr as t$7, on as CommunitySignedPropertyNames, pt as retryKuboIpfsAddAndProvide, q as isLinkOfMedia, qt as CommentModerationPubsubMessagePublicationSchema, r as ChallengeMessageSchema, rr as t$6, s as ChallengeVerificationMessageSchema, sr as r$1, st as removeNullUndefinedValues, t as ChallengeAnswerMessageSchema, tr as n$3, u as DecryptedChallengeRequestPublicationSchema, vn as VoteTablesRowSchema, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xn as CommentIpfsSchema, xr as messages, xt as writeKuboFilesWithTimeout, y as version_default, yt as timestamp, zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema } from "./schema-By3Sh-uW.js";
3
- import { $t as getPublicKeyFromPrivateKey, A as deriveDbPosts, At as verifyCommentIpfs, Bt as getAuthorNameFromWire, C as BackupAbortError, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Dt as verifyChallengeRequest, E as calculateInlineRepliesBudget, En as parseJsonWithPKCErrorIfFails, F as importSignerIntoKuboNode, Ft as verifyCommunityEdit, G as REPLY_REPLIES_SORT_TYPES, Gt as getCommunityPublicKeyFromWire, It as verifyVote, Jt as encode, K as TIMEFRAMES_TO_SECONDS, Lt as buildRuntimeAuthor, M as getDefaultCommunityDbConfig, Mt as verifyCommentPubsubMessage, Nt as verifyCommentUpdate, O as deleteOldCommunityInWindows, P as getThumbnailPropsOfLink, Pt as verifyCommunity, Qt as getPKCAddressFromPublicKeySync, R as moveCommunityDbToDeletedDirectory, Rt as cleanWireAuthor, S as encryptEd25519AesGcmPublicKeyBuffer, St as signCommunity, T as calculateExpectedSignatureSize, Tt as verifyChallengeAnswer, U as POSTS_SORT_TYPES, W as POST_REPLIES_SORT_TYPES, Wt as getCommunityNameFromWire, Xt as getIpfsKeyFromPrivateKey, Z as iterateOverPageCidsToFindAllCids, Zt as getPKCAddressFromPublicKey, _t as signComment, a as loadChallengeFileFromCommunityChallengeSettings, ar as t$11, b as decryptEd25519AesGcmPublicKeyBuffer, bt as signCommentUpdate, c as LRUCache, d as KeyvBetterSqlite3, dn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, dr as STORAGE_KEYS, en as createSchemaRowParser, er as crosspostChainDepthUpTo, fr as require_lodash_merge, ft as cleanUpBeforePublishing, g as SignerWithPublicKeyAddress, gt as signChallengeVerification, i as getCommunityChallengeFromCommunityChallengeSettings, ir as r$2, j as deriveDbReplies, jt as verifyCommentModeration, k as deriveCommentIpfsFromCommentTableRow, kt as verifyCommentEdit, lr as t$10, lt as pLimit, mt as signChallengeMessage, nr as t$9, o as pkcJsChallenges, or as n$6, pn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, qt as decode, r as getChallengeVerification, rr as t$12, s as TrackedInstanceRegistry, sr as n$5, t as RpcLocalCommunity, tr as effectiveMaxCrosspostDepth, u as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, ur as stringify, vt as signCommentEdit, w as backupCommunityDb, xt as signCommentUpdateForChallengeVerification, z as resolveDbPostsCidRefs } from "./rpc-local-community-Bu6Wp-tO.js";
2
+ import { $ as pubsubTopicToDhtKey, $n as n$4, Bn as CommentEditReservedFields, C as contentContainsMarkdownAudio, Ct as findStartedCommunity, F as getIpnsRecordInLocalKuboNode, Fr as ZodError, Ft as untrackStartedCommunity, G as isLinkOfAudio, Hn as CommentEditsTableRowSchema, Ht as CommunityEditPublicationPubsubReservedFields, J as isLinkOfVideo, Jt as CommentModerationReservedFields, K as isLinkOfImage, Kn as AuthorReservedFields, L as hideClassPrivateProps, Lt as untrackUpdatingCommunity, M as genToArray, Mn as CommentsTableRowSchema, Mt as trackStartedCommunity, N as getEquivalentCommunityAddresses, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Pt as trackUpdatingCommunity, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditPubsubMessagePublicationSchema, Rt as require_sha256, S as calculateStringSizeSameAsIpfsAddCidV0, Sn as CommentPubsubMessageReservedFields, Sr as logger_default, St as findCommunityInRegistry, T as contentContainsMarkdownVideos, Tt as findUpdatingCommunity, W as isLinkOfAnimatedImage, Xt as CommentModerationsTableRowSchema, Y as isLinkValid, _t as statMfsPathSafely, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, at as removeMfsFilesSafely, b as areEquivalentCommunityAddresses, br as PKCError, cr as t$4, d as DecryptedChallengeRequestSchema, dr as t$5, dt as retryKuboBlockPutPinAndProvidePubsubTopic, er as t$8, fr as t$3, gn as VotePubsubReservedFields, gt as sleepUntilTimeoutOrAbort, hn as VotePubsubMessagePublicationSchema, ir as e, it as removeBlocksFromKuboNode, jn as CommentUpdateTableRowSchema, jt as syncCommunityRegistryEntry, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, mr as require_retry, nr as t$7, on as CommunitySignedPropertyNames, pt as retryKuboIpfsAddAndProvide, q as isLinkOfMedia, qt as CommentModerationPubsubMessagePublicationSchema, r as ChallengeMessageSchema, rr as t$6, s as ChallengeVerificationMessageSchema, sr as r$1, st as removeNullUndefinedValues, t as ChallengeAnswerMessageSchema, tr as n$3, u as DecryptedChallengeRequestPublicationSchema, vn as VoteTablesRowSchema, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xn as CommentIpfsSchema, xr as messages, xt as writeKuboFilesWithTimeout, y as version_default, yt as timestamp, zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema } from "./schema-bDrzx9EZ.js";
3
+ import { $t as getPublicKeyFromPrivateKey, A as deriveDbPosts, At as verifyCommentIpfs, Bt as getAuthorNameFromWire, C as BackupAbortError, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Dt as verifyChallengeRequest, E as calculateInlineRepliesBudget, En as parseJsonWithPKCErrorIfFails, F as importSignerIntoKuboNode, Ft as verifyCommunityEdit, G as REPLY_REPLIES_SORT_TYPES, Gt as getCommunityPublicKeyFromWire, It as verifyVote, Jt as encode, K as TIMEFRAMES_TO_SECONDS, Lt as buildRuntimeAuthor, M as getDefaultCommunityDbConfig, Mt as verifyCommentPubsubMessage, Nt as verifyCommentUpdate, O as deleteOldCommunityInWindows, P as getThumbnailPropsOfLink, Pt as verifyCommunity, Qt as getPKCAddressFromPublicKeySync, R as moveCommunityDbToDeletedDirectory, Rt as cleanWireAuthor, S as encryptEd25519AesGcmPublicKeyBuffer, St as signCommunity, T as calculateExpectedSignatureSize, Tt as verifyChallengeAnswer, U as POSTS_SORT_TYPES, W as POST_REPLIES_SORT_TYPES, Wt as getCommunityNameFromWire, Xt as getIpfsKeyFromPrivateKey, Z as iterateOverPageCidsToFindAllCids, Zt as getPKCAddressFromPublicKey, _t as signComment, a as loadChallengeFileFromCommunityChallengeSettings, ar as t$11, b as decryptEd25519AesGcmPublicKeyBuffer, bt as signCommentUpdate, c as LRUCache, d as KeyvBetterSqlite3, dn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, dr as STORAGE_KEYS, en as createSchemaRowParser, er as crosspostChainDepthUpTo, fr as require_lodash_merge, ft as cleanUpBeforePublishing, g as SignerWithPublicKeyAddress, gt as signChallengeVerification, i as getCommunityChallengeFromCommunityChallengeSettings, ir as r$2, j as deriveDbReplies, jt as verifyCommentModeration, k as deriveCommentIpfsFromCommentTableRow, kt as verifyCommentEdit, lr as t$10, lt as pLimit, mt as signChallengeMessage, nr as t$9, o as pkcJsChallenges, or as n$6, pn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, qt as decode, r as getChallengeVerification, rr as t$12, s as TrackedInstanceRegistry, sr as n$5, t as RpcLocalCommunity, tr as effectiveMaxCrosspostDepth, u as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, ur as stringify, vt as signCommentEdit, w as backupCommunityDb, xt as signCommentUpdateForChallengeVerification, z as resolveDbPostsCidRefs } from "./rpc-local-community-Dq00OHRf.js";
4
4
  import { randomFillSync, randomUUID } from "node:crypto";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  import path from "node:path";
@@ -386,13 +386,42 @@ async function adjustPostUpdatesBucketsIfNeeded(community) {
386
386
  }
387
387
  //#endregion
388
388
  //#region dist/node/runtime/node/community/local-community/cleanup.js
389
+ var import_retry = /* @__PURE__ */ __toESM(require_retry(), 1);
390
+ async function _pinLsWithRetries({ kuboRpcClient, cid, log, inputNumOfRetries }) {
391
+ const numOfRetries = inputNumOfRetries ?? 3;
392
+ return new Promise((resolve, reject) => {
393
+ const operation = import_retry.operation({
394
+ retries: numOfRetries,
395
+ factor: 2,
396
+ minTimeout: 1e3
397
+ });
398
+ operation.attempt(async (currentAttempt) => {
399
+ try {
400
+ await genToArray(kuboRpcClient._client.pin.ls({ paths: cid }));
401
+ resolve();
402
+ } catch (error) {
403
+ if (error.message?.includes("is not pinned")) {
404
+ reject(error);
405
+ return;
406
+ }
407
+ log.error(`Failed attempt ${currentAttempt}/${numOfRetries + 1} to check whether ${cid} is pinned:`, error);
408
+ if (operation.retry(error)) return;
409
+ reject(operation.mainError() || error);
410
+ }
411
+ });
412
+ });
413
+ }
389
414
  async function repinCommentsIPFSIfNeeded(community) {
390
415
  const log = logger_default("pkc-js:local-community:start:_repinCommentsIPFSIfNeeded");
391
416
  const latestCommentCid = community._dbHandler.queryLatestCommentCid();
392
417
  if (!latestCommentCid) return;
393
418
  const kuboRpcOrHelia = community._clientsManager.getDefaultKuboRpcClient();
394
419
  try {
395
- await genToArray(kuboRpcOrHelia._client.pin.ls({ paths: latestCommentCid.cid }));
420
+ await _pinLsWithRetries({
421
+ kuboRpcClient: kuboRpcOrHelia,
422
+ cid: latestCommentCid.cid,
423
+ log
424
+ });
396
425
  return;
397
426
  } catch (e) {
398
427
  if (!e.message.includes("is not pinned")) throw e;
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $n as n$2, B as isIpfsCid, Bt as pTimeout, Ct as findStartedCommunity, D as deepMergeRuntimeFields, Dt as listUpdatingComments, E as createAbortError, En as CommentUpdateForChallengeVerificationSchema, Et as listStartedCommunities, H as isIpns, Ir as joinValues, It as untrackUpdatingComment, L as hideClassPrivateProps, Lr as parsedType, Nt as trackUpdatingComment, Ot as listUpdatingCommunities, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rr as stringifyPrimitive, Rt as require_sha256, Sr as logger_default, Tr as setErrorMap, Tt as findUpdatingCommunity, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, b as areEquivalentCommunityAddresses, br as PKCError, bt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, ct as removeUndefinedValuesRecursively, dn as PubsubTopicSchema, en as CommunityAnchorSchema, ft as retryKuboIpfsAdd, gt as sleepUntilTimeoutOrAbort, hr as FailedToFetchCommentIpfsFromGatewaysError, ht as shortifyCid, ir as e, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, kt as refreshTrackedCommentAliases, lt as replaceXWithY, mr as require_retry, mt as shortifyAddress, nt as rejectWhenAbortSignalFires, r as ChallengeMessageSchema, rr as t$1, rt as rejectWhenCommunityStopsOrAborts, s as ChallengeVerificationMessageSchema, sr as r, t as ChallengeAnswerMessageSchema, tr as n$1, ut as resolveWhenPredicateIsTrue, vt as throwIfAbortSignalAborted, wt as findUpdatingComment, xn as CommentIpfsSchema, xr as messages, y as version_default, yt as timestamp, z as isAbortError, zt as TimeoutError } from "./schema-By3Sh-uW.js";
3
- import { $ as RepliesPages, $n as RpcUnsubscribeParamSchema, An as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, At as verifyCommentIpfs, B as setNativeFunctions$1, Bn as RpcEditCommunityParamSchema, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Ct as signCommunityEdit, D as createKuboRpcClient, Dn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, En as parseJsonWithPKCErrorIfFails, Et as verifyChallengeMessage, Fn as RpcCancelExportParamSchema, Ft as verifyCommunityEdit, Gn as RpcFetchCidParamSchema, Gt as getCommunityPublicKeyFromWire, H as CommentClientsManager, Hn as RpcExportCommunityModLogsResultSchema, Ht as buildRuntimeCommunityFields, I as listCommunitiesSync, In as RpcCidParamSchema, It as verifyVote, Jn as RpcPublishChallengeAnswersParamSchema, Kn as RpcFetchCidResultSchema, Kt as normalizeCommunityInputFromCommunity, L as monitorCommunitiesDirectory, Ln as RpcCommentRepliesPageParamSchema, Lt as buildRuntimeAuthor, Mn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Mt as verifyCommentPubsubMessage, N as getDefaultDataPath, Nn as RpcAnchorPublishPreparationResultSchema, Nt as verifyCommentUpdate, On as parseRpcCommentEventWithPKCErrorIfItFails, Ot as verifyChallengeVerification, Pn as RpcAuthorNameParamSchema, Q as parseRawPages, Qn as RpcSuccessResultSchema, Qt as getPKCAddressFromPublicKeySync, Rn as RpcCommunityIdentifierParamSchema, Rt as cleanWireAuthor, Sn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, Tn as parseDecryptedChallengeWithPKCErrorIfItFails, Un as RpcExportCommunityParamSchema, Ut as getCommunityAddressFromRecord, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcExportCommunityModLogsParamSchema, Vt as normalizeCreatePublicationAuthor, Wn as RpcExportCommunityResultSchema, Wt as getCommunityNameFromWire, X as findCommentInPageInstanceRecursively, Xn as RpcResolveAuthorNameResultSchema, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as RpcPublishedAnchorRecordResultSchema, Yt as getBufferedPKCAddressFromPublicKey, Zn as RpcSubscriptionIdResultSchema, _ as createSigner, _n as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, _t as signComment, an as parseCommentIpfsSchemaWithPKCErrorIfItFails, ar as t$3, at as PublicationClientsManager, bn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, c as LRUCache, cn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, cr as t$2, d as KeyvBetterSqlite3, dt as require_lib$1, et as applyNameResolvedCacheToCrosspost, f as decodeRpcChallengeAnswerPubsubMsg, fn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ft as cleanUpBeforePublishing, gn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeVerificationPubsubMsg, hn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ht as signChallengeRequest, in as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, it as stripNameResolvedFromCrosspost, jt as verifyCommentModeration, kn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, kt as verifyCommentEdit, l as RemoteCommunity, ln as parseCommunityAddressWithPKCErrorIfItFails, lr as t$5, m as decodeRpcChallengeRequestPubsubMsg, mn as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, mr as require_undici, n as RpcRemoteCommunity, nr as t$4, nt as collectCrosspostAuthorsToResolve, o as pkcJsChallenges, or as n$3, ot as PKCClientsManager, p as decodeRpcChallengePubsubMsg, pr as nativeFunctions$2, pt as signChallengeAnswer, qn as RpcPublishAnchorRecordParamSchema, qt as decode, s as TrackedInstanceRegistry, sn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as InflightFetchManager, t as RpcLocalCommunity, tn as parseCidStringSchemaWithPKCErrorIfItFails, tt as cloneCrosspostForRuntime, ut as PKCTypedEmitter, v as createAnchorIpnsRecord$1, vt as signCommentEdit, wn as parseDecryptedChallengeVerification, wt as signVote, x as encryptEd25519AesGcm, xn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as decryptEd25519AesGcm, yt as signCommentModeration, zn as RpcCommunityPageParamSchema, zt as getAuthorNameFromRuntime } from "./rpc-local-community-Bu6Wp-tO.js";
4
- import { o as getHeliaDebugContext } from "./util-BxLdjyTF.js";
2
+ import { $n as n$2, B as isIpfsCid, Bt as pTimeout, Ct as findStartedCommunity, D as deepMergeRuntimeFields, Dt as listUpdatingComments, E as createAbortError, En as CommentUpdateForChallengeVerificationSchema, Et as listStartedCommunities, H as isIpns, Ir as joinValues, It as untrackUpdatingComment, L as hideClassPrivateProps, Lr as parsedType, Nt as trackUpdatingComment, Ot as listUpdatingCommunities, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rr as stringifyPrimitive, Rt as require_sha256, Sr as logger_default, Tr as setErrorMap, Tt as findUpdatingCommunity, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, b as areEquivalentCommunityAddresses, br as PKCError, bt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, ct as removeUndefinedValuesRecursively, dn as PubsubTopicSchema, en as CommunityAnchorSchema, ft as retryKuboIpfsAdd, gt as sleepUntilTimeoutOrAbort, hr as FailedToFetchCommentIpfsFromGatewaysError, ht as shortifyCid, ir as e, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, kt as refreshTrackedCommentAliases, lt as replaceXWithY, mr as require_retry, mt as shortifyAddress, nt as rejectWhenAbortSignalFires, r as ChallengeMessageSchema, rr as t$1, rt as rejectWhenCommunityStopsOrAborts, s as ChallengeVerificationMessageSchema, sr as r, t as ChallengeAnswerMessageSchema, tr as n$1, ut as resolveWhenPredicateIsTrue, vt as throwIfAbortSignalAborted, wt as findUpdatingComment, xn as CommentIpfsSchema, xr as messages, y as version_default, yt as timestamp, z as isAbortError, zt as TimeoutError } from "./schema-bDrzx9EZ.js";
3
+ import { $ as RepliesPages, $n as RpcUnsubscribeParamSchema, An as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, At as verifyCommentIpfs, B as setNativeFunctions$1, Bn as RpcEditCommunityParamSchema, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Ct as signCommunityEdit, D as createKuboRpcClient, Dn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, En as parseJsonWithPKCErrorIfFails, Et as verifyChallengeMessage, Fn as RpcCancelExportParamSchema, Ft as verifyCommunityEdit, Gn as RpcFetchCidParamSchema, Gt as getCommunityPublicKeyFromWire, H as CommentClientsManager, Hn as RpcExportCommunityModLogsResultSchema, Ht as buildRuntimeCommunityFields, I as listCommunitiesSync, In as RpcCidParamSchema, It as verifyVote, Jn as RpcPublishChallengeAnswersParamSchema, Kn as RpcFetchCidResultSchema, Kt as normalizeCommunityInputFromCommunity, L as monitorCommunitiesDirectory, Ln as RpcCommentRepliesPageParamSchema, Lt as buildRuntimeAuthor, Mn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Mt as verifyCommentPubsubMessage, N as getDefaultDataPath, Nn as RpcAnchorPublishPreparationResultSchema, Nt as verifyCommentUpdate, On as parseRpcCommentEventWithPKCErrorIfItFails, Ot as verifyChallengeVerification, Pn as RpcAuthorNameParamSchema, Q as parseRawPages, Qn as RpcSuccessResultSchema, Qt as getPKCAddressFromPublicKeySync, Rn as RpcCommunityIdentifierParamSchema, Rt as cleanWireAuthor, Sn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, Tn as parseDecryptedChallengeWithPKCErrorIfItFails, Un as RpcExportCommunityParamSchema, Ut as getCommunityAddressFromRecord, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcExportCommunityModLogsParamSchema, Vt as normalizeCreatePublicationAuthor, Wn as RpcExportCommunityResultSchema, Wt as getCommunityNameFromWire, X as findCommentInPageInstanceRecursively, Xn as RpcResolveAuthorNameResultSchema, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as RpcPublishedAnchorRecordResultSchema, Yt as getBufferedPKCAddressFromPublicKey, Zn as RpcSubscriptionIdResultSchema, _ as createSigner, _n as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, _t as signComment, an as parseCommentIpfsSchemaWithPKCErrorIfItFails, ar as t$3, at as PublicationClientsManager, bn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, c as LRUCache, cn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, cr as t$2, d as KeyvBetterSqlite3, dt as require_lib$1, et as applyNameResolvedCacheToCrosspost, f as decodeRpcChallengeAnswerPubsubMsg, fn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ft as cleanUpBeforePublishing, gn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeVerificationPubsubMsg, hn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ht as signChallengeRequest, in as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, it as stripNameResolvedFromCrosspost, jt as verifyCommentModeration, kn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, kt as verifyCommentEdit, l as RemoteCommunity, ln as parseCommunityAddressWithPKCErrorIfItFails, lr as t$5, m as decodeRpcChallengeRequestPubsubMsg, mn as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, mr as require_undici, n as RpcRemoteCommunity, nr as t$4, nt as collectCrosspostAuthorsToResolve, o as pkcJsChallenges, or as n$3, ot as PKCClientsManager, p as decodeRpcChallengePubsubMsg, pr as nativeFunctions$2, pt as signChallengeAnswer, qn as RpcPublishAnchorRecordParamSchema, qt as decode, s as TrackedInstanceRegistry, sn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as InflightFetchManager, t as RpcLocalCommunity, tn as parseCidStringSchemaWithPKCErrorIfItFails, tt as cloneCrosspostForRuntime, ut as PKCTypedEmitter, v as createAnchorIpnsRecord$1, vt as signCommentEdit, wn as parseDecryptedChallengeVerification, wt as signVote, x as encryptEd25519AesGcm, xn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as decryptEd25519AesGcm, yt as signCommentModeration, zn as RpcCommunityPageParamSchema, zt as getAuthorNameFromRuntime } from "./rpc-local-community-Dq00OHRf.js";
4
+ import { o as getHeliaDebugContext } from "./util-DuJcVQ7Y.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -6948,7 +6948,7 @@ var PKC$1 = class extends PKCTypedEmitter {
6948
6948
  this.clients.libp2pJsClients = {};
6949
6949
  if (!this.libp2pJsClientsOptions) return;
6950
6950
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
6951
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-CgG0H5g2.js");
6951
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-BKXOmklx.js");
6952
6952
  for (const clientOptions of this.libp2pJsClientsOptions) {
6953
6953
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
6954
6954
  ...clientOptions,
@@ -7227,7 +7227,7 @@ var PKC$1 = class extends PKCTypedEmitter {
7227
7227
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
7228
7228
  log.trace("Received community options to create a local community instance:", options);
7229
7229
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
7230
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-rFE0QOdJ.js");
7230
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-C7tTEYDD.js");
7231
7231
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
7232
7232
  const community = new LocalCommunity(this);
7233
7233
  if (isLocalCommunity) {