bitcoin-payment-channel-0.5.0.1: Library for working with Bitcoin payment channels

Safe HaskellNone
LanguageHaskell2010

Data.Bitcoin.PaymentChannel.Internal.State

Synopsis

Documentation

setClientChangeAddress :: PaymentChannelState -> Address -> PaymentChannelState Source #

Set new client/sender change address. Use this function if the client wishes to change its change address. First set the new change address using this function, then accept the payment which uses this new change address.

channelValueLeft :: PaymentChannelState -> BitcoinAmount Source #

We subtract the specified "dust" limit from the total available value. This avoids creating a Bitcoin transaction that won't circulate in the Bitcoin P2P network.

channelIsExhausted :: PaymentChannelState -> Bool Source #

Returns True if all available channel value has been transferred, False otherwise

newPaymentChannelState :: Config -> ChannelParameters -> FundingTxInfo -> PaymentTxConfig -> PaymentSignature -> PaymentChannelState Source #