plutus-pab-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Cardano.Wallet.LocalClient.ExportTx

Description

Turn UnbalancedTx values into transactions using the wallet API.

Synopsis

Documentation

balanceTx :: forall (effs :: [Type -> Type]). Member WalletEffect effs => UnbalancedTx -> Eff effs (Either WalletAPIError CardanoTx) #

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 :: [Type -> Type]). Member WalletEffect effs => UnbalancedTx -> Eff effs () #

signTxAndSubmit :: forall (effs :: [Type -> Type]). Member WalletEffect effs => CardanoTx -> Eff effs CardanoTx #

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 Cardano.Wallet.LocalClient.ExportTx

Show ExportTx Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Generic ExportTx Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Associated Types

type Rep ExportTx :: Type -> Type Source #

FromJSON ExportTx Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Methods

parseJSON :: Value -> Parser ExportTx

parseJSONList :: Value -> Parser [ExportTx]

ToJSON ExportTx Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Methods

toJSON :: ExportTx -> Value

toEncoding :: ExportTx -> Encoding

toJSONList :: [ExportTx] -> Value

toEncodingList :: [ExportTx] -> Encoding

ToSchema ExportTx 
Instance details

Defined in Plutus.PAB.Webserver.Types

Methods

declareNamedSchema :: Proxy ExportTx -> Declare (Definitions Schema) NamedSchema

type Rep ExportTx Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

type Rep ExportTx = D1 ('MetaData "ExportTx" "Cardano.Wallet.LocalClient.ExportTx" "plutus-pab-1.2.0.0-LtxAAjtTYeqGloVmBPlsYv" '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

Instances details
Eq ExportTxInput Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Show ExportTxInput Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Generic ExportTxInput Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Associated Types

type Rep ExportTxInput :: Type -> Type Source #

FromJSON ExportTxInput Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Methods

parseJSON :: Value -> Parser ExportTxInput

parseJSONList :: Value -> Parser [ExportTxInput]

ToJSON ExportTxInput Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Methods

toJSON :: ExportTxInput -> Value

toEncoding :: ExportTxInput -> Encoding

toJSONList :: [ExportTxInput] -> Value

toEncodingList :: [ExportTxInput] -> Encoding

ToSchema ExportTxInput 
Instance details

Defined in Plutus.PAB.Webserver.Types

Methods

declareNamedSchema :: Proxy ExportTxInput -> Declare (Definitions Schema) NamedSchema

type Rep ExportTxInput Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

type Rep ExportTxInput = D1 ('MetaData "ExportTxInput" "Cardano.Wallet.LocalClient.ExportTx" "plutus-pab-1.2.0.0-LtxAAjtTYeqGloVmBPlsYv" '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 BabbageEra)))) :*: (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 #

Constructors

SpendingRedeemer 

Fields

MintingRedeemer 

Fields

RewardingRedeemer 

Fields

CertifyingRedeemer 

Fields

Instances

Instances details
Eq ExportTxRedeemer Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Show ExportTxRedeemer Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Generic ExportTxRedeemer Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Associated Types

type Rep ExportTxRedeemer :: Type -> Type Source #

FromJSON ExportTxRedeemer Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

Methods

parseJSON :: Value -> Parser ExportTxRedeemer

parseJSONList :: Value -> Parser [ExportTxRedeemer]

ToJSON ExportTxRedeemer Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

ToSchema ExportTxRedeemer 
Instance details

Defined in Plutus.PAB.Webserver.Types

Methods

declareNamedSchema :: Proxy ExportTxRedeemer -> Declare (Definitions Schema) NamedSchema

type Rep ExportTxRedeemer Source # 
Instance details

Defined in Cardano.Wallet.LocalClient.ExportTx

type Rep ExportTxRedeemer = D1 ('MetaData "ExportTxRedeemer" "Cardano.Wallet.LocalClient.ExportTx" "plutus-pab-1.2.0.0-LtxAAjtTYeqGloVmBPlsYv" '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))) :+: (C1 ('MetaCons "RewardingRedeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "redeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Redeemer) :*: S1 ('MetaSel ('Just "redeemerStakingCredential") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 StakingCredential)) :+: C1 ('MetaCons "CertifyingRedeemer" 'PrefixI 'True) (S1 ('MetaSel ('Just "redeemer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Redeemer) :*: S1 ('MetaSel ('Just "redeemerDCert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 DCert))))

export :: Params -> UnbalancedTx -> Either CardanoLedgerError ExportTx Source #