interledger / web-monetization-projects

Coil projects that use Web Monetization. Primarily Coil's browser extension and related WM polyfills.
web-monetization-projects-coilhq.vercel.app
Apache License 2.0
81 stars 17 forks source link

Re-use STREAM connection across multiple BTP connections #1459

Open sharafian opened 3 years ago

sharafian commented 3 years ago

From conversation with @sentientwaffle @kincaidoneil @sabinebertram

When the token we're authenticating BTP with is exhausted we currently re-establish the payment stream completely. We redo the SPSP query, make a new stream, and make a new BTP connection. By adding some custom plugin logic we could save on the extra SPSP and STREAM round trips by just re-establishing BTP and sending a connection new address frame.

We need to think about the privacy implications before doing this. It wouldn't correlate payments across multiple sites, but it may expose the length of a session on a single site.

sublimator commented 3 years ago

re-establish the payment stream

Would it make more sense to create a simple POST endpoint that takes a paymentPointer or SPSP response, that can be used for the now more sporadic and generally post-paid payments? It would use privacy pass token[s] for authentication and could also support (private) tips ?

edit: supporting larger sized anon payments to support tipping would have KYC/AML complications