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

Cardano.Ledger.Shelley.Scripts

Synopsis

Documentation

data MultiSig era Source #

Instances

Instances details
Memoized MultiSig Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Associated Types

type RawType MultiSig = (r ∷ TypeType) Source #

Generic (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Associated Types

type Rep (MultiSig era) ∷ TypeType Source #

Methods

fromMultiSig era → Rep (MultiSig era) x Source #

toRep (MultiSig era) x → MultiSig era Source #

Show (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

showsPrecIntMultiSig era → ShowS Source #

showMultiSig era → String Source #

showList ∷ [MultiSig era] → ShowS Source #

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 (Annotator (MultiSig era)) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

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 #

NFData (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

rnfMultiSig era → () Source #

Eq (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

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

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

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

Defined in Cardano.Ledger.Shelley.Scripts

type RawType MultiSig 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.16.0.0-inplace" 'True) (C1 ('MetaCons "MultiSigConstr" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (MemoBytes 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.

Instances

Instances details
Generic (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Associated Types

type Rep (MultiSigRaw era) ∷ TypeType Source #

Methods

fromMultiSigRaw era → Rep (MultiSigRaw era) x Source #

toRep (MultiSigRaw era) x → MultiSigRaw era Source #

Show (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Era era ⇒ DecCBOR (Annotator (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 → () Source #

Eq (MultiSigRaw era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

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

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

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.16.0.0-inplace" 'False) ((C1 ('MetaCons "RequireSignature'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'Witness))) :+: C1 ('MetaCons "RequireAllOf'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (MultiSig era))))) :+: (C1 ('MetaCons "RequireAnyOf'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (MultiSig era)))) :+: C1 ('MetaCons "RequireMOf'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictSeq (MultiSig era))))))

Orphan instances