cardano-ledger-shelley-1.17.0.0: Shelley Ledger Executable Model
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Ledger.Shelley.Scripts

Synopsis

Documentation

newtype MultiSig era Source #

Constructors

MkMultiSig (MemoBytes (MultiSigRaw era)) 

Instances

Instances details
Generic (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Associated Types

type Rep (MultiSig era) ∷ TypeType #

Methods

fromMultiSig era → Rep (MultiSig era) x #

toRep (MultiSig era) x → MultiSig era #

Show (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

showsPrecIntMultiSig era → ShowS #

showMultiSig era → String #

showList ∷ [MultiSig era] → ShowS #

Typeable era ⇒ ToCBOR (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

toCBORMultiSig era → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (MultiSig era) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [MultiSig era] → Size Source #

Era era ⇒ DecCBOR (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

decCBORDecoder s (MultiSig era) Source #

dropCBORProxy (MultiSig era) → Decoder s () Source #

labelProxy (MultiSig era) → Text Source #

Era era ⇒ EncCBOR (MultiSig era) Source #

Encodes memoized bytes created upon construction.

Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

encCBORMultiSig era → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (MultiSig era) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [MultiSig era] → Size Source #

SafeToHash (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

EqRaw (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

eqRawMultiSig era → MultiSig era → Bool Source #

Memoized (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Associated Types

type RawType (MultiSig era) = (r ∷ Type) Source #

NFData (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

rnfMultiSig era → () #

Eq (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

(==)MultiSig era → MultiSig era → Bool #

(/=)MultiSig era → MultiSig era → Bool #

Typeable era ⇒ NoThunks (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

type Rep (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

type Rep (MultiSig era) = D1 ('MetaData "MultiSig" "Cardano.Ledger.Shelley.Scripts" "cardano-ledger-shelley-1.17.0.0-inplace" 'True) (C1 ('MetaCons "MkMultiSig" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes (MultiSigRaw era)))))
type RawType (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

type RawType (MultiSig era) = MultiSigRaw era

class EraScript era ⇒ ShelleyEraScript era where Source #

evalMultiSig ∷ (ShelleyEraScript era, NativeScript era ~ MultiSig era) ⇒ Set (KeyHash 'Witness) → NativeScript era → Bool Source #

Script evaluator for native multi-signature scheme. vhks is the set of key hashes that signed the transaction to be validated.

validateMultiSig ∷ (ShelleyEraScript era, EraTx era, NativeScript era ~ MultiSig era) ⇒ Tx era → NativeScript era → Bool Source #

Script validator for native multi-signature scheme.

nativeMultiSigTagByteString Source #

Magic number "memorialized" in the ValidateScript class under the method: scriptPrefixTag:: Core.Script era -> Bs.ByteString, for the Shelley Era.

eqMultiSigRawMultiSig era → MultiSig era → Bool Source #

Check the equality of two underlying types, while ignoring their binary representation, which Eq instance normally does. This is used for testing.

data MultiSigRaw era Source #

A simple language for expressing conditions under which it is valid to withdraw from a normal UTxO payment address or to use a stake address.

The use case is for expressing multi-signature payment addresses and multi-signature stake addresses. These can be combined arbitrarily using logical operations:

  • multi-way "and";
  • multi-way "or";
  • multi-way "N of M".

This makes it easy to express multi-signature addresses, and provides an extension point to express other validity conditions, e.g., as needed for locking funds used with lightning.

Constructors

MultiSigSignature !(KeyHash 'Witness)

Require the redeeming transaction be witnessed by the spending key corresponding to the given verification key hash.

MultiSigAllOf !(StrictSeq (MultiSig era))

Require all the sub-terms to be satisfied.

MultiSigAnyOf !(StrictSeq (MultiSig era))

Require any one of the sub-terms to be satisfied.

MultiSigMOf !Int !(StrictSeq (MultiSig era))

Require M of the given sub-terms to be satisfied.

Instances

Instances details
Generic (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Associated Types

type Rep (MultiSigRaw era) ∷ TypeType #

Methods

fromMultiSigRaw era → Rep (MultiSigRaw era) x #

toRep (MultiSigRaw era) x → MultiSigRaw era #

Show (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

showsPrecIntMultiSigRaw era → ShowS #

showMultiSigRaw era → String #

showList ∷ [MultiSigRaw era] → ShowS #

Era era ⇒ DecCBOR (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

NFData (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

rnfMultiSigRaw era → () #

Eq (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

(==)MultiSigRaw era → MultiSigRaw era → Bool #

(/=)MultiSigRaw era → MultiSigRaw era → Bool #

Typeable era ⇒ NoThunks (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

type Rep (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

type Rep (MultiSigRaw era) = D1 ('MetaData "MultiSigRaw" "Cardano.Ledger.Shelley.Scripts" "cardano-ledger-shelley-1.17.0.0-inplace" 'False) ((C1 ('MetaCons "MultiSigSignature" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'Witness))) :+: C1 ('MetaCons "MultiSigAllOf" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (MultiSig era))))) :+: (C1 ('MetaCons "MultiSigAnyOf" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (MultiSig era)))) :+: C1 ('MetaCons "MultiSigMOf" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (MultiSig era))))))

Orphan instances