🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@nostr-dev-kit/ndk-cache-dexie

Package Overview
Dependencies
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nostr-dev-kit/ndk-cache-dexie

NDK Dexie Cache Adapter

latest
npmnpm
Version
2.6.44
Version published
Weekly downloads
965
-52.16%
Maintainers
2
Weekly downloads
 
Created
Source

ndk-cache-dexie

NDK cache adapter for Dexie. Dexie is a wrapper around IndexedDB, an in-browser database.

Usage

NDK will attempt to use the Dexie adapter to store users, events, and tags. The default behaviour is to always check the cache first and then hit relays, replacing older cached events as needed.

Install

pnpm add @nostr-dev-kit/ndk-cache-dexie

Add as a cache adapter

import NDKCacheAdapterDexie from "@nostr-dev-kit/ndk-cache-dexie";

const dexieAdapter = new NDKCacheAdapterDexie({ dbName: 'your-db-name' });
const ndk = new NDK({cacheAdapter: dexieAdapter, ...other config options});

🚨 Because Dexie only exists client-side, this cache adapter will not work in pure node.js environments. You'll need to make sure that you're using the right cache adapter in the right place (e.g. Redis on the backend, Dexie on the frontend).

License

MIT

Keywords

nostr

FAQs

Package last updated on 04 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts