Context
After Task 15, the frontend imports from @invofi/sdk, but as features move fast it is possible for a new frontend call site to bypass the SDK and talk to contracts directly, re-introducing duplication.
Task
Add a parity check: enumerate every contract method called from apps/frontend/src (search for contract.invoke / createInvofiClient usage) and confirm each has a typed export in the SDK. Document the expected one-to-one mapping in the SDK README, and add a CI-friendly script (or lint rule) that fails if a raw contract call appears outside the SDK binding.
Stop
Do not refactor existing working code beyond the mapping. Do not block legitimate custom calls without an explicit exception comment.
Acceptance
- Mapping table documents each contract method -> SDK export.
- A check script flags any raw invoke outside
lib/contract.ts and the SDK.
Context
After Task 15, the frontend imports from
@invofi/sdk, but as features move fast it is possible for a new frontend call site to bypass the SDK and talk to contracts directly, re-introducing duplication.Task
Add a parity check: enumerate every contract method called from
apps/frontend/src(search forcontract.invoke/createInvofiClientusage) and confirm each has a typed export in the SDK. Document the expected one-to-one mapping in the SDK README, and add a CI-friendly script (or lint rule) that fails if a raw contract call appears outside the SDK binding.Stop
Do not refactor existing working code beyond the mapping. Do not block legitimate custom calls without an explicit exception comment.
Acceptance
lib/contract.tsand the SDK.