We don't have anything written down at the moment. I guess it depends on what you do need done.. a Nostr Client, Nostr relay, database, etc. There is probably too many things going on in that lib :)

If it is just a client, take a look on how Amethyst and Amber set up the Nostr Client class. You want to have just one NostrCliend and control it by opening and closing subscriptions.

On Amethyst, we create it in the Application class:

```kt

// Provides a relay pool

val client: NostrClient = NostrClient(websocketBuilder, applicationIOScope)

// Watches for changes on Tor and Connectivity and reconnects the client

val relayProxyClientConnector = RelayProxyClientConnector(torProxySettingsAnchor, okHttpClients, connManager, client, applicationIOScope)

// Verifies and inserts in the cache from all relays, all subscriptions

val cacheClientConnector = CacheClientConnector(client, cache)

// Show messages from the Relay and controls their dismissal

val notifyCoordinator = NotifyCoordinator(client)

// Authenticates with relays.

val authCoordinator = AuthCoordinator(client, applicationIOScope)

val logger = if (isDebug) RelaySpeedLogger(client) else null

// Coordinates all subscriptions for the Nostr Client

val sources: RelaySubscriptionsCoordinator = RelaySubscriptionsCoordinator(LocalCache, client, applicationIOScope)

```

Reply to this note

Please Login to reply.

Discussion

Its not a full client, but needs to be able to observe events for filtered events and be able to send events. Oh and DMs. Your additional explanation helps. I’ve looked into Amber, but will checkout Amethyst as well. Thanks!

Will do a write up soon.

Up: https://github.com/vitorpamplona/amethyst?tab=readme-ov-file#using-the-quartz-library

Feel free to suggest improvements to the quartz lib. Amethyst does too much, so I usually need to clean things up before moving there.