plutus-contract-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Plutus.Contract.Wallet

Description

Turn UnbalancedTx values into transactions using the wallet API.

Synopsis

Documentation

handleTx :: (Member WalletEffect effs, Member (Error WalletAPIError) effs) => UnbalancedTx -> Eff effs CardanoTx Source #

Balance an unabalanced transaction, sign it, and submit it to the chain in the context of a wallet.

yieldUnbalancedTx :: forall effs. Member WalletEffect effs => UnbalancedTx -> Eff effs () Source #

getUnspentOutput :: AsContractError e => Contract w s e TxOutRef Source #

Get an unspent output belonging to the wallet.

signTxAndSubmit :: Member WalletEffect effs => CardanoTx -> Eff effs CardanoTx Source #

Add the wallet's signature to the transaction and submit it. Returns the transaction with the wallet's signature.

Exporting transactions

data ExportTx Source #

Partial transaction that can be balanced by the wallet backend.

Constructors

ExportTx 

Fields

Instances

Instances details
Eq ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

Show ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

Generic ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

Associated Types

type Rep ExportTx :: Type -> Type Source #

ToJSON ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

FromJSON ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

ToSchema ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

type Rep ExportTx Source # 
Instance details

Defined in Plutus.Contract.Wallet

type Rep ExportTx = D1 ('MetaData "ExportTx" "Plutus.Contract.Wallet" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "ExportTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "partialTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Tx AlonzoEra)) :*: (S1 ('MetaSel ('Just "lookups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExportTxInput]) :*: S1 ('MetaSel ('Just "redeemers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExportTxRedeemer]))))

data ExportTxInput Source #

Instances

Instances details
Eq ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

Show ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

Generic ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

Associated Types

type Rep ExportTxInput :: Type -> Type Source #

ToJSON ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

FromJSON ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

ToSchema ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

type Rep ExportTxInput Source # 
Instance details

Defined in Plutus.Contract.Wallet

type Rep ExportTxInput = D1 ('MetaData "ExportTxInput" "Plutus.Contract.Wallet" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "ExportTxInput" 'PrefixI 'True) ((S1 ('MetaSel ('Just "etxiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxId) :*: (S1 ('MetaSel ('Just "etxiTxIx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxIx) :*: S1 ('MetaSel ('Just "etxiAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (AddressInEra AlonzoEra)))) :*: (S1 ('MetaSel ('Just "etxiLovelaceQuantity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Lovelace) :*: (S1 ('MetaSel ('Just "etxiDatumHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Hash ScriptData))) :*: S1 ('MetaSel ('Just "etxiAssets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(PolicyId, AssetName, Quantity)])))))

data ExportTxRedeemer Source #

Instances

Instances details
Eq ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

Show ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

Generic ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

Associated Types

type Rep ExportTxRedeemer :: Type -> Type Source #

ToJSON ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

FromJSON ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

ToSchema ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

type Rep ExportTxRedeemer Source # 
Instance details

Defined in Plutus.Contract.Wallet

type Rep ExportTxRedeemer = D1 ('MetaData "ExportTxRedeemer" "Plutus.Contract.Wallet" "plutus-contract-0.1.0.0-2DbvKQdtEvHK4UkDq1ndDW" 'False) (C1 ('MetaCons "SpendingRedeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "redeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Redeemer) :*: S1 ('MetaSel ('Just "redeemerOutRef") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TxOutRef)) :+: C1 ('MetaCons "MintingRedeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "redeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Redeemer) :*: S1 ('MetaSel ('Just "redeemerPolicyId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MintingPolicyHash)))