packages feed

bitcoin-payment-channel 0.4.0.0 → 0.4.0.1

raw patch · 2 files changed

+10/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

bitcoin-payment-channel.cabal view
@@ -1,5 +1,5 @@ name:                 bitcoin-payment-channel-version:              0.4.0.0+version:              0.4.0.1 synopsis:             Library for working with Bitcoin payment channels description:     A Bitcoin payment channel allows secure and instant transfer of bitcoins from one
src/Data/Bitcoin/PaymentChannel.hs view
@@ -8,15 +8,16 @@ Portability : POSIX  In order to set up a payment channel between a sender and a receiver, the two parties must- first agree on three parameters for the channel:+ first agree on four parameters for the channel:      (1) sender public key     (2) receiver public key     (3) channel expiration date+    (4) sender change output "dust limit" (see note [1])   These parameters- are contained in 'ChannelParameters', from which a channel funding- address can be derived using+ are contained in 'ChannelParameters', from which the Bitcoin address used to fund+ the payment channel can be derived using  'getFundingAddress'. The transaction which pays to this address is the channel funding  transaction, and information about it is contained in a 'FundingTxInfo'.  So, the channel funding transaction will contain an output which pays to the address returned by@@ -67,6 +68,11 @@  signing function passed to 'getSettlementBitcoinTx', where @receiverPrivKey@ is the private key from which 'cpReceiverPubKey' is derived. +[1] The minimum amount that the server is willing to accept as the client change value in the+ payment transaction. Set this to 700 and you'll be fine. It's only relevant if the channel is+ emptied of value completely, but it is necessary because the server doesn't want to accept+ payments based on transactions it cannot publish via the Bitcoin P2P network, because they+ contain an output of minuscule value.  __/IMPORTANT:/__ /Channel setup is risk free because the sender can derive a refund Bitcoin transaction/  /using 'getRefundBitcoinTx', which returns the bitcoins used to fund the channel back to the sender./