@xmtp/redis-persistence
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

redis-persistence

An example of a custom persistence layer that can be used for caching conversations in xmtp-js using Redis.

Usage

import { RedisPersistence } from "@xmtp/redis-persistence"
import { Client } from "@xmtp/xmtp-js"
import { createClient } from "@redis/client"

const redis = createClient({
  url: "redis://localhost:6379",
})
await redis.connect()

const client = await Client.create(someWallet, {
  basePersistence: new RedisPersistence(redis, "xmtp:"),
})

Readme

Keywords

Package Sidebar

Install

npm i @xmtp/redis-persistence

Weekly Downloads

88

Version

0.0.4

License

MIT

Unpacked Size

101 kB

Total Files

12

Last publish

Collaborators

  • fabriguespe
  • nplasterer-xmtp
  • saul-xmtp
  • nick-xmtp
  • xmtp-eng-robot
  • galligan