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

Plutus.Contracts.Prism

Synopsis

Unlock (STO)

data STOSubscriber Source #

Instances

Instances details
Eq STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

Show STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

Generic STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

Associated Types

type Rep STOSubscriber :: Type -> Type Source #

ToJSON STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

FromJSON STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

ToSchema STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

type Rep STOSubscriber Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

type Rep STOSubscriber = D1 ('MetaData "STOSubscriber" "Plutus.Contracts.Prism.Unlock" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "STOSubscriber" 'PrefixI 'True) ((S1 ('MetaSel ('Just "wCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Credential) :*: S1 ('MetaSel ('Just "wSTOIssuer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)) :*: (S1 ('MetaSel ('Just "wSTOTokenName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenName) :*: S1 ('MetaSel ('Just "wSTOAmount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))))

data UnlockError Source #

Instances

Instances details
Eq UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

Show UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

Generic UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

Associated Types

type Rep UnlockError :: Type -> Type Source #

ToJSON UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

FromJSON UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

AsContractError UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

type Rep UnlockError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Unlock

subscribeSTO :: forall w s. HasEndpoint "sto" STOSubscriber s => Contract w s UnlockError () Source #

Obtain a token from the credential manager app, then participate in the STO

Unlock (exchange)

type UnlockExchangeSchema = Endpoint "unlock from exchange" Credential Source #

unlockExchange :: forall w s. HasEndpoint "unlock from exchange" Credential s => Contract w s UnlockError () Source #

Obtain a token from the credential manager app, then use it to unlock funds that were locked by an exchange.

Mirror app

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.

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 #

ToJSON CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

FromJSON CredentialOwnerReference Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

ToSchema 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-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" '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 #

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 #

ToJSON MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

FromJSON MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

AsContractError MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

AsSMContractError MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

type Rep MirrorError Source # 
Instance details

Defined in Plutus.Contracts.Prism.Mirror

Credential manager app

data Credential Source #

Named credential issued by a credential authority

Instances

Instances details
Eq Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Ord Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Show Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Generic Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Associated Types

type Rep Credential :: Type -> Type Source #

Hashable Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

ToJSON Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

FromJSON Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

ToSchema Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

UnsafeFromData Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

FromData Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

ToData Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Lift DefaultUni Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Typeable DefaultUni Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

type Rep Credential Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

type Rep Credential = D1 ('MetaData "Credential" "Plutus.Contracts.Prism.Credential" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Credential" 'PrefixI 'True) (S1 ('MetaSel ('Just "credAuthority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CredentialAuthority) :*: S1 ('MetaSel ('Just "credName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenName)))

data UserCredential Source #

A Credential issued to a user (public key address)

Constructors

UserCredential 

Fields

Instances

Instances details
Eq UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

Show UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

Generic UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

Associated Types

type Rep UserCredential :: Type -> Type Source #

Hashable UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

ToJSON UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

FromJSON UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

Lift DefaultUni UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

Typeable DefaultUni UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

type Rep UserCredential Source # 
Instance details

Defined in Plutus.Contracts.Prism.StateMachine

type Rep UserCredential = D1 ('MetaData "UserCredential" "Plutus.Contracts.Prism.StateMachine" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "UserCredential" 'PrefixI 'True) (S1 ('MetaSel ('Just "ucAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash) :*: (S1 ('MetaSel ('Just "ucCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Credential) :*: S1 ('MetaSel ('Just "ucToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Value))))

newtype CredentialAuthority Source #

Entity that is authorised to mint credential tokens

Instances

Instances details
Eq CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Ord CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Show CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Generic CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Associated Types

type Rep CredentialAuthority :: Type -> Type Source #

Hashable CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

ToJSON CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

FromJSON CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

ToSchema CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

UnsafeFromData CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

FromData CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

ToData CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Lift DefaultUni CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

Typeable DefaultUni CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

type Rep CredentialAuthority Source # 
Instance details

Defined in Plutus.Contracts.Prism.Credential

type Rep CredentialAuthority = D1 ('MetaData "CredentialAuthority" "Plutus.Contracts.Prism.Credential" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "CredentialAuthority" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCredentialAuthority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKeyHash)))

all-in-one

data Role Source #

The roles that we pass to contract.

Constructors

Mirror

The mirror contract

UnlockSTO

The subscribeSTO contract

UnlockExchange

The unlockExchange contract

Instances

Instances details
Eq Role Source # 
Instance details

Defined in Plutus.Contracts.Prism

Methods

(==) :: Role -> Role -> Bool Source #

(/=) :: Role -> Role -> Bool Source #

Show Role Source # 
Instance details

Defined in Plutus.Contracts.Prism

Generic Role Source # 
Instance details

Defined in Plutus.Contracts.Prism

Associated Types

type Rep Role :: Type -> Type Source #

Methods

from :: Role -> Rep Role x Source #

to :: Rep Role x -> Role Source #

ToJSON Role Source # 
Instance details

Defined in Plutus.Contracts.Prism

FromJSON Role Source # 
Instance details

Defined in Plutus.Contracts.Prism

type Rep Role Source # 
Instance details

Defined in Plutus.Contracts.Prism

type Rep Role = D1 ('MetaData "Role" "Plutus.Contracts.Prism" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Mirror" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnlockSTO" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnlockExchange" 'PrefixI 'False) (U1 :: Type -> Type)))

data PrismError Source #

Instances

Instances details
Eq PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

Show PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

Generic PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

Associated Types

type Rep PrismError :: Type -> Type Source #

ToJSON PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

FromJSON PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

AsContractError PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

type Rep PrismError Source # 
Instance details

Defined in Plutus.Contracts.Prism

contract :: Contract () PrismSchema PrismError () Source #

A wrapper around the four prism contracts. This is just a workaround for the emulator, where we can only ever run a single Contract. In the PAB we could simply start all four contracts (credentialManager, mirror, subscribeSTO, subscribeExchange) separately.