fix(sdk): sub-account invoke encodes OpenNote.collect_policy (#908)
Core's build().subaccounts(dappName).invoke omitted the anonymizer OpenNote's collect_policy field
when compiling privacy_invoke_with_computation calldata — it only compiled because the committed
SubAccountAnonymizerABI was stale (missing collect_policy), and would have produced calldata the
anonymizer rejects. invoke now takes an optional collectPolicy ({ type: 'all'|'diff'|'exact' },
default all) applied to every open note, encoded as the Cairo CollectPolicy enum. Regenerated the
ABI to include collect_policy. Exports the CollectPolicy type.
<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/starkware-libs/starknet-privacy/908)
<!-- Reviewable:end --> I
Ittay Dror committed
76f57e09b46bba375f2758f609a35d2d4f674696
Parent: e96709b
Committed by GitHub <noreply@github.com>
on 7/22/2026, 7:17:23 AM