registry/fold
Responsibility
Fold permanent M1 registration and termination requests in input order.
Dependencies
Reuses the original approval binding, trie fault, duty and refund owners. Imported by registry/modify, the single active fold implementation.
Assumptions
The caller checks state continuation, fixed pins, net mint and settlement. Requests carry their own public datum and per-request proof.
Invariants
Only insertActive and updateTerminal advance the trie; no dispatch exists for the excluded edges. Rejected requests retain original refund obligations. The first refusal latches and successful actions advance the intermediate root.
Types
The fold’s accumulator. refusal latches the first refusal’s reason
and every later step is skipped, so exactly one reason is reported
however many later rules the same transaction would also break.
Constructors
-
Fold { refusal: Option<String>, trie: MerklePatriciaForestry, actions: List<RequestAction>, consumed: Int, minted: Value, duties: List<Duty>, refunds: List<Pair<VerificationKeyHash, Int>>, }