pub(super) fn are_inputs_standard(
tx: &Transaction,
spent_outputs: &[Output],
) -> boolExpand description
Returns true if all transparent inputs are standard.
Mirrors zcashd’s AreInputsStandard():
https://github.com/zcash/zcash/blob/v6.11.0/src/policy/policy.cpp#L136
For each input:
- The spent output’s scriptPubKey must be a known standard type (via the
zcash_scriptsolver). Non-standard scripts and OP_RETURN outputs are rejected. - The scriptSig stack depth must match
ScriptSigArgsExpected(). - For P2SH inputs:
- If the redeemed script is standard, its expected args are added to the total.
- If the redeemed script is non-standard, it must have <=
MAX_P2SH_SIGOPSsigops.
§Panics
Callers must ensure spent_outputs.len() matches the number of transparent inputs.