| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cooked.MockChain.GenerateTx.Witness
Description
This module exposes the generation of witnesses and reward account
Synopsis
- toRewardAccount :: MonadBlockChainBalancing m => Credential -> m RewardAccount
- toCardanoCredential :: (MonadBlockChainBalancing m, SerialiseAsRawBytes (Hash key)) => AsType key -> (Hash key -> KeyHash kr) -> Credential -> m (Credential kr)
- toScriptWitness :: (MonadBlockChainBalancing m, ToVScript a) => a -> TxSkelRedeemer -> ScriptDatum b -> m (ScriptWitness b ConwayEra)
- toKeyWitness :: TxBody ConwayEra -> TxSkelSignatory -> Maybe (KeyWitness ConwayEra)
- toStakeCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'Staking)
- deserialiseFromBuiltinByteString :: (MonadBlockChainBalancing m, SerialiseAsRawBytes a) => AsType a -> BuiltinByteString -> m a
- toScriptHash :: MonadBlockChainBalancing m => ScriptHash -> m ScriptHash
- toKeyHash :: (MonadBlockChainBalancing m, SerialiseAsRawBytes (Hash key)) => AsType key -> (Hash key -> KeyHash kr) -> PubKeyHash -> m (KeyHash kr)
- toDRepCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'DRepRole)
- toStakePoolKeyHash :: MonadBlockChainBalancing m => PubKeyHash -> m (KeyHash 'StakePool)
- toColdCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'ColdCommitteeRole)
- toHotCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'HotCommitteeRole)
- toVRFVerKeyHash :: MonadBlockChainBalancing m => PubKeyHash -> m (VRFVerKeyHash a)
Documentation
toRewardAccount :: MonadBlockChainBalancing m => Credential -> m RewardAccount Source #
Translates a given credential to a reward account.
toCardanoCredential :: (MonadBlockChainBalancing m, SerialiseAsRawBytes (Hash key)) => AsType key -> (Hash key -> KeyHash kr) -> Credential -> m (Credential kr) Source #
Converts an Credential to a Cardano Credential of the expected kind
toScriptWitness :: (MonadBlockChainBalancing m, ToVScript a) => a -> TxSkelRedeemer -> ScriptDatum b -> m (ScriptWitness b ConwayEra) Source #
Translates a script with its associated redeemer and datum to a script
witness. Note on the usage of zeroExecutionUnits: at this stage of
the transaction create, we cannot know the execution units used by the
script. They will be filled out later on once the full body has been
generated. So, for now, we temporarily leave them to 0.
toKeyWitness :: TxBody ConwayEra -> TxSkelSignatory -> Maybe (KeyWitness ConwayEra) Source #
Generates a key witnesses for a given signatory and body, when the signatory contains a private key.
toStakeCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'Staking) Source #
Translates a credential into a Cardano stake credential
deserialiseFromBuiltinByteString :: (MonadBlockChainBalancing m, SerialiseAsRawBytes a) => AsType a -> BuiltinByteString -> m a Source #
Converts an PubKeyHash to any kind of key
toScriptHash :: MonadBlockChainBalancing m => ScriptHash -> m ScriptHash Source #
Converts a plutus script hash into a cardano ledger script hash
toKeyHash :: (MonadBlockChainBalancing m, SerialiseAsRawBytes (Hash key)) => AsType key -> (Hash key -> KeyHash kr) -> PubKeyHash -> m (KeyHash kr) Source #
Converts a plutus pkhash into a certain cardano ledger hash
toDRepCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'DRepRole) Source #
Translates a credential into a Cardano drep credential
toStakePoolKeyHash :: MonadBlockChainBalancing m => PubKeyHash -> m (KeyHash 'StakePool) Source #
Converts an PubKeyHash into a cardano ledger stake pool key hash
toColdCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'ColdCommitteeRole) Source #
Translates a credential into a Cardano cold committee credential
toHotCredential :: MonadBlockChainBalancing m => Credential -> m (Credential 'HotCommitteeRole) Source #
Translates a credential into a Cardano hot committee credential
toVRFVerKeyHash :: MonadBlockChainBalancing m => PubKeyHash -> m (VRFVerKeyHash a) Source #
Converts an PubKeyHash into a cardano ledger VRFVerKeyHash