| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
PlutusLedgerApi.V1.Data.Credential
Description
Address and staking address credentials for outputs.
Synopsis
- data StakingCredential
- pattern StakingHash :: Credential -> StakingCredential
- pattern StakingPtr :: Integer -> Integer -> Integer -> StakingCredential
- data 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
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
| 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 #