MCPcopy Create free account
hub / github.com/Noumena-Network/code / read

Function read

src/utils/secureStorage/plainTextStorage.ts:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49export const plainTextStorage = {
50 name: 'plaintext',
51 read(): SecureStorageData | null {
52 // sync IO: called from sync context (SecureStorage interface)
53 for (const storagePath of getPlainTextStorageReadPaths()) {
54 try {
55 const data = getFsImplementation().readFileSync(storagePath, {
56 encoding: 'utf8',
57 })
58 return jsonParse(data)
59 } catch {
60 continue
61 }
62 }
63 return null
64 },
65 async readAsync(): Promise<SecureStorageData | null> {
66 for (const storagePath of getPlainTextStorageReadPaths()) {
67 try {

Callers

nothing calls this directly

Calls 3

getFsImplementationFunction · 0.85
jsonParseFunction · 0.85

Tested by

no test coverage detected