Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MultiSig era
- class EraScript era ⇒ ShelleyEraScript era where
- mkRequireSignature ∷ KeyHash 'Witness → NativeScript era
- getRequireSignature ∷ NativeScript era → Maybe (KeyHash 'Witness)
- mkRequireAllOf ∷ StrictSeq (NativeScript era) → NativeScript era
- getRequireAllOf ∷ NativeScript era → Maybe (StrictSeq (NativeScript era))
- mkRequireAnyOf ∷ StrictSeq (NativeScript era) → NativeScript era
- getRequireAnyOf ∷ NativeScript era → Maybe (StrictSeq (NativeScript era))
- mkRequireMOf ∷ Int → StrictSeq (NativeScript era) → NativeScript era
- getRequireMOf ∷ NativeScript era → Maybe (Int, StrictSeq (NativeScript era))
- pattern RequireSignature ∷ ShelleyEraScript era ⇒ KeyHash 'Witness → NativeScript era
- pattern RequireAllOf ∷ ShelleyEraScript era ⇒ StrictSeq (NativeScript era) → NativeScript era
- pattern RequireAnyOf ∷ ShelleyEraScript era ⇒ StrictSeq (NativeScript era) → NativeScript era
- pattern RequireMOf ∷ ShelleyEraScript era ⇒ Int → StrictSeq (NativeScript era) → NativeScript era
- evalMultiSig ∷ (ShelleyEraScript era, NativeScript era ~ MultiSig era) ⇒ Set (KeyHash 'Witness) → NativeScript era → Bool
- validateMultiSig ∷ (ShelleyEraScript era, EraTx era, NativeScript era ~ MultiSig era) ⇒ Tx era → NativeScript era → Bool
- nativeMultiSigTag ∷ ByteString
- eqMultiSigRaw ∷ MultiSig era → MultiSig era → Bool
- data MultiSigRaw era
Documentation
Instances
class EraScript era ⇒ ShelleyEraScript era where Source #
mkRequireSignature ∷ KeyHash 'Witness → NativeScript era Source #
getRequireSignature ∷ NativeScript era → Maybe (KeyHash 'Witness) Source #
mkRequireAllOf ∷ StrictSeq (NativeScript era) → NativeScript era Source #
getRequireAllOf ∷ NativeScript era → Maybe (StrictSeq (NativeScript era)) Source #
mkRequireAnyOf ∷ StrictSeq (NativeScript era) → NativeScript era Source #
getRequireAnyOf ∷ NativeScript era → Maybe (StrictSeq (NativeScript era)) Source #
mkRequireMOf ∷ Int → StrictSeq (NativeScript era) → NativeScript era Source #
getRequireMOf ∷ NativeScript era → Maybe (Int, StrictSeq (NativeScript era)) Source #
Instances
pattern RequireSignature ∷ ShelleyEraScript era ⇒ KeyHash 'Witness → NativeScript era Source #
pattern RequireAllOf ∷ ShelleyEraScript era ⇒ StrictSeq (NativeScript era) → NativeScript era Source #
pattern RequireAnyOf ∷ ShelleyEraScript era ⇒ StrictSeq (NativeScript era) → NativeScript era Source #
pattern RequireMOf ∷ ShelleyEraScript era ⇒ Int → StrictSeq (NativeScript era) → NativeScript era 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.
nativeMultiSigTag ∷ ByteString Source #
Magic number "memorialized" in the ValidateScript class under the method: scriptPrefixTag:: Core.Script era -> Bs.ByteString, for the Shelley Era.
eqMultiSigRaw ∷ MultiSig 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
Orphan instances
EraScript ShelleyEra Source # | |
type Script ShelleyEra = (r ∷ Type) Source # type NativeScript ShelleyEra = (r ∷ Type) Source # |