
Show HN: RESTful Bitcoin payment channel server (written in Haskell) - runeks
GitHub repo: https:&#x2F;&#x2F;github.com&#x2F;runeksvendsen&#x2F;restful-payment-channel-server<p>Hello everyone<p>This server allows the operator to receive instant Bitcoin payments (no waiting for confirmations) from a single, pre-defined sender; paying the Bitcoin transaction fee only once, when the channel is closed.<p>One could imagine, for example, setting up a service which sends video in response to payments, the first minute being free (if you have an open payment channel), and then charging, say 0.1 cent per second thereafter. That&#x27;s trustless pay-per-view. Pretty cool, if you ask me.<p>I&#x27;m at a stage where I&#x27;m interested in getting feedback on this, and having people try it out, to see what I&#x27;ve missed. I&#x27;ve been thinking about this for the past two years or so, and have been working for the past year on code, with most of the code written in the past six months (I&#x27;ve rewritten the server at least five times now).<p>The README in the JavaScript client implementation contains an explanation of what a payment channel is (which is not necessarily a Bitcoin-only concept): https:&#x2F;&#x2F;github.com&#x2F;runeksvendsen&#x2F;paychanjs-client&#x2F;blob&#x2F;master&#x2F;README.md#bitcoin-payment-channel-primer. Conceptually, it simply involves requiring each potential receiver of funds to also sign the transaction (as opposed to just the sender), thus solving the double spend problem at the expense of limiting the potential number of receivers.<p>Side note: if someone is good at JavaScript, I could use help with the client implementation. It works, but it&#x27;s not pretty. I find myself completely lost in JavaScript land, coming from Haskell.
======
rnbrady
Payment channels are cool. REST is cool. This is cool^2.

