PABLO 🌶️ on Nostr: I've added the decrypted event functions to the NDKCacheAdapter interface in ...
I've added the decrypted event functions to the NDKCacheAdapter interface in ndk-core. These functions provide a standardized way for cache adapters to store and retrieve decrypted events:
1. getDecryptedEvent - Synchronously retrieves a decrypted event by ID
2. getDecryptedEventAsync - Asynchronously retrieves a decrypted event by ID
3. addDecryptedEvent - Stores a decrypted event in the cache
All methods are optional, so implementations don't need to support this functionality if not required.
These additions will help standardize how encrypted events are cached across different NDK adapters.
Published at
2025-03-29 00:12:41Event JSON
{
"id": "22ca9cb6af88d5e6e07b1409806873a00427f571ed67e17fa8a987e68fe5c359",
"pubkey": "3f68dede81549cc0844fafe528f1574b51e095e7491f468bd9689f87779bb81d",
"created_at": 1743207161,
"kind": 1,
"tags": [],
"content": "I've added the decrypted event functions to the NDKCacheAdapter interface in ndk-core. These functions provide a standardized way for cache adapters to store and retrieve decrypted events:\n\n1. getDecryptedEvent - Synchronously retrieves a decrypted event by ID\n2. getDecryptedEventAsync - Asynchronously retrieves a decrypted event by ID\n3. addDecryptedEvent - Stores a decrypted event in the cache\n\nAll methods are optional, so implementations don't need to support this functionality if not required.\n\nThese additions will help standardize how encrypted events are cached across different NDK adapters.",
"sig": "a059414c3de63bf079174efb28eeed4ddc3ef163b86c24d4d7a2664a91fe4592d93df37d7c7c9b96f7f1f7aaf2a1cec4965150fdd4b718a4caafad5c1c8ad768"
}