Skip to content

feat: serialize caipAddress on allAccounts#5535

Merged
tomiir merged 2 commits intomainfrom
tomiir/serialize-allaccounts
Feb 16, 2026
Merged

feat: serialize caipAddress on allAccounts#5535
tomiir merged 2 commits intomainfrom
tomiir/serialize-allaccounts

Conversation

@tomiir
Copy link
Collaborator

@tomiir tomiir commented Feb 12, 2026

Summary

  • Adds optional caipAddress field to AccountTypeMap and Connection.accounts, constructed from connection.caipNetwork.caipNetworkId:address (CAIP-10 format)
  • Populates caipAddress on each account in allAccounts across all 3 construction sites: React hook, Vue hook, and base client getAccount()
  • Fixes Vue useAppKitAccount() hook which previously never populated allAccounts (always returned [])

Test plan

  • pnpm build passes (all 23 packages)
  • pnpm test passes (246 test files, 3162 tests)
  • pnpm run prettier:format clean
  • Verify allAccounts[n].caipAddress returns correct CAIP-10 format in a connected wallet scenario

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 12, 2026 10:03
@vercel
Copy link

vercel bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
appkit-basic-html Ready Ready Preview, Comment Feb 16, 2026 0:23am
appkit-demo Ready Ready Preview, Comment Feb 16, 2026 0:23am
appkit-gallery Ready Ready Preview, Comment Feb 16, 2026 0:23am
appkit-headless-sample-app Ready Ready Preview, Comment Feb 16, 2026 0:23am
appkit-laboratory Ready Ready Preview, Comment Feb 16, 2026 0:23am
10 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-basic-example Ignored Ignored Feb 16, 2026 0:23am
appkit-basic-sign-client-example Ignored Ignored Feb 16, 2026 0:23am
appkit-basic-up-example Ignored Ignored Feb 16, 2026 0:23am
appkit-ethers5-bera Ignored Ignored Feb 16, 2026 0:23am
appkit-nansen-demo Ignored Ignored Feb 16, 2026 0:23am
appkit-vue-solana Ignored Ignored Feb 16, 2026 0:23am
appkit-wagmi-cdn-example Ignored Ignored Feb 16, 2026 0:23am
ethereum-provider-wagmi-example Ignored Ignored Feb 16, 2026 0:23am
next-wagmi-solana-bitcoin-example Ignored Ignored Feb 16, 2026 0:23am
vue-wagmi-example Ignored Ignored Feb 16, 2026 0:23am

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Feb 12, 2026

🦋 Changeset detected

Latest commit: 48c3485

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@reown/appkit-universal-connector Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit-wallet-button Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-utils Patch
@reown/appkit-experimental Patch
@reown/appkit-controllers Patch
@reown/appkit-core Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-polyfills Patch
@reown/appkit-codemod Patch
@reown/appkit-testing Patch
@reown/appkit Patch
@reown/appkit-common Patch
@reown/appkit-wallet Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-cdn Patch
@reown/appkit-cli Patch
@reown/appkit-pay Patch
@reown/appkit-ui Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Visual Regression Test Results ✅ Passed

⚠️ 15 visual change(s) detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=754
Storybook Preview: https://6493191bf4b10fed8ca7353f-ngjjrkcupy.chromatic.com/

👉 Please review the visual changes in Chromatic and accept or reject them.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds CAIP-10 (caipAddress) serialization to allAccounts across the React hook, Vue hook, and the base client getAccount() API, and fixes the Vue useAppKitAccount() hook to actually populate allAccounts.

Changes:

  • Extend account-related types to optionally include caipAddress (AccountTypeMap and Connection.accounts).
  • Thread caipAddress through CoreHelperUtil.createAccount(...) and populate it when building allAccounts (React, Vue, base client).
  • Update Vue useAppKitAccount() to compute allAccounts from ConnectionController.getConnections(...).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/controllers/src/utils/TypeUtil.ts Adds optional caipAddress to AccountTypeMap.
packages/controllers/src/utils/CoreHelperUtil.ts Extends createAccount to accept/store optional caipAddress.
packages/controllers/exports/vue.ts Populates allAccounts (and caipAddress) from controller connections in the Vue hook.
packages/controllers/exports/react.ts Populates allAccounts[n].caipAddress when constructing accounts in the React hook.
packages/common/src/utils/TypeUtil.ts Extends Connection.accounts[] type to optionally include caipAddress.
packages/appkit/src/client/appkit-base-client.ts Populates allAccounts[n].caipAddress in getAccount().
.changeset/rare-brooms-smell.md Publishes patch bumps and notes CAIP address serialization change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

📦 Bundle Size Check

All bundles are within size limits

📊 View detailed bundle sizes

> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit


> size-limit

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         75.5 kB with all dependencies, minified and gzipped
Loading time: 1.5 s   on slow 3G
Running time: 326 ms  on Snapdragon 410
Total time:   1.9 s
@reown/appkit/react
Size limit:   235 kB
Size:         233.59 kB with all dependencies, minified and gzipped
Loading time: 4.6 s     on slow 3G
Running time: 868 ms    on Snapdragon 410
Total time:   5.5 s
@reown/appkit/vue
Size limit:   80 kB
Size:         75.5 kB with all dependencies, minified and gzipped
Loading time: 1.5 s   on slow 3G
Running time: 457 ms  on Snapdragon 410
Total time:   2 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         213.51 kB with all dependencies, minified and gzipped
Loading time: 4.2 s     on slow 3G
Running time: 822 ms    on Snapdragon 410
Total time:   5 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.16 kB with all dependencies, minified and gzipped
Loading time: 258 ms   on slow 3G
Running time: 116 ms   on Snapdragon 410
Total time:   373 ms

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.63% 39532 / 50274
🔵 Statements 78.63% 39532 / 50274
🔵 Functions 76.36% 4251 / 5567
🔵 Branches 86.69% 9625 / 11102
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/adapters/bitcoin/src/adapter.ts 83.53% 82.64% 70.96% 83.53% 72-85, 88, 141, 208-209, 312, 315-334, 415-416, 423-424, 456-457, 469-470, 521-522, 578-581, 585-619, 623-624
packages/adapters/ethers/src/client.ts 64.36% 75.96% 63.63% 64.36% 110-111, 124-125, 148-149, 163-186, 199-235, 241-242, 249-266, 295-296, 391-416, 419-424, 437-438, 448-469, 475-477, 480-481, 508, 537-538, 546-547, 575-580, 599-658, 665-666, 688, 717-718, 729-730, 764-765, 769, 784-785, 802-807, 816-834, 840-841, 850-851, 862-863, 869-881
packages/adapters/ethers5/src/client.ts 59.59% 73.68% 63.63% 59.59% 70-91, 107-108, 121-122, 145-146, 160-183, 196-232, 235-236, 242-243, 250-267, 386-411, 414-419, 432-433, 443-464, 470-472, 475-476, 503, 532-533, 541-542, 570-575, 579-638, 660-661, 683, 712-713, 725-726, 763-764, 768, 782-807, 815-833, 839-840, 849-850, 861-862, 868-880
packages/adapters/wagmi/src/client.ts 75.41% 66.66% 79.54% 75.41% 125-126, 131-132, 146-156, 217-218, 258-261, 371-372, 386, 396-397, 410-411, 488-489, 501-502, 543-544, 561-576, 590-607, 627-628, 641-650, 661-662, 666-667, 672-704, 723-732, 736-742, 745-756, 765-766, 777-778, 799-801, 815-816, 829-830, 845-846, 889-890, 914-915, 923-924, 929-930, 937-938, 946-947, 952-953, 962-963, 971-972, 977-978, 984-1006, 1009-1022
packages/appkit/src/client/appkit-base-client.ts 73.03% 85.58% 76.69% 73.03% 184-190, 210, 223-226, 229, 241-242, 248-249, 252, 261, 308-309, 355-356, 394-395, 397-398, 403-404, 485-486, 522-528, 599-600, 622-637, 640, 674-675, 678, 719-723, 730-731, 734-735, 740-741, 752-775, 784-785, 802-822, 826-847, 850-876, 879-885, 888-894, 897-903, 906-912, 915-925, 928-934, 937-944, 958-967, 970-976, 979-980, 983-984, 1003-1004, 1027-1067, 1074-1086, 1092-1119, 1122-1132, 1164-1165, 1190-1191, 1196, 1211-1227, 1241, 1245-1253, 1284-1285, 1304-1307, 1311-1312, 1314-1315, 1349-1351, 1355-1376, 1381-1382, 1390-1391, 1393-1394, 1488-1489, 1501-1502, 1507, 1530-1535, 1582, 1603-1604, 1613, 1615-1631, 1636, 1682-1683, 1695-1706, 1752-1765, 1810, 1816-1820, 1841-1856, 1859-1860, 1886-1889, 1925-1944, 1976, 2019-2020, 2026-2052, 2273-2274, 2311-2312, 2315-2316, 2332-2335, 2338-2339, 2359-2360, 2363-2364, 2385, 2406-2407, 2410-2420, 2424-2425, 2439, 2447, 2466-2467, 2473-2474, 2505-2510, 2528-2529, 2532-2533, 2580-2581, 2652-2653, 2656-2657, 2660-2663, 2666-2667, 2670-2671, 2674-2675, 2678-2679, 2682-2686, 2695-2704, 2713-2724, 1374, 2419
packages/appkit/src/universal-adapter/client.ts 52.91% 56.66% 34.21% 52.91% 18-19, 33-42, 61-64, 98-102, 108, 110-114, 120, 130-163, 172-175, 178-181, 184-187, 189-192, 195-196, 199-200, 203-204, 207-208, 211-212, 215-216, 219-226, 239, 243-246, 262-263, 271-34, 131-185
packages/common/src/utils/TypeUtil.ts 100% 100% 100% 100%
packages/controllers/exports/react.ts 88.47% 87.65% 46.15% 88.47% 70-79, 101-109, 126, 149, 543, 545-553, 570-571, 141-167, 442-573
packages/controllers/exports/vue.ts 91.4% 85.07% 60% 91.4% 114, 150-152, 209-214, 224, 229, 234, 239, 248, 311-314, 350-353, 377, 382, 387, 396
packages/controllers/src/utils/CoreHelperUtil.ts 74.55% 85.79% 66.3% 74.55% 22-23, 42, 67-68, 84, 88, 95-96, 112-113, 124, 147-148, 184, 200-201, 219-225, 255-256, 268-276, 323-328, 336, 352, 360, 362, 364-365, 375-380, 384-387, 397, 402, 407-413, 415, 478, 482-486, 495-498, 501-503, 507-522, 525-549, 552-556, 437
Generated in workflow #16857 for commit 48c3485 by the Vitest Coverage Report Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Warnings
⚠️

🔑 Potential UUID detected in packages/adapters/wagmi/src/tests/client.test.ts (line 411): 07ba87ed-43aa-4adf-4...

Generated by 🚫 dangerJS against 48c3485

Refactors createAccount to accept caipAddress as sole identity input,
deriving namespace, address, and chainId from it via ParseUtil.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tomiir tomiir merged commit 249beb6 into main Feb 16, 2026
58 of 64 checks passed
@tomiir tomiir deleted the tomiir/serialize-allaccounts branch February 16, 2026 13:31
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants