Why Nostr? What is Njump?
2025-05-16 18:14:05

hzrd149 on Nostr: The new event loaders in applesauce are going to work and they are much more ...

The new event loaders in applesauce are going to work and they are much more customizable than what I had before 😁

As an example, here is the existing replaceable loader (used to load profiles) in applesauce
https://github.com/hzrd149/applesauce/blob/v2/packages/loaders/src/loaders/replaceable-loader.ts
Its kind of an unreadable mess, you cant tell whats going on and you definitively cant really customize it

And here is what the new address loader looks like under the hood


It takes the exact same options as the old replaceable loader but now its composed of a bunch of methods. so If an app wanted to customize or build its own loader it only needs to copy ~20 lines of code and add some custom methods
Got completely distracted the past two days but I think it will be worth it. I'm about half way through designing a modular event loading system for applesauce.

This would allow and app to pull in parts and customize how their app loads profiles. for example you could load from 2 event caches, a local relay, and then finally make connections out to public relays to look for the profiles
Still very much a WIP though, so not sure how will it will actually work
Author Public Key
npub1ye5ptcxfyyxl5vjvdjar2ua3f0hynkjzpx552mu5snj3qmx5pzjscpknpr