Ordering follows Plutus's derived Ord StakingCredential, i.e. PubKeyCredential before ScriptCredential, then hash.
Ordering follows Plutus's derived Ord StakingCredential, i.e. PubKeyCredential before ScriptCredential, then hash.
This is deliberately NOT Ord[Credential], and must not be rewritten to delegate to it. The two eras key withdrawals by different types: V1/V2 build a Map PV1.StakingCredential Integer keyed by the Plutus type and Map.toList it (Alonzo/Plutus/TxInfo.hs:301-309), so they deliver Plutus order, while V3 keys by the ledger's Credential and delivers the ledger's order. Ord[Credential] follows V3; this instance follows V1/V2.