@murai-wallet/storage-drizzle
v1.0.3
Published
Drizzle ORM storage adapter for murai (PostgreSQL)
Downloads
17
Maintainers
Readme
@murai-wallet/storage-drizzle
Drizzle ORM storage adapter for Murai — PostgreSQL with row-level locking.
Install
npm install @murai-wallet/storage-drizzle @murai-wallet/core drizzle-orm postgresUsage
import postgres from 'postgres';
import { drizzle } from 'drizzle-orm/postgres-js';
import { createDrizzleStorage } from '@murai-wallet/storage-drizzle';
const sql = postgres(process.env.DATABASE_URL);
const storage = createDrizzleStorage(drizzle(sql));
// Use with createWallet from @murai-wallet/coreFeatures
- PostgreSQL via
drizzle-orm/postgres-js SELECT FOR UPDATErow-level locking for atomic balance operations- BIGINT storage for precise monetary amounts
- Paginated transaction and checkout queries with filtering
Documentation
Full docs: ebuntario.github.io/murai
