Skip to main content

checkTxObservationCoherence

HardKAS SDK


HardKAS SDK / artifacts/src / checkTxObservationCoherence

Function: checkTxObservationCoherence()

checkTxObservationCoherence(observation): TxObservationCoherence

Defined in: packages/artifacts/src/tx-observation.ts:34

Pure coherence rules of ONE observation against itself and the upstream parameters (no store, no RPC):

  • chain_accepted / finality_reached: confirmationsBlue = point.sinkBlueScore − acceptingBlueScore;
  • chain_accepted: a removedAcceptingBlockHash is not the accepting block itself;
  • finality_reached: finalityDepth is the network's verified depth and confirmationsBlue ≥ finalityDepth;
  • synthetic_executed ⇔ observer.kind = "synthetic";
  • mempool_entry/chain findings need an rpc observer;
  • mempool_entry: its chain window is all four fields or none (a partial window is not a verified one).

Parameters​

observation​

unknown

Returns​

TxObservationCoherence