I think you can query S3 by filename, so just save each event as a separate file with name = pubkey:created_at and done? Or save each event with an id and keep local disk indexes.

Replies (3)

Hmm - I don’t see why not. I think the main challenge is just UX. Probably easiest to let users deposit a balance by pubkey and deduct from it as we receive/store events? Maybe just charge a fixed amount per note/per year of storage. Then you get a recurring invoice for keeping your notes beyond the initial retention period (I’m thinking annually as opposed to monthly). Something like this?