deriveZkOperationStatus
HardKAS SDK / artifacts/src / deriveZkOperationStatus
Function: deriveZkOperationStatus()
deriveZkOperationStatus(
params):ZkOperationStatusResult
Defined in: packages/artifacts/src/operation-status.ts:206
Pure function deriving end-to-end ZK operation lifecycle state from cryptographic facts and L1 transaction confirmation status. Distinguishes local mathematical proof verification from consensus settlement.
The transaction status, when known, takes precedence: an accepted spend means the node's OpZkPrecompile verified the proof, whatever was (or was not) checked off-chain. Without a transaction status, an off-chain verification that was never performed is PROOF_NOT_VERIFIED_OFFCHAIN (not final), never a definitive failure (HK-17). Only consensus finality is final.
Parameters
params
txStatus?
zkFact
{ computeBudget?: number; contentHash?: string; curve?: "BN254"; draftArtifactId?: string; feeSompi?: string; guestSystem?: "custom" | "RISC Zero"; hardkasVersion?: string; hashVersion?: string | number; imageId?: string; journalHash?: string; networkId?: "simnet" | "mainnet" | "testnet-10" | "testnet-11" | "testnet-12" | "simnet-1" | "devnet" | "simulated" | "igra"; offChainVerification?: "VERIFIED" | "NOT_PERFORMED" | "FAILED"; offChainVerifier?: string; p2shAddress?: string; payoutAddress?: string; payoutSompi?: string; planArtifactId?: string; proofSha256?: string; provingSystem?: "Groth16"; redeemScriptHash?: string; schema?: "hardkas.zkVerificationFact.v1"; spendUtxo?: { amountSompi?: string; index?: number; transactionId?: string; }; timestamp?: string; txId?: string; verifiedOffChain?: boolean; }
zkFact.computeBudget?
number = ...
zkFact.contentHash?
string = ...
zkFact.curve?
"BN254" = ...
zkFact.draftArtifactId?
string = ...
zkFact.feeSompi?
string = ...
zkFact.guestSystem?
"custom" | "RISC Zero" = ...
zkFact.hardkasVersion?
string = ...
zkFact.hashVersion?
string | number = ...
zkFact.imageId?
string = ...
zkFact.journalHash?
string = ...
zkFact.networkId?
"simnet" | "mainnet" | "testnet-10" | "testnet-11" | "testnet-12" | "simnet-1" | "devnet" | "simulated" | "igra" = kaspaNetworkIdSchema
zkFact.offChainVerification?
"VERIFIED" | "NOT_PERFORMED" | "FAILED" = ...
Who verified, if anyone: NOT_PERFORMED is not a failure; the node's precompile is the verifier of record.
zkFact.offChainVerifier?
string = ...
zkFact.p2shAddress?
string = ...
zkFact.payoutAddress?
string = ...
zkFact.payoutSompi?
string = ...
zkFact.planArtifactId?
string = ...
zkFact.proofSha256?
string = ...
SHA-256 of the proof BYTES (the 128-byte compressed proof the signature script pushes).
zkFact.provingSystem?
"Groth16" = ...
zkFact.redeemScriptHash?
string = ...
zkFact.schema?
"hardkas.zkVerificationFact.v1" = ...
zkFact.spendUtxo?
{ amountSompi?: string; index?: number; transactionId?: string; } = ...
zkFact.spendUtxo.amountSompi?
string = ...
zkFact.spendUtxo.index?
number = ...
zkFact.spendUtxo.transactionId?
string = ...
zkFact.timestamp?
string = ...
Optional: omitted by default so the fact's identity does not depend on the clock (ZK-09).
zkFact.txId?
string = ...
zkFact.verifiedOffChain?
boolean = ...