cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Copyright © 2018-2020 IOHK
License Apache-2.0
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Transaction

Description

An extra interface for operation on transactions (e.g. creating witnesses, estimating size...). This makes it possible to decouple those operations from our wallet layer, keeping the implementation flexible to various backends.

Synopsis

Interface

data TransactionLayer k tx Source #

Constructors

TransactionLayer

Fields

data DelegationAction Source #

Whether the user is attempting any particular delegation action.

Instances

Instances details
Eq DelegationAction Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show DelegationAction Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic DelegationAction Source #
Instance details

Defined in Cardano.Wallet.Transaction

Buildable DelegationAction Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep DelegationAction Source #
Instance details

Defined in Cardano.Wallet.Transaction

data TransactionCtx Source #

Some additional context about a transaction. This typically contains details that are known upfront about the transaction and are used to construct it from inputs selected from the wallet's UTxO.

Constructors

TransactionCtx

Fields

Instances

Instances details
Eq TransactionCtx Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show TransactionCtx Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic TransactionCtx Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep TransactionCtx Source #
Instance details

Defined in Cardano.Wallet.Transaction

defaultTransactionCtx :: TransactionCtx Source #

A default context with sensible placeholder. Can be used to reduce repetition for changing only sub-part of the default context.

data TxUpdate Source #

Describes modifications that can be made to a Tx using $sel:updateTx:TransactionLayer .

Constructors

TxUpdate

Fields

data TxFeeUpdate Source #

Method to use when updating the fee of a transaction.

Constructors

UseOldTxFee

Instead of updating the fee, just use the old fee of the Tx (no-op for fee update).

UseNewTxFee Coin

Specify a new fee to use instead.

data TokenMapWithScripts Source #

data AnyScript Source #

Instances

Instances details
Eq AnyScript Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show AnyScript Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic AnyScript Source #
Instance details

Defined in Cardano.Wallet.Transaction

NFData AnyScript Source #
Instance details

Defined in Cardano.Wallet.Transaction

ToJSON ( ApiT AnyScript ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

FromJSON ( ApiT AnyScript ) Source #
Instance details

Defined in Cardano.Wallet.Api.Types

type Rep AnyScript Source #
Instance details

Defined in Cardano.Wallet.Transaction

newtype PlutusScriptInfo Source #

Instances

Instances details
Eq PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

NFData PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

ToJSON PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

FromJSON PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep PlutusScriptInfo Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep PlutusScriptInfo = D1 (' MetaData "PlutusScriptInfo" "Cardano.Wallet.Transaction" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "PlutusScriptInfo" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "languageVersion") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 PlutusVersion )))

data PlutusVersion Source #

Instances

Instances details
Eq PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

NFData PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

ToText PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

FromText PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep PlutusVersion Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep PlutusVersion = D1 (' MetaData "PlutusVersion" "Cardano.Wallet.Transaction" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' False ) ( C1 (' MetaCons "PlutusVersionV1" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "PlutusVersionV2" ' PrefixI ' False ) ( U1 :: Type -> Type ))

mapTxFeeAndChange Source #

Arguments

:: ( Coin -> Coin )

A function to transform the fee

-> (change1 -> change2)

A function to transform the change

-> TxFeeAndChange change1

The original fee and change

-> TxFeeAndChange change2

The transformed fee and change

Manipulates a TxFeeAndChange value.

data ValidityIntervalExplicit Source #

Instances

Instances details
Eq ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

NFData ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

ToJSON ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

FromJSON ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep ValidityIntervalExplicit Source #
Instance details

Defined in Cardano.Wallet.Transaction

type Rep ValidityIntervalExplicit = D1 (' MetaData "ValidityIntervalExplicit" "Cardano.Wallet.Transaction" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' False ) ( C1 (' MetaCons "ValidityIntervalExplicit" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "invalidBefore") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Quantity "slot" Word64 )) :*: S1 (' MetaSel (' Just "invalidHereafter") ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Quantity "slot" Word64 ))))

Errors

data ErrSignTx Source #

Possible signing error

Constructors

ErrSignTxAddressUnknown TxIn

We tried to sign a transaction with inputs that are unknown to us?

ErrSignTxUnimplemented

TODO: [ADP-919] Remove ErrSignTxUnimplemented

data ErrMkTransaction Source #

Instances

Instances details
Eq ErrMkTransaction Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show ErrMkTransaction Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic ErrMkTransaction Source #
Instance details

Defined in Cardano.Wallet.Transaction

IsServerError ErrMkTransaction Source #
Instance details

Defined in Cardano.Wallet.Api.Server

type Rep ErrMkTransaction Source #
Instance details

Defined in Cardano.Wallet.Transaction

data ErrCannotJoin Source #

newtype ErrUpdateSealedTx Source #

Constructors

ErrExistingKeyWitnesses Int

The SealedTx couldn't not be updated because the *n* existing key-witnesses would have been rendered invalid.

data ErrAssignRedeemers Source #

Constructors

ErrAssignRedeemersScriptFailure Redeemer String

Failed to assign execution units for a particular redeemer. The String indicates the reason of the failure.

TODO: Refine this type to avoid the String and provides a better sum-type of possible errors.

ErrAssignRedeemersTargetNotFound Redeemer

The given redeemer target couldn't be located in the transaction.

ErrAssignRedeemersInvalidData Redeemer String

Redeemer's data isn't a valid Plutus' data.

ErrAssignRedeemersTranslationError ( TranslationError StandardCrypto )

Mistranslating of hashes, credentials, certificates etc.

Instances

Instances details
Eq ErrAssignRedeemers Source #
Instance details

Defined in Cardano.Wallet.Transaction

Show ErrAssignRedeemers Source #
Instance details

Defined in Cardano.Wallet.Transaction

Generic ErrAssignRedeemers Source #
Instance details

Defined in Cardano.Wallet.Transaction

IsServerError ErrAssignRedeemers Source #
Instance details

Defined in Cardano.Wallet.Api.Server

type Rep ErrAssignRedeemers Source #
Instance details

Defined in Cardano.Wallet.Transaction

newtype ErrMoreSurplusNeeded Source #

Error for when its impossible for $sel:distributeSurplus:TransactionLayer to distribute the surplus. As long as the surplus is larger than costOfIncreasingCoin , this should never happen.