MCPcopy Create free account
hub / github.com/Eversmile12/sharedcontext / checkRemoteVersion

Function checkRemoteVersion

src/core/sync.ts:432–441  ·  view source on GitHub ↗
(
  walletAddress: string
)

Source from the content-addressed store, hash-verified

430 * Returns the remote version, or null if no shards exist.
431 */
432export async function checkRemoteVersion(
433 walletAddress: string
434): Promise<number | null> {
435 const shards = await queryShards(walletAddress);
436 const dataShards = shards.filter(
437 (s) => s.type === "delta" || s.type === "snapshot"
438 );
439 if (dataShards.length === 0) return null;
440 return Math.max(...dataShards.map((s) => s.version));
441}

Callers

nothing calls this directly

Calls 1

queryShardsFunction · 0.85

Tested by

no test coverage detected