MCPcopy Create free account
hub / github.com/Maksandre/w3wallets / hashFilePath

Function hashFilePath

packages/w3wallets/src/cache/buildCache.ts:83–86  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

81}
82
83export function hashFilePath(filePath: string): string {
84 const hash = crypto.createHash("sha256").update(filePath).digest("hex");
85 return hash.slice(0, 20);
86}
87
88/**
89 * Build cache for a single setup file.

Callers 3

buildCache.test.tsFile · 0.90
buildCacheForSetupFunction · 0.85
buildAllCachesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected