@zama-fhe/react-sdk 2.2.0 → 2.3.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -154,7 +154,7 @@ import { ZamaProvider } from "@zama-fhe/react-sdk";
154
154
  signer={signer} // GenericSigner (WagmiSigner, ViemSigner, EthersSigner, or custom)
155
155
  storage={storage} // GenericStorage
156
156
  sessionStorage={sessionStorage} // Optional. Session storage for wallet signatures. Default: in-memory (lost on reload).
157
- keypairTTL={86400} // Optional. Seconds the ML-KEM keypair remains valid. Default: 86400 (1 day).
157
+ keypairTTL={2592000} // Optional. Seconds the ML-KEM keypair remains valid. Default: 2592000 (30 days).
158
158
  sessionTTL={2592000} // Optional. Seconds the session signature remains valid. Default: 2592000 (30 days). 0 = re-sign every operation.
159
159
  onEvent={(event) => console.debug(event)} // Optional. Structured event listener for debugging.
160
160
  >
@@ -990,7 +990,7 @@ FHE decrypt credentials are generated once per wallet + contract set and cached
990
990
  1. **First decrypt** — SDK generates an FHE keypair, creates EIP-712 typed data, and prompts the wallet to sign. The encrypted credential is stored; the signature is cached in memory.
991
991
  2. **Same session** — Cached credentials and session signature are reused silently (no wallet prompt).
992
992
  3. **Page reload** — Encrypted credentials are loaded from storage; the wallet is prompted once to re-sign for the session.
993
- 4. **Expiry** — Credentials expire based on `keypairTTL` (default: 86400s = 1 day). After expiry, the next decrypt regenerates and re-prompts.
993
+ 4. **Expiry** — Credentials expire based on `keypairTTL` (default: 2592000s = 30 days). After expiry, the next decrypt regenerates and re-prompts.
994
994
  5. **Pre-authorization** — Call `useAllow(contractAddresses)` early to batch-authorize all contracts in one wallet prompt, avoiding repeated popups.
995
995
  6. **Check status** — Use `useIsAllowed()` to conditionally enable UI elements (e.g. disable "Reveal" until allowed).
996
996
  7. **Disconnect** — Call `useRevoke(contractAddresses)` or `await credentials.revoke()` to clear the session signature from memory.