For anyone using the `applesauce-relay` package. there is a breaking change coming in v3. The `publish` and authentication methods will return a Promise instead of an Observable.

Should make it more intuitive to use for humans and AI since you won't need to wrap everything in `lastValueFrom`

https://cdn.hzrd149.com/25be0f7b2684dd44690c941f0a00008fab130fe2db2d867537fc7fc3cadb1fdc.webp

https://github.com/hzrd149/applesauce/pull/24

Reply to this note

Please Login to reply.

Discussion

Also as a bonus there are some NIP-61 nutzap tools coming in V3. not enough to build a wallet but it should help apps get started

Good to know. Still trying to understand the model/loader patterns and how to best cache data between react components.

The react documentation is lacking, but generally you want to use the model for everything since they act like react-query and deduplicate subscription.

The loaders are confusing, but they are used to request new events from relays. integrating them into the models is a pain right now because I haven't found a way to make them plug together cleanly without turning applesauce into a monolith / black box

The cleanest way I've found so far is to create a custom `ProfileQuery` model that will request the event from the default relays if its not present in the event store

https://github.com/hzrd149/applesauce/blob/master/packages/examples/src/examples/nutzap/zap-profile.tsx#L56-L71