add React docs section (@cofhe/react) and replace quick-start stub#28
Draft
roeezolantz wants to merge 1 commit into
Draft
add React docs section (@cofhe/react) and replace quick-start stub#28roeezolantz wants to merge 1 commit into
roeezolantz wants to merge 1 commit into
Conversation
@cofhe/react 0.5.2 ships providers, hooks, an SSR-safe SDK boundary, a
styled UI kit, and a token portal. The docs had only a stub
quick-start page saying the library was 'currently in development'.
- New nav group 'React' under the Client SDK tab with three pages:
- getting-started: install, CofheProvider, hooks-only vs styled UI
entrypoints, react.* config (projectName, logger, position, theme),
SSR notes.
- hooks: client/connection (useCofheClient, useCofheConnection,
useCofheConnect, useCofheAutoConnect), coprocessor status
(useCofheEnabled), permits (useCofheActivePermit and the typed
ValidationResult.error union), encryption (useCofheEncrypt,
useEncryptInput), reads (useCofheReadContract,
useCofheReadContractAndDecrypt) with the renamed
disabledDueToMissingValidPermit flag called out, writes
(useCofheWriteContract), and the full CoFHE token-helper surface.
- components-and-portal: CofheEncryptInput props,
CofheFloatingButton portal, wallet-disconnected projectName
behavior, custom-token import flow.
- Replace the quick-start/react.mdx stub with a real walkthrough that
links into the new section.
- docs.json: add the 'React' group between Foundry Plugin and
Examples.
Co-authored-by: multica-agent <github@multica.ai>
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
@cofhe/reactis a fully-shipped library (currently0.5.2) with providers, hooks for connection / permits / encryption / decryption / contract reads & writes / token helpers, and a styled UI kit including theCofheFloatingButtonportal. The docs had only one page about it — a stub quick-start saying it was "currently in development." This PR replaces the stub and adds a real three-page React section.Together this covers gaps B-1 and A-5 from the docs audit on XDL-11.
Where the underlying changes were made
All shipped in
@cofhe/react@0.5.0, with two patches since:useCofheEnabledhook — changeset `09bf7c9`. ReadsTaskManager.isEnabled()reactively.onPollcallback end-to-end — changeset `788a6e2`. See also docs PR #20 for the corresponding SDK guide updates.disabledDueToMissingPermit→disabledDueToMissingValidPermitrename — changeset `9a06012`. Source: `useCofheReadContract.ts#L183-L231`, `useCofheReadContractAndDecrypt.ts#L77-L100`, `useCofheTokenDecryptedBalance.ts#L34-L84`.useCofheTokens— changeset `7b1f4c3`.react.projectName— changeset `f857263`.createCofheConfig({ react: { logger } })— changeset `503536a`.@cofhe/sdk/weblazy-loads tfhe) — `@cofhe/sdk@0.5.1` — `342fd0f`.Source layout (every reference is from
packages/react/src/):Changes
client-sdk/react/getting-started.mdxCofheProviderprops table (config-only vs pass-an-existing-client modes), thereact.*config options table (projectName,logger,position,initialTheme), hooks-only vs@cofhe/react/uistyled-UI entrypoints, SSR notes.client-sdk/react/hooks.mdxuseCofheEnabled), Permits (typedValidationResult.error), Encryption (useCofheEncrypt,useEncryptInput), Reading encrypted state (with thedisabledDueToMissingValidPermitrename<Note>), Writing encrypted state, and the full CoFHE token-helper surface. Cross-references the TaskManager and Permits deep-dives.client-sdk/react/components-and-portal.mdxCofheEncryptInputprops table, theCofheFloatingButtonportal mount snippet, wallet-disconnectedprojectNamebehavior, position/theme config, the custom-token import flow, bundling notes (CSS auto-load on/ui, MUI peer removed).client-sdk/quick-start/react.mdxdocs.jsonTest plan
/client-sdk/react/*./client-sdk/guides/permits#validating-permits/deep-dive/cofhe-components/task-manager#enable--disable-switch/client-sdk/react/getting-started#react-config-options