4 ms·
I am amazed that after so many years of smart contracts existing, something like an API micropayment standard doesn't exist yet. The root of the API service, e
by 7373737373 4y ago
I am amazed that after so many years of smart contracts existing, something like an API micropayment standard doesn't exist yet.
The root of the API service, example.com/api/ could GET a "service descriptor file", which describes all endpoints of the API, and the crypto address of the API provider. The first time you use such an API using a client which would handle all the payment stuff in the background, it would open a payment channel by depositing some amount in a smart contract with a standardized interface, and each subsequent HTTP GET to the chosen endpoint(s) would be supplied with a payment channel signature in its header (something like "X-Signature"), incrementally signing off on more transfers offchain.
The key to this would be to
(1) create a well-accepted payment channel contract
(2) create server and client side middleware that handles all this automatically
On the server side, something like https://www.hug.rest https://www.hug.rest would be an ideal starting point, it automatically generates documentation in JSON format at the API root
- xani_ 4y agoI'm absolutely not, because that is not in interest of any of the payment provider to make it easier for the user to change for competing, cheaper payment provider >The first time you use such an API using a client which would handle all the payment stuff in the background, it would open a payment channel by depositing some amount in a smart contract with a standardized interface, a and crypto is terrible way to deal with normal money transactions on every level
- 7373737373 4y agoDisagreed, in some instances this could be the easiest way of getting an API monetized. No messing around with a third party service. Clients wouldn't need to register anywhere. Considering the many new machine learning APIs, now might be a good time for this. Crypto does have its problems, irreversible transactions can be a big problem. But with microtransactions, it might not matter that much.
- AndrewStephens 4y agoSimilar things have been proposed. Quite apart from crypto being useless for this, the problem with micropayments is that they have all the problems with traditional payments (fraud, chargebacks, money laundering) without the benefit of being able to make much money of transaction fees. So nobody wants to provide the service and I don't blame them.
- 7373737373 4y ago> nobody wants to provide the service I could imagine many more machine learning APIs popping up if it is created. Monetizing an API currently requires various third parties > ~nobody wants to create something like this Yes, because it would be a common good, for which there is no financial incentive for its potential creator - even if it would be a net positive for all once it is created