plutus-use-cases-1.2.0.0: Collection of smart contracts to develop the plutus/wallet interface
Safe HaskellNone
LanguageHaskell2010

Plutus.Contracts.Prism.Mirror

Description

The Atala Mirror application that initialises the state machine

Synopsis

Documentation

type MirrorSchema = Endpoint "issue" CredentialOwnerReference .\/ Endpoint "revoke" CredentialOwnerReference Source #

data CredentialOwnerReference Source #

Reference to a credential tied to a specific owner (public key address). From this, and the public key of the Mirror instance, we can compute the address of the state machine script that locks the token for the owner.

Constructors

CredentialOwnerReference 

Fields

Instances

Instances details
Eq CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Ord CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Show CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Generic CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Associated Types

type Rep CredentialOwnerReference :: Type -> Type Source #

FromJSON CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Methods

parseJSON :: Value -> Parser CredentialOwnerReference

parseJSONList :: Value -> Parser [CredentialOwnerReference]

ToJSON CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

type Rep CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

type Rep CredentialOwnerReference = D1 ('MetaData "CredentialOwnerReference" "Plutus.Contracts.Prism.Mirror" "plutus-use-cases-1.2.0.0-BuYOLXrynPcLosE012cowc" 'False) (C1 ('MetaCons "CredentialOwnerReference" 'PrefixI 'True) (S1 ('MetaSel ('Just "coTokenName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenName) :*: S1 ('MetaSel ('Just "coOwner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Wallet)))

data MirrorError Source #

Constructors

StateNotFound TokenName PaymentPubKeyHash 
SetupError ContractError 
MirrorEndpointError ContractError 
CreateTokenTxError ContractError 
StateMachineError SMContractError 

Instances

Instances details
Eq MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Show MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Generic MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Associated Types

type Rep MirrorError :: Type -> Type Source #

FromJSON MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Methods

parseJSON :: Value -> Parser MirrorError

parseJSONList :: Value -> Parser [MirrorError]

ToJSON MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Methods

toJSON :: MirrorError -> Value

toEncoding :: MirrorError -> Encoding

toJSONList :: [MirrorError] -> Value

toEncodingList :: [MirrorError] -> Encoding

AsContractError MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Methods

_ContractError :: Prism' MirrorError ContractError

_WalletContractError :: Prism' MirrorError WalletAPIError

_ChainIndexContractError :: Prism' MirrorError (Text, ChainIndexResponse)

_ConstraintResolutionContractError :: Prism' MirrorError MkTxError

_ToCardanoConvertContractError :: Prism' MirrorError ToCardanoError

_ResumableContractError :: Prism' MirrorError MatchingError

_CCheckpointContractError :: Prism' MirrorError CheckpointError

_EndpointDecodeContractError :: Prism' MirrorError (EndpointDescription, EndpointValue Value, Text)

_OtherContractError :: Prism' MirrorError Text

AsSMContractError MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Methods

_SMContractError :: Prism' MirrorError SMContractError

_ChooserError :: Prism' MirrorError Text

_UnableToExtractTransition :: Prism' MirrorError ()

_SMCContractError :: Prism' MirrorError ContractError

type Rep MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

type Rep MirrorError = D1 ('MetaData "MirrorError" "Plutus.Contracts.Prism.Mirror" "plutus-use-cases-1.2.0.0-BuYOLXrynPcLosE012cowc" 'False) ((C1 ('MetaCons "StateNotFound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)) :+: C1 ('MetaCons "SetupError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError))) :+: (C1 ('MetaCons "MirrorEndpointError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError)) :+: (C1 ('MetaCons "CreateTokenTxError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError)) :+: C1 ('MetaCons "StateMachineError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SMContractError)))))

mirror :: (HasEndpoint "revoke" CredentialOwnerReference s, HasEndpoint "issue" CredentialOwnerReference s) => Contract w s MirrorError () Source #