Safe Haskell | None |
---|---|
Language | Haskell2010 |
State machine that manages credential tokens
Synopsis
- data IDState
- data IDAction
- data UserCredential = UserCredential {
- ucAddress :: PaymentPubKeyHash
- ucCredential :: Credential
- ucToken :: Value
- typedValidator :: UserCredential -> TypedValidator (StateMachine IDState IDAction)
- machineClient :: TypedValidator (StateMachine IDState IDAction) -> UserCredential -> StateMachineClient IDState IDAction
- mkMachineClient :: CredentialAuthority -> PaymentPubKeyHash -> TokenName -> StateMachineClient IDState IDAction
Documentation
Active | The credential is active and can be used in transactions |
Revoked | The credential has been revoked and can't be used anymore. |
Instances
Eq IDState Source # | |
Show IDState Source # | |
Generic IDState Source # | |
FromJSON IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine parseJSON :: Value -> Parser IDState parseJSONList :: Value -> Parser [IDState] | |
ToJSON IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine toEncoding :: IDState -> Encoding toJSONList :: [IDState] -> Value toEncodingList :: [IDState] -> Encoding | |
ToData IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine toBuiltinData :: IDState -> BuiltinData | |
FromData IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine fromBuiltinData :: BuiltinData -> Maybe IDState | |
UnsafeFromData IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine unsafeFromBuiltinData :: BuiltinData -> IDState | |
Lift DefaultUni IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine | |
Typeable DefaultUni IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine | |
type Rep IDState Source # | |
Defined in Plutus.Contracts.Prism.StateMachine |
PresentCredential | Present the credential in a transaction |
RevokeCredential | Revoke the credential |
Instances
data UserCredential Source #
A Credential
issued to a user (public key address)
UserCredential | |
|
Instances
typedValidator :: UserCredential -> TypedValidator (StateMachine IDState IDAction) Source #
machineClient :: TypedValidator (StateMachine IDState IDAction) -> UserCredential -> StateMachineClient IDState IDAction Source #
mkMachineClient :: CredentialAuthority -> PaymentPubKeyHash -> TokenName -> StateMachineClient IDState IDAction Source #