machinomy / machinomy

Node.js library for micropayments in Ether and ERC20 tokens over HTTP

Home Page:http://machinomy.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Track user balance instead of tying payment tokens to individual requests?

emschwartz opened this issue · comments

The receiver currently generates tokens from individual payments, which the sender then attaches to individual HTTP requests for content. This means that the sender must make a full additional HTTP request to make the payment for each request they actually want to make.

A slightly more flexible way to set this up would be to generate a longer-lived token to identify a user. The user would send the same token with every request and could send a payment to cover one or more requests. The receiver would track an overall balance for the user and increase it when they send a new payment channel update it and decrease it for every request for content.

What do you think?