Skip to content

[DOCS] all tabs: finish the 0.7 sweep for versions, ACPs, and encrypted types - #57

Closed
alexandrecarvalheira wants to merge 6 commits into
docs/sweep-client-sdk-guidesfrom
docs/sweep-versions
Closed

[DOCS] all tabs: finish the 0.7 sweep for versions, ACPs, and encrypted types#57
alexandrecarvalheira wants to merge 6 commits into
docs/sweep-client-sdk-guidesfrom
docs/sweep-versions

Conversation

@alexandrecarvalheira

Copy link
Copy Markdown
Collaborator

Stacked on #56. Once that merges this retargets to main and the diff shrinks to its own commits.

Every page checked and edited one at a time. After the scripted attempt produced real errors, this pass used no pattern replacement.

Versions

72 stale references across six pages, in two forms that had drifted apart on the same page: install commands said one thing, the package table beside them said another.

@cofhe/* 0.5.2 to 0.7.1, cofhe-contracts 0.1.3 to 0.2.0. Every documented import path verified to resolve in the published tarballs. Historical references ("added in cofhe-contracts@v0.1.2") deliberately left alone.

The Foundry plugin renamed its Solidity API too

A JS-only rename would have missed this entirely:

Old 0.7.1
createInEuintN(v) createExternalEuintN(v, consumingContract) returning (handle, proof)
permit_createSelf() ACP_createSelf()
decryptForTx_withoutPermit decryptForTx_withoutACP
Permission struct ACP, from the same Permissioned.sol

The missing type family

sharedEuintXX was not documented anywhere. inputs.mdx now has a section on passing encrypted values between contracts, and encrypted-operations and the FHE.sol reference list all three families side by side.

It matters beyond naming: FHE operations check the permission of the contract performing them, not the caller, so a function taking a bare euintXX can be handed any handle that contract is allowed on and made to return something derived from it. The page says so, and covers the Param vs FromCall receive rule.

A revert worth reading

I first wrote the multi-input examples as separate calls:

euint8 a = FHE.asEuint8(hashA, proof);
euint8 b = FHE.asEuint8(hashB, proof);   // reverts

One signature covers keccak(hashA ‖ hashB), so verifying each hash against it individually fails. They now use FHE.asEuint8s(inputs, proof). Four blocks had this shape.

FheOS accuracy

what-is-cofhe.mdx said the FheOS Server "executes the actual FHE computations" and omitted the FHE Engine from the component table. STYLE.md is explicit that FheOS verifies and queues work and does not execute FHE operations. Both rows corrected.

Out of scope, deliberately

deep-dive/, cofhejs/, fhe-library/confidential-contracts/ (its own branch), and tutorials/ (4 pages, deferred).

Also left in old form on purpose: the old-API column of the mock-contracts 0.4 mapping table, the cofhejs column of the cofhejs guide, the // Before blocks in the 0.7 guide, and sentences naming a removed symbol in order to say it was removed.

Vale and lint-docs.py exit 0 on every changed file. mint validate and mint broken-links --check-anchors --check-redirects pass.

🤖 Generated with Claude Code

alexandrecarvalheira and others added 6 commits August 25, 2026 22:16
72 stale version references across six pages: 58 in install commands and
14 in the package tables beside them, which had drifted apart from each
other on the same page.

- @cofhe/* packages: 0.5.2 to 0.7.1
- @fhenixprotocol/cofhe-contracts: 0.1.3 to 0.2.0

Also drops a note claiming cofhe-contracts 0.2.0 needs @cofhe/sdk >= 0.5.1
with 0.5.2 as latest. It now states the real pairing and points at the
compatibility page rather than repeating a table that goes stale.

Verified against npm, and every documented import path resolves in the
published tarballs: FHE.sol in cofhe-contracts 0.2.0, and all five
fhenix-confidential-contracts paths in 0.4.0.

Historical references are left alone. 'added in cofhe-contracts@v0.1.2'
is a fact about when something shipped, not a stale pin.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The card was titled Cofhejs and linked to the legacy tab, while the
comment above it read {/* @SDK */}. cofhejs is superseded by @cofhe/sdk,
so the landing page was sending readers to the wrong library.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both pages described the 0.6 shape: a signed EncryptedItemInput per value
and permits managed through client.permits.

They now describe one batch (a handle per input plus a shared signature,
with the consuming contract declared before signing) and ACPs through
client.acp. The sequence diagram carries the same correction, since it
showed CoFHE returning a signed EncryptedItemInput.

The @cofhe/sdk/permits entrypoint is now @cofhe/sdk/acps. Checked against
the 0.7.1 package exports, where ./permits no longer resolves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every remaining client-sdk page, checked one at a time against the 0.7.1
packages rather than swept with a pattern.

Prose and the SDK API move to ACP: client.acp, withACP/withoutACP,
ACPUtils, and the @cofhe/sdk/acps entrypoint, which is what the package
actually exports now (./permits no longer resolves).

The Foundry plugin renamed its Solidity API too, which a JS-only rename
would have missed: createInEuintN became createExternalEuintN and now
takes the consuming contract and returns a (handle, proof) pair;
permit_createSelf became ACP_createSelf; decryptForTx_withoutPermit
became decryptForTx_withoutACP; the Permission struct is now ACP,
imported from the same Permissioned.sol.

Examples move to the batch shape: setConsumingContract before execute,
and a destructure that accounts for the trailing signature.

Deliberately left alone: the old-API column of the mock-contracts 0.4
mapping table, the cofhejs column of the cofhejs guide, the Before
blocks in the 0.7 guide, and the sentences that name a removed symbol in
order to explain that it was removed.

Also corrects the localcofhe chain id, which the pre-configured networks
table left blank, and drops assertCorrectEncryptedItemInput from the
entrypoint list since it resolves to zero files in 0.7.1.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
InEuintXX is deleted in cofhe-contracts 0.2.0. Every affected function
signature now takes externalEuintXX plus the bytes proof that
authenticates it, and each FHE.asEuintXX call passes both.

Adds the type family that was missing entirely: sharedEuintXX, for values
handed from one contract to another. inputs.mdx gains a section on it,
covering the Param and FromCall receive forms and why the type exists,
which is that FHE operations check the permission of the contract doing
them rather than the caller, so a bare euintXX parameter is a disclosure
path. encrypted-operations and the FHE.sol reference now list all three
families side by side.

The multi-input examples use the plural asEuintXXs form. Two inputs share
one batch signature, so converting them one at a time verifies each hash
against a signature covering both and reverts. Signatures checked against
FHE.sol 0.2.0 rather than inferred.

confidential-contracts is untouched and stays for its own branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ermits to ACPs

The component table said the FheOS Server executes the FHE computations
and left the FHE Engine out of the table entirely. STYLE.md is explicit
that FheOS verifies and queues incoming work and does not execute FHE
operations, and that the FHE Engine is what executes them. Both rows are
now correct.

Also renames permits to ACPs across the page, including the flow diagram
and the link to the ACP guide.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant