[DOCS] handles page, and the onchain ACP sharing registry - #60
Merged
Conversation
…oes not give you unwrap and wrap were documented only as bare signatures in the utility reference, which left the question they actually raise unanswered. The new page states it: both are internal pure casts over the same bytes32, and wrapping grants nothing. The type records what kind of value this is, the ACL decides whether you may use it, and wrap touches only the first. Wrapping an arbitrary handle succeeds; the first FHE operation on it reverts. Covers when unwrap is right (storage slots, events, mapping keys, identity comparison), when wrap is right (recovering a handle the contract already owns), and routes the arrived-from-outside case to the typed forms rather than a guarded bare handle: externalEuintXX with its proof, receiveEuintXXParam for an argument, receiveEuintXXFromCall for a return value. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The section was four lines and a code block. It now covers who calls each
method, which of them send transactions, and what the registry does.
Checked against the published ACP page rather than the SDK source alone,
which corrected four things: shareOnChain returns { txHash, shareId },
getIncomingShares filters to still-importable shares, importFromChain
also stores and activates the ACP, and cancelShare only works on a share
that has not been imported yet.
Drops a claim I could not support. Both cancelShare and dismissShare
resolve to the same registry call in the SDK, but that does not mean
either party can clear any share, since the registry's own authorization
was not verified. The note now says only that they share a call and are
named for who is acting.
Adds the privacy caveat: posting onchain makes the issuer to recipient
relationship public, which the offline route avoids.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Item 3 on the queue: a home for wrap/unwrap, and a proper explanation of onchain shared ACPs.
New page: handles, wrap, and unwrap
unwrapandwrapexisted only as bare signatures in the utility reference, which left unanswered the question they actually raise. The new page answers it.Both are
internal purecasts over the samebytes32. No cryptography, no TaskManager call, no storage. The load-bearing point:So
FHE.wrapEuint32(someHandleFromAnEvent)succeeds, and the first FHE operation on it reverts. That asymmetry is the thing worth writing down, because the cast looks like acquisition and isn't.The page covers when
unwrapis right (genericbytes32slots, events, mapping keys, identity comparison as distinct fromFHE.eq), whenwrapis right (recovering a handle the contract already owns), and the case where neither is: a value that arrived from outside. That routes to the typed forms rather than a guarded bare handle, since there is one for every way a value can reach you.externalEuintXX+bytesproofFHE.asEuintXX(handle, proof)sharedEuintXXreceiveEuintXXParam, checks sharer ismsg.sendersharedEuintXXreceiveEuintXXFromCall, checks sharer is the calleeeuintXXwrapEuintXXPlaced after
inputsin Core Concepts, which is where the type families are introduced.Onchain ACP sharing, expanded
Four lines and a code block became a method table with the actor, the transaction-versus-read distinction, and the registry config shape.
Verified against the published ACP page, not just the SDK source, which corrected four things I had wrong or missing:
shareOnChainreturns{ txHash, shareId };getIncomingSharesfilters to still-importable shares;importFromChainalso stores and activates the ACP; andcancelShareonly works on a share not yet imported.One claim removed. I had written that
dismissShareandcancelShare"do the same thing, either side can clear a share." The first half is true, both resolve to the sameremoveShareOnChain(shareId)in the SDK. The second half was my inference from identical implementations, and I never verified what the registry contract authorizes per caller. The note now says only what I can back.Also adds the privacy caveat: posting onchain makes the issuer-to-recipient relationship public, which the offline route avoids.
Vale and
lint-docs.pyexit 0.mint validateandmint broken-links --check-anchors --check-redirectspass.🤖 Generated with Claude Code