convex-testing-interface
Safe HaskellSafe-Inferred
LanguageHaskell2010

Convex.TestingInterface.Trace

Synopsis

Test run trace

data TestRunTrace Source #

Complete trace of a test run (one QuickCheck property execution = N iterations). Links to the Tasty test tree via trtTestId.

Constructors

TestRunTrace 

Fields

Instances

Instances details
ToJSON TestRunTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TestRunTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TestRunTrace :: Type -> Type #

Show TestRunTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TestRunTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TestRunTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TestRunTrace = D1 ('MetaData "TestRunTrace" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TestRunTrace" 'PrefixI 'True) ((S1 ('MetaSel ('Just "trtTestId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "trtTestName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "trtPath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]) :*: (S1 ('MetaSel ('Just "trtCategory") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TestCategory) :*: S1 ('MetaSel ('Just "trtIterations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [IterationTrace])))))

data TestCategory Source #

Whether this test run is a positive or negative test property.

Constructors

Positive 
Negative 

Instances

Instances details
ToJSON TestCategory Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TestCategory Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TestCategory :: Type -> Type #

Show TestCategory Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TestCategory Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TestCategory Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TestCategory = D1 ('MetaData "TestCategory" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Positive" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Negative" 'PrefixI 'False) (U1 :: Type -> Type))

Iteration trace

data IterationTrace Source #

Trace of a single QuickCheck iteration within a test run.

Constructors

IterationTrace 

Fields

Instances

Instances details
ToJSON IterationTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic IterationTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep IterationTrace :: Type -> Type #

Show IterationTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq IterationTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep IterationTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep IterationTrace = D1 ('MetaData "IterationTrace" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "IterationTrace" 'PrefixI 'True) ((S1 ('MetaSel ('Just "itIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "itStatus") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 IterationStatus)) :*: (S1 ('MetaSel ('Just "itTransitions") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Transition]) :*: S1 ('MetaSel ('Just "itThreatModels") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [ThreatModelTrace]))))

data IterationStatus Source #

Outcome of a single iteration.

Instances

Instances details
ToJSON IterationStatus Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic IterationStatus Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep IterationStatus :: Type -> Type #

Show IterationStatus Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq IterationStatus Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep IterationStatus Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep IterationStatus = D1 ('MetaData "IterationStatus" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "IterationSuccess" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "IterationFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "IterationDiscarded" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

State transitions

data Transition Source #

One step in an iteration: an action was performed, the model state changed, and a transaction was (possibly) submitted.

Constructors

Transition 

Fields

Instances

Instances details
ToJSON Transition Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic Transition Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep Transition :: Type -> Type #

Show Transition Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq Transition Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep Transition Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep Transition = D1 ('MetaData "Transition" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Transition" 'PrefixI 'True) ((S1 ('MetaSel ('Just "trStepIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "trAction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "trStateBefore") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Value))) :*: (S1 ('MetaSel ('Just "trStateAfter") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Value) :*: (S1 ('MetaSel ('Just "trTransaction") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe TxSummary)) :*: S1 ('MetaSel ('Just "trResult") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TransitionResult)))))

data TransitionResult Source #

Whether the transaction was successfully submitted to the mockchain.

Constructors

TransitionSuccess !Text

TxId as text

TransitionFailure !Text

Error description

Instances

Instances details
ToJSON TransitionResult Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TransitionResult Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TransitionResult :: Type -> Type #

Show TransitionResult Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TransitionResult Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TransitionResult Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TransitionResult = D1 ('MetaData "TransitionResult" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TransitionSuccess" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "TransitionFailure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))

Transaction summary

data TxSummary Source #

Compact representation of a transaction for visualization. Values are structured JSON for full fidelity.

Constructors

TxSummary 

Fields

Instances

Instances details
ToJSON TxSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TxSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TxSummary :: Type -> Type #

Show TxSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TxSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

data TxInputSummary Source #

Summary of a transaction input.

Constructors

TxInputSummary 

Fields

Instances

Instances details
ToJSON TxInputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TxInputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TxInputSummary :: Type -> Type #

Show TxInputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TxInputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxInputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxInputSummary = D1 ('MetaData "TxInputSummary" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TxInputSummary" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tisUtxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "tisAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "tisAddressType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AddressType) :*: S1 ('MetaSel ('Just "tisAddressLabel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "tisValue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ValueSummary) :*: S1 ('MetaSel ('Just "tisRedeemerRaw") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tisRedeemerConstr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "tisRedeemerKind") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tisRedeemerPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Value)))))))

data TxOutputSummary Source #

Summary of a transaction output.

Constructors

TxOutputSummary 

Fields

Instances

Instances details
ToJSON TxOutputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TxOutputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TxOutputSummary :: Type -> Type #

Show TxOutputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TxOutputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxOutputSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxOutputSummary = D1 ('MetaData "TxOutputSummary" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TxOutputSummary" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tosUtxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "tosAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "tosAddressType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AddressType))) :*: (S1 ('MetaSel ('Just "tosAddressLabel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "tosValue") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ValueSummary) :*: S1 ('MetaSel ('Just "tosDatum") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text))))))

data TxWithdrawalSummary Source #

Summary of a stake-reward withdrawal. Includes zero-lovelace withdrawals, which are how a script attached to a stake credential can be triggered to run its logic without spending or creating any UTxO (the "withdraw zero trick").

Constructors

TxWithdrawalSummary 

Fields

Instances

Instances details
ToJSON TxWithdrawalSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic TxWithdrawalSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep TxWithdrawalSummary :: Type -> Type #

Show TxWithdrawalSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq TxWithdrawalSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxWithdrawalSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep TxWithdrawalSummary = D1 ('MetaData "TxWithdrawalSummary" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "TxWithdrawalSummary" 'PrefixI 'True) (((S1 ('MetaSel ('Just "twsStakeAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "twsAddressType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AddressType)) :*: (S1 ('MetaSel ('Just "twsAddressLabel") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "twsAmount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))) :*: ((S1 ('MetaSel ('Just "twsRedeemerRaw") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "twsRedeemerConstr") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Integer))) :*: (S1 ('MetaSel ('Just "twsRedeemerKind") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "twsRedeemerPayload") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Value))))))

Value representation

data ValueSummary Source #

Structured representation of a Cardano value for JSON serialization.

Constructors

ValueSummary 

Instances

Instances details
ToJSON ValueSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic ValueSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep ValueSummary :: Type -> Type #

Show ValueSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq ValueSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ValueSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ValueSummary = D1 ('MetaData "ValueSummary" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ValueSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "vsLovelace") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "vsAssets") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [AssetSummary])))

data AssetSummary Source #

Constructors

AssetSummary 

Instances

Instances details
ToJSON AssetSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic AssetSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep AssetSummary :: Type -> Type #

Show AssetSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq AssetSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep AssetSummary Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep AssetSummary = D1 ('MetaData "AssetSummary" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "AssetSummary" 'PrefixI 'True) (S1 ('MetaSel ('Just "asPolicyId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: (S1 ('MetaSel ('Just "asName") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "asQuantity") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer))))

Threat model trace

data ThreatModelTrace Source #

What happened when a threat model was applied to a specific transaction in this iteration.

Constructors

ThreatModelTrace 

Fields

  • tmtName :: !Text

    Name of the threat model (e.g. "unprotectedScriptOutput")

  • tmtCategory :: !ThreatModelCategory

    Which ThreatModelsFor list the model came from, i.e. how a TMTOFailed outcome is to be read. Repeated on every entry so that a consumer of the test_trace stream can tell a vulnerability from an expected or accepted finding without waiting for the test_done event that carries the run-level ThreatModelSummary.

  • tmtTestId :: !Int

    Test id of the threat model

  • tmtTargetTxIndex :: !Int

    Index into itTransitions identifying which transaction was targeted

  • tmtModifications :: ![Value]

    Structured JSON descriptions of each modification applied

  • tmtOriginalTx :: !TxSummary

    The original transaction before modification

  • tmtModifiedTx :: !(Maybe TxSummary)

    The modified transaction, Nothing if the modification couldn't produce a valid tx body

  • tmtValidation :: !(Maybe ThreatModelValidation)

    How the ledger judged this modified transaction. Nothing when there is no verdict to report: the lightweight trace emitted when the threat model made no Validate call at all, or a Validate call that recorded neither a validity report nor a rebalancing error (not expected). Unlike tmtOutcome, which is the verdict of the whole threat model run and is repeated on every entry of that run, this is specific to the entry.

  • tmtOutcome :: !ThreatModelTraceOutcome

    The outcome of running the threat model

  • tmtCovered :: ![SrcLocRange]

    The code ranges covered by running this threat model

Instances

Instances details
ToJSON ThreatModelTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic ThreatModelTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep ThreatModelTrace :: Type -> Type #

Show ThreatModelTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq ThreatModelTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ThreatModelTrace Source # 
Instance details

Defined in Convex.TestingInterface.Trace

data ThreatModelTraceOutcome Source #

Outcome of applying a threat model to a transaction.

Constructors

TMTOPassed

Modified tx was correctly rejected by the ledger (good!)

TMTOFailed !Text

Modified tx was ACCEPTED by the ledger (vulnerability found!)

TMTOSkipped !Text

Couldn't test: rebalancing failed or precondition not met

TMTOSkippedPhase1 !Text

Skipped: modified tx hit Phase 1 invalidation

TMTOError !Text

Unexpected error during threat model execution

Instances

Instances details
ToJSON ThreatModelTraceOutcome Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic ThreatModelTraceOutcome Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep ThreatModelTraceOutcome :: Type -> Type #

Show ThreatModelTraceOutcome Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq ThreatModelTraceOutcome Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ThreatModelTraceOutcome Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ThreatModelTraceOutcome = D1 ('MetaData "ThreatModelTraceOutcome" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) ((C1 ('MetaCons "TMTOPassed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TMTOFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))) :+: (C1 ('MetaCons "TMTOSkipped" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: (C1 ('MetaCons "TMTOSkippedPhase1" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :+: C1 ('MetaCons "TMTOError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)))))

data ThreatModelValidation Source #

The ledger's verdict on a single modified transaction produced by a Validate call.

Constructors

TMVValid

Phase 1 and Phase 2 both passed: the ledger accepted the modified tx

TMVPhase1Invalid ![Text]

Rejected by Phase 1 ledger rules; scripts never ran. Carries the error messages.

TMVPhase2Invalid ![Text]

Phase 1 passed but a script rejected the tx. Carries the script error messages.

TMVRebalanceFailed !Text

The modified tx could not be rebalanced and signed, so it was never validated

Instances

Instances details
ToJSON ThreatModelValidation Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic ThreatModelValidation Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep ThreatModelValidation :: Type -> Type #

Show ThreatModelValidation Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq ThreatModelValidation Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ThreatModelValidation Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep ThreatModelValidation = D1 ('MetaData "ThreatModelValidation" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) ((C1 ('MetaCons "TMVValid" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TMVPhase1Invalid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text]))) :+: (C1 ('MetaCons "TMVPhase2Invalid" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 [Text])) :+: C1 ('MetaCons "TMVRebalanceFailed" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))

Redeemer tagging (Tier 2)

data RedeemerTag Source #

A human-readable label for a redeemer, produced by a RedeemerTagger supplied by the implementor (Tier 2). When no tagger matches, both tisRedeemerKind and tisRedeemerPayload stay Nothing and only Tier 1 (tisRedeemerRaw / tisRedeemerConstr) is streamed.

Constructors

RedeemerTag 

Fields

newtype RedeemerTagger Source #

An opt-in function from a parsed Plutus Data (the redeemer of a script input) to an optional RedeemerTag. The Monoid instance picks the first Just result, enabling composition of per-validator taggers.

Address labeling

data AddressType Source #

Whether an address's credential is a public key or a script, so a client doesn't have to parse the address itself to find out.

Constructors

PublicKey 
Script 

Instances

Instances details
ToJSON AddressType Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Generic AddressType Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Associated Types

type Rep AddressType :: Type -> Type #

Show AddressType Source # 
Instance details

Defined in Convex.TestingInterface.Trace

Eq AddressType Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep AddressType Source # 
Instance details

Defined in Convex.TestingInterface.Trace

type Rep AddressType = D1 ('MetaData "AddressType" "Convex.TestingInterface.Trace" "convex-testing-interface-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PublicKey" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Script" 'PrefixI 'False) (U1 :: Type -> Type))

newtype AddressLabeler Source #

An opt-in function from the hex-encoded hash of an address's payment or stake credential (key hash or script hash) to a human-readable label, so a client doesn't need to recognise raw hashes to tell wallets and scripts apart. The TestingInterface default (mockWalletAddressLabeler) labels the standard mock wallets as "Wallet 1".."Wallet 10"; override or extend it (via the Monoid instance, which picks the first Just result) to label a model's own script hashes or additional keys.

Constructors

AddressLabeler