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

Copyright(c) Rune K. Svendsen 2016
LicensePublicDomain
Maintainerrunesvend@gmail.com
Safe HaskellNone
LanguageHaskell2010

Data.Bitcoin.PaymentChannel.Util

Description

Utility functions for Data.Bitcoin.PaymentChannel.

Synopsis

Documentation

getFundingAddress :: ChannelParameters -> Address Source #

Derive a Bitcoin address, for funding a payment channel, from ChannelParameters. The transaction which pays to this address is the channel funding transaction, and information about this transaction is contained in FundingTxInfo.

setSenderChangeAddress :: PaymentChannel a => a -> Address -> a Source #

Set new value sender change address

parseBitcoinLocktime :: Word32 -> BitcoinLockTime Source #

Convert from Bitcoin format (Word32)

toWord32 :: BitcoinLockTime -> Word32 Source #

Convert to Bitcoin format (uint32 UNIX timestamp)

unsafeUpdateRecvState :: ReceiverPaymentChannelI a -> Payment -> ReceiverPaymentChannelI a Source #

Update internal state without signature verification. Useful for database-type services where a logic layer has already verified the signature, and it just needs to be stored.