Skip to content

Conversation

@0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Oct 9, 2025

Added exports for ERC7702 MinimalAccount generated event and helper modules to both in-app.ts and in-app.native.ts. This includes event exports (Executed, SessionCreated, ValueReceived) and read/write helpers for session and policy management.


PR-Codex overview

This PR adds various exports related to the erc7702 extension for the MinimalAccount. It introduces new event and helper functions for managing sessions and policies for signers.

Detailed summary

  • Added exports for events: executedEvent, sessionCreatedEvent, valueReceivedEvent.
  • Introduced helper functions and types for session management and signer policies.
  • Included support checks for various signer-related operations.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • New Features
    • Expanded in-app wallet API with session key creation, execution helpers, and ERC-7702 event access.
    • Added utilities to read signer policies, session state/expiration, and transfer rules.
    • Introduced authentication helpers: pre-authenticate, authenticate, profile linking/unlinking, and user info retrieval (email/phone).
    • Added support for multi-step and single-step auth flows, social auth options, and auto-connect settings.
    • Passkey detection now available to check stored credentials.
    • Provided wallet UI icon utilities.
    • Available across web and native in-app wallet environments.

Added exports for ERC7702 MinimalAccount generated event and helper modules to both in-app.ts and in-app.native.ts. This includes event exports (Executed, SessionCreated, ValueReceived) and read/write helpers for session and policy management.
@0xFirekeeper 0xFirekeeper requested review from a team as code owners October 9, 2025 19:38
@changeset-bot
Copy link

changeset-bot bot commented Oct 9, 2025

⚠️ No Changeset found

Latest commit: e5d2b3c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-v2 Ready Ready Preview Comment Oct 9, 2025 7:57pm
nebula Ready Ready Preview Comment Oct 9, 2025 7:57pm
thirdweb_playground Ready Ready Preview Comment Oct 9, 2025 7:57pm
thirdweb-www Ready Ready Preview Comment Oct 9, 2025 7:57pm
wallet-ui Ready Ready Preview Comment Oct 9, 2025 7:57pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 9, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Oct 9, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 9, 2025

Walkthrough

Expanded public exports in two modules to include ERC7702 MinimalAccount events, read/write helpers, account/session helpers and types, and in-app wallet/auth APIs for both web and native targets. Added wallet icon utilities on web. No removals or renames.

Changes

Cohort / File(s) Summary
ERC7702 MinimalAccount events and helpers
packages/thirdweb/src/exports/wallets/in-app.native.ts, packages/thirdweb/src/exports/wallets/in-app.ts
Added exports for events (executedEvent, sessionCreatedEvent, valueReceivedEvent), domain (eip712Domain, isEip712DomainSupported), read helpers (call/session/transfer policies, wildcard signer), and write helpers (createSessionWithSig, execute, executeWithSig) including their param/types and isSupported checks.
Account session key helpers and types
packages/thirdweb/src/exports/wallets/in-app.native.ts, packages/thirdweb/src/exports/wallets/in-app.ts
Exported createSessionKey, isCreateSessionKeySupported, CreateSessionKeyOptions, and account types Condition, LimitType.
In-app wallet core types
packages/thirdweb/src/exports/wallets/in-app.native.ts, packages/thirdweb/src/exports/wallets/in-app.ts
Exported auth types (GetAuthenticatedUserParams, MultiStepAuthArgsType, SingleStepAuthArgsType) and wallet types (InAppWalletAuth, InAppWalletAutoConnectOptions, InAppWalletConnectionOptions, InAppWalletCreationOptions, InAppWalletSocialAuth).
Native auth APIs
packages/thirdweb/src/exports/wallets/in-app.native.ts
Exported authenticate, preAuthenticate, getProfiles, getUserEmail, getUserPhoneNumber, linkProfile, unlinkProfile from native auth.
Web auth APIs
packages/thirdweb/src/exports/wallets/in-app.ts
Exported authenticate, preAuthenticate, getProfiles, getUserEmail, getUserPhoneNumber, linkProfile, unlinkProfile from web auth.
Passkey helpers
packages/thirdweb/src/exports/wallets/in-app.native.ts, packages/thirdweb/src/exports/wallets/in-app.ts
Exported hasStoredPasskey from native/web passkeys respectively.
In-app wallet entry
packages/thirdweb/src/exports/wallets/in-app.native.ts, packages/thirdweb/src/exports/wallets/in-app.ts
Exported inAppWallet from native/web implementations respectively.
Wallet icon utilities (web only)
packages/thirdweb/src/exports/wallets/in-app.ts
Exported getSocialIcon, socialIcons.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description does not follow the repository’s required template and is missing the formatted title line with the issue tag, as well as the “Notes for the reviewer” and “How to test” sections specified in the template. It currently only summarizes the changes without the required headings or testing instructions. Please update the description to include the templated title format (e.g., “[SDK/Dashboard/Portal] Feature/Fix: …”), add a “Notes for the reviewer” section to highlight any important details, and provide a “How to test” section with steps or test cases.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly and concisely describes the primary change by explicitly stating that ERC7702 MinimalAccount helpers and events are being exported, which matches the modifications in the changeset without extraneous details. It is a single, focused sentence that would make sense in pull request history at a glance. There is no misleading or unrelated content.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch firekeeper/export-7702

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/thirdweb/src/exports/wallets/in-app.ts (1)

52-87: Add comprehensive TSDoc with @example and a custom annotation tag to all exported APIs.

  • packages/thirdweb/src/extensions/erc7702/account/createSessionKey.ts: missing @example and custom tag.
  • packages/thirdweb/src/extensions/erc7702/account/types.ts: no JSDoc on exported types.
  • packages/thirdweb/src/react/core/utils/walletIcon.ts: missing JSDoc/examples for getSocialIcon and socialIcons.
  • packages/thirdweb/src/wallets/in-app/web/lib/auth/index.ts: only getAuthenticatedUser is documented; add JSDoc with @example and custom tag for authenticate, getProfiles, getUserEmail, getUserPhoneNumber, linkProfile, preAuthenticate, unlinkProfile.
  • packages/thirdweb/src/wallets/in-app/web/lib/auth/passkeys.ts: no JSDoc on PasskeyWebClient methods.
  • packages/thirdweb/src/wallets/in-app/web/in-app.ts: has @example but missing a custom annotation tag.
packages/thirdweb/src/exports/wallets/in-app.native.ts (1)

61-83: Add missing @example block to hasStoredPasskey
The hasStoredPasskey export in packages/thirdweb/src/wallets/in-app/native/auth/passkeys.ts lacks an @example snippet; add a usage example per TSDoc guidelines.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6fc4d83 and e5d2b3c.

📒 Files selected for processing (2)
  • packages/thirdweb/src/exports/wallets/in-app.native.ts (1 hunks)
  • packages/thirdweb/src/exports/wallets/in-app.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from @/types where applicable
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size

Files:

  • packages/thirdweb/src/exports/wallets/in-app.native.ts
  • packages/thirdweb/src/exports/wallets/in-app.ts
packages/thirdweb/src/exports/**

📄 CodeRabbit inference engine (CLAUDE.md)

packages/thirdweb/src/exports/**: Export everything via exports/ directory, grouped by feature in the SDK public API
Every public symbol must have comprehensive TSDoc with at least one @example block that compiles and custom annotation tags (@beta, @internal, @experimental)

Files:

  • packages/thirdweb/src/exports/wallets/in-app.native.ts
  • packages/thirdweb/src/exports/wallets/in-app.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • packages/thirdweb/src/exports/wallets/in-app.native.ts
  • packages/thirdweb/src/exports/wallets/in-app.ts
packages/thirdweb/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling @example and a custom tag (@beta, @internal, @experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g., const { jsPDF } = await import("jspdf"))

Files:

  • packages/thirdweb/src/exports/wallets/in-app.native.ts
  • packages/thirdweb/src/exports/wallets/in-app.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
📚 Learning: 2025-07-18T19:19:55.613Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules

Applied to files:

  • packages/thirdweb/src/exports/wallets/in-app.native.ts
  • packages/thirdweb/src/exports/wallets/in-app.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Unit Tests
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/thirdweb/src/exports/wallets/in-app.ts (1)

61-64: LGTM: Web-specific social icon exports.

The social icon utilities are appropriately included only in the web export file, correctly differentiating from the native version.

packages/thirdweb/src/exports/wallets/in-app.native.ts (2)

3-60: LGTM: Consistent ERC7702 and account exports.

Lines 3-60 correctly mirror the web version, maintaining consistency across platforms for the ERC7702 helpers and account types.


61-83: LGTM: Native-specific exports are correctly scoped.

The native version appropriately excludes social icon exports and imports from native/ paths instead of web/, correctly differentiating the two platforms.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.51 KB (0%) 1.3 s (0%) 175 ms (+101.68% 🔺) 1.5 s
thirdweb (cjs) 365.79 KB (0%) 7.4 s (0%) 758 ms (+4.66% 🔺) 8.1 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 86 ms (+2317.29% 🔺) 200 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 56 ms (+2554.33% 🔺) 66 ms
thirdweb/react (minimal + tree-shaking) 19.13 KB (0%) 383 ms (0%) 46 ms (+818.08% 🔺) 429 ms

@0xFirekeeper 0xFirekeeper added the hotfix This pull request should be prioritized in the merge queue. label Oct 9, 2025
Copy link
Member Author

0xFirekeeper commented Oct 9, 2025

Merge activity

  • Oct 9, 7:45 PM UTC: The merge label 'hotfix' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 9, 7:59 PM UTC: The merge label 'hotfix' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.02%. Comparing base (6fc4d83) to head (e5d2b3c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8227   +/-   ##
=======================================
  Coverage   55.02%   55.02%           
=======================================
  Files         919      919           
  Lines       60583    60583           
  Branches     4126     4125    -1     
=======================================
  Hits        33333    33333           
- Misses      27146    27147    +1     
+ Partials      104      103    -1     
Flag Coverage Δ
packages 55.02% <ø> (ø)
see 1 file with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotfix This pull request should be prioritized in the merge queue. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants