haskoin-core-0.9.0: Bitcoin & Bitcoin Cash library for Haskell

CopyrightNo rights reserved
LicenseUNLICENSE
Maintainermatt@bitnomial.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Network.Haskoin.Transaction.Partial

Description

Code related to PSBT parsing and serialization.

Synopsis

Documentation

data PartiallySignedTransaction Source #

PSBT data type as specified in BIP-174. This contains an unsigned transaction, inputs and outputs, and unspecified extra data. There is one input per input in the unsigned transaction, and one output per output in the unsigned transaction. The inputs and outputs in the PartiallySignedTransaction line up by index with the inputs and outputs in the unsigned transaction.

data Input Source #

Inputs contain all of the data needed to sign a transaction and all of the resulting signature data after signing.

Instances
Eq Input Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

(==) :: Input -> Input -> Bool #

(/=) :: Input -> Input -> Bool #

Show Input Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

showsPrec :: Int -> Input -> ShowS #

show :: Input -> String #

showList :: [Input] -> ShowS #

Serialize Input Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

put :: Putter Input #

get :: Get Input #

data Output Source #

Outputs can contain information needed to spend the output at a later date.

Instances
Eq Output Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

(==) :: Output -> Output -> Bool #

(/=) :: Output -> Output -> Bool #

Show Output Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Serialize Output Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

newtype UnknownMap Source #

A map of raw PSBT keys to byte strings for extra data. The keyType field cannot overlap with any of the reserved keyType fields specified in the PSBT specification.

Constructors

UnknownMap 

data Key Source #

Raw keys for the map type used in PSBTs.

Constructors

Key 

Fields

Instances
Eq Key Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

(==) :: Key -> Key -> Bool #

(/=) :: Key -> Key -> Bool #

Show Key Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

showsPrec :: Int -> Key -> ShowS #

show :: Key -> String #

showList :: [Key] -> ShowS #

Generic Key Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Associated Types

type Rep Key :: Type -> Type #

Methods

from :: Key -> Rep Key x #

to :: Rep Key x -> Key #

Hashable Key Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

hashWithSalt :: Int -> Key -> Int #

hash :: Key -> Int #

Serialize Key Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

Methods

put :: Putter Key #

get :: Get Key #

type Rep Key Source # 
Instance details

Defined in Network.Haskoin.Transaction.Partial

type Rep Key = D1 (MetaData "Key" "Network.Haskoin.Transaction.Partial" "haskoin-core-0.9.0-9luCRjUjDcyCwjYBmjo0zV" False) (C1 (MetaCons "Key" PrefixI True) (S1 (MetaSel (Just "keyType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word8) :*: S1 (MetaSel (Just "key") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)))

complete :: PartiallySignedTransaction -> PartiallySignedTransaction Source #

Take partial signatures from all of the Inputs and finalize the signature.

finalTransaction :: PartiallySignedTransaction -> Tx Source #

Take a finalized PartiallySignedTransaction and produce the signed final transaction. You may need to call complete on the PartiallySignedTransaction before producing the final transaction.

emptyPSBT :: Tx -> PartiallySignedTransaction Source #

Take an unsigned transaction and produce an empty PartiallySignedTransaction