Author

Topic: Bitcoin nanopayments library in Node (Read 1511 times)

newbie
Activity: 7
Merit: 0
August 21, 2013, 08:16:10 PM
#6
Thanks Mike! Jevon and Casascius pretty much came up with the protocol, I just implemented it. I'll take credit for that though! Wink
legendary
Activity: 1526
Merit: 1134
August 21, 2013, 12:29:02 PM
#5
Very interesting work and neat protocol, congrats.
newbie
Activity: 7
Merit: 0
August 20, 2013, 11:39:28 PM
#4
Hi Jeff, thanks for taking a look!  I will definitely switch to use those libraries; they look much better than the current solution that I have shitpatched together.
legendary
Activity: 1232
Merit: 1094
August 19, 2013, 11:40:45 AM
#3
It's still very much alpha-stage, but it should be usable if anyone wants to start developing applications that make use of nanopayments.  I would love any feedback on documentation clarity, bugs, feature requests, or anything else about it!  So, yeah... have at it!  Cheesy

According to the thread, the same functionality can be achieved using the micro-payment channels system?

Apparently not, that refers to the OP's version.

So,

Bob creates a transaction that pays 0.01 BTC from himself to which has a hash of H.

Bob says to Alice "Create a transaction which pays 1 BTC to me and is paid from output 0" and also signs it with "anyone can pay".   can be any in the range from S to S + N, when S = H - rand(N).

With "anyone can pay", Alice can add extra inputs without invalidating Bob's signature, but she can't change the output (sending the money to Bob).

Alice sends the transaction to Bob.

If matches, then Bob can submit both his transactions to the network.

The risk is that Alice will submit a transaction spending the input at the same time she sends the transaction to Bob.  However, she doesn't know which of the 1000 transactions is the valid one.

Cost to double spend: f (since you have to pay the BTC fee to add the transaction in the block-chain)
Benefit of double spend: V / N (since that is the expected loss of not double spending)

As long as f > V / N, then it isn't worth double spending.  The means that N has to increase as the value goes up.  Ironically, the transaction fee makes this service useful and also adds to its security.

That's pretty cool.
legendary
Activity: 1596
Merit: 1100
August 19, 2013, 07:23:37 AM
#2
FYI,
https://github.com/gasteve/node-base58
https://github.com/gasteve/node-libcoin

Should be no need to create/duplicate base58 or bitcoin code, in node.js applications.

newbie
Activity: 7
Merit: 0
August 17, 2013, 10:46:48 PM
#1
I'm working on a probabilistic nanopayments library in Node: https://github.com/hi-entropy/bitcoin-nanopayment

It's an implementation of jevon's idea from this thread: https://bitcointalksearch.org/topic/sustainable-nanopayment-idea-probabilistic-payments-62558

It's still very much alpha-stage, but it should be usable if anyone wants to start developing applications that make use of nanopayments.  I would love any feedback on documentation clarity, bugs, feature requests, or anything else about it!  So, yeah... have at it!  Cheesy
Jump to: