createNEARMemoryStorage()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / createNEARMemoryStorage
Function: createNEARMemoryStorage()
Section titled “Function: createNEARMemoryStorage()”createNEARMemoryStorage():
NEARViewingKeyStorage
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:18831
Simple in-memory viewing key storage
Useful for testing and temporary storage. For production use, implement a persistent storage provider.
Returns
Section titled “Returns”Example
Section titled “Example”const storage = createNEARMemoryStorage()
// Store a keyawait storage.save(viewingKey)
// List all keysconst keys = await storage.list()
// Load a specific keyconst key = await storage.load(hash)