Draft: Streak API
Implement most of what we need for streaks, minus the ability to reset a broken streak with a payment. Streaks can only be forfeited.
Before we can handle payments, we need to finish implementing the Cashu integration.
Creating a kind 1 event through Ditto will start the streak. Then the streak can be continued from any app as long as one kind 1 event passes through our relay each day. If a 24 hour period passes between posts, the streak will be "broken" and cannot be continued until forfeited.
The source
property of GET /api/v1/accounts/verify_credentials
now includes a ditto.streak
object, containing the number of days of the streak and the number of days the streak has been broken, if any:
POST /api/v1/ditto/streak/forfeit
will reset the streak, putting your account into the same state as before you started the streak. A streak will start again upon making a new post.