Skip to content

Conversation

@soos3d
Copy link

@soos3d soos3d commented Dec 5, 2025

Summary

Adds Universal Account integration for Account Kit, enabling chain abstraction with Particle Network. This allows users to have a single account, balance, and interaction point across all supported chains (EVM + Solana).

The Universal Account is automatically available via Alchemy's AccountKit. The AccountKit config and usage are unchanged.

Features

  • Unified Balance: View and use assets across all chains as a single balance
  • Cross-Chain Transactions: Send transactions to any chain without manual bridging
  • Universal Gas: Pay gas fees with any supported token
  • Solana Support: Interact with both EVM and Solana chains

Changes

New Package: @account-kit/universal-account

  • UniversalAccountProvide(/aa-sdk/account-kit/universal-account/src/provider.tsx:81:0-198:1) - React context provider
  • useUniversalAccount(/aa-sdk/account-kit/universal-account/src/provider.tsx:216:0-263:1) - Hook to initialize and manage Universal Account
  • useUnifiedBalance(/aa-sdk/account-kit/universal-account/src/provider.tsx:265:0-342:1) - Hook to fetch unified balance across chains
  • useSendTransaction(/aa-sdk/account-kit/universal-account/src/provider.tsx:352:0-551:1) - Hook for cross-chain transactions (transfer, buy, sell, convert)
  • createUniversalAccountClient(/aa-sdk/account-kit/universal-account/src/client.ts:408:0-455:1) - Low-level client for non-React usage

Documentation

  • Added Universal Accounts guide under Transactions section

Tests

  • Unit tests for constants and client wrapper (21 tests)

Example

  • Next.js demo app in examples/next-example/(/aa-sdk/account-kit/universal-account/examples/next-example:0:0-0:0)

Pull Request Checklist

  • [✅ ] Did you add new tests and confirm existing tests pass? (yarn test)
  • [ ✅] Did you update relevant docs? (docs are found in the site folder, and guidelines for updating/adding docs can be found in the contribution guide)
  • [✅ ] Do your commits follow the Conventional Commits standard?
  • [ ✅] Does your PR title also follow the Conventional Commits standard?
  • [✅ ] If you have a breaking change, is it correctly reflected in your commit message? (e.g. feat!: breaking change)
  • [✅ ] Did you run lint (yarn lint:check) and fix any issues? (yarn lint:write)
  • [ ✅] Did you follow the contribution guidelines?

PR-Codex overview

This PR introduces the @account-kit/universal-account package, enabling integration with Particle Network for chain abstraction. It includes configuration files, components, and demo examples for a seamless user experience across multiple blockchain networks.

Detailed summary

  • Added favicon.ico, SVG icons, and configuration files for the demo app.
  • Implemented postcss.config.mjs and next.config.ts for Tailwind CSS and Next.js setup.
  • Created vitest.config.ts for testing configurations.
  • Developed a README.md for the demo app, detailing setup and usage.
  • Introduced various TypeScript configuration files for type safety.
  • Implemented components and hooks in the demo app for user authentication, unified balances, and transaction handling.
  • Added tests for the UniversalAccountClient to ensure functionality and correct parameter passing.
  • Updated documentation for third-party integration with Universal Accounts, including installation and usage instructions.

The following files were skipped due to too many changes: account-kit/universal-account/src/__tests__/client.test.ts, account-kit/universal-account/examples/next-example/app/components/UniversalAccountDemo.tsx, account-kit/universal-account/src/client.ts, account-kit/universal-account/src/provider.tsx, yarn.lock, account-kit/universal-account/README.md

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

…k integration

- Add Universal Account provider and hooks (useUniversalAccount, useUnifiedBalance, useSendTransaction)
- Support all transaction types: transfer, universal, buy, sell, convert
- Add CHAIN_ID and TOKEN_TYPE constants for supported chains
- Include Next.js demo app with comprehensive documentation
- Add step-by-step comments explaining the integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant