License | PublicDomain |
---|---|
Maintainer | runesvend@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
TODO
- data MovableChan
- data ChannelPair = ChannelPair {}
- data PartialPayment
- newMovableChan :: ChannelParameters -> FundingTxInfo -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount)
- getStateForClosing :: MovableChan -> (ReceiverPaymentChannel, BitcoinAmount)
- getStateByInfo :: MovableChan -> BitcoinLockTime -> OutPoint -> Maybe (ReceiverPaymentChannel, BitcoinAmount)
- moveChannel :: MovableChan -> (Hash256 -> Signature) -> Address -> BitcoinAmount -> Maybe (Tx, MovableChan)
- markAsSettled :: MovableChan -> Maybe MovableChan
- recvSinglePayment :: MovableChan -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount)
- oldRecvPay :: ChannelPair -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount)
- newRecvPay :: ChannelPair -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount)
- receiveSecondPayment :: PartialPayment -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount)
- checkChangeValueMatch :: BitcoinAmount -> FullPayment -> Either PayChanError FullPayment
Documentation
data MovableChan Source #
A ReceiverPaymentChannel whose received value can be redeemed while keeping the channel open, by switching between two different OutPoints in the FundingTxInfo.
data PartialPayment Source #
We wrap the state in which only payment 1/2 has been received in a data type, in order to be able to serialize it to disk.
newMovableChan :: ChannelParameters -> FundingTxInfo -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount) Source #
getStateByInfo :: MovableChan -> BitcoinLockTime -> OutPoint -> Maybe (ReceiverPaymentChannel, BitcoinAmount) Source #
:: MovableChan | |
-> (Hash256 -> Signature) | Function which produces a signature which verifies against |
-> Address | Receiver destination address. Funds sent over the channel will be sent to this address, the rest back to the client change address (an argument to |
-> BitcoinAmount | Bitcoin transaction fee |
-> Maybe (Tx, MovableChan) |
recvSinglePayment :: MovableChan -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount) Source #
oldRecvPay :: ChannelPair -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount) Source #
newRecvPay :: ChannelPair -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount) Source #
receiveSecondPayment :: PartialPayment -> FullPayment -> Either PayChanError (BitcoinAmount, MovableChan, BitcoinAmount) Source #
checkChangeValueMatch :: BitcoinAmount -> FullPayment -> Either PayChanError FullPayment Source #
We want to make sure that payment 12 and 22 are of equal value