cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Type

Synopsis

Documentation

anyUtxoDataUtxoRpcToUtxo :: forall era m. (HasCallStack, MonadThrow m) => Era era -> [Proto AnyUtxoData] -> m (UTxO era) Source #

utxoRpcTxOutputToTxOut :: forall era m. (HasCallStack, MonadThrow m, IsEra era) => Proto TxOutput -> m (TxOut CtxUTxO era) Source #

utxoRpcChainPointMsgToChainPoint :: (HasCallStack, MonadThrow m) => Proto ChainPoint -> m (ChainPoint, WithOrigin BlockNo, UTCTime) Source #

Inverse of mkChainPointMsg. Note: Origin and At (BlockNo 0) both encode to height=0, so the decode always maps 0 back to Origin.

scriptWitnessIndexToRedeemerPurpose :: ScriptWitnessIndex -> (RedeemerPurpose, Word32) Source #

Map a ScriptWitnessIndex to the corresponding proto RedeemerPurpose and the numeric index within that purpose.

scriptExecutionErrorToEvalReport :: ScriptWitnessIndex -> ScriptExecutionError -> Proto EvalReport Source #

Convert a ScriptExecutionError into a proto EvalReport with the redeemer purpose and 0-based index that produced the error.

mkProtoRedeemer Source #

Arguments

:: ScriptWitnessIndex

Redeemer purpose and index

-> ExecutionUnits

Execution units consumed

-> Maybe (ScriptData, ByteString)

Plutus data payload and its CBOR bytes

-> Proto Redeemer 

Assemble a proto Redeemer from evaluation results and transaction witness data.

mkProtoTxEval Source #

Arguments

:: Coin

Computed minimum fee

-> Map ScriptWitnessIndex (Either ScriptExecutionError ([Text], ExecutionUnits))

Per-redeemer evaluation results: script traces and execution units on success, or a script execution error on failure

-> Map ScriptWitnessIndex (ScriptData, ByteString)

Redeemer Plutus data extracted from the transaction witness set, keyed by script witness index, with decoded payload and CBOR bytes.

-> Proto TxEval 

Assemble a proto TxEval response from the computed fee, per-redeemer evaluation results, and redeemer Plutus data from the transaction witness set.