Skip to content

refactor(examples): upgrade example-bnb to @zama-fhe/sdk 3.1.0-alpha.10#433

Draft
zama-cremaud wants to merge 1 commit into
prereleasefrom
feat/upgrade-example-bnb-3.1.0-alpha.10
Draft

refactor(examples): upgrade example-bnb to @zama-fhe/sdk 3.1.0-alpha.10#433
zama-cremaud wants to merge 1 commit into
prereleasefrom
feat/upgrade-example-bnb-3.1.0-alpha.10

Conversation

@zama-cremaud

Copy link
Copy Markdown
Contributor

Upgrades the example-bnb app from 3.0.0-alpha.34 to the 3.1.0-alpha.10 SDK line.

What changed

  • Bumps @zama-fhe/sdk and @zama-fhe/react-sdk to 3.1.0-alpha.10.
  • Permit hooks renamed: useIsAlloweduseHasPermit, useAllowuseGrantPermit.
  • Token hooks take the address directly instead of { tokenAddress, wrapperAddress }:
    • positional address: useUnshield, useResumeUnshield, useDelegateDecryption, useRevokeDelegation
    • { address } object: useConfidentialBalance, useConfidentialTransfer
  • useDelegationStatus config field tokenAddresscontractAddress; DelegationStatusData.isDelegatedisActive.
  • ZamaSDK.requireSigner removed → use sdk.signer with an explicit null check.
  • shield() lives on WrappedTokencreateToken becomes createWrappedToken in the manual ShieldCard flow.

Verification

  • npm run typecheck → exit 0 against the published 3.1.0-alpha.10 packages.

Part of the SDK-208 example-app upgrade rollout (one PR per app).

🤖 Generated with Claude Code

@cla-bot cla-bot Bot added the cla-signed label Jun 16, 2026
@github-actions

Copy link
Copy Markdown

Public API Changes

✅ No public API changes detected.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 92.13% (🎯 80%) 3105 / 3370
🔵 Statements 92.21% 3199 / 3469
🔵 Functions 92.45% (🎯 80%) 1041 / 1126
🔵 Branches 84.66% (🎯 80%) 1193 / 1409
File CoverageNo changed files found.
Generated in workflow #2597 for commit 8a819bf by the Vitest Coverage Report Action

Migrate the example-bnb app from 3.0.0-alpha.34 to the 3.1 SDK line:
- bump @zama-fhe/sdk and @zama-fhe/react-sdk pins to 3.1.0-alpha.10
- permit hooks renamed: useIsAllowed -> useHasPermit, useAllow -> useGrantPermit
- token hooks take the address directly: useUnshield/useResumeUnshield/
  useDelegateDecryption/useRevokeDelegation positional; useConfidentialBalance/
  useConfidentialTransfer take { address } (was { tokenAddress, wrapperAddress })
- useDelegationStatus config field tokenAddress -> contractAddress;
  DelegationStatusData.isDelegated -> isActive
- ZamaSDK.requireSigner removed: use sdk.signer with an explicit null check
- shield() lives on WrappedToken: createToken -> createWrappedToken in ShieldCard

Verified with `npm run typecheck` (exit 0) against the published
3.1.0-alpha.10 packages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zama-cremaud zama-cremaud force-pushed the feat/upgrade-example-bnb-3.1.0-alpha.10 branch from 8af63c6 to 8a819bf Compare June 16, 2026 22:43
@zama-cremaud zama-cremaud changed the title feat(examples): upgrade example-bnb to @zama-fhe/sdk 3.1.0-alpha.10 refactor(examples): upgrade example-bnb to @zama-fhe/sdk 3.1.0-alpha.10 Jun 16, 2026
@ankurdotb ankurdotb added the do not merge This is not ready to be merged, waiting on someone else's work label Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed do not merge This is not ready to be merged, waiting on someone else's work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants