haskoin-core-1.0.4: Bitcoin & Bitcoin Cash library for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Haskoin.Util.Marshal

Documentation

class Marshal s a | a -> s where Source #

Methods

marshalPut :: MonadPut m => s -> a -> m () Source #

marshalGet :: MonadGet m => s -> m a Source #

Instances

Instances details
Marshal Network XPrvKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Extended

Methods

marshalPut :: MonadPut m => Network -> XPrvKey -> m () Source #

marshalGet :: MonadGet m => Network -> m XPrvKey Source #

Marshal Ctx PublicKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Common

Methods

marshalPut :: MonadPut m => Ctx -> PublicKey -> m () Source #

marshalGet :: MonadGet m => Ctx -> m PublicKey Source #

Marshal Ctx ScriptOutput Source # 
Instance details

Defined in Haskoin.Script.Standard

Methods

marshalPut :: MonadPut m => Ctx -> ScriptOutput -> m () Source #

marshalGet :: MonadGet m => Ctx -> m ScriptOutput Source #

Marshal Ctx XOnlyPubKey Source # 
Instance details

Defined in Haskoin.Transaction.Taproot

Methods

marshalPut :: MonadPut m => Ctx -> XOnlyPubKey -> m () Source #

marshalGet :: MonadGet m => Ctx -> m XOnlyPubKey Source #

Marshal Ctx Sig Source # 
Instance details

Defined in Haskoin.Crypto.Signature

Methods

marshalPut :: MonadPut m => Ctx -> Sig -> m () Source #

marshalGet :: MonadGet m => Ctx -> m Sig Source #

Marshal (Network, Ctx) XPubKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Extended

Methods

marshalPut :: MonadPut m => (Network, Ctx) -> XPubKey -> m () Source #

marshalGet :: MonadGet m => (Network, Ctx) -> m XPubKey Source #

Marshal (Network, Ctx) TxSignature Source # 
Instance details

Defined in Haskoin.Script.SigHash

Methods

marshalPut :: MonadPut m => (Network, Ctx) -> TxSignature -> m () Source #

marshalGet :: MonadGet m => (Network, Ctx) -> m TxSignature Source #

Marshal (Network, Ctx) ScriptInput Source # 
Instance details

Defined in Haskoin.Script.Standard

Methods

marshalPut :: MonadPut m => (Network, Ctx) -> ScriptInput -> m () Source #

marshalGet :: MonadGet m => (Network, Ctx) -> m ScriptInput Source #

marshal :: Marshal s a => s -> a -> ByteString Source #

marshalLazy :: Marshal s a => s -> a -> ByteString Source #

class MarshalJSON s a | a -> s where Source #

Minimal complete definition

marshalValue, unmarshalValue

Methods

marshalValue :: s -> a -> Value Source #

marshalEncoding :: s -> a -> Encoding Source #

unmarshalValue :: s -> Value -> Parser a Source #

Instances

Instances details
MarshalJSON Network Address Source # 
Instance details

Defined in Haskoin.Address

Methods

marshalValue :: Network -> Address -> Value Source #

marshalEncoding :: Network -> Address -> Encoding Source #

unmarshalValue :: Network -> Value -> Parser Address Source #

MarshalJSON Network PrivateKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Common

MarshalJSON Network XPrvKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Extended

Methods

marshalValue :: Network -> XPrvKey -> Value Source #

marshalEncoding :: Network -> XPrvKey -> Encoding Source #

unmarshalValue :: Network -> Value -> Parser XPrvKey Source #

MarshalJSON Ctx PublicKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Common

Methods

marshalValue :: Ctx -> PublicKey -> Value Source #

marshalEncoding :: Ctx -> PublicKey -> Encoding Source #

unmarshalValue :: Ctx -> Value -> Parser PublicKey Source #

MarshalJSON Ctx ScriptOutput Source # 
Instance details

Defined in Haskoin.Script.Standard

Methods

marshalValue :: Ctx -> ScriptOutput -> Value Source #

marshalEncoding :: Ctx -> ScriptOutput -> Encoding Source #

unmarshalValue :: Ctx -> Value -> Parser ScriptOutput Source #

MarshalJSON Ctx SigInput Source # 
Instance details

Defined in Haskoin.Transaction.Builder.Sign

Methods

marshalValue :: Ctx -> SigInput -> Value Source #

marshalEncoding :: Ctx -> SigInput -> Encoding Source #

unmarshalValue :: Ctx -> Value -> Parser SigInput Source #

MarshalJSON Ctx XOnlyPubKey Source # 
Instance details

Defined in Haskoin.Transaction.Taproot

Methods

marshalValue :: Ctx -> XOnlyPubKey -> Value Source #

marshalEncoding :: Ctx -> XOnlyPubKey -> Encoding Source #

unmarshalValue :: Ctx -> Value -> Parser XOnlyPubKey Source #

MarshalJSON Ctx Sig Source # 
Instance details

Defined in Haskoin.Crypto.Signature

Methods

marshalValue :: Ctx -> Sig -> Value Source #

marshalEncoding :: Ctx -> Sig -> Encoding Source #

unmarshalValue :: Ctx -> Value -> Parser Sig Source #

MarshalJSON (Network, Ctx) XPubKey Source # 
Instance details

Defined in Haskoin.Crypto.Keys.Extended

Methods

marshalValue :: (Network, Ctx) -> XPubKey -> Value Source #

marshalEncoding :: (Network, Ctx) -> XPubKey -> Encoding Source #

unmarshalValue :: (Network, Ctx) -> Value -> Parser XPubKey Source #

MarshalJSON (Network, Ctx) TxSignature Source # 
Instance details

Defined in Haskoin.Script.SigHash

Methods

marshalValue :: (Network, Ctx) -> TxSignature -> Value Source #

marshalEncoding :: (Network, Ctx) -> TxSignature -> Encoding Source #

unmarshalValue :: (Network, Ctx) -> Value -> Parser TxSignature Source #