| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Plutus.Contract.Wallet
Contents
Description
Turn UnbalancedTx values into transactions using the
wallet API.
Synopsis
- balanceTx :: forall effs. Member WalletEffect effs => UnbalancedTx -> Eff effs (Either WalletAPIError CardanoTx)
- handleTx :: (Member WalletEffect effs, Member (Error WalletAPIError) effs) => UnbalancedTx -> Eff effs CardanoTx
- yieldUnbalancedTx :: forall effs. Member WalletEffect effs => UnbalancedTx -> Eff effs ()
- getUnspentOutput :: AsContractError e => Contract w s e TxOutRef
- signTxAndSubmit :: Member WalletEffect effs => CardanoTx -> Eff effs CardanoTx
- data ExportTx = ExportTx {
- partialTx :: Tx BabbageEra
- lookups :: [ExportTxInput]
- redeemers :: [ExportTxRedeemer]
- data ExportTxInput = ExportTxInput {}
- data ExportTxRedeemer
- = SpendingRedeemer { }
- | MintingRedeemer { }
- | RewardingRedeemer { }
- | CertifyingRedeemer { }
- export :: Params -> UnbalancedTx -> Either CardanoLedgerError ExportTx
Documentation
balanceTx :: forall effs. Member WalletEffect effs => UnbalancedTx -> Eff effs (Either WalletAPIError CardanoTx) Source #
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
Partial transaction that can be balanced by the wallet backend.
Constructors
| ExportTx | |
Fields
| |
Instances
| Eq ExportTx Source # | |
| Show ExportTx Source # | |
| Generic ExportTx Source # | |
| ToJSON ExportTx Source # | |
| FromJSON ExportTx Source # | |
| ToSchema ExportTx Source # | |
Defined in Plutus.Contract.Wallet Methods declareNamedSchema :: Proxy ExportTx -> Declare (Definitions Schema) NamedSchema Source # | |
| type Rep ExportTx Source # | |
Defined in Plutus.Contract.Wallet type Rep ExportTx = D1 ('MetaData "ExportTx" "Plutus.Contract.Wallet" "plutus-contract-1.1.0.0-KZTRXOViW1GCXNPMdYqx30" 'False) (C1 ('MetaCons "ExportTx" 'PrefixI 'True) (S1 ('MetaSel ('Just "partialTx") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Tx BabbageEra)) :*: (S1 ('MetaSel ('Just "lookups") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExportTxInput]) :*: S1 ('MetaSel ('Just "redeemers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ExportTxRedeemer])))) | |
data ExportTxInput Source #
Constructors
| ExportTxInput | |
Fields
| |
Instances
data ExportTxRedeemer Source #
Constructors
| SpendingRedeemer | |
Fields | |
| MintingRedeemer | |
Fields | |
| RewardingRedeemer | |
Fields | |
| CertifyingRedeemer | |
Fields
| |
Instances
export :: Params -> UnbalancedTx -> Either CardanoLedgerError ExportTx Source #