plutus-ledger-api-1.60.0.0: Interface to the Plutus ledger for the Cardano ledger.
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusLedgerApi.V1.Data.Credential

Description

Address and staking address credentials for outputs.

Synopsis

Documentation

data StakingCredential #

Staking credential used to assign rewards.

The staking hash constructor is the Credential required to unlock a transaction output. Either a public key credential (PubKeyHash) or a script credential (ScriptHash). Both are hashed with BLAKE2b-244. 28 byte.

The StakingPtr constructor is the certificate pointer, constructed by the given slot number, transaction and certificate indices. NB: The fields should really be all Word64, as they are implemented in Word64, but RepIsStuckError StakingCredential :: Type -> Type) (Rep StakingCredential)))

pattern StakingHash :: Credential -> StakingCredential #

pattern StakingPtr :: Integer -> Integer -> Integer -> StakingCredential #

data Credential #

Credentials required to unlock a transaction output.

The PubKeyCredential constructor represents the transaction that spends this output and must be signed by the private key. See PubKeyHash.

The ScriptCredential constructor represents the transaction that spends this output must include the validator script and be accepted by the validator. See ScriptHash.

Instances

Instances details
RepIsStuckError Credential :: Type -> Type) (Rep Credential)))

pattern PubKeyCredential :: PubKeyHash -> Credential #

pattern ScriptCredential :: ScriptHash -> Credential #

matchCredential :: forall r. Credential -> (PubKeyHash -> r) -> (ScriptHash -> r) -> r #

matchStakingCredential :: forall r. StakingCredential -> (Credential -> r) -> (Integer -> Integer -> Integer -> r) -> r #