cardano-ledger-shelley-1.15.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 #

HashAlgorithm (HASH (EraCrypto era)) ⇒ 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 #

EqRaw (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

Methods

eqRawMultiSig era → MultiSig era → Bool Source #

SafeToHash (MultiSig era) Source # 
Instance details

Defined in Cardano.Ledger.Shelley.Scripts

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.15.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 (EraCrypto era)) → 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.

newtype ScriptHash c Source #

Instances

Instances details
Crypto c ⇒ FromJSON (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c ⇒ FromJSONKey (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c ⇒ ToJSON (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c ⇒ ToJSONKey (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Generic (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Associated Types

type Rep (ScriptHash c) ∷ TypeType Source #

Methods

fromScriptHash c → Rep (ScriptHash c) x Source #

toRep (ScriptHash c) x → ScriptHash c Source #

Show (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c ⇒ FromCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c ⇒ ToCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

toCBORScriptHash c → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (ScriptHash c) → Size Source #

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

Crypto c ⇒ DecCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Crypto c ⇒ EncCBOR (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

encCBORScriptHash c → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (ScriptHash c) → Size Source #

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

NFData (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

rnfScriptHash c → () Source #

Eq (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

Methods

(==)ScriptHash c → ScriptHash c → Bool Source #

(/=)ScriptHash c → ScriptHash c → Bool Source #

Ord (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

NoThunks (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

type Rep (ScriptHash c) 
Instance details

Defined in Cardano.Ledger.Hashes

type Rep (ScriptHash c) = D1 ('MetaData "ScriptHash" "Cardano.Ledger.Hashes" "cardano-ledger-core-1.16.0.0-inplace" 'True) (C1 ('MetaCons "ScriptHash" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash (ADDRHASH c) EraIndependentScript))))

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 #

HashAlgorithm (HASH (EraCrypto era)) ⇒ 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.15.0.0-inplace" 'False) ((C1 ('MetaCons "RequireSignature'" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'Witness (EraCrypto era)))) :+: 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