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

Plutus.Contracts.Prism.Unlock

Description

Two sample that unlock some funds by presenting the credentials. * subscribeSTO uses the credential to participate in an STO * unlockExchange uses the credential to take ownership of funds that were locked by an exchange.

Synopsis

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))))

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

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.

Errors etc.

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