Skip to content

SDK/frontend parity: enforce all contract calls go through the SDK #141

Description

@samjay8

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    infraCI, deployment, repo toolingmediumStandard feature or fix — a single page, hook, or contract functionsdk@invofi/sdk package work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions