docs(sdk): clarify _client param is not read in encrypt + disclose (#587)#622
Open
aggre wants to merge 1 commit into
Open
docs(sdk): clarify _client param is not read in encrypt + disclose (#587)#622aggre wants to merge 1 commit into
aggre wants to merge 1 commit into
Conversation
) Follow-up to #609. Aggre flagged these in #587's latest comment: 'Out of scope (separate follow-up): crypto.ts:encrypt and disclose.ts (sign/verify/reveal/verifyProof) carry the same unused-_client pattern.' Adds/extends docstrings on all 5 functions explaining: - no network I/O (local cryptographic operation) - _client accepted for forward-compatibility of the public signature, not read - retained so future versions may add client-bound behavior without breaking Wording adapted from #609 (do not call them 'pure local operation'): - encrypt: non-deterministic (fresh ephemeral keypair + random nonce per call) - disclose x4: WASM boundary (@docknetwork/crypto-wasm, lazy-initialized via ensureWasmInitialized) - reveal: documents intentional LemmaClient | undefined (createProof passes undefined internally) Docs-only. No code, signature, or behavior changes. tsc + eslint clean. Whitepaper refs: §2.1/§4.4 (crypto), §2.6/§4.6 (disclose).
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.
Summary
Follow-up to #587, mirroring merged #609. Aggre's latest comment on #587 explicitly flagged this as a separate follow-up:
#609 added docstrings to
prepareandnormalizeexplaining the unused_client: LemmaClientparameter. This PR applies the same treatment to the remaining 5 functions.Changes
packages/sdk/src/crypto.ts— new docstring onencryptpackages/sdk/src/disclose.ts— extended docstrings onsign,verify,reveal,verifyProofEach docstring explains:
_clientaccepted for forward-compatibility of the public signature, not readWording adaptation
#609's "pure local operation" phrasing is accurate for
prepare/normalize(in-memory Poseidon) but inaccurate for these functions, so the wording is adapted per function:encrypt— non-deterministic (fresh ephemeral keypair + random nonce per call via CSPRNG)sign/verify/reveal/verifyProof— WASM boundary (@docknetwork/crypto-wasm, lazy-initialized viaensureWasmInitialized)reveal— additionally documents the intentionalLemmaClient | undefinedtype (createProofcallsreveal(undefined, ...)internally)Scope
Docs-only. No code, signature, or behavior changes.
tsc+eslintclean on both modified files. Whitepaper refs: §2.1/§4.4 (crypto), §2.6/§4.6 (disclose).Closes #587 (final flagged follow-up item).